char ifname[IFNAMSIZ] = {0,};
int wlaninitmode = WLAN_INIT_MODE_DEFAULT;
-unsigned int bypasswmi = 0;
+static bool bypasswmi;
unsigned int debuglevel = 0;
int tspecCompliance = ATHEROS_COMPLIANCE;
unsigned int busspeedlow = 0;
module_param_string(ifname, ifname, sizeof(ifname), 0644);
module_param(wlaninitmode, int, 0644);
module_param(bmienable, int, 0644);
-module_param(bypasswmi, uint, 0644);
+module_param(bypasswmi, bool, 0644);
module_param(debuglevel, uint, 0644);
module_param(tspecCompliance, int, 0644);
module_param(onebitmode, uint, 0644);
/*
* HTC service connection handlers
*/
-static A_STATUS ar6000_avail_ev(void *context, void *hif_handle);
+static int ar6000_avail_ev(void *context, void *hif_handle);
-static A_STATUS ar6000_unavail_ev(void *context, void *hif_handle);
+static int ar6000_unavail_ev(void *context, void *hif_handle);
-A_STATUS ar6000_configure_target(AR_SOFTC_T *ar);
+int ar6000_configure_target(AR_SOFTC_T *ar);
-static void ar6000_target_failure(void *Instance, A_STATUS Status);
+static void ar6000_target_failure(void *Instance, int Status);
static void ar6000_rx(void *Context, HTC_PACKET *pPacket);
struct bin_attribute *bin_attr,
char *buf, loff_t pos, size_t count);
-static A_STATUS
+static int
ar6000_sysfs_bmi_init(AR_SOFTC_T *ar);
/* HCI PAL callback function declarations */
-A_STATUS ar6k_setup_hci_pal(AR_SOFTC_T *ar);
+int ar6k_setup_hci_pal(AR_SOFTC_T *ar);
void ar6k_cleanup_hci_pal(AR_SOFTC_T *ar);
static void
ar6000_sysfs_bmi_deinit(AR_SOFTC_T *ar);
-A_STATUS
+int
ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, A_UINT32 mode);
/*
static struct ar_cookie *ar6000_alloc_cookie(AR_SOFTC_T *ar);
#ifdef USER_KEYS
-static A_STATUS ar6000_reinstall_keys(AR_SOFTC_T *ar,A_UINT8 key_op_ctrl);
+static int ar6000_reinstall_keys(AR_SOFTC_T *ar,A_UINT8 key_op_ctrl);
#endif
#ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT
*/
#define REPORT_DEBUG_LOGS_TO_APP
-A_STATUS
+int
ar6000_set_host_app_area(AR_SOFTC_T *ar)
{
A_UINT32 address, data;
{
A_UINT32 param;
A_UINT32 address;
- A_STATUS status;
+ int status;
address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_dbglog_hdr));
if ((status = ar6000_ReadDataDiag(ar->arHifDevice, address,
ar6000_init_module(void)
{
static int probed = 0;
- A_STATUS status;
+ int status;
OSDRV_CALLBACKS osdrvCallbacks;
a_module_debug_support_init();
A_UINT32 numbytes;
A_UINT32 throughput;
AR_SOFTC_T *ar;
- A_STATUS status;
+ int status;
ar = (AR_SOFTC_T *)arg;
A_ASSERT(ar != NULL);
return count;
}
-static A_STATUS
+static int
ar6000_sysfs_bmi_init(AR_SOFTC_T *ar)
{
- A_STATUS status;
+ int status;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Creating sysfs entry\n"));
A_MEMZERO(&ar->osDevInfo, sizeof(HIF_DEVICE_OS_DEVICE_INFO));
&ar->osDevInfo,
sizeof(HIF_DEVICE_OS_DEVICE_INFO));
- if (A_FAILED(status)) {
+ if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI: Failed to get OS device info from HIF\n"));
return A_ERROR;
}
}
#endif /* SOFTMAC_FILE_USED */
-static A_STATUS
+static int
ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, A_UINT32 address, A_BOOL compressed)
{
- A_STATUS status;
+ int status;
const char *filename;
const struct firmware *fw_entry;
A_UINT32 fw_entry_size;
}
if (eppingtest) {
- bypasswmi = TRUE;
+ bypasswmi = true;
if (ar->arVersion.target_ver == AR6003_REV1_VERSION) {
filename = AR6003_REV1_EPPING_FIRMWARE_FILE;
} else if (ar->arVersion.target_ver == AR6003_REV2_VERSION) {
}
#endif /* INIT_MODE_DRV_ENABLED */
-A_STATUS
+int
ar6000_update_bdaddr(AR_SOFTC_T *ar)
{
return A_OK;
}
-A_STATUS
+int
ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, A_UINT32 mode)
{
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Requesting device specific configuration\n"));
#ifdef INIT_MODE_DRV_ENABLED
} else {
/* The config is contained within the driver itself */
- A_STATUS status;
+ int status;
A_UINT32 param, options, sleep, address;
/* Temporarily disable system sleep */
return A_OK;
}
-A_STATUS
+int
ar6000_configure_target(AR_SOFTC_T *ar)
{
A_UINT32 param;
/* since BMIInit is called in the driver layer, we have to set the block
* size here for the target */
- if (A_FAILED(ar6000_set_htc_params(ar->arHifDevice,
- ar->arTargetType,
- mbox_yield_limit,
- 0 /* use default number of control buffers */
- ))) {
+ if (ar6000_set_htc_params(ar->arHifDevice, ar->arTargetType,
+ mbox_yield_limit, 0)) {
+ /* use default number of control buffers */
return A_ERROR;
}
if (setupbtdev != 0) {
- if (A_FAILED(ar6000_set_hci_bridge_flags(ar->arHifDevice,
- ar->arTargetType,
- setupbtdev))) {
+ if (ar6000_set_hci_bridge_flags(ar->arHifDevice,
+ ar->arTargetType,
+ setupbtdev)) {
return A_ERROR;
}
}
/*
* HTC Event handlers
*/
-static A_STATUS
+static int
ar6000_avail_ev(void *context, void *hif_handle)
{
int i;
#ifdef ATH6K_CONFIG_CFG80211
struct wireless_dev *wdev;
#endif /* ATH6K_CONFIG_CFG80211 */
- A_STATUS init_status = A_OK;
+ int init_status = A_OK;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("ar6000_available\n"));
if (ar_netif) {
HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
A_MEMZERO(&osDevInfo, sizeof(osDevInfo));
- if ( A_SUCCESS( HIFConfigureDevice(hif_handle, HIF_DEVICE_GET_OS_DEVICE,
- &osDevInfo, sizeof(osDevInfo))) ) {
+ if (!HIFConfigureDevice(hif_handle, HIF_DEVICE_GET_OS_DEVICE,
+ &osDevInfo, sizeof(osDevInfo))) {
SET_NETDEV_DEV(dev, osDevInfo.pOSDevice);
}
}
if ((wlaninitmode == WLAN_INIT_MODE_UDEV) ||
(wlaninitmode == WLAN_INIT_MODE_DRV))
{
- A_STATUS status = A_OK;
+ int status = A_OK;
do {
if ((status = ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != A_OK)
{
(unsigned long)ar));
avail_ev_failed :
- if (A_FAILED(init_status)) {
+ if (init_status) {
if (bmienable) {
ar6000_sysfs_bmi_deinit(ar);
}
return init_status;
}
-static void ar6000_target_failure(void *Instance, A_STATUS Status)
+static void ar6000_target_failure(void *Instance, int Status)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)Instance;
WMI_TARGET_ERROR_REPORT_EVENT errEvent;
}
}
-static A_STATUS
+static int
ar6000_unavail_ev(void *context, void *hif_handle)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
void
ar6000_restart_endpoint(struct net_device *dev)
{
- A_STATUS status = A_OK;
+ int status = A_OK;
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
BMIInit();
// FIXME: workaround to reset BT's UART baud rate to default
if (NULL != ar->exitCallback) {
AR3K_CONFIG_INFO ar3kconfig;
- A_STATUS status;
+ int status;
A_MEMZERO(&ar3kconfig,sizeof(ar3kconfig));
ar6000_set_default_ar3kconfig(ar, (void *)&ar3kconfig);
}
/* connect to a service */
-static A_STATUS ar6000_connectservice(AR_SOFTC_T *ar,
+static int ar6000_connectservice(AR_SOFTC_T *ar,
HTC_SERVICE_CONNECT_REQ *pConnect,
char *pDesc)
{
- A_STATUS status;
+ int status;
HTC_SERVICE_CONNECT_RESP response;
do {
pConnect,
&response);
- if (A_FAILED(status)) {
+ if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,(" Failed to connect to %s service status:%d \n",
pDesc, status));
break;
int ar6000_init(struct net_device *dev)
{
AR_SOFTC_T *ar;
- A_STATUS status;
+ int status;
A_INT32 timeleft;
A_INT16 i;
int ret = 0;
*/
status = HTCWaitTarget(ar->arHtcTarget);
- if (A_FAILED(status)) {
+ if (status) {
break;
}
status = ar6000_connectservice(ar,
&connect,
"WMI CONTROL");
- if (A_FAILED(status)) {
+ if (status) {
break;
}
status = ar6000_connectservice(ar,
&connect,
"WMI DATA BE");
- if (A_FAILED(status)) {
+ if (status) {
break;
}
status = ar6000_connectservice(ar,
&connect,
"WMI DATA BK");
- if (A_FAILED(status)) {
+ if (status) {
break;
}
status = ar6000_connectservice(ar,
&connect,
"WMI DATA VI");
- if (A_FAILED(status)) {
+ if (status) {
break;
}
status = ar6000_connectservice(ar,
&connect,
"WMI DATA VO");
- if (A_FAILED(status)) {
+ if (status) {
break;
}
hciHandles.netDevice = ar->arNetDev;
hciHandles.hifDevice = ar->arHifDevice;
hciHandles.htcHandle = ar->arHtcTarget;
- status = (A_STATUS)(ar6kHciTransCallbacks.setupTransport(&hciHandles));
+ status = (int)(ar6kHciTransCallbacks.setupTransport(&hciHandles));
}
#else
if (setuphci) {
} while (FALSE);
- if (A_FAILED(status)) {
+ if (status) {
ret = -EIO;
goto ar6000_init_done;
}
if (ac == HCI_TRANSPORT_STREAM_NUM) {
/* pass this to HCI */
#ifndef EXPORT_HCI_BRIDGE_INTERFACE
- if (A_SUCCESS(hci_test_send(ar,skb))) {
+ if (!hci_test_send(ar,skb)) {
return 0;
}
#endif
A_UINT32 numbytes;
A_UINT32 throughput;
struct timeval ts;
- A_STATUS status;
+ int status;
AR6000_SPIN_LOCK(&ar->arLock, 0);
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
A_UINT32 mapNo = 0;
- A_STATUS status;
+ int status;
struct ar_cookie * ar_cookie;
HTC_ENDPOINT_ID eid;
A_BOOL wakeEvent = FALSE;
/* add this to the list, use faster non-lock API */
__skb_queue_tail(&skb_queue,pktSkb);
- if (A_SUCCESS(status)) {
+ if (!status) {
A_ASSERT(pPacket->ActualLength == A_NETBUF_LEN(pktSkb));
}
}
}
- if (A_FAILED(status)) {
+ if (status) {
if (status == A_ECANCELED) {
/* a packet was flushed */
flushing = TRUE;
A_NETBUF_FREE(pktSkb);
}
- if ((ar->arConnected == TRUE) || (bypasswmi)) {
+ if ((ar->arConnected == TRUE) || bypasswmi) {
if (!flushing) {
/* don't wake the queue if we are flushing, other wise it will just
* keep queueing packets, which will keep failing */
struct sk_buff *skb = (struct sk_buff *)pPacket->pPktContext;
int minHdrLen;
A_UINT8 containsDot11Hdr = 0;
- A_STATUS status = pPacket->Status;
+ int status = pPacket->Status;
HTC_ENDPOINT_ID ept = pPacket->Endpoint;
A_ASSERT((status != A_OK) ||
* and adaptive power throughput state */
AR6000_SPIN_LOCK(&ar->arLock, 0);
- if (A_SUCCESS(status)) {
+ if (!status) {
AR6000_STAT_INC(ar, rx_packets);
ar->arNetStats.rx_bytes += pPacket->ActualLength;
#ifdef ADAPTIVE_POWER_THROUGHPUT_CONTROL
void *osbuf = NULL;
A_INT8 i;
A_UINT8 size, *buf;
- A_STATUS ret = A_OK;
+ int ret = A_OK;
size = cmd->evt_buf_sz + 4;
osbuf = A_NETBUF_ALLOC(size);
}
void
-ar6000_scanComplete_event(AR_SOFTC_T *ar, A_STATUS status)
+ar6000_scanComplete_event(AR_SOFTC_T *ar, int status)
{
#ifdef ATH6K_CONFIG_CFG80211
A_UINT32 wmiSendCmdNum;
-A_STATUS
+int
ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)devt;
- A_STATUS status = A_OK;
+ int status = A_OK;
struct ar_cookie *cookie = NULL;
int i;
#ifdef CONFIG_PM
}
-A_STATUS
+int
ar6000_get_driver_cfg(struct net_device *dev,
A_UINT16 cfgParam,
void *result)
{
- A_STATUS ret = 0;
+ int ret = 0;
switch(cfgParam)
{
#endif
#ifdef USER_KEYS
-static A_STATUS
+static int
ar6000_reinstall_keys(AR_SOFTC_T *ar, A_UINT8 key_op_ctrl)
{
- A_STATUS status = A_OK;
+ int status = A_OK;
struct ieee80211req_key *uik = &ar->user_saved_keys.ucast_ik;
struct ieee80211req_key *bik = &ar->user_saved_keys.bcast_ik;
CRYPTO_TYPE keyType = ar->user_saved_keys.keyType;
return 0;
}
-A_STATUS
+int
ar6000_connect_to_ap(struct ar6_softc *ar)
{
/* The ssid length check prevents second "essid off" from the user,
*/
if((ar->arWmiReady == TRUE) && (ar->arSsidLen > 0) && ar->arNetworkType!=AP_NETWORK)
{
- A_STATUS status;
+ int status;
if((ADHOC_NETWORK != ar->arNetworkType) &&
(NONE_AUTH==ar->arAuthMode) &&
(WEP_CRYPT==ar->arPairwiseCrypto)) {
return A_ERROR;
}
-A_STATUS
+int
ar6000_ap_mode_get_wpa_ie(struct ar6_softc *ar, struct ieee80211req_wpaie *wpaie)
{
sta_t *conn = NULL;
return 0;
}
-A_STATUS
+int
is_iwioctl_allowed(A_UINT8 mode, A_UINT16 cmd)
{
if(cmd >= SIOCSIWCOMMIT && cmd <= SIOCGIWPOWER) {
return A_ENOTSUP;
}
-A_STATUS
+int
is_xioctl_allowed(A_UINT8 mode, int cmd)
{
if(sizeof(xioctl_filter)-1 < cmd) {
{
struct ieee80211req_key *ik = (struct ieee80211req_key *)ikey;
KEY_USAGE keyUsage = 0;
- A_STATUS status;
+ int status;
if (A_MEMCMP(ik->ik_macaddr, bcast_mac, IEEE80211_ADDR_LEN) == 0) {
keyUsage = GROUP_USAGE;
* AP mode.
*/
-A_STATUS ar6000_start_ap_interface(AR_SOFTC_T *ar)
+int ar6000_start_ap_interface(AR_SOFTC_T *ar)
{
AR_VIRTUAL_INTERFACE_T *arApDev;
return A_OK;
}
-A_STATUS ar6000_stop_ap_interface(AR_SOFTC_T *ar)
+int ar6000_stop_ap_interface(AR_SOFTC_T *ar)
{
AR_VIRTUAL_INTERFACE_T *arApDev;
}
-A_STATUS ar6000_create_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
+int ar6000_create_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
{
struct net_device *dev;
AR_VIRTUAL_INTERFACE_T *arApDev;
return A_OK;
}
-A_STATUS ar6000_add_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
+int ar6000_add_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
{
/* Interface already added, need not proceed further */
if (ar->arApDev != NULL) {
return ar6000_start_ap_interface(ar);
}
-A_STATUS ar6000_remove_ap_interface(AR_SOFTC_T *ar)
+int ar6000_remove_ap_interface(AR_SOFTC_T *ar)
{
if (arApNetDev) {
ar6000_stop_ap_interface(ar);