aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-02-02 17:05:57 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-02 17:34:51 -0500
commit4f69cef0a978e8efc2b2a5c0666bb59f39426685 (patch)
tree48d2368958bc313433729fee927cd04b9966efb9
parenta1d46529630cbe1072b7b7b1a0104655b47cd7de (diff)
staging: ath6kl: Remove #define A_OK
Just use 0. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/ath6kl/bmi/src/bmi.c30
-rw-r--r--drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c46
-rw-r--r--drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c8
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k.c34
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k.h12
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c18
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c18
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c28
-rw-r--r--drivers/staging/ath6kl/htc2/htc.c2
-rw-r--r--drivers/staging/ath6kl/htc2/htc_recv.c18
-rw-r--r--drivers/staging/ath6kl/htc2/htc_send.c4
-rw-r--r--drivers/staging/ath6kl/htc2/htc_services.c4
-rw-r--r--drivers/staging/ath6kl/include/common/athdefs.h3
-rw-r--r--drivers/staging/ath6kl/include/common/wmi.h2
-rw-r--r--drivers/staging/ath6kl/include/hci_transport_api.h14
-rw-r--r--drivers/staging/ath6kl/include/htc_api.h8
-rw-r--r--drivers/staging/ath6kl/miscdrv/ar3kconfig.c16
-rw-r--r--drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c30
-rw-r--r--drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c10
-rw-r--r--drivers/staging/ath6kl/miscdrv/common_drv.c44
-rw-r--r--drivers/staging/ath6kl/miscdrv/credit_dist.c2
-rw-r--r--drivers/staging/ath6kl/os/linux/ar6000_drv.c156
-rw-r--r--drivers/staging/ath6kl/os/linux/ar6000_pm.c50
-rw-r--r--drivers/staging/ath6kl/os/linux/ar6000_raw_if.c8
-rw-r--r--drivers/staging/ath6kl/os/linux/ar6k_pal.c16
-rw-r--r--drivers/staging/ath6kl/os/linux/cfg80211.c20
-rw-r--r--drivers/staging/ath6kl/os/linux/export_hci_transport.c2
-rw-r--r--drivers/staging/ath6kl/os/linux/hci_bridge.c20
-rw-r--r--drivers/staging/ath6kl/os/linux/ioctl.c210
-rw-r--r--drivers/staging/ath6kl/os/linux/netbuf.c18
-rw-r--r--drivers/staging/ath6kl/os/linux/wireless_ext.c74
-rw-r--r--drivers/staging/ath6kl/reorder/rcv_aggr.c8
-rw-r--r--drivers/staging/ath6kl/wlan/src/wlan_recv_beacon.c2
-rw-r--r--drivers/staging/ath6kl/wmi/wmi.c186
34 files changed, 560 insertions, 561 deletions
diff --git a/drivers/staging/ath6kl/bmi/src/bmi.c b/drivers/staging/ath6kl/bmi/src/bmi.c
index 104c53e430b..49aed8ac2dc 100644
--- a/drivers/staging/ath6kl/bmi/src/bmi.c
+++ b/drivers/staging/ath6kl/bmi/src/bmi.c
@@ -113,7 +113,7 @@ BMIDone(HIF_DEVICE *device)
113 113
114 if (bmiDone) { 114 if (bmiDone) {
115 AR_DEBUG_PRINTF (ATH_DEBUG_BMI, ("BMIDone skipped\n")); 115 AR_DEBUG_PRINTF (ATH_DEBUG_BMI, ("BMIDone skipped\n"));
116 return A_OK; 116 return 0;
117 } 117 }
118 118
119 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device)); 119 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device));
@@ -138,7 +138,7 @@ BMIDone(HIF_DEVICE *device)
138 138
139 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Exit\n")); 139 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Exit\n"));
140 140
141 return A_OK; 141 return 0;
142} 142}
143 143
144int 144int
@@ -197,7 +197,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
197 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Get Target Info: Exit (ver: 0x%x type: 0x%x)\n", 197 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Get Target Info: Exit (ver: 0x%x type: 0x%x)\n",
198 targ_info->target_ver, targ_info->target_type)); 198 targ_info->target_ver, targ_info->target_type));
199 199
200 return A_OK; 200 return 0;
201} 201}
202 202
203int 203int
@@ -253,7 +253,7 @@ BMIReadMemory(HIF_DEVICE *device,
253 } 253 }
254 254
255 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read Memory: Exit\n")); 255 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read Memory: Exit\n"));
256 return A_OK; 256 return 0;
257} 257}
258 258
259int 259int
@@ -318,7 +318,7 @@ BMIWriteMemory(HIF_DEVICE *device,
318 318
319 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Write Memory: Exit\n")); 319 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Write Memory: Exit\n"));
320 320
321 return A_OK; 321 return 0;
322} 322}
323 323
324int 324int
@@ -366,7 +366,7 @@ BMIExecute(HIF_DEVICE *device,
366 A_MEMCPY(param, pBMICmdBuf, sizeof(*param)); 366 A_MEMCPY(param, pBMICmdBuf, sizeof(*param));
367 367
368 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Execute: Exit (param: %d)\n", *param)); 368 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Execute: Exit (param: %d)\n", *param));
369 return A_OK; 369 return 0;
370} 370}
371 371
372int 372int
@@ -403,7 +403,7 @@ BMISetAppStart(HIF_DEVICE *device,
403 } 403 }
404 404
405 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Set App Start: Exit\n")); 405 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Set App Start: Exit\n"));
406 return A_OK; 406 return 0;
407} 407}
408 408
409int 409int
@@ -449,7 +449,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
449 A_MEMCPY(param, pBMICmdBuf, sizeof(*param)); 449 A_MEMCPY(param, pBMICmdBuf, sizeof(*param));
450 450
451 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit (value: %d)\n", *param)); 451 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit (value: %d)\n", *param));
452 return A_OK; 452 return 0;
453} 453}
454 454
455int 455int
@@ -489,7 +489,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
489 } 489 }
490 490
491 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit\n")); 491 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit\n"));
492 return A_OK; 492 return 0;
493} 493}
494 494
495int 495int
@@ -545,7 +545,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
545 A_MEMCPY(rompatch_id, pBMICmdBuf, sizeof(*rompatch_id)); 545 A_MEMCPY(rompatch_id, pBMICmdBuf, sizeof(*rompatch_id));
546 546
547 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch Install: (rompatch_id=%d)\n", *rompatch_id)); 547 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch Install: (rompatch_id=%d)\n", *rompatch_id));
548 return A_OK; 548 return 0;
549} 549}
550 550
551int 551int
@@ -582,7 +582,7 @@ BMIrompatchUninstall(HIF_DEVICE *device,
582 } 582 }
583 583
584 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch UNinstall: (rompatch_id=0x%x)\n", rompatch_id)); 584 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch UNinstall: (rompatch_id=0x%x)\n", rompatch_id));
585 return A_OK; 585 return 0;
586} 586}
587 587
588static int 588static int
@@ -626,7 +626,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,
626 626
627 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Change rompatch Activation: Exit\n")); 627 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Change rompatch Activation: Exit\n"));
628 628
629 return A_OK; 629 return 0;
630} 630}
631 631
632int 632int
@@ -692,7 +692,7 @@ BMILZData(HIF_DEVICE *device,
692 692
693 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Data: Exit\n")); 693 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Data: Exit\n"));
694 694
695 return A_OK; 695 return 0;
696} 696}
697 697
698int 698int
@@ -729,7 +729,7 @@ BMILZStreamStart(HIF_DEVICE *device,
729 729
730 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Stream Start: Exit\n")); 730 AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Stream Start: Exit\n"));
731 731
732 return A_OK; 732 return 0;
733} 733}
734 734
735/* BMI Access routines */ 735/* BMI Access routines */
@@ -954,7 +954,7 @@ bmiBufferReceive(HIF_DEVICE *device,
954 return A_ERROR; 954 return A_ERROR;
955 } 955 }
956 956
957 return A_OK; 957 return 0;
958} 958}
959 959
960int 960int
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
index 773d134192d..4d6feeae288 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
@@ -148,7 +148,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks)
148 return A_ERROR; 148 return A_ERROR;
149 } 149 }
150 150
151 return A_OK; 151 return 0;
152 152
153} 153}
154 154
@@ -161,7 +161,7 @@ __HIFReadWrite(HIF_DEVICE *device,
161 void *context) 161 void *context)
162{ 162{
163 u8 opcode; 163 u8 opcode;
164 int status = A_OK; 164 int status = 0;
165 int ret; 165 int ret;
166 u8 *tbuffer; 166 u8 *tbuffer;
167 bool bounced = false; 167 bool bounced = false;
@@ -337,7 +337,7 @@ HIFReadWrite(HIF_DEVICE *device,
337 u32 request, 337 u32 request,
338 void *context) 338 void *context)
339{ 339{
340 int status = A_OK; 340 int status = 0;
341 BUS_REQUEST *busrequest; 341 BUS_REQUEST *busrequest;
342 342
343 343
@@ -644,13 +644,13 @@ int ReinitSDIO(HIF_DEVICE *device)
644 sdio_release_host(func); 644 sdio_release_host(func);
645 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -ReinitSDIO \n")); 645 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -ReinitSDIO \n"));
646 646
647 return (err) ? A_ERROR : A_OK; 647 return (err) ? A_ERROR : 0;
648} 648}
649 649
650int 650int
651PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config) 651PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
652{ 652{
653 int status = A_OK; 653 int status = 0;
654#if defined(CONFIG_PM) 654#if defined(CONFIG_PM)
655 struct sdio_func *func = device->func; 655 struct sdio_func *func = device->func;
656 int old_reset_val; 656 int old_reset_val;
@@ -678,7 +678,7 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
678 if (device->powerConfig == HIF_DEVICE_POWER_CUT) { 678 if (device->powerConfig == HIF_DEVICE_POWER_CUT) {
679 status = ReinitSDIO(device); 679 status = ReinitSDIO(device);
680 } 680 }
681 if (status == A_OK) { 681 if (status == 0) {
682 status = hifEnableFunc(device, func); 682 status = hifEnableFunc(device, func);
683 } 683 }
684 break; 684 break;
@@ -695,7 +695,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
695 void *config, u32 configLen) 695 void *config, u32 configLen)
696{ 696{
697 u32 count; 697 u32 count;
698 int status = A_OK; 698 int status = 0;
699 699
700 switch(opcode) { 700 switch(opcode) {
701 case HIF_DEVICE_GET_MBOX_BLOCK_SIZE: 701 case HIF_DEVICE_GET_MBOX_BLOCK_SIZE:
@@ -785,7 +785,7 @@ hifIRQHandler(struct sdio_func *func)
785 status = device->htcCallbacks.dsrHandler(device->htcCallbacks.context); 785 status = device->htcCallbacks.dsrHandler(device->htcCallbacks.context);
786 sdio_claim_host(device->func); 786 sdio_claim_host(device->func);
787 atomic_set(&device->irqHandling, 0); 787 atomic_set(&device->irqHandling, 0);
788 AR_DEBUG_ASSERT(status == A_OK || status == A_ECANCELED); 788 AR_DEBUG_ASSERT(status == 0 || status == A_ECANCELED);
789 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifIRQHandler\n")); 789 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifIRQHandler\n"));
790} 790}
791 791
@@ -797,7 +797,7 @@ static int startup_task(void *param)
797 device = (HIF_DEVICE *)param; 797 device = (HIF_DEVICE *)param;
798 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call HTC from startup_task\n")); 798 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call HTC from startup_task\n"));
799 /* start up inform DRV layer */ 799 /* start up inform DRV layer */
800 if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != A_OK) { 800 if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != 0) {
801 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n")); 801 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
802 } 802 }
803 return 0; 803 return 0;
@@ -814,7 +814,7 @@ static int enable_task(void *param)
814 if (device && 814 if (device &&
815 device->claimedContext && 815 device->claimedContext &&
816 osdrvCallbacks.devicePowerChangeHandler && 816 osdrvCallbacks.devicePowerChangeHandler &&
817 osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != A_OK) 817 osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != 0)
818 { 818 {
819 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n")); 819 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
820 } 820 }
@@ -952,7 +952,7 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
952static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func) 952static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
953{ 953{
954 int ret; 954 int ret;
955 int status = A_OK; 955 int status = 0;
956 956
957 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n")); 957 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n"));
958 device = getHifDevice(func); 958 device = getHifDevice(func);
@@ -988,7 +988,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
988 988
989 sdio_release_host(device->func); 989 sdio_release_host(device->func);
990 990
991 if (status == A_OK) { 991 if (status == 0) {
992 device->is_disabled = true; 992 device->is_disabled = true;
993 } 993 }
994 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDisableFunc\n")); 994 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDisableFunc\n"));
@@ -1001,7 +1001,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
1001 struct task_struct* pTask; 1001 struct task_struct* pTask;
1002 const char *taskName = NULL; 1002 const char *taskName = NULL;
1003 int (*taskFunc)(void *) = NULL; 1003 int (*taskFunc)(void *) = NULL;
1004 int ret = A_OK; 1004 int ret = 0;
1005 1005
1006 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifEnableFunc\n")); 1006 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifEnableFunc\n"));
1007 device = getHifDevice(func); 1007 device = getHifDevice(func);
@@ -1055,7 +1055,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
1055 if (!device->claimedContext) { 1055 if (!device->claimedContext) {
1056 taskFunc = startup_task; 1056 taskFunc = startup_task;
1057 taskName = "AR6K startup"; 1057 taskName = "AR6K startup";
1058 ret = A_OK; 1058 ret = 0;
1059#if defined(CONFIG_PM) 1059#if defined(CONFIG_PM)
1060 } else { 1060 } else {
1061 taskFunc = enable_task; 1061 taskFunc = enable_task;
@@ -1080,7 +1080,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
1080static int hifDeviceSuspend(struct device *dev) 1080static int hifDeviceSuspend(struct device *dev)
1081{ 1081{
1082 struct sdio_func *func=dev_to_sdio_func(dev); 1082 struct sdio_func *func=dev_to_sdio_func(dev);
1083 int status = A_OK; 1083 int status = 0;
1084 HIF_DEVICE *device; 1084 HIF_DEVICE *device;
1085 1085
1086 device = getHifDevice(func); 1086 device = getHifDevice(func);
@@ -1095,7 +1095,7 @@ static int hifDeviceSuspend(struct device *dev)
1095 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n")); 1095 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n"));
1096 1096
1097 switch (status) { 1097 switch (status) {
1098 case A_OK: 1098 case 0:
1099 return 0; 1099 return 0;
1100 case A_EBUSY: 1100 case A_EBUSY:
1101 return -EBUSY; /* Hack for kernel in order to support deep sleep and wow */ 1101 return -EBUSY; /* Hack for kernel in order to support deep sleep and wow */
@@ -1107,14 +1107,14 @@ static int hifDeviceSuspend(struct device *dev)
1107static int hifDeviceResume(struct device *dev) 1107static int hifDeviceResume(struct device *dev)
1108{ 1108{
1109 struct sdio_func *func=dev_to_sdio_func(dev); 1109 struct sdio_func *func=dev_to_sdio_func(dev);
1110 int status = A_OK; 1110 int status = 0;
1111 HIF_DEVICE *device; 1111 HIF_DEVICE *device;
1112 1112
1113 device = getHifDevice(func); 1113 device = getHifDevice(func);
1114 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceResume\n")); 1114 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceResume\n"));
1115 if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) { 1115 if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
1116 status = osdrvCallbacks.deviceResumeHandler(device->claimedContext); 1116 status = osdrvCallbacks.deviceResumeHandler(device->claimedContext);
1117 if (status == A_OK) { 1117 if (status == 0) {
1118 device->is_suspend = false; 1118 device->is_suspend = false;
1119 } 1119 }
1120 } 1120 }
@@ -1126,7 +1126,7 @@ static int hifDeviceResume(struct device *dev)
1126 1126
1127static void hifDeviceRemoved(struct sdio_func *func) 1127static void hifDeviceRemoved(struct sdio_func *func)
1128{ 1128{
1129 int status = A_OK; 1129 int status = 0;
1130 HIF_DEVICE *device; 1130 HIF_DEVICE *device;
1131 AR_DEBUG_ASSERT(func != NULL); 1131 AR_DEBUG_ASSERT(func != NULL);
1132 1132
@@ -1144,7 +1144,7 @@ static void hifDeviceRemoved(struct sdio_func *func)
1144 CleanupHIFScatterResources(device); 1144 CleanupHIFScatterResources(device);
1145 1145
1146 delHifDevice(device); 1146 delHifDevice(device);
1147 AR_DEBUG_ASSERT(status == A_OK); 1147 AR_DEBUG_ASSERT(status == 0);
1148 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceRemoved\n")); 1148 AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceRemoved\n"));
1149} 1149}
1150 1150
@@ -1155,7 +1155,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
1155{ 1155{
1156 s32 cnt = 10; 1156 s32 cnt = 10;
1157 u8 host_int_status; 1157 u8 host_int_status;
1158 int status = A_OK; 1158 int status = 0;
1159 1159
1160 do { 1160 do {
1161 while (atomic_read(&device->irqHandling)) { 1161 while (atomic_read(&device->irqHandling)) {
@@ -1178,7 +1178,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
1178 ("AR6000: %s(), Unable clear up pending IRQ before the system suspended\n", __FUNCTION__)); 1178 ("AR6000: %s(), Unable clear up pending IRQ before the system suspended\n", __FUNCTION__));
1179 } 1179 }
1180 1180
1181 return A_OK; 1181 return 0;
1182} 1182}
1183 1183
1184 1184
@@ -1240,7 +1240,7 @@ int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
1240 return A_ERROR; 1240 return A_ERROR;
1241 } 1241 }
1242 device->htcCallbacks = *callbacks; 1242 device->htcCallbacks = *callbacks;
1243 return A_OK; 1243 return 0;
1244} 1244}
1245 1245
1246void HIFDetachHTC(HIF_DEVICE *device) 1246void HIFDetachHTC(HIF_DEVICE *device)
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
index 4319e3d9ad1..78cbbb11ed6 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
@@ -89,7 +89,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
89 struct mmc_data data; 89 struct mmc_data data;
90 HIF_SCATTER_REQ_PRIV *pReqPriv; 90 HIF_SCATTER_REQ_PRIV *pReqPriv;
91 HIF_SCATTER_REQ *pReq; 91 HIF_SCATTER_REQ *pReq;
92 int status = A_OK; 92 int status = 0;
93 struct scatterlist *pSg; 93 struct scatterlist *pSg;
94 94
95 pReqPriv = busrequest->pScatterReq; 95 pReqPriv = busrequest->pScatterReq;
@@ -260,7 +260,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
260 AR_DEBUG_PRINTF(ATH_DEBUG_SCATTER, ("HIF-SCATTER: queued async req: 0x%lX\n", (unsigned long)pReqPriv->busrequest)); 260 AR_DEBUG_PRINTF(ATH_DEBUG_SCATTER, ("HIF-SCATTER: queued async req: 0x%lX\n", (unsigned long)pReqPriv->busrequest));
261 /* wake thread, it will process and then take care of the async callback */ 261 /* wake thread, it will process and then take care of the async callback */
262 up(&device->sem_async); 262 up(&device->sem_async);
263 status = A_OK; 263 status = 0;
264 } 264 }
265 265
266 } while (false); 266 } while (false);
@@ -268,7 +268,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
268 if (status && (request & HIF_ASYNCHRONOUS)) { 268 if (status && (request & HIF_ASYNCHRONOUS)) {
269 pReq->CompletionStatus = status; 269 pReq->CompletionStatus = status;
270 pReq->CompletionRoutine(pReq); 270 pReq->CompletionRoutine(pReq);
271 status = A_OK; 271 status = 0;
272 } 272 }
273 273
274 return status; 274 return status;
@@ -344,7 +344,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *
344 pInfo->MaxScatterEntries = MAX_SCATTER_ENTRIES_PER_REQ; 344 pInfo->MaxScatterEntries = MAX_SCATTER_ENTRIES_PER_REQ;
345 pInfo->MaxTransferSizePerScatterReq = MAX_SCATTER_REQ_TRANSFER_SIZE; 345 pInfo->MaxTransferSizePerScatterReq = MAX_SCATTER_REQ_TRANSFER_SIZE;
346 346
347 status = A_OK; 347 status = 0;
348 348
349 } while (false); 349 } while (false);
350 350
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
index ed51a8da965..6083231cdbb 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
@@ -77,7 +77,7 @@ void DevCleanup(AR6K_DEVICE *pDev)
77int DevSetup(AR6K_DEVICE *pDev) 77int DevSetup(AR6K_DEVICE *pDev)
78{ 78{
79 u32 blocksizes[AR6K_MAILBOXES]; 79 u32 blocksizes[AR6K_MAILBOXES];
80 int status = A_OK; 80 int status = 0;
81 int i; 81 int i;
82 HTC_CALLBACKS htcCallbacks; 82 HTC_CALLBACKS htcCallbacks;
83 83
@@ -309,7 +309,7 @@ int DevUnmaskInterrupts(AR6K_DEVICE *pDev)
309 * and when HTC is finally ready to handle interrupts, other software can perform target "soft" resets. 309 * and when HTC is finally ready to handle interrupts, other software can perform target "soft" resets.
310 * The AR6K interrupt enables reset back to an "enabled" state when this happens. 310 * The AR6K interrupt enables reset back to an "enabled" state when this happens.
311 * */ 311 * */
312 int IntStatus = A_OK; 312 int IntStatus = 0;
313 DevDisableInterrupts(pDev); 313 DevDisableInterrupts(pDev);
314 314
315#ifdef THREAD_X 315#ifdef THREAD_X
@@ -357,7 +357,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke
357 * disable recv events */ 357 * disable recv events */
358static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode) 358static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
359{ 359{
360 int status = A_OK; 360 int status = 0;
361 HTC_PACKET *pIOPacket = NULL; 361 HTC_PACKET *pIOPacket = NULL;
362 362
363 AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n", 363 AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n",
@@ -405,7 +405,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bo
405 * the host I/F */ 405 * the host I/F */
406static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode) 406static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
407{ 407{
408 int status = A_OK; 408 int status = 0;
409 HTC_PACKET *pIOPacket = NULL; 409 HTC_PACKET *pIOPacket = NULL;
410 AR6K_IRQ_ENABLE_REGISTERS regs; 410 AR6K_IRQ_ENABLE_REGISTERS regs;
411 411
@@ -490,7 +490,7 @@ int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode)
490 490
491int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending) 491int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending)
492{ 492{
493 int status = A_OK; 493 int status = 0;
494 A_UCHAR host_int_status = 0x0; 494 A_UCHAR host_int_status = 0x0;
495 u32 counter = 0x0; 495 u32 counter = 0x0;
496 496
@@ -519,7 +519,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPendin
519 host_int_status = !status ? (host_int_status & (1 << 0)):0; 519 host_int_status = !status ? (host_int_status & (1 << 0)):0;
520 if(!host_int_status) 520 if(!host_int_status)
521 { 521 {
522 status = A_OK; 522 status = 0;
523 *pbIsRecvPending = false; 523 *pbIsRecvPending = false;
524 break; 524 break;
525 } 525 }
@@ -645,7 +645,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA)
645 remaining -= length; 645 remaining -= length;
646 } 646 }
647 647
648 return A_OK; 648 return 0;
649} 649}
650 650
651static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) 651static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
@@ -667,7 +667,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
667static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) 667static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
668{ 668{
669 AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; 669 AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context;
670 int status = A_OK; 670 int status = 0;
671 HTC_PACKET *pIOPacket = NULL; 671 HTC_PACKET *pIOPacket = NULL;
672 u32 request = pReq->Request; 672 u32 request = pReq->Request;
673 673
@@ -727,7 +727,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
727 } 727 }
728 pReq->CompletionStatus = status; 728 pReq->CompletionStatus = status;
729 pReq->CompletionRoutine(pReq); 729 pReq->CompletionRoutine(pReq);
730 status = A_OK; 730 status = 0;
731 } 731 }
732 732
733 return status; 733 return status;
@@ -751,7 +751,7 @@ static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev)
751 /* function to set up virtual scatter support if HIF layer has not implemented the interface */ 751 /* function to set up virtual scatter support if HIF layer has not implemented the interface */
752static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) 752static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev)
753{ 753{
754 int status = A_OK; 754 int status = 0;
755 int bufferSize, sgreqSize; 755 int bufferSize, sgreqSize;
756 int i; 756 int i;
757 DEV_SCATTER_DMA_VIRTUAL_INFO *pVirtualInfo; 757 DEV_SCATTER_DMA_VIRTUAL_INFO *pVirtualInfo;
@@ -923,7 +923,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, boo
923 if (Async) { 923 if (Async) {
924 pScatterReq->CompletionStatus = status; 924 pScatterReq->CompletionStatus = status;
925 pScatterReq->CompletionRoutine(pScatterReq); 925 pScatterReq->CompletionRoutine(pScatterReq);
926 return A_OK; 926 return 0;
927 } 927 }
928 return status; 928 return status;
929 } 929 }
@@ -936,7 +936,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, boo
936 DEV_FINISH_SCATTER_OPERATION(pScatterReq); 936 DEV_FINISH_SCATTER_OPERATION(pScatterReq);
937 } else { 937 } else {
938 if (status == A_PENDING) { 938 if (status == A_PENDING) {
939 status = A_OK; 939 status = 0;
940 } 940 }
941 } 941 }
942 942
@@ -1127,7 +1127,7 @@ static u16 GetEndMarker(void)
1127/* send the ordered buffers to the target */ 1127/* send the ordered buffers to the target */
1128static int SendBuffers(AR6K_DEVICE *pDev, int mbox) 1128static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
1129{ 1129{
1130 int status = A_OK; 1130 int status = 0;
1131 u32 request = HIF_WR_SYNC_BLOCK_INC; 1131 u32 request = HIF_WR_SYNC_BLOCK_INC;
1132 BUFFER_PROC_LIST sendList[BUFFER_PROC_LIST_DEPTH]; 1132 BUFFER_PROC_LIST sendList[BUFFER_PROC_LIST_DEPTH];
1133 int i; 1133 int i;
@@ -1171,7 +1171,7 @@ static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
1171/* poll the mailbox credit counter until we get a credit or timeout */ 1171/* poll the mailbox credit counter until we get a credit or timeout */
1172static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits) 1172static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
1173{ 1173{
1174 int status = A_OK; 1174 int status = 0;
1175 int timeout = TEST_CREDITS_RECV_TIMEOUT; 1175 int timeout = TEST_CREDITS_RECV_TIMEOUT;
1176 u8 credits = 0; 1176 u8 credits = 0;
1177 u32 address; 1177 u32 address;
@@ -1207,7 +1207,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
1207 1207
1208 } 1208 }
1209 1209
1210 if (status == A_OK) { 1210 if (status == 0) {
1211 *pCredits = credits; 1211 *pCredits = credits;
1212 } 1212 }
1213 1213
@@ -1218,7 +1218,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
1218/* wait for the buffers to come back */ 1218/* wait for the buffers to come back */
1219static int RecvBuffers(AR6K_DEVICE *pDev, int mbox) 1219static int RecvBuffers(AR6K_DEVICE *pDev, int mbox)
1220{ 1220{
1221 int status = A_OK; 1221 int status = 0;
1222 u32 request = HIF_RD_SYNC_BLOCK_INC; 1222 u32 request = HIF_RD_SYNC_BLOCK_INC;
1223 BUFFER_PROC_LIST recvList[BUFFER_PROC_LIST_DEPTH]; 1223 BUFFER_PROC_LIST recvList[BUFFER_PROC_LIST_DEPTH];
1224 int curBuffer; 1224 int curBuffer;
@@ -1457,7 +1457,7 @@ int DoMboxHWTest(AR6K_DEVICE *pDev)
1457 1457
1458 } while (false); 1458 } while (false);
1459 1459
1460 if (status == A_OK) { 1460 if (status == 0) {
1461 AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - SUCCESS! - \n")); 1461 AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - SUCCESS! - \n"));
1462 } else { 1462 } else {
1463 AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - FAILED! - \n")); 1463 AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - FAILED! - \n"));
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
index 5e147c0ec24..d3b6b309dc2 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
@@ -189,7 +189,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send
189 A_ASSERT(false); 189 A_ASSERT(false);
190 if (pPacket->Completion != NULL) { 190 if (pPacket->Completion != NULL) {
191 COMPLETE_HTC_PACKET(pPacket,A_EINVAL); 191 COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
192 return A_OK; 192 return 0;
193 } 193 }
194 return A_EINVAL; 194 return A_EINVAL;
195 } 195 }
@@ -212,7 +212,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send
212 pPacket->Status = status; 212 pPacket->Status = status;
213 } else { 213 } else {
214 if (status == A_PENDING) { 214 if (status == A_PENDING) {
215 status = A_OK; 215 status = 0;
216 } 216 }
217 } 217 }
218 218
@@ -234,7 +234,7 @@ static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Recv
234 paddedLength,RecvLength,pPacket->BufferLength)); 234 paddedLength,RecvLength,pPacket->BufferLength));
235 if (pPacket->Completion != NULL) { 235 if (pPacket->Completion != NULL) {
236 COMPLETE_HTC_PACKET(pPacket,A_EINVAL); 236 COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
237 return A_OK; 237 return 0;
238 } 238 }
239 return A_EINVAL; 239 return A_EINVAL;
240 } 240 }
@@ -291,7 +291,7 @@ static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) {
291 if ((pReq->Request & HIF_WRITE) && (pReq->ScatterMethod == HIF_SCATTER_DMA_BOUNCE)) { 291 if ((pReq->Request & HIF_WRITE) && (pReq->ScatterMethod == HIF_SCATTER_DMA_BOUNCE)) {
292 return DevCopyScatterListToFromDMABuffer(pReq,TO_DMA_BUFFER); 292 return DevCopyScatterListToFromDMABuffer(pReq,TO_DMA_BUFFER);
293 } else { 293 } else {
294 return A_OK; 294 return 0;
295 } 295 }
296} 296}
297 297
@@ -346,12 +346,12 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev);
346 346
347 /* compiled out */ 347 /* compiled out */
348#define DevCleanupGMbox(p) 348#define DevCleanupGMbox(p)
349#define DevCheckGMboxInterrupts(p) A_OK 349#define DevCheckGMboxInterrupts(p) 0
350#define DevNotifyGMboxTargetFailure(p) 350#define DevNotifyGMboxTargetFailure(p)
351 351
352static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) { 352static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) {
353 pDev->GMboxEnabled = false; 353 pDev->GMboxEnabled = false;
354 return A_OK; 354 return 0;
355} 355}
356 356
357#endif 357#endif
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c
index f9b153315d4..4517bef4ba8 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c
@@ -55,7 +55,7 @@ int DevRWCompletionHandler(void *context, int status)
55 AR_DEBUG_PRINTF(ATH_DEBUG_RECV, 55 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
56 ("-DevRWCompletionHandler\n")); 56 ("-DevRWCompletionHandler\n"));
57 57
58 return A_OK; 58 return 0;
59} 59}
60 60
61/* mailbox recv message polling */ 61/* mailbox recv message polling */
@@ -63,7 +63,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
63 u32 *pLookAhead, 63 u32 *pLookAhead,
64 int TimeoutMS) 64 int TimeoutMS)
65{ 65{
66 int status = A_OK; 66 int status = 0;
67 int timeout = TimeoutMS/DELAY_PER_INTERVAL_MS; 67 int timeout = TimeoutMS/DELAY_PER_INTERVAL_MS;
68 68
69 A_ASSERT(timeout > 0); 69 A_ASSERT(timeout > 0);
@@ -187,7 +187,7 @@ static int DevServiceCPUInterrupt(AR6K_DEVICE *pDev)
187 HIF_WR_SYNC_BYTE_FIX, 187 HIF_WR_SYNC_BYTE_FIX,
188 NULL); 188 NULL);
189 189
190 A_ASSERT(status == A_OK); 190 A_ASSERT(status == 0);
191 return status; 191 return status;
192} 192}
193 193
@@ -241,7 +241,7 @@ static int DevServiceErrorInterrupt(AR6K_DEVICE *pDev)
241 HIF_WR_SYNC_BYTE_FIX, 241 HIF_WR_SYNC_BYTE_FIX,
242 NULL); 242 NULL);
243 243
244 A_ASSERT(status == A_OK); 244 A_ASSERT(status == 0);
245 return status; 245 return status;
246} 246}
247 247
@@ -271,7 +271,7 @@ static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev)
271 HIF_RD_SYNC_BYTE_INC, 271 HIF_RD_SYNC_BYTE_INC,
272 NULL); 272 NULL);
273 273
274 A_ASSERT(status == A_OK); 274 A_ASSERT(status == 0);
275 return status; 275 return status;
276} 276}
277 277
@@ -296,7 +296,7 @@ static int DevServiceCounterInterrupt(AR6K_DEVICE *pDev)
296 return DevServiceDebugInterrupt(pDev); 296 return DevServiceDebugInterrupt(pDev);
297 } 297 }
298 298
299 return A_OK; 299 return 0;
300} 300}
301 301
302/* callback when our fetch to get interrupt status registers completes */ 302/* callback when our fetch to get interrupt status registers completes */
@@ -391,7 +391,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
391int DevCheckPendingRecvMsgsAsync(void *context) 391int DevCheckPendingRecvMsgsAsync(void *context)
392{ 392{
393 AR6K_DEVICE *pDev = (AR6K_DEVICE *)context; 393 AR6K_DEVICE *pDev = (AR6K_DEVICE *)context;
394 int status = A_OK; 394 int status = 0;
395 HTC_PACKET *pIOPacket; 395 HTC_PACKET *pIOPacket;
396 396
397 /* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can 397 /* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can
@@ -469,7 +469,7 @@ void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev)
469/* process pending interrupts synchronously */ 469/* process pending interrupts synchronously */
470static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProcessing) 470static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProcessing)
471{ 471{
472 int status = A_OK; 472 int status = 0;
473 u8 host_int_status = 0; 473 u8 host_int_status = 0;
474 u32 lookAhead = 0; 474 u32 lookAhead = 0;
475 475
@@ -684,7 +684,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProces
684int DevDsrHandler(void *context) 684int DevDsrHandler(void *context)
685{ 685{
686 AR6K_DEVICE *pDev = (AR6K_DEVICE *)context; 686 AR6K_DEVICE *pDev = (AR6K_DEVICE *)context;
687 int status = A_OK; 687 int status = 0;
688 bool done = false; 688 bool done = false;
689 bool asyncProc = false; 689 bool asyncProc = false;
690 690
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c
index d27bab4f6c5..d58e4188472 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c
@@ -76,7 +76,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket)
76 76
77static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) 77static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
78{ 78{
79 int status = A_OK; 79 int status = 0;
80 AR6K_IRQ_ENABLE_REGISTERS regs; 80 AR6K_IRQ_ENABLE_REGISTERS regs;
81 HTC_PACKET *pIOPacket = NULL; 81 HTC_PACKET *pIOPacket = NULL;
82 82
@@ -157,7 +157,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE
157 157
158int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) 158int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
159{ 159{
160 int status = A_OK; 160 int status = 0;
161 HTC_PACKET *pIOPacket = NULL; 161 HTC_PACKET *pIOPacket = NULL;
162 u8 GMboxIntControl[4]; 162 u8 GMboxIntControl[4];
163 163
@@ -271,7 +271,7 @@ void DevCleanupGMbox(AR6K_DEVICE *pDev)
271 271
272int DevSetupGMbox(AR6K_DEVICE *pDev) 272int DevSetupGMbox(AR6K_DEVICE *pDev)
273{ 273{
274 int status = A_OK; 274 int status = 0;
275 u8 muxControl[4]; 275 u8 muxControl[4];
276 276
277 do { 277 do {
@@ -324,7 +324,7 @@ int DevSetupGMbox(AR6K_DEVICE *pDev)
324 324
325int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) 325int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
326{ 326{
327 int status = A_OK; 327 int status = 0;
328 u8 counter_int_status; 328 u8 counter_int_status;
329 int credits; 329 int credits;
330 u8 host_int_status2; 330 u8 host_int_status2;
@@ -426,7 +426,7 @@ int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength)
426 pPacket->Status = status; 426 pPacket->Status = status;
427 } else { 427 } else {
428 if (status == A_PENDING) { 428 if (status == A_PENDING) {
429 status = A_OK; 429 status = 0;
430 } 430 }
431 } 431 }
432 432
@@ -450,7 +450,7 @@ int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 ReadLength)
450 paddedLength,ReadLength,pPacket->BufferLength)); 450 paddedLength,ReadLength,pPacket->BufferLength));
451 if (pPacket->Completion != NULL) { 451 if (pPacket->Completion != NULL) {
452 COMPLETE_HTC_PACKET(pPacket,A_EINVAL); 452 COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
453 return A_OK; 453 return 0;
454 } 454 }
455 return A_EINVAL; 455 return A_EINVAL;
456 } 456 }
@@ -541,7 +541,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
541 541
542int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits) 542int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits)
543{ 543{
544 int status = A_OK; 544 int status = 0;
545 HTC_PACKET *pIOPacket = NULL; 545 HTC_PACKET *pIOPacket = NULL;
546 546
547 AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC")); 547 AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC"));
@@ -637,7 +637,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev)
637int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes) 637int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes)
638{ 638{
639 639
640 int status = A_OK; 640 int status = 0;
641 AR6K_IRQ_PROC_REGISTERS procRegs; 641 AR6K_IRQ_PROC_REGISTERS procRegs;
642 int maxCopy; 642 int maxCopy;
643 643
@@ -678,7 +678,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLoo
678 678
679int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS) 679int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS)
680{ 680{
681 int status = A_OK; 681 int status = 0;
682 int i; 682 int i;
683 u8 buffer[4]; 683 u8 buffer[4];
684 684
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
index cf45f991268..cddb9399319 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
@@ -195,7 +195,7 @@ static int CreditsAvailableCallback(void *pContext, int Credits, bool CreditIRQE
195 bool enableCreditIrq = false; 195 bool enableCreditIrq = false;
196 bool disableCreditIrq = false; 196 bool disableCreditIrq = false;
197 bool doPendingSends = false; 197 bool doPendingSends = false;
198 int status = A_OK; 198 int status = 0;
199 199
200 /** this callback is called under 2 conditions: 200 /** this callback is called under 2 conditions:
201 * 1. The credit IRQ interrupt was enabled and signaled. 201 * 1. The credit IRQ interrupt was enabled and signaled.
@@ -307,7 +307,7 @@ static void StateDumpCallback(void *pContext)
307static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidBytes) 307static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidBytes)
308{ 308{
309 GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext; 309 GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext;
310 int status = A_OK; 310 int status = 0;
311 int totalRecvLength = 0; 311 int totalRecvLength = 0;
312 HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID; 312 HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID;
313 bool recvRefillCalled = false; 313 bool recvRefillCalled = false;
@@ -476,7 +476,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
476 /* adjust buffer to move past packet ID */ 476 /* adjust buffer to move past packet ID */
477 pPacket->pBuffer++; 477 pPacket->pBuffer++;
478 pPacket->ActualLength = totalRecvLength - 1; 478 pPacket->ActualLength = totalRecvLength - 1;
479 pPacket->Status = A_OK; 479 pPacket->Status = 0;
480 /* indicate packet */ 480 /* indicate packet */
481 DO_HCI_RECV_INDICATION(pProt,pPacket); 481 DO_HCI_RECV_INDICATION(pProt,pPacket);
482 pPacket = NULL; 482 pPacket = NULL;
@@ -549,7 +549,7 @@ static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket)
549 549
550static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt) 550static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt)
551{ 551{
552 int status = A_OK; 552 int status = 0;
553 int credits; 553 int credits;
554 int retry = 100; 554 int retry = 100;
555 555
@@ -581,7 +581,7 @@ static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt)
581 581
582static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, bool Synchronous) 582static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, bool Synchronous)
583{ 583{
584 int status = A_OK; 584 int status = 0;
585 int transferLength; 585 int transferLength;
586 int creditsRequired, remainder; 586 int creditsRequired, remainder;
587 u8 hciUartType; 587 u8 hciUartType;
@@ -848,7 +848,7 @@ static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt)
848 848
849int GMboxProtocolInstall(AR6K_DEVICE *pDev) 849int GMboxProtocolInstall(AR6K_DEVICE *pDev)
850{ 850{
851 int status = A_OK; 851 int status = 0;
852 GMBOX_PROTO_HCI_UART *pProtocol = NULL; 852 GMBOX_PROTO_HCI_UART *pProtocol = NULL;
853 853
854 do { 854 do {
@@ -911,7 +911,7 @@ void GMboxProtocolUninstall(AR6K_DEVICE *pDev)
911static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt) 911static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt)
912{ 912{
913 HCI_TRANSPORT_PROPERTIES props; 913 HCI_TRANSPORT_PROPERTIES props;
914 int status = A_OK; 914 int status = 0;
915 915
916 do { 916 do {
917 917
@@ -1004,7 +1004,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans)
1004int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue) 1004int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue)
1005{ 1005{
1006 GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; 1006 GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
1007 int status = A_OK; 1007 int status = 0;
1008 bool unblockRecv = false; 1008 bool unblockRecv = false;
1009 HTC_PACKET *pPacket; 1009 HTC_PACKET *pPacket;
1010 1010
@@ -1066,7 +1066,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE
1066 1066
1067 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HCI_TransportAddReceivePkt \n")); 1067 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HCI_TransportAddReceivePkt \n"));
1068 1068
1069 return A_OK; 1069 return 0;
1070} 1070}
1071 1071
1072int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous) 1072int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous)
@@ -1163,7 +1163,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
1163 int MaxPollMS) 1163 int MaxPollMS)
1164{ 1164{
1165 GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; 1165 GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
1166 int status = A_OK; 1166 int status = 0;
1167 u8 lookAhead[8]; 1167 u8 lookAhead[8];
1168 int bytes; 1168 int bytes;
1169 int totalRecvLength; 1169 int totalRecvLength;
@@ -1216,7 +1216,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
1216 1216
1217 pPacket->pBuffer++; 1217 pPacket->pBuffer++;
1218 pPacket->ActualLength = totalRecvLength - 1; 1218 pPacket->ActualLength = totalRecvLength - 1;
1219 pPacket->Status = A_OK; 1219 pPacket->Status = 0;
1220 break; 1220 break;
1221 } 1221 }
1222 1222
@@ -1235,7 +1235,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud)
1235 GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; 1235 GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
1236 HIF_DEVICE *pHIFDevice = (HIF_DEVICE *)(pProt->pDev->HIFDevice); 1236 HIF_DEVICE *pHIFDevice = (HIF_DEVICE *)(pProt->pDev->HIFDevice);
1237 u32 scaledBaud, scratchAddr; 1237 u32 scaledBaud, scratchAddr;
1238 int status = A_OK; 1238 int status = 0;
1239 1239
1240 /* Divide the desired baud rate by 100 1240 /* Divide the desired baud rate by 100
1241 * Store the LSB in the local scratch register 4 and the MSB in the local 1241 * Store the LSB in the local scratch register 4 and the MSB in the local
@@ -1247,14 +1247,14 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud)
1247 scratchAddr = MBOX_BASE_ADDRESS | (LOCAL_SCRATCH_ADDRESS + 4 * MSB_SCRATCH_IDX); 1247 scratchAddr = MBOX_BASE_ADDRESS | (LOCAL_SCRATCH_ADDRESS + 4 * MSB_SCRATCH_IDX);
1248 scaledBaud = ((Baud / 100) >> (LOCAL_SCRATCH_VALUE_MSB+1)) & LOCAL_SCRATCH_VALUE_MASK; 1248 scaledBaud = ((Baud / 100) >> (LOCAL_SCRATCH_VALUE_MSB+1)) & LOCAL_SCRATCH_VALUE_MASK;
1249 status |= ar6000_WriteRegDiag(pHIFDevice, &scratchAddr, &scaledBaud); 1249 status |= ar6000_WriteRegDiag(pHIFDevice, &scratchAddr, &scaledBaud);
1250 if (A_OK != status) { 1250 if (0 != status) {
1251 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to set up baud rate in scratch register!")); 1251 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to set up baud rate in scratch register!"));
1252 return status; 1252 return status;
1253 } 1253 }
1254 1254
1255 /* Now interrupt the target to tell it about the baud rate */ 1255 /* Now interrupt the target to tell it about the baud rate */
1256 status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_BAUD_SET, BAUD_TIMEOUT_MS); 1256 status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_BAUD_SET, BAUD_TIMEOUT_MS);
1257 if (A_OK != status) { 1257 if (0 != status) {
1258 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to tell target to change baud rate!")); 1258 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to tell target to change baud rate!"));
1259 } 1259 }
1260 1260
diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c
index cf88a9af805..684eca9bd02 100644
--- a/drivers/staging/ath6kl/htc2/htc.c
+++ b/drivers/staging/ath6kl/htc2/htc.c
@@ -93,7 +93,7 @@ static void HTCCleanup(HTC_TARGET *target)
93HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) 93HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
94{ 94{
95 HTC_TARGET *target = NULL; 95 HTC_TARGET *target = NULL;
96 int status = A_OK; 96 int status = 0;
97 int i; 97 int i;
98 u32 ctrl_bufsz; 98 u32 ctrl_bufsz;
99 u32 blocksizes[HTC_MAILBOX_NUM_MAX]; 99 u32 blocksizes[HTC_MAILBOX_NUM_MAX];
diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c
index 8a794696d65..34454754b8c 100644
--- a/drivers/staging/ath6kl/htc2/htc_recv.c
+++ b/drivers/staging/ath6kl/htc2/htc_recv.c
@@ -105,7 +105,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target,
105 105
106 pOrigBuffer = pBuffer; 106 pOrigBuffer = pBuffer;
107 origLength = Length; 107 origLength = Length;
108 status = A_OK; 108 status = 0;
109 109
110 while (Length > 0) { 110 while (Length > 0) {
111 111
@@ -233,7 +233,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
233{ 233{
234 u8 temp; 234 u8 temp;
235 u8 *pBuf; 235 u8 *pBuf;
236 int status = A_OK; 236 int status = 0;
237 u16 payloadLen; 237 u16 payloadLen;
238 u32 lookAhead; 238 u32 lookAhead;
239 239
@@ -692,7 +692,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
692 HTC_ENDPOINT *pEndpoint, 692 HTC_ENDPOINT *pEndpoint,
693 HTC_PACKET_QUEUE *pQueue) 693 HTC_PACKET_QUEUE *pQueue)
694{ 694{
695 int status = A_OK; 695 int status = 0;
696 HTC_PACKET *pPacket; 696 HTC_PACKET *pPacket;
697 HTC_FRAME_HDR *pHdr; 697 HTC_FRAME_HDR *pHdr;
698 int i,j; 698 int i,j;
@@ -816,7 +816,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
816 /* clear flags */ 816 /* clear flags */
817 pPacket->PktInfo.AsRx.HTCRxFlags = 0; 817 pPacket->PktInfo.AsRx.HTCRxFlags = 0;
818 pPacket->PktInfo.AsRx.IndicationFlags = 0; 818 pPacket->PktInfo.AsRx.IndicationFlags = 0;
819 pPacket->Status = A_OK; 819 pPacket->Status = 0;
820 820
821 if (noRecycle) { 821 if (noRecycle) {
822 /* flag that these packets cannot be recycled, they have to be returned to the 822 /* flag that these packets cannot be recycled, they have to be returned to the
@@ -859,7 +859,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
859 if (status) { 859 if (status) {
860 if (A_NO_RESOURCE == status) { 860 if (A_NO_RESOURCE == status) {
861 /* this is actually okay */ 861 /* this is actually okay */
862 status = A_OK; 862 status = 0;
863 } 863 }
864 break; 864 break;
865 } 865 }
@@ -990,7 +990,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
990 int *pNumPacketsFetched, 990 int *pNumPacketsFetched,
991 bool PartialBundle) 991 bool PartialBundle)
992{ 992{
993 int status = A_OK; 993 int status = 0;
994 HIF_SCATTER_REQ *pScatterReq; 994 HIF_SCATTER_REQ *pScatterReq;
995 int i, totalLength; 995 int i, totalLength;
996 int pktsToScatter; 996 int pktsToScatter;
@@ -1120,7 +1120,7 @@ static INLINE void CheckRecvWaterMark(HTC_ENDPOINT *pEndpoint)
1120int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched) 1120int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched)
1121{ 1121{
1122 HTC_TARGET *target = (HTC_TARGET *)Context; 1122 HTC_TARGET *target = (HTC_TARGET *)Context;
1123 int status = A_OK; 1123 int status = 0;
1124 HTC_PACKET *pPacket; 1124 HTC_PACKET *pPacket;
1125 HTC_ENDPOINT *pEndpoint; 1125 HTC_ENDPOINT *pEndpoint;
1126 bool asyncProc = false; 1126 bool asyncProc = false;
@@ -1390,7 +1390,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
1390 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); 1390 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
1391 HTC_ENDPOINT *pEndpoint; 1391 HTC_ENDPOINT *pEndpoint;
1392 bool unblockRecv = false; 1392 bool unblockRecv = false;
1393 int status = A_OK; 1393 int status = 0;
1394 HTC_PACKET *pFirstPacket; 1394 HTC_PACKET *pFirstPacket;
1395 1395
1396 pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue); 1396 pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue);
@@ -1567,7 +1567,7 @@ int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
1567 u32 TimeoutInMs, 1567 u32 TimeoutInMs,
1568 bool *pbIsRecvPending) 1568 bool *pbIsRecvPending)
1569{ 1569{
1570 int status = A_OK; 1570 int status = 0;
1571 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); 1571 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
1572 1572
1573 status = DevWaitForPendingRecv(&target->Device, 1573 status = DevWaitForPendingRecv(&target->Device,
diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c
index 8b7c7f01ef5..a31acae9620 100644
--- a/drivers/staging/ath6kl/htc2/htc_send.c
+++ b/drivers/staging/ath6kl/htc2/htc_send.c
@@ -270,7 +270,7 @@ static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
270 HTC_PACKET *pPacket; 270 HTC_PACKET *pPacket;
271 HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pScatterReq->Context; 271 HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pScatterReq->Context;
272 HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target; 272 HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
273 int status = A_OK; 273 int status = 0;
274 HTC_PACKET_QUEUE sendCompletes; 274 HTC_PACKET_QUEUE sendCompletes;
275 275
276 INIT_HTC_PACKET_QUEUE(&sendCompletes); 276 INIT_HTC_PACKET_QUEUE(&sendCompletes);
@@ -705,7 +705,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
705 705
706 AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("-HTCSendPktsMultiple \n")); 706 AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("-HTCSendPktsMultiple \n"));
707 707
708 return A_OK; 708 return 0;
709} 709}
710 710
711/* HTC API - HTCSendPkt */ 711/* HTC API - HTCSendPkt */
diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c
index 08209a37034..9ddf32cd2df 100644
--- a/drivers/staging/ath6kl/htc2/htc_services.c
+++ b/drivers/staging/ath6kl/htc2/htc_services.c
@@ -126,7 +126,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
126 HTC_SERVICE_CONNECT_RESP *pConnectResp) 126 HTC_SERVICE_CONNECT_RESP *pConnectResp)
127{ 127{
128 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); 128 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
129 int status = A_OK; 129 int status = 0;
130 HTC_PACKET *pRecvPacket = NULL; 130 HTC_PACKET *pRecvPacket = NULL;
131 HTC_PACKET *pSendPacket = NULL; 131 HTC_PACKET *pSendPacket = NULL;
132 HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg; 132 HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg;
@@ -290,7 +290,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
290 /* save local connection flags */ 290 /* save local connection flags */
291 pEndpoint->LocalConnectionFlags = pConnectReq->LocalConnectionFlags; 291 pEndpoint->LocalConnectionFlags = pConnectReq->LocalConnectionFlags;
292 292
293 status = A_OK; 293 status = 0;
294 294
295 } while (false); 295 } while (false);
296 296
diff --git a/drivers/staging/ath6kl/include/common/athdefs.h b/drivers/staging/ath6kl/include/common/athdefs.h
index 255c7ddf308..74922481e06 100644
--- a/drivers/staging/ath6kl/include/common/athdefs.h
+++ b/drivers/staging/ath6kl/include/common/athdefs.h
@@ -32,11 +32,10 @@
32/* 32/*
33 * Generic error codes that can be used by hw, sta, ap, sim, dk 33 * Generic error codes that can be used by hw, sta, ap, sim, dk
34 * and any other environments. 34 * and any other environments.
35 * Feel free to add any more codes that you need. 35 * Feel free to add any more non-zero codes that you need.
36 */ 36 */
37 37
38#define A_ERROR (-1) /* Generic error return */ 38#define A_ERROR (-1) /* Generic error return */
39#define A_OK 0 /* success */
40#define A_DEVICE_NOT_FOUND 1 /* not able to find PCI device */ 39#define A_DEVICE_NOT_FOUND 1 /* not able to find PCI device */
41#define A_NO_MEMORY 2 /* not able to allocate memory, 40#define A_NO_MEMORY 2 /* not able to allocate memory,
42 * not avail#defineable */ 41 * not avail#defineable */
diff --git a/drivers/staging/ath6kl/include/common/wmi.h b/drivers/staging/ath6kl/include/common/wmi.h
index a03b4371519..f16ef28537b 100644
--- a/drivers/staging/ath6kl/include/common/wmi.h
+++ b/drivers/staging/ath6kl/include/common/wmi.h
@@ -1884,7 +1884,7 @@ typedef PREPACK struct {
1884} POSTPACK WMI_CHANNEL_LIST_REPLY; 1884} POSTPACK WMI_CHANNEL_LIST_REPLY;
1885 1885
1886typedef enum { 1886typedef enum {
1887 A_SUCCEEDED = A_OK, 1887 A_SUCCEEDED = 0,
1888 A_FAILED_DELETE_STREAM_DOESNOT_EXIST=250, 1888 A_FAILED_DELETE_STREAM_DOESNOT_EXIST=250,
1889 A_SUCCEEDED_MODIFY_STREAM=251, 1889 A_SUCCEEDED_MODIFY_STREAM=251,
1890 A_FAILED_INVALID_STREAM = 252, 1890 A_FAILED_INVALID_STREAM = 252,
diff --git a/drivers/staging/ath6kl/include/hci_transport_api.h b/drivers/staging/ath6kl/include/hci_transport_api.h
index 47d0db97ab5..8ab692db6cf 100644
--- a/drivers/staging/ath6kl/include/hci_transport_api.h
+++ b/drivers/staging/ath6kl/include/hci_transport_api.h
@@ -134,7 +134,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans);
134 @input: HciTrans - HCI transport handle 134 @input: HciTrans - HCI transport handle
135 pQueue - a queue holding one or more packets 135 pQueue - a queue holding one or more packets
136 @output: 136 @output:
137 @return: A_OK on success 137 @return: 0 on success
138 @notes: user must supply HTC packets for capturing incomming HCI packets. The caller 138 @notes: user must supply HTC packets for capturing incomming HCI packets. The caller
139 must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL() 139 must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
140 macro. Each packet in the queue must be of the same type and length 140 macro. Each packet in the queue must be of the same type and length
@@ -150,7 +150,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE
150 pPacket - packet to send 150 pPacket - packet to send
151 Synchronous - send the packet synchronously (blocking) 151 Synchronous - send the packet synchronously (blocking)
152 @output: 152 @output:
153 @return: A_OK 153 @return: 0
154 @notes: Caller must initialize packet using SET_HTC_PACKET_INFO_TX() and 154 @notes: Caller must initialize packet using SET_HTC_PACKET_INFO_TX() and
155 HCI_SET_PACKET_TYPE() macros to prepare the packet. 155 HCI_SET_PACKET_TYPE() macros to prepare the packet.
156 If Synchronous is set to false the call is fully asynchronous. On error or completion, 156 If Synchronous is set to false the call is fully asynchronous. On error or completion,
@@ -187,7 +187,7 @@ void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans);
187 @function name: HCI_TransportStart 187 @function name: HCI_TransportStart
188 @input: HciTrans - hci transport handle 188 @input: HciTrans - hci transport handle
189 @output: 189 @output:
190 @return: A_OK on success 190 @return: 0 on success
191 @notes: HCI transport communication will begin, the caller can expect the arrival 191 @notes: HCI transport communication will begin, the caller can expect the arrival
192 of HCI recv packets as soon as this call returns. 192 of HCI recv packets as soon as this call returns.
193 @example: 193 @example:
@@ -201,7 +201,7 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans);
201 @input: HciTrans - hci transport handle 201 @input: HciTrans - hci transport handle
202 Enable - enable or disable asynchronous recv 202 Enable - enable or disable asynchronous recv
203 @output: 203 @output:
204 @return: A_OK on success 204 @return: 0 on success
205 @notes: This API must be called when HCI recv is handled synchronously 205 @notes: This API must be called when HCI recv is handled synchronously
206 @example: 206 @example:
207 @see also: 207 @see also:
@@ -215,7 +215,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool E
215 pPacket - HTC packet to hold the recv data 215 pPacket - HTC packet to hold the recv data
216 MaxPollMS - maximum polling duration in Milliseconds; 216 MaxPollMS - maximum polling duration in Milliseconds;
217 @output: 217 @output:
218 @return: A_OK on success 218 @return: 0 on success
219 @notes: This API should be used only during HCI device initialization, the caller must call 219 @notes: This API should be used only during HCI device initialization, the caller must call
220 HCI_TransportEnableDisableAsyncRecv with Enable=false prior to using this API. 220 HCI_TransportEnableDisableAsyncRecv with Enable=false prior to using this API.
221 This API will only capture HCI Event packets. 221 This API will only capture HCI Event packets.
@@ -232,7 +232,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
232 @input: HciTrans - hci transport handle 232 @input: HciTrans - hci transport handle
233 Baud - baud rate in bps 233 Baud - baud rate in bps
234 @output: 234 @output:
235 @return: A_OK on success 235 @return: 0 on success
236 @notes: This API should be used only after HCI device initialization 236 @notes: This API should be used only after HCI device initialization
237 @example: 237 @example:
238 @see also: 238 @see also:
@@ -245,7 +245,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud);
245 @input: HciTrans - hci transport handle 245 @input: HciTrans - hci transport handle
246 Enable - 1 = Enable, 0 = Disable 246 Enable - 1 = Enable, 0 = Disable
247 @output: 247 @output:
248 @return: A_OK on success 248 @return: 0 on success
249 @notes: 249 @notes:
250 @example: 250 @example:
251 @see also: 251 @see also:
diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h
index 3cfa9f2c8e0..c5c9fed3fe4 100644
--- a/drivers/staging/ath6kl/include/htc_api.h
+++ b/drivers/staging/ath6kl/include/htc_api.h
@@ -341,7 +341,7 @@ int HTCStart(HTC_HANDLE HTCHandle);
341 @input: HTCHandle - HTC handle 341 @input: HTCHandle - HTC handle
342 pPacket - HTC receive packet to add 342 pPacket - HTC receive packet to add
343 @output: 343 @output:
344 @return: A_OK on success 344 @return: 0 on success
345 @notes: user must supply HTC packets for capturing incomming HTC frames. The caller 345 @notes: user must supply HTC packets for capturing incomming HTC frames. The caller
346 must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL() 346 must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
347 macro. 347 macro.
@@ -370,7 +370,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
370 @input: HTCHandle - HTC handle 370 @input: HTCHandle - HTC handle
371 pPacket - packet to send 371 pPacket - packet to send
372 @output: 372 @output:
373 @return: A_OK 373 @return: 0
374 @notes: Caller must initialize packet using SET_HTC_PACKET_INFO_TX() macro. 374 @notes: Caller must initialize packet using SET_HTC_PACKET_INFO_TX() macro.
375 This interface is fully asynchronous. On error, HTC SendPkt will 375 This interface is fully asynchronous. On error, HTC SendPkt will
376 call the registered Endpoint callback to cleanup the packet. 376 call the registered Endpoint callback to cleanup the packet.
@@ -499,7 +499,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle);
499 @input: HTCHandle - HTC handle 499 @input: HTCHandle - HTC handle
500 pPktQueue - local queue holding packets to send 500 pPktQueue - local queue holding packets to send
501 @output: 501 @output:
502 @return: A_OK 502 @return: 0
503 @notes: Caller must initialize each packet using SET_HTC_PACKET_INFO_TX() macro. 503 @notes: Caller must initialize each packet using SET_HTC_PACKET_INFO_TX() macro.
504 The queue must only contain packets directed at the same endpoint. 504 The queue must only contain packets directed at the same endpoint.
505 Caller supplies a pointer to an HTC_PACKET_QUEUE structure holding the TX packets in FIFO order. 505 Caller supplies a pointer to an HTC_PACKET_QUEUE structure holding the TX packets in FIFO order.
@@ -519,7 +519,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue);
519 @input: HTCHandle - HTC handle 519 @input: HTCHandle - HTC handle
520 pPktQueue - HTC receive packet queue holding packets to add 520 pPktQueue - HTC receive packet queue holding packets to add
521 @output: 521 @output:
522 @return: A_OK on success 522 @return: 0 on success
523 @notes: user must supply HTC packets for capturing incomming HTC frames. The caller 523 @notes: user must supply HTC packets for capturing incomming HTC frames. The caller
524 must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL() 524 must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
525 macro. The queue must only contain recv packets for the same endpoint. 525 macro. The queue must only contain recv packets for the same endpoint.
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c
index 354008904a6..29873ac1589 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c
+++ b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c
@@ -54,7 +54,7 @@ static int SendHCICommand(AR3K_CONFIG_INFO *pConfig,
54 int Length) 54 int Length)
55{ 55{
56 HTC_PACKET *pPacket = NULL; 56 HTC_PACKET *pPacket = NULL;
57 int status = A_OK; 57 int status = 0;
58 58
59 do { 59 do {
60 60
@@ -88,7 +88,7 @@ static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig,
88 u8 *pBuffer, 88 u8 *pBuffer,
89 int *pLength) 89 int *pLength)
90{ 90{
91 int status = A_OK; 91 int status = 0;
92 HTC_PACKET *pRecvPacket = NULL; 92 HTC_PACKET *pRecvPacket = NULL;
93 93
94 do { 94 do {
@@ -128,7 +128,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
128 u8 **ppEventBuffer, 128 u8 **ppEventBuffer,
129 u8 **ppBufferToFree) 129 u8 **ppBufferToFree)
130{ 130{
131 int status = A_OK; 131 int status = 0;
132 u8 *pBuffer = NULL; 132 u8 *pBuffer = NULL;
133 u8 *pTemp; 133 u8 *pTemp;
134 int length; 134 int length;
@@ -211,7 +211,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
211 211
212static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig) 212static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig)
213{ 213{
214 int status = A_OK; 214 int status = 0;
215 u8 hciBaudChangeCommand[] = {0x0c,0xfc,0x2,0,0}; 215 u8 hciBaudChangeCommand[] = {0x0c,0xfc,0x2,0,0};
216 u16 baudVal; 216 u16 baudVal;
217 u8 *pEvent = NULL; 217 u8 *pEvent = NULL;
@@ -312,7 +312,7 @@ static int AR3KExitMinBoot(AR3K_CONFIG_INFO *pConfig)
312 312
313static int AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig) 313static int AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig)
314{ 314{
315 int status = A_OK; 315 int status = 0;
316 u8 hciResetCommand[] = {0x03,0x0c,0x0}; 316 u8 hciResetCommand[] = {0x03,0x0c,0x0};
317 u8 *pEvent = NULL; 317 u8 *pEvent = NULL;
318 u8 *pBufferToFree = NULL; 318 u8 *pBufferToFree = NULL;
@@ -455,7 +455,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
455 455
456int AR3KConfigure(AR3K_CONFIG_INFO *pConfig) 456int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
457{ 457{
458 int status = A_OK; 458 int status = 0;
459 459
460 AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Configuring AR3K ...\n")); 460 AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Configuring AR3K ...\n"));
461 461
@@ -481,7 +481,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
481 481
482 482
483 /* Load patching and PST file if available*/ 483 /* Load patching and PST file if available*/
484 if (A_OK != AthPSInitialize(pConfig)) { 484 if (0 != AthPSInitialize(pConfig)) {
485 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Patch Download Failed!\n")); 485 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Patch Download Failed!\n"));
486 } 486 }
487 487
@@ -523,7 +523,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
523 523
524int AR3KConfigureExit(void *config) 524int AR3KConfigureExit(void *config)
525{ 525{
526 int status = A_OK; 526 int status = 0;
527 AR3K_CONFIG_INFO *pConfig = (AR3K_CONFIG_INFO *)config; 527 AR3K_CONFIG_INFO *pConfig = (AR3K_CONFIG_INFO *)config;
528 528
529 AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Cleaning up AR3K ...\n")); 529 AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Cleaning up AR3K ...\n"));
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
index 7106a6a080f..67e6d5edfa5 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
+++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
@@ -93,7 +93,7 @@ void Hci_log(A_UCHAR * log_string,A_UCHAR *data,u32 len)
93 93
94int AthPSInitialize(AR3K_CONFIG_INFO *hdev) 94int AthPSInitialize(AR3K_CONFIG_INFO *hdev)
95{ 95{
96 int status = A_OK; 96 int status = 0;
97 if(hdev == NULL) { 97 if(hdev == NULL) {
98 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Invalid Device handle received\n")); 98 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Invalid Device handle received\n"));
99 return A_ERROR; 99 return A_ERROR;
@@ -280,8 +280,8 @@ int PSSendOps(void *arg)
280 HciCmdList[0].Hcipacket, 280 HciCmdList[0].Hcipacket,
281 HciCmdList[0].packetLen, 281 HciCmdList[0].packetLen,
282 &event, 282 &event,
283 &bufferToFree) == A_OK) { 283 &bufferToFree) == 0) {
284 if(ReadPSEvent(event) == A_OK) { /* Exit if the status is success */ 284 if(ReadPSEvent(event) == 0) { /* Exit if the status is success */
285 if(bufferToFree != NULL) { 285 if(bufferToFree != NULL) {
286 A_FREE(bufferToFree); 286 A_FREE(bufferToFree);
287 } 287 }
@@ -309,8 +309,8 @@ int PSSendOps(void *arg)
309 HciCmdList[i].Hcipacket, 309 HciCmdList[i].Hcipacket,
310 HciCmdList[i].packetLen, 310 HciCmdList[i].packetLen,
311 &event, 311 &event,
312 &bufferToFree) == A_OK) { 312 &bufferToFree) == 0) {
313 if(ReadPSEvent(event) != A_OK) { /* Exit if the status is success */ 313 if(ReadPSEvent(event) != 0) { /* Exit if the status is success */
314 if(bufferToFree != NULL) { 314 if(bufferToFree != NULL) {
315 A_FREE(bufferToFree); 315 A_FREE(bufferToFree);
316 } 316 }
@@ -415,7 +415,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
415 return A_ERROR; 415 return A_ERROR;
416 } 416 }
417 417
418 return A_OK; 418 return 0;
419} 419}
420#endif /* HCI_TRANSPORT_SDIO */ 420#endif /* HCI_TRANSPORT_SDIO */
421 421
@@ -426,14 +426,14 @@ int ReadPSEvent(A_UCHAR* Data){
426 { 426 {
427 switch(Data[3]){ 427 switch(Data[3]){
428 case 0x0B: 428 case 0x0B:
429 return A_OK; 429 return 0;
430 break; 430 break;
431 case 0x0C: 431 case 0x0C:
432 /* Change Baudrate */ 432 /* Change Baudrate */
433 return A_OK; 433 return 0;
434 break; 434 break;
435 case 0x04: 435 case 0x04:
436 return A_OK; 436 return 0;
437 break; 437 break;
438 case 0x1E: 438 case 0x1E:
439 Rom_Version = Data[9]; 439 Rom_Version = Data[9];
@@ -445,7 +445,7 @@ int ReadPSEvent(A_UCHAR* Data){
445 Build_Version = ((Build_Version << 8) |Data[12]); 445 Build_Version = ((Build_Version << 8) |Data[12]);
446 Build_Version = ((Build_Version << 8) |Data[11]); 446 Build_Version = ((Build_Version << 8) |Data[11]);
447 Build_Version = ((Build_Version << 8) |Data[10]); 447 Build_Version = ((Build_Version << 8) |Data[10]);
448 return A_OK; 448 return 0;
449 break; 449 break;
450 450
451 451
@@ -499,13 +499,13 @@ int write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type)
499 bdaddr_cmd[outc] = bdaddr[inc]; 499 bdaddr_cmd[outc] = bdaddr[inc];
500 } 500 }
501 501
502 if(A_OK == SendHCICommandWaitCommandComplete(pConfig,bdaddr_cmd, 502 if(0 == SendHCICommandWaitCommandComplete(pConfig,bdaddr_cmd,
503 sizeof(bdaddr_cmd), 503 sizeof(bdaddr_cmd),
504 &event,&bufferToFree)) { 504 &event,&bufferToFree)) {
505 505
506 if(event[4] == 0xFC && event[5] == 0x00){ 506 if(event[4] == 0xFC && event[5] == 0x00){
507 if(event[3] == 0x0B){ 507 if(event[3] == 0x0B){
508 result = A_OK; 508 result = 0;
509 } 509 }
510 } 510 }
511 511
@@ -522,7 +522,7 @@ int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig)
522 u8 *event; 522 u8 *event;
523 u8 *bufferToFree = NULL; 523 u8 *bufferToFree = NULL;
524 int result = A_ERROR; 524 int result = A_ERROR;
525 if(A_OK == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) { 525 if(0 == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
526 result = ReadPSEvent(event); 526 result = ReadPSEvent(event);
527 527
528 } 528 }
@@ -543,7 +543,7 @@ int getDeviceType(AR3K_CONFIG_INFO *pConfig, u32 *code)
543 hciCommand[4] = (u8)((FPGA_REGISTER >> 8) & 0xFF); 543 hciCommand[4] = (u8)((FPGA_REGISTER >> 8) & 0xFF);
544 hciCommand[5] = (u8)((FPGA_REGISTER >> 16) & 0xFF); 544 hciCommand[5] = (u8)((FPGA_REGISTER >> 16) & 0xFF);
545 hciCommand[6] = (u8)((FPGA_REGISTER >> 24) & 0xFF); 545 hciCommand[6] = (u8)((FPGA_REGISTER >> 24) & 0xFF);
546 if(A_OK == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) { 546 if(0 == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
547 547
548 if(event[4] == 0xFC && event[5] == 0x00){ 548 if(event[4] == 0xFC && event[5] == 0x00){
549 switch(event[3]){ 549 switch(event[3]){
@@ -553,7 +553,7 @@ int getDeviceType(AR3K_CONFIG_INFO *pConfig, u32 *code)
553 reg = ((reg << 8) |event[7]); 553 reg = ((reg << 8) |event[7]);
554 reg = ((reg << 8) |event[6]); 554 reg = ((reg << 8) |event[6]);
555 *code = reg; 555 *code = reg;
556 result = A_OK; 556 result = 0;
557 557
558 break; 558 break;
559 case 0x06: 559 case 0x06:
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
index 10f2900d596..90ced223d1f 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
+++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
@@ -549,7 +549,7 @@ int AthParseFilesUnified(A_UCHAR *srcbuffer,u32 srclen, int FileFormat)
549 if(Buffer != NULL) { 549 if(Buffer != NULL) {
550 A_FREE(Buffer); 550 A_FREE(Buffer);
551 } 551 }
552 return A_OK; 552 return 0;
553 553
554} 554}
555 555
@@ -576,7 +576,7 @@ int GetNextTwoChar(A_UCHAR *srcbuffer,u32 len, u32 *pos, char *buffer)
576 { 576 {
577 return A_ERROR; 577 return A_ERROR;
578 } 578 }
579 return A_OK; 579 return 0;
580} 580}
581 581
582int AthDoParsePatch(A_UCHAR *patchbuffer, u32 patchlen) 582int AthDoParsePatch(A_UCHAR *patchbuffer, u32 patchlen)
@@ -654,7 +654,7 @@ int AthDoParsePatch(A_UCHAR *patchbuffer, u32 patchlen)
654 654
655 655
656 } 656 }
657 return A_OK; 657 return 0;
658} 658}
659 659
660 660
@@ -953,7 +953,7 @@ static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatch
953 case CHANGE_BDADDR: 953 case CHANGE_BDADDR:
954 break; 954 break;
955 } 955 }
956 return A_OK; 956 return 0;
957} 957}
958int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets) 958int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets)
959{ 959{
@@ -965,5 +965,5 @@ int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets)
965 A_FREE((*HciPacketList)[i].Hcipacket); 965 A_FREE((*HciPacketList)[i].Hcipacket);
966 } 966 }
967 A_FREE(*HciPacketList); 967 A_FREE(*HciPacketList);
968 return A_OK; 968 return 0;
969} 969}
diff --git a/drivers/staging/ath6kl/miscdrv/common_drv.c b/drivers/staging/ath6kl/miscdrv/common_drv.c
index bf71f96847e..7a77290da14 100644
--- a/drivers/staging/ath6kl/miscdrv/common_drv.c
+++ b/drivers/staging/ath6kl/miscdrv/common_drv.c
@@ -134,7 +134,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
134 return status; 134 return status;
135 } 135 }
136 136
137 return A_OK; 137 return 0;
138 138
139 139
140 140
@@ -177,7 +177,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
177 return status; 177 return status;
178 } 178 }
179 179
180 return A_OK; 180 return 0;
181} 181}
182 182
183#endif 183#endif
@@ -248,11 +248,11 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
248 A_UCHAR *data, u32 length) 248 A_UCHAR *data, u32 length)
249{ 249{
250 u32 count; 250 u32 count;
251 int status = A_OK; 251 int status = 0;
252 252
253 for (count = 0; count < length; count += 4, address += 4) { 253 for (count = 0; count < length; count += 4, address += 4) {
254 if ((status = ar6000_ReadRegDiag(hifDevice, &address, 254 if ((status = ar6000_ReadRegDiag(hifDevice, &address,
255 (u32 *)&data[count])) != A_OK) 255 (u32 *)&data[count])) != 0)
256 { 256 {
257 break; 257 break;
258 } 258 }
@@ -266,11 +266,11 @@ ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
266 A_UCHAR *data, u32 length) 266 A_UCHAR *data, u32 length)
267{ 267{
268 u32 count; 268 u32 count;
269 int status = A_OK; 269 int status = 0;
270 270
271 for (count = 0; count < length; count += 4, address += 4) { 271 for (count = 0; count < length; count += 4, address += 4) {
272 if ((status = ar6000_WriteRegDiag(hifDevice, &address, 272 if ((status = ar6000_WriteRegDiag(hifDevice, &address,
273 (u32 *)&data[count])) != A_OK) 273 (u32 *)&data[count])) != 0)
274 { 274 {
275 break; 275 break;
276 } 276 }
@@ -382,13 +382,13 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
382 actual_wait += 100; 382 actual_wait += 100;
383 383
384 data = 0; 384 data = 0;
385 if (ar6000_ReadRegDiag(hifDevice, &address, &data) != A_OK) { 385 if (ar6000_ReadRegDiag(hifDevice, &address, &data) != 0) {
386 return A_ERROR; 386 return A_ERROR;
387 } 387 }
388 388
389 if (data != 0) { 389 if (data != 0) {
390 /* No need to wait longer -- we have a BMI credit */ 390 /* No need to wait longer -- we have a BMI credit */
391 return A_OK; 391 return 0;
392 } 392 }
393 } 393 }
394 return A_ERROR; /* timed out */ 394 return A_ERROR; /* timed out */
@@ -401,7 +401,7 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
401/* reset device */ 401/* reset device */
402int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset) 402int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset)
403{ 403{
404 int status = A_OK; 404 int status = 0;
405 u32 address; 405 u32 address;
406 u32 data; 406 u32 data;
407 407
@@ -476,7 +476,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompl
476 AR_DEBUG_PRINTF(ATH_LOG_ERR, ("Failed to reset target \n")); 476 AR_DEBUG_PRINTF(ATH_LOG_ERR, ("Failed to reset target \n"));
477 } 477 }
478 478
479 return A_OK; 479 return 0;
480} 480}
481 481
482/* This should be called in BMI phase after firmware is downloaded */ 482/* This should be called in BMI phase after firmware is downloaded */
@@ -490,7 +490,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
490 if (BMIReadMemory(hifDevice, 490 if (BMIReadMemory(hifDevice,
491 HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_board_data), 491 HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_board_data),
492 (A_UCHAR *)&eepHeaderAddr, 492 (A_UCHAR *)&eepHeaderAddr,
493 4)!= A_OK) 493 4)!= 0)
494 { 494 {
495 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadMemory for reading board data address failed \n")); 495 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadMemory for reading board data address failed \n"));
496 return; 496 return;
@@ -500,7 +500,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
500 eepHeaderAddr += 36; /* AR6003 customer data section offset is 37 */ 500 eepHeaderAddr += 36; /* AR6003 customer data section offset is 37 */
501 501
502 for (i=0; i<AR6003_CUST_DATA_SIZE+4; i+=4){ 502 for (i=0; i<AR6003_CUST_DATA_SIZE+4; i+=4){
503 if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&AR6003CustDataShadow[i])!= A_OK) { 503 if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&AR6003CustDataShadow[i])!= 0) {
504 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadSOCRegister () failed \n")); 504 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadSOCRegister () failed \n"));
505 return ; 505 return ;
506 } 506 }
@@ -514,7 +514,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
514 eepHeaderAddr += 64; /* AR6002 customer data sectioin offset is 64 */ 514 eepHeaderAddr += 64; /* AR6002 customer data sectioin offset is 64 */
515 515
516 for (i=0; i<AR6002_CUST_DATA_SIZE; i+=4){ 516 for (i=0; i<AR6002_CUST_DATA_SIZE; i+=4){
517 if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&custDataAR6002[i])!= A_OK) { 517 if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&custDataAR6002[i])!= 0) {
518 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadSOCRegister () failed \n")); 518 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadSOCRegister () failed \n"));
519 return ; 519 return ;
520 } 520 }
@@ -686,7 +686,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
686 686
687static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion) 687static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
688{ 688{
689 int status = A_OK; 689 int status = 0;
690 690
691 /* placeholder */ 691 /* placeholder */
692 692
@@ -695,7 +695,7 @@ static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
695 695
696static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion) 696static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion)
697{ 697{
698 int status = A_OK; 698 int status = 0;
699 699
700 /* placeholder */ 700 /* placeholder */
701 701
@@ -714,7 +714,7 @@ int ar6000_prepare_target(HIF_DEVICE *hifDevice,
714 return prepare_ar6003(hifDevice,TargetVersion); 714 return prepare_ar6003(hifDevice,TargetVersion);
715 } 715 }
716 716
717 return A_OK; 717 return 0;
718} 718}
719 719
720#if defined(CONFIG_AR6002_REV1_FORCE_HOST) 720#if defined(CONFIG_AR6002_REV1_FORCE_HOST)
@@ -734,7 +734,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
734 }; 734 };
735 struct forceROM_s *ForceROM; 735 struct forceROM_s *ForceROM;
736 s32 szForceROM; 736 s32 szForceROM;
737 int status = A_OK; 737 int status = 0;
738 u32 address; 738 u32 address;
739 u32 data; 739 u32 data;
740 740
@@ -782,7 +782,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
782 { 782 {
783 if (ar6000_WriteRegDiag(hifDevice, 783 if (ar6000_WriteRegDiag(hifDevice,
784 &ForceROM[i].addr, 784 &ForceROM[i].addr,
785 &ForceROM[i].data) != A_OK) 785 &ForceROM[i].data) != 0)
786 { 786 {
787 ATH_DEBUG_PRINTF (DBG_MISC_DRV, ATH_DEBUG_TRC, ("Cannot force Target to recognize Host!\n")); 787 ATH_DEBUG_PRINTF (DBG_MISC_DRV, ATH_DEBUG_TRC, ("Cannot force Target to recognize Host!\n"));
788 return A_ERROR; 788 return A_ERROR;
@@ -791,7 +791,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
791 791
792 A_MDELAY(1000); 792 A_MDELAY(1000);
793 793
794 return A_OK; 794 return 0;
795} 795}
796 796
797#endif /* CONFIG_AR6002_REV1_FORCE_HOST */ 797#endif /* CONFIG_AR6002_REV1_FORCE_HOST */
@@ -942,7 +942,7 @@ int a_get_module_mask(char *module_name, u32 *pMask)
942 } 942 }
943 943
944 *pMask = pInfo->CurrentMask; 944 *pMask = pInfo->CurrentMask;
945 return A_OK; 945 return 0;
946} 946}
947 947
948int a_set_module_mask(char *module_name, u32 Mask) 948int a_set_module_mask(char *module_name, u32 Mask)
@@ -955,7 +955,7 @@ int a_set_module_mask(char *module_name, u32 Mask)
955 955
956 pInfo->CurrentMask = Mask; 956 pInfo->CurrentMask = Mask;
957 A_PRINTF("Module %s, new mask: 0x%8.8X \n",module_name,pInfo->CurrentMask); 957 A_PRINTF("Module %s, new mask: 0x%8.8X \n",module_name,pInfo->CurrentMask);
958 return A_OK; 958 return 0;
959} 959}
960 960
961 961
@@ -1002,7 +1002,7 @@ int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice,
1002 u32 TargetType, 1002 u32 TargetType,
1003 u32 Flags) 1003 u32 Flags)
1004{ 1004{
1005 int status = A_OK; 1005 int status = 0;
1006 1006
1007 do { 1007 do {
1008 1008
diff --git a/drivers/staging/ath6kl/miscdrv/credit_dist.c b/drivers/staging/ath6kl/miscdrv/credit_dist.c
index b813f8e8c4d..68b1ed67b30 100644
--- a/drivers/staging/ath6kl/miscdrv/credit_dist.c
+++ b/drivers/staging/ath6kl/miscdrv/credit_dist.c
@@ -413,6 +413,6 @@ int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, COMMON_CREDIT_STATE_INFO *pCr
413 servicepriority, 413 servicepriority,
414 5); 414 5);
415 415
416 return A_OK; 416 return 0;
417} 417}
418 418
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
index f08c08b1668..26dafc90451 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -410,19 +410,19 @@ ar6000_set_host_app_area(AR_SOFTC_T *ar)
410 410
411 /* Fetch the address of the host_app_area_s instance in the host interest area */ 411 /* Fetch the address of the host_app_area_s instance in the host interest area */
412 address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_app_host_interest)); 412 address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_app_host_interest));
413 if (ar6000_ReadRegDiag(ar->arHifDevice, &address, &data) != A_OK) { 413 if (ar6000_ReadRegDiag(ar->arHifDevice, &address, &data) != 0) {
414 return A_ERROR; 414 return A_ERROR;
415 } 415 }
416 address = TARG_VTOP(ar->arTargetType, data); 416 address = TARG_VTOP(ar->arTargetType, data);
417 host_app_area.wmi_protocol_ver = WMI_PROTOCOL_VERSION; 417 host_app_area.wmi_protocol_ver = WMI_PROTOCOL_VERSION;
418 if (ar6000_WriteDataDiag(ar->arHifDevice, address, 418 if (ar6000_WriteDataDiag(ar->arHifDevice, address,
419 (A_UCHAR *)&host_app_area, 419 (A_UCHAR *)&host_app_area,
420 sizeof(struct host_app_area_s)) != A_OK) 420 sizeof(struct host_app_area_s)) != 0)
421 { 421 {
422 return A_ERROR; 422 return A_ERROR;
423 } 423 }
424 424
425 return A_OK; 425 return 0;
426} 426}
427 427
428u32 dbglog_get_debug_hdr_ptr(AR_SOFTC_T *ar) 428u32 dbglog_get_debug_hdr_ptr(AR_SOFTC_T *ar)
@@ -433,7 +433,7 @@ u32 dbglog_get_debug_hdr_ptr(AR_SOFTC_T *ar)
433 433
434 address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_dbglog_hdr)); 434 address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_dbglog_hdr));
435 if ((status = ar6000_ReadDataDiag(ar->arHifDevice, address, 435 if ((status = ar6000_ReadDataDiag(ar->arHifDevice, address,
436 (A_UCHAR *)&param, 4)) != A_OK) 436 (A_UCHAR *)&param, 4)) != 0)
437 { 437 {
438 param = 0; 438 param = 0;
439 } 439 }
@@ -566,7 +566,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar)
566 if (ar->log_cnt > (DBGLOG_HOST_LOG_BUFFER_SIZE - length)) { 566 if (ar->log_cnt > (DBGLOG_HOST_LOG_BUFFER_SIZE - length)) {
567 ar->log_cnt = 0; 567 ar->log_cnt = 0;
568 } 568 }
569 if(A_OK != ar6000_ReadDataDiag(ar->arHifDevice, address, 569 if(0 != ar6000_ReadDataDiag(ar->arHifDevice, address,
570 (A_UCHAR *)&ar->log_buffer[ar->log_cnt], length)) 570 (A_UCHAR *)&ar->log_buffer[ar->log_cnt], length))
571 { 571 {
572 break; 572 break;
@@ -581,7 +581,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar)
581 address = TARG_VTOP(ar->arTargetType, data[0] /* next */); 581 address = TARG_VTOP(ar->arTargetType, data[0] /* next */);
582 length = 4 /* sizeof(next) */ + 4 /* sizeof(buffer) */ + 4 /* sizeof(bufsize) */ + 4 /* sizeof(length) */ + 4 /* sizeof(count) */ + 4 /* sizeof(free) */; 582 length = 4 /* sizeof(next) */ + 4 /* sizeof(buffer) */ + 4 /* sizeof(bufsize) */ + 4 /* sizeof(length) */ + 4 /* sizeof(count) */ + 4 /* sizeof(free) */;
583 A_MEMZERO(data, sizeof(data)); 583 A_MEMZERO(data, sizeof(data));
584 if(A_OK != ar6000_ReadDataDiag(ar->arHifDevice, address, 584 if(0 != ar6000_ReadDataDiag(ar->arHifDevice, address,
585 (A_UCHAR *)&data, length)) 585 (A_UCHAR *)&data, length))
586 { 586 {
587 break; 587 break;
@@ -592,7 +592,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar)
592 592
593 ar->dbgLogFetchInProgress = false; 593 ar->dbgLogFetchInProgress = false;
594 594
595 return A_OK; 595 return 0;
596} 596}
597 597
598void 598void
@@ -759,7 +759,7 @@ aptcTimerHandler(unsigned long arg)
759 AR6000_SPIN_UNLOCK(&ar->arLock, 0); 759 AR6000_SPIN_UNLOCK(&ar->arLock, 0);
760 status = wmi_powermode_cmd(ar->arWmi, REC_POWER); 760 status = wmi_powermode_cmd(ar->arWmi, REC_POWER);
761 AR6000_SPIN_LOCK(&ar->arLock, 0); 761 AR6000_SPIN_LOCK(&ar->arLock, 0);
762 A_ASSERT(status == A_OK); 762 A_ASSERT(status == 0);
763 aptcTR.timerScheduled = false; 763 aptcTR.timerScheduled = false;
764 } else { 764 } else {
765 A_TIMEOUT_MS(&aptcTimer, APTC_TRAFFIC_SAMPLING_INTERVAL, 0); 765 A_TIMEOUT_MS(&aptcTimer, APTC_TRAFFIC_SAMPLING_INTERVAL, 0);
@@ -816,7 +816,7 @@ ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj,
816 816
817 if (index == MAX_AR6000) return 0; 817 if (index == MAX_AR6000) return 0;
818 818
819 if ((BMIRawRead(ar->arHifDevice, (A_UCHAR*)buf, count, true)) != A_OK) { 819 if ((BMIRawRead(ar->arHifDevice, (A_UCHAR*)buf, count, true)) != 0) {
820 return 0; 820 return 0;
821 } 821 }
822 822
@@ -843,7 +843,7 @@ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj,
843 843
844 if (index == MAX_AR6000) return 0; 844 if (index == MAX_AR6000) return 0;
845 845
846 if ((BMIRawWrite(ar->arHifDevice, (A_UCHAR*)buf, count)) != A_OK) { 846 if ((BMIRawWrite(ar->arHifDevice, (A_UCHAR*)buf, count)) != 0) {
847 return 0; 847 return 0;
848 } 848 }
849 849
@@ -876,7 +876,7 @@ ar6000_sysfs_bmi_init(AR_SOFTC_T *ar)
876 return A_ERROR; 876 return A_ERROR;
877 } 877 }
878 878
879 return A_OK; 879 return 0;
880} 880}
881 881
882static void 882static void
@@ -888,7 +888,7 @@ ar6000_sysfs_bmi_deinit(AR_SOFTC_T *ar)
888} 888}
889 889
890#define bmifn(fn) do { \ 890#define bmifn(fn) do { \
891 if ((fn) < A_OK) { \ 891 if ((fn) < 0) { \
892 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI operation failed: %d\n", __LINE__)); \ 892 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI operation failed: %d\n", __LINE__)); \
893 return A_ERROR; \ 893 return A_ERROR; \
894 } \ 894 } \
@@ -1151,7 +1151,7 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, u32 address, bool c
1151 return A_ERROR; 1151 return A_ERROR;
1152 } 1152 }
1153 A_RELEASE_FIRMWARE(fw_entry); 1153 A_RELEASE_FIRMWARE(fw_entry);
1154 return A_OK; 1154 return 0;
1155} 1155}
1156#endif /* INIT_MODE_DRV_ENABLED */ 1156#endif /* INIT_MODE_DRV_ENABLED */
1157 1157
@@ -1163,13 +1163,13 @@ ar6000_update_bdaddr(AR_SOFTC_T *ar)
1163 u32 address; 1163 u32 address;
1164 1164
1165 if (BMIReadMemory(ar->arHifDevice, 1165 if (BMIReadMemory(ar->arHifDevice,
1166 HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data), (A_UCHAR *)&address, 4) != A_OK) 1166 HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data), (A_UCHAR *)&address, 4) != 0)
1167 { 1167 {
1168 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for hi_board_data failed\n")); 1168 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for hi_board_data failed\n"));
1169 return A_ERROR; 1169 return A_ERROR;
1170 } 1170 }
1171 1171
1172 if (BMIReadMemory(ar->arHifDevice, address + BDATA_BDADDR_OFFSET, (A_UCHAR *)ar->bdaddr, 6) != A_OK) 1172 if (BMIReadMemory(ar->arHifDevice, address + BDATA_BDADDR_OFFSET, (A_UCHAR *)ar->bdaddr, 6) != 0)
1173 { 1173 {
1174 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for BD address failed\n")); 1174 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for BD address failed\n"));
1175 return A_ERROR; 1175 return A_ERROR;
@@ -1179,7 +1179,7 @@ ar6000_update_bdaddr(AR_SOFTC_T *ar)
1179 ar->bdaddr[4], ar->bdaddr[5])); 1179 ar->bdaddr[4], ar->bdaddr[5]));
1180 } 1180 }
1181 1181
1182return A_OK; 1182return 0;
1183} 1183}
1184 1184
1185int 1185int
@@ -1284,7 +1284,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
1284 AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("Board Data download address: 0x%x\n", address)); 1284 AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("Board Data download address: 0x%x\n", address));
1285 1285
1286 /* Write EEPROM data to Target RAM */ 1286 /* Write EEPROM data to Target RAM */
1287 if ((ar6000_transfer_bin_file(ar, AR6K_BOARD_DATA_FILE, address, false)) != A_OK) { 1287 if ((ar6000_transfer_bin_file(ar, AR6K_BOARD_DATA_FILE, address, false)) != 0) {
1288 return A_ERROR; 1288 return A_ERROR;
1289 } 1289 }
1290 1290
@@ -1295,7 +1295,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
1295 /* Transfer One time Programmable data */ 1295 /* Transfer One time Programmable data */
1296 AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver); 1296 AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver);
1297 status = ar6000_transfer_bin_file(ar, AR6K_OTP_FILE, address, true); 1297 status = ar6000_transfer_bin_file(ar, AR6K_OTP_FILE, address, true);
1298 if (status == A_OK) { 1298 if (status == 0) {
1299 /* Execute the OTP code */ 1299 /* Execute the OTP code */
1300 param = 0; 1300 param = 0;
1301 AR6K_APP_START_OVERRIDE_ADDRESS(address, ar->arVersion.target_ver); 1301 AR6K_APP_START_OVERRIDE_ADDRESS(address, ar->arVersion.target_ver);
@@ -1310,7 +1310,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
1310 1310
1311 /* Download Target firmware */ 1311 /* Download Target firmware */
1312 AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver); 1312 AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver);
1313 if ((ar6000_transfer_bin_file(ar, AR6K_FIRMWARE_FILE, address, true)) != A_OK) { 1313 if ((ar6000_transfer_bin_file(ar, AR6K_FIRMWARE_FILE, address, true)) != 0) {
1314 return A_ERROR; 1314 return A_ERROR;
1315 } 1315 }
1316 1316
@@ -1320,7 +1320,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
1320 1320
1321 /* Apply the patches */ 1321 /* Apply the patches */
1322 AR6K_PATCH_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver); 1322 AR6K_PATCH_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver);
1323 if ((ar6000_transfer_bin_file(ar, AR6K_PATCH_FILE, address, false)) != A_OK) { 1323 if ((ar6000_transfer_bin_file(ar, AR6K_PATCH_FILE, address, false)) != 0) {
1324 return A_ERROR; 1324 return A_ERROR;
1325 } 1325 }
1326 1326
@@ -1394,7 +1394,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
1394#endif /* INIT_MODE_DRV_ENABLED */ 1394#endif /* INIT_MODE_DRV_ENABLED */
1395 } 1395 }
1396 1396
1397 return A_OK; 1397 return 0;
1398} 1398}
1399 1399
1400int 1400int
@@ -1406,7 +1406,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1406 if (BMIWriteMemory(ar->arHifDevice, 1406 if (BMIWriteMemory(ar->arHifDevice,
1407 HOST_INTEREST_ITEM_ADDRESS(ar, hi_serial_enable), 1407 HOST_INTEREST_ITEM_ADDRESS(ar, hi_serial_enable),
1408 (A_UCHAR *)&param, 1408 (A_UCHAR *)&param,
1409 4)!= A_OK) 1409 4)!= 0)
1410 { 1410 {
1411 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for enableuartprint failed \n")); 1411 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for enableuartprint failed \n"));
1412 return A_ERROR; 1412 return A_ERROR;
@@ -1419,7 +1419,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1419 if (BMIWriteMemory(ar->arHifDevice, 1419 if (BMIWriteMemory(ar->arHifDevice,
1420 HOST_INTEREST_ITEM_ADDRESS(ar, hi_app_host_interest), 1420 HOST_INTEREST_ITEM_ADDRESS(ar, hi_app_host_interest),
1421 (A_UCHAR *)&param, 1421 (A_UCHAR *)&param,
1422 4)!= A_OK) 1422 4)!= 0)
1423 { 1423 {
1424 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for htc version failed \n")); 1424 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for htc version failed \n"));
1425 return A_ERROR; 1425 return A_ERROR;
@@ -1438,7 +1438,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1438 if (BMIReadMemory(ar->arHifDevice, 1438 if (BMIReadMemory(ar->arHifDevice,
1439 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), 1439 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
1440 (A_UCHAR *)&param, 1440 (A_UCHAR *)&param,
1441 4)!= A_OK) 1441 4)!= 0)
1442 { 1442 {
1443 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for enabletimerwar failed \n")); 1443 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for enabletimerwar failed \n"));
1444 return A_ERROR; 1444 return A_ERROR;
@@ -1449,7 +1449,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1449 if (BMIWriteMemory(ar->arHifDevice, 1449 if (BMIWriteMemory(ar->arHifDevice,
1450 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), 1450 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
1451 (A_UCHAR *)&param, 1451 (A_UCHAR *)&param,
1452 4) != A_OK) 1452 4) != 0)
1453 { 1453 {
1454 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for enabletimerwar failed \n")); 1454 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for enabletimerwar failed \n"));
1455 return A_ERROR; 1455 return A_ERROR;
@@ -1464,7 +1464,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1464 if (BMIReadMemory(ar->arHifDevice, 1464 if (BMIReadMemory(ar->arHifDevice,
1465 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), 1465 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
1466 (A_UCHAR *)&param, 1466 (A_UCHAR *)&param,
1467 4)!= A_OK) 1467 4)!= 0)
1468 { 1468 {
1469 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for setting fwmode failed \n")); 1469 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for setting fwmode failed \n"));
1470 return A_ERROR; 1470 return A_ERROR;
@@ -1475,7 +1475,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1475 if (BMIWriteMemory(ar->arHifDevice, 1475 if (BMIWriteMemory(ar->arHifDevice,
1476 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), 1476 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
1477 (A_UCHAR *)&param, 1477 (A_UCHAR *)&param,
1478 4) != A_OK) 1478 4) != 0)
1479 { 1479 {
1480 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for setting fwmode failed \n")); 1480 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for setting fwmode failed \n"));
1481 return A_ERROR; 1481 return A_ERROR;
@@ -1490,7 +1490,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1490 if (BMIReadMemory(ar->arHifDevice, 1490 if (BMIReadMemory(ar->arHifDevice,
1491 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), 1491 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
1492 (A_UCHAR *)&param, 1492 (A_UCHAR *)&param,
1493 4)!= A_OK) 1493 4)!= 0)
1494 { 1494 {
1495 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for disabling debug logs failed\n")); 1495 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for disabling debug logs failed\n"));
1496 return A_ERROR; 1496 return A_ERROR;
@@ -1501,7 +1501,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1501 if (BMIWriteMemory(ar->arHifDevice, 1501 if (BMIWriteMemory(ar->arHifDevice,
1502 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), 1502 HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
1503 (A_UCHAR *)&param, 1503 (A_UCHAR *)&param,
1504 4) != A_OK) 1504 4) != 0)
1505 { 1505 {
1506 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for HI_OPTION_DISABLE_DBGLOG\n")); 1506 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for HI_OPTION_DISABLE_DBGLOG\n"));
1507 return A_ERROR; 1507 return A_ERROR;
@@ -1523,7 +1523,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1523 if (BMIWriteMemory(ar->arHifDevice, 1523 if (BMIWriteMemory(ar->arHifDevice,
1524 HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_ext_data), 1524 HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_ext_data),
1525 (A_UCHAR *)&param, 1525 (A_UCHAR *)&param,
1526 4) != A_OK) 1526 4) != 0)
1527 { 1527 {
1528 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for hi_board_ext_data failed \n")); 1528 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for hi_board_ext_data failed \n"));
1529 return A_ERROR; 1529 return A_ERROR;
@@ -1547,7 +1547,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
1547 return A_ERROR; 1547 return A_ERROR;
1548 } 1548 }
1549 } 1549 }
1550 return A_OK; 1550 return 0;
1551} 1551}
1552 1552
1553static void 1553static void
@@ -1603,7 +1603,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
1603#ifdef ATH6K_CONFIG_CFG80211 1603#ifdef ATH6K_CONFIG_CFG80211
1604 struct wireless_dev *wdev; 1604 struct wireless_dev *wdev;
1605#endif /* ATH6K_CONFIG_CFG80211 */ 1605#endif /* ATH6K_CONFIG_CFG80211 */
1606 int init_status = A_OK; 1606 int init_status = 0;
1607 1607
1608 AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("ar6000_available\n")); 1608 AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("ar6000_available\n"));
1609 1609
@@ -1722,7 +1722,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
1722 { 1722 {
1723 struct bmi_target_info targ_info; 1723 struct bmi_target_info targ_info;
1724 1724
1725 if (BMIGetTargetInfo(ar->arHifDevice, &targ_info) != A_OK) { 1725 if (BMIGetTargetInfo(ar->arHifDevice, &targ_info) != 0) {
1726 init_status = A_ERROR; 1726 init_status = A_ERROR;
1727 goto avail_ev_failed; 1727 goto avail_ev_failed;
1728 } 1728 }
@@ -1733,14 +1733,14 @@ ar6000_avail_ev(void *context, void *hif_handle)
1733 /* do any target-specific preparation that can be done through BMI */ 1733 /* do any target-specific preparation that can be done through BMI */
1734 if (ar6000_prepare_target(ar->arHifDevice, 1734 if (ar6000_prepare_target(ar->arHifDevice,
1735 targ_info.target_type, 1735 targ_info.target_type,
1736 targ_info.target_ver) != A_OK) { 1736 targ_info.target_ver) != 0) {
1737 init_status = A_ERROR; 1737 init_status = A_ERROR;
1738 goto avail_ev_failed; 1738 goto avail_ev_failed;
1739 } 1739 }
1740 1740
1741 } 1741 }
1742 1742
1743 if (ar6000_configure_target(ar) != A_OK) { 1743 if (ar6000_configure_target(ar) != 0) {
1744 init_status = A_ERROR; 1744 init_status = A_ERROR;
1745 goto avail_ev_failed; 1745 goto avail_ev_failed;
1746 } 1746 }
@@ -1795,9 +1795,9 @@ ar6000_avail_ev(void *context, void *hif_handle)
1795 if ((wlaninitmode == WLAN_INIT_MODE_UDEV) || 1795 if ((wlaninitmode == WLAN_INIT_MODE_UDEV) ||
1796 (wlaninitmode == WLAN_INIT_MODE_DRV)) 1796 (wlaninitmode == WLAN_INIT_MODE_DRV))
1797 { 1797 {
1798 int status = A_OK; 1798 int status = 0;
1799 do { 1799 do {
1800 if ((status = ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != A_OK) 1800 if ((status = ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != 0)
1801 { 1801 {
1802 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_sysfs_bmi_get_config failed\n")); 1802 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_sysfs_bmi_get_config failed\n"));
1803 break; 1803 break;
@@ -1806,7 +1806,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
1806 break; /* Don't call ar6000_init for ART */ 1806 break; /* Don't call ar6000_init for ART */
1807#endif 1807#endif
1808 rtnl_lock(); 1808 rtnl_lock();
1809 status = (ar6000_init(dev)==0) ? A_OK : A_ERROR; 1809 status = (ar6000_init(dev)==0) ? 0 : A_ERROR;
1810 rtnl_unlock(); 1810 rtnl_unlock();
1811 if (status) { 1811 if (status) {
1812 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_init\n")); 1812 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_init\n"));
@@ -1852,7 +1852,7 @@ static void ar6000_target_failure(void *Instance, int Status)
1852 WMI_TARGET_ERROR_REPORT_EVENT errEvent; 1852 WMI_TARGET_ERROR_REPORT_EVENT errEvent;
1853 static bool sip = false; 1853 static bool sip = false;
1854 1854
1855 if (Status != A_OK) { 1855 if (Status != 0) {
1856 1856
1857 printk(KERN_ERR "ar6000_target_failure: target asserted \n"); 1857 printk(KERN_ERR "ar6000_target_failure: target asserted \n");
1858 1858
@@ -1889,26 +1889,26 @@ ar6000_unavail_ev(void *context, void *hif_handle)
1889 ar6000_devices[ar->arDeviceIndex] = NULL; 1889 ar6000_devices[ar->arDeviceIndex] = NULL;
1890 ar6000_destroy(ar->arNetDev, 1); 1890 ar6000_destroy(ar->arNetDev, 1);
1891 1891
1892 return A_OK; 1892 return 0;
1893} 1893}
1894 1894
1895void 1895void
1896ar6000_restart_endpoint(struct net_device *dev) 1896ar6000_restart_endpoint(struct net_device *dev)
1897{ 1897{
1898 int status = A_OK; 1898 int status = 0;
1899 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 1899 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
1900 1900
1901 BMIInit(); 1901 BMIInit();
1902 do { 1902 do {
1903 if ( (status=ar6000_configure_target(ar))!=A_OK) 1903 if ( (status=ar6000_configure_target(ar))!= 0)
1904 break; 1904 break;
1905 if ( (status=ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != A_OK) 1905 if ( (status=ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != 0)
1906 { 1906 {
1907 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_sysfs_bmi_get_config failed\n")); 1907 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_sysfs_bmi_get_config failed\n"));
1908 break; 1908 break;
1909 } 1909 }
1910 rtnl_lock(); 1910 rtnl_lock();
1911 status = (ar6000_init(dev)==0) ? A_OK : A_ERROR; 1911 status = (ar6000_init(dev)==0) ? 0 : A_ERROR;
1912 rtnl_unlock(); 1912 rtnl_unlock();
1913 1913
1914 if (status) { 1914 if (status) {
@@ -1919,7 +1919,7 @@ ar6000_restart_endpoint(struct net_device *dev)
1919 } 1919 }
1920 } while (0); 1920 } while (0);
1921 1921
1922 if (status==A_OK) { 1922 if (status== 0) {
1923 return; 1923 return;
1924 } 1924 }
1925 1925
@@ -2016,7 +2016,7 @@ ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs)
2016 A_MEMZERO(&ar3kconfig,sizeof(ar3kconfig)); 2016 A_MEMZERO(&ar3kconfig,sizeof(ar3kconfig));
2017 ar6000_set_default_ar3kconfig(ar, (void *)&ar3kconfig); 2017 ar6000_set_default_ar3kconfig(ar, (void *)&ar3kconfig);
2018 status = ar->exitCallback(&ar3kconfig); 2018 status = ar->exitCallback(&ar3kconfig);
2019 if (A_OK != status) { 2019 if (0 != status) {
2020 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to reset AR3K baud rate! \n")); 2020 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to reset AR3K baud rate! \n"));
2021 } 2021 }
2022 } 2022 }
@@ -2196,7 +2196,7 @@ static void ar6000_detect_error(unsigned long ptr)
2196 AR6000_SPIN_UNLOCK(&ar->arLock, 0); 2196 AR6000_SPIN_UNLOCK(&ar->arLock, 0);
2197 2197
2198 /* Send the challenge on the control channel */ 2198 /* Send the challenge on the control channel */
2199 if (wmi_get_challenge_resp_cmd(ar->arWmi, ar->arHBChallengeResp.seqNum, DRV_HB_CHALLENGE) != A_OK) { 2199 if (wmi_get_challenge_resp_cmd(ar->arWmi, ar->arHBChallengeResp.seqNum, DRV_HB_CHALLENGE) != 0) {
2200 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to send heart beat challenge\n")); 2200 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to send heart beat challenge\n"));
2201 } 2201 }
2202 2202
@@ -2329,7 +2329,7 @@ ar6000_close(struct net_device *dev)
2329 2329
2330 if(ar->arWmiReady == true) { 2330 if(ar->arWmiReady == true) {
2331 if (wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0, 2331 if (wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0,
2332 0, 0, 0, 0, 0, 0, 0, 0) != A_OK) { 2332 0, 0, 0, 0, 0, 0, 0, 0) != 0) {
2333 return -EIO; 2333 return -EIO;
2334 } 2334 }
2335 ar->arWlanState = WLAN_DISABLED; 2335 ar->arWlanState = WLAN_DISABLED;
@@ -2460,7 +2460,7 @@ int ar6000_init(struct net_device *dev)
2460 2460
2461 /* Do we need to finish the BMI phase */ 2461 /* Do we need to finish the BMI phase */
2462 if ((wlaninitmode == WLAN_INIT_MODE_USR || wlaninitmode == WLAN_INIT_MODE_DRV) && 2462 if ((wlaninitmode == WLAN_INIT_MODE_USR || wlaninitmode == WLAN_INIT_MODE_DRV) &&
2463 (BMIDone(ar->arHifDevice) != A_OK)) 2463 (BMIDone(ar->arHifDevice) != 0))
2464 { 2464 {
2465 ret = -EIO; 2465 ret = -EIO;
2466 goto ar6000_init_done; 2466 goto ar6000_init_done;
@@ -2700,14 +2700,14 @@ int ar6000_init(struct net_device *dev)
2700 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s() WMI is ready\n", __func__)); 2700 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s() WMI is ready\n", __func__));
2701 2701
2702 /* Communicate the wmi protocol verision to the target */ 2702 /* Communicate the wmi protocol verision to the target */
2703 if ((ar6000_set_host_app_area(ar)) != A_OK) { 2703 if ((ar6000_set_host_app_area(ar)) != 0) {
2704 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set the host app area\n")); 2704 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set the host app area\n"));
2705 } 2705 }
2706 2706
2707 /* configure the device for rx dot11 header rules 0,0 are the default values 2707 /* configure the device for rx dot11 header rules 0,0 are the default values
2708 * therefore this command can be skipped if the inputs are 0,false,false.Required 2708 * therefore this command can be skipped if the inputs are 0,false,false.Required
2709 if checksum offload is needed. Set RxMetaVersion to 2*/ 2709 if checksum offload is needed. Set RxMetaVersion to 2*/
2710 if ((wmi_set_rx_frame_format_cmd(ar->arWmi,ar->rxMetaVersion, processDot11Hdr, processDot11Hdr)) != A_OK) { 2710 if ((wmi_set_rx_frame_format_cmd(ar->arWmi,ar->rxMetaVersion, processDot11Hdr, processDot11Hdr)) != 0) {
2711 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set the rx frame format.\n")); 2711 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set the rx frame format.\n"));
2712 } 2712 }
2713 2713
@@ -2724,7 +2724,7 @@ int ar6000_init(struct net_device *dev)
2724#error Unsupported Bluetooth Type 2724#error Unsupported Bluetooth Type
2725#endif /* Collocated Bluetooth Type */ 2725#endif /* Collocated Bluetooth Type */
2726 2726
2727 if ((wmi_set_btcoex_colocated_bt_dev_cmd(ar->arWmi, &sbcb_cmd)) != A_OK) 2727 if ((wmi_set_btcoex_colocated_bt_dev_cmd(ar->arWmi, &sbcb_cmd)) != 0)
2728 { 2728 {
2729 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set collocated BT type\n")); 2729 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set collocated BT type\n"));
2730 } 2730 }
@@ -2739,7 +2739,7 @@ int ar6000_init(struct net_device *dev)
2739#error Unsupported Front-End Antenna Configuration 2739#error Unsupported Front-End Antenna Configuration
2740#endif /* AR600x Front-End Antenna Configuration */ 2740#endif /* AR600x Front-End Antenna Configuration */
2741 2741
2742 if ((wmi_set_btcoex_fe_ant_cmd(ar->arWmi, &sbfa_cmd)) != A_OK) { 2742 if ((wmi_set_btcoex_fe_ant_cmd(ar->arWmi, &sbfa_cmd)) != 0) {
2743 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set fornt end antenna configuration\n")); 2743 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set fornt end antenna configuration\n"));
2744 } 2744 }
2745#endif /* INIT_MODE_DRV_ENABLED && ENABLE_COEXISTENCE */ 2745#endif /* INIT_MODE_DRV_ENABLED && ENABLE_COEXISTENCE */
@@ -3049,12 +3049,12 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev)
3049 } 3049 }
3050 3050
3051 if (dot11Hdr) { 3051 if (dot11Hdr) {
3052 if (wmi_dot11_hdr_add(ar->arWmi,skb,ar->arNetworkType) != A_OK) { 3052 if (wmi_dot11_hdr_add(ar->arWmi,skb,ar->arNetworkType) != 0) {
3053 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx-wmi_dot11_hdr_add failed\n")); 3053 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx-wmi_dot11_hdr_add failed\n"));
3054 break; 3054 break;
3055 } 3055 }
3056 } else { 3056 } else {
3057 if (wmi_dix_2_dot3(ar->arWmi, skb) != A_OK) { 3057 if (wmi_dix_2_dot3(ar->arWmi, skb) != 0) {
3058 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx - wmi_dix_2_dot3 failed\n")); 3058 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx - wmi_dix_2_dot3 failed\n"));
3059 break; 3059 break;
3060 } 3060 }
@@ -3066,7 +3066,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev)
3066 metaV2.csumDest = csumDest; 3066 metaV2.csumDest = csumDest;
3067 metaV2.csumFlags = 0x1;/*instruct target to calculate checksum*/ 3067 metaV2.csumFlags = 0x1;/*instruct target to calculate checksum*/
3068 if (wmi_data_hdr_add(ar->arWmi, skb, DATA_MSGTYPE, bMoreData, dot11Hdr, 3068 if (wmi_data_hdr_add(ar->arWmi, skb, DATA_MSGTYPE, bMoreData, dot11Hdr,
3069 WMI_META_VERSION_2,&metaV2) != A_OK) { 3069 WMI_META_VERSION_2,&metaV2) != 0) {
3070 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx - wmi_data_hdr_add failed\n")); 3070 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx - wmi_data_hdr_add failed\n"));
3071 break; 3071 break;
3072 } 3072 }
@@ -3075,7 +3075,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev)
3075 else 3075 else
3076#endif 3076#endif
3077 { 3077 {
3078 if (wmi_data_hdr_add(ar->arWmi, skb, DATA_MSGTYPE, bMoreData, dot11Hdr,0,NULL) != A_OK) { 3078 if (wmi_data_hdr_add(ar->arWmi, skb, DATA_MSGTYPE, bMoreData, dot11Hdr,0,NULL) != 0) {
3079 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx - wmi_data_hdr_add failed\n")); 3079 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx - wmi_data_hdr_add failed\n"));
3080 break; 3080 break;
3081 } 3081 }
@@ -3781,7 +3781,7 @@ ar6000_rx(void *Context, HTC_PACKET *pPacket)
3781 break; 3781 break;
3782 } 3782 }
3783 3783
3784 A_ASSERT(status == A_OK); 3784 A_ASSERT(status == 0);
3785 3785
3786 /* NWF: print the 802.11 hdr bytes */ 3786 /* NWF: print the 802.11 hdr bytes */
3787 if(containsDot11Hdr) { 3787 if(containsDot11Hdr) {
@@ -4130,7 +4130,7 @@ ar6000_get_iwstats(struct net_device * dev)
4130 4130
4131 ar->statsUpdatePending = true; 4131 ar->statsUpdatePending = true;
4132 4132
4133 if(wmi_get_stats_cmd(ar->arWmi) != A_OK) { 4133 if(wmi_get_stats_cmd(ar->arWmi) != 0) {
4134 break; 4134 break;
4135 } 4135 }
4136 4136
@@ -4757,7 +4757,7 @@ ar6000_hci_event_rcv_evt(struct ar6_softc *ar, WMI_HCI_EVENT *cmd)
4757 void *osbuf = NULL; 4757 void *osbuf = NULL;
4758 s8 i; 4758 s8 i;
4759 u8 size, *buf; 4759 u8 size, *buf;
4760 int ret = A_OK; 4760 int ret = 0;
4761 4761
4762 size = cmd->evt_buf_sz + 4; 4762 size = cmd->evt_buf_sz + 4;
4763 osbuf = A_NETBUF_ALLOC(size); 4763 osbuf = A_NETBUF_ALLOC(size);
@@ -4893,7 +4893,7 @@ ar6000_scanComplete_event(AR_SOFTC_T *ar, int status)
4893 wmi_bssfilter_cmd(ar->arWmi, NONE_BSS_FILTER, 0); 4893 wmi_bssfilter_cmd(ar->arWmi, NONE_BSS_FILTER, 0);
4894 } 4894 }
4895 if (ar->scan_triggered) { 4895 if (ar->scan_triggered) {
4896 if (status==A_OK) { 4896 if (status== 0) {
4897 union iwreq_data wrqu; 4897 union iwreq_data wrqu;
4898 A_MEMZERO(&wrqu, sizeof(wrqu)); 4898 A_MEMZERO(&wrqu, sizeof(wrqu));
4899 wireless_send_event(ar->arNetDev, SIOCGIWSCAN, &wrqu, NULL); 4899 wireless_send_event(ar->arNetDev, SIOCGIWSCAN, &wrqu, NULL);
@@ -5266,7 +5266,7 @@ int
5266ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid) 5266ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid)
5267{ 5267{
5268 AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; 5268 AR_SOFTC_T *ar = (AR_SOFTC_T *)devt;
5269 int status = A_OK; 5269 int status = 0;
5270 struct ar_cookie *cookie = NULL; 5270 struct ar_cookie *cookie = NULL;
5271 int i; 5271 int i;
5272#ifdef CONFIG_PM 5272#ifdef CONFIG_PM
@@ -5332,7 +5332,7 @@ ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid)
5332 /* this interface is asynchronous, if there is an error, cleanup will happen in the 5332 /* this interface is asynchronous, if there is an error, cleanup will happen in the
5333 * TX completion callback */ 5333 * TX completion callback */
5334 HTCSendPkt(ar->arHtcTarget, &cookie->HtcPkt); 5334 HTCSendPkt(ar->arHtcTarget, &cookie->HtcPkt);
5335 status = A_OK; 5335 status = 0;
5336 } 5336 }
5337 5337
5338 if (status) { 5338 if (status) {
@@ -5952,7 +5952,7 @@ static int
5952 5952
5953ar6000_reinstall_keys(AR_SOFTC_T *ar, u8 key_op_ctrl) 5953ar6000_reinstall_keys(AR_SOFTC_T *ar, u8 key_op_ctrl)
5954{ 5954{
5955 int status = A_OK; 5955 int status = 0;
5956 struct ieee80211req_key *uik = &ar->user_saved_keys.ucast_ik; 5956 struct ieee80211req_key *uik = &ar->user_saved_keys.ucast_ik;
5957 struct ieee80211req_key *bik = &ar->user_saved_keys.bcast_ik; 5957 struct ieee80211req_key *bik = &ar->user_saved_keys.bcast_ik;
5958 CRYPTO_TYPE keyType = ar->user_saved_keys.keyType; 5958 CRYPTO_TYPE keyType = ar->user_saved_keys.keyType;
@@ -6108,7 +6108,7 @@ ar6000_connect_to_ap(struct ar6_softc *ar)
6108 } 6108 }
6109 6109
6110 if (!ar->arUserBssFilter) { 6110 if (!ar->arUserBssFilter) {
6111 if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != A_OK) { 6111 if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != 0) {
6112 return -EIO; 6112 return -EIO;
6113 } 6113 }
6114 } 6114 }
@@ -6184,12 +6184,12 @@ is_iwioctl_allowed(u8 mode, u16 cmd)
6184{ 6184{
6185 if(cmd >= SIOCSIWCOMMIT && cmd <= SIOCGIWPOWER) { 6185 if(cmd >= SIOCSIWCOMMIT && cmd <= SIOCGIWPOWER) {
6186 cmd -= SIOCSIWCOMMIT; 6186 cmd -= SIOCSIWCOMMIT;
6187 if(sioctl_filter[cmd] == 0xFF) return A_OK; 6187 if(sioctl_filter[cmd] == 0xFF) return 0;
6188 if(sioctl_filter[cmd] & mode) return A_OK; 6188 if(sioctl_filter[cmd] & mode) return 0;
6189 } else if(cmd >= SIOCIWFIRSTPRIV && cmd <= (SIOCIWFIRSTPRIV+30)) { 6189 } else if(cmd >= SIOCIWFIRSTPRIV && cmd <= (SIOCIWFIRSTPRIV+30)) {
6190 cmd -= SIOCIWFIRSTPRIV; 6190 cmd -= SIOCIWFIRSTPRIV;
6191 if(pioctl_filter[cmd] == 0xFF) return A_OK; 6191 if(pioctl_filter[cmd] == 0xFF) return 0;
6192 if(pioctl_filter[cmd] & mode) return A_OK; 6192 if(pioctl_filter[cmd] & mode) return 0;
6193 } else { 6193 } else {
6194 return A_ERROR; 6194 return A_ERROR;
6195 } 6195 }
@@ -6203,8 +6203,8 @@ is_xioctl_allowed(u8 mode, int cmd)
6203 A_PRINTF("Filter for this cmd=%d not defined\n",cmd); 6203 A_PRINTF("Filter for this cmd=%d not defined\n",cmd);
6204 return 0; 6204 return 0;
6205 } 6205 }
6206 if(xioctl_filter[cmd] == 0xFF) return A_OK; 6206 if(xioctl_filter[cmd] == 0xFF) return 0;
6207 if(xioctl_filter[cmd] & mode) return A_OK; 6207 if(xioctl_filter[cmd] & mode) return 0;
6208 return A_ERROR; 6208 return A_ERROR;
6209} 6209}
6210 6210
@@ -6230,7 +6230,7 @@ ap_set_wapi_key(struct ar6_softc *ar, void *ikey)
6230 ik->ik_keydata, KEY_OP_INIT_VAL, ik->ik_macaddr, 6230 ik->ik_keydata, KEY_OP_INIT_VAL, ik->ik_macaddr,
6231 SYNC_BOTH_WMIFLAG); 6231 SYNC_BOTH_WMIFLAG);
6232 6232
6233 if (A_OK != status) { 6233 if (0 != status) {
6234 return -EIO; 6234 return -EIO;
6235 } 6235 }
6236 return 0; 6236 return 0;
@@ -6343,7 +6343,7 @@ int ar6000_start_ap_interface(AR_SOFTC_T *ar)
6343 arApDev = (AR_VIRTUAL_INTERFACE_T *)ar->arApDev; 6343 arApDev = (AR_VIRTUAL_INTERFACE_T *)ar->arApDev;
6344 ar->arNetDev = arApDev->arNetDev; 6344 ar->arNetDev = arApDev->arNetDev;
6345 6345
6346 return A_OK; 6346 return 0;
6347} 6347}
6348 6348
6349int ar6000_stop_ap_interface(AR_SOFTC_T *ar) 6349int ar6000_stop_ap_interface(AR_SOFTC_T *ar)
@@ -6356,7 +6356,7 @@ int ar6000_stop_ap_interface(AR_SOFTC_T *ar)
6356 ar->arNetDev = arApDev->arStaNetDev; 6356 ar->arNetDev = arApDev->arStaNetDev;
6357 } 6357 }
6358 6358
6359 return A_OK; 6359 return 0;
6360} 6360}
6361 6361
6362 6362
@@ -6390,7 +6390,7 @@ int ar6000_create_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
6390 /* Copy the MAC address */ 6390 /* Copy the MAC address */
6391 A_MEMCPY(dev->dev_addr, ar->arNetDev->dev_addr, AR6000_ETH_ADDR_LEN); 6391 A_MEMCPY(dev->dev_addr, ar->arNetDev->dev_addr, AR6000_ETH_ADDR_LEN);
6392 6392
6393 return A_OK; 6393 return 0;
6394} 6394}
6395 6395
6396int ar6000_add_ap_interface(AR_SOFTC_T *ar, char *ap_ifname) 6396int ar6000_add_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
@@ -6398,10 +6398,10 @@ int ar6000_add_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
6398 /* Interface already added, need not proceed further */ 6398 /* Interface already added, need not proceed further */
6399 if (ar->arApDev != NULL) { 6399 if (ar->arApDev != NULL) {
6400 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_add_ap_interface: interface already present \n")); 6400 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_add_ap_interface: interface already present \n"));
6401 return A_OK; 6401 return 0;
6402 } 6402 }
6403 6403
6404 if (ar6000_create_ap_interface(ar, ap_ifname) != A_OK) { 6404 if (ar6000_create_ap_interface(ar, ap_ifname) != 0) {
6405 return A_ERROR; 6405 return A_ERROR;
6406 } 6406 }
6407 6407
@@ -6424,7 +6424,7 @@ int ar6000_remove_ap_interface(AR_SOFTC_T *ar)
6424 arApNetDev = NULL; 6424 arApNetDev = NULL;
6425 6425
6426 6426
6427 return A_OK; 6427 return 0;
6428} 6428}
6429#endif /* CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT */ 6429#endif /* CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT */
6430 6430
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_pm.c b/drivers/staging/ath6kl/os/linux/ar6000_pm.c
index d2d18dad5ff..46342d87cc0 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_pm.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_pm.c
@@ -78,7 +78,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar)
78 u16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period; 78 u16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period;
79 WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {true, false}; 79 WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {true, false};
80 ar->arWowState = WLAN_WOW_STATE_NONE; 80 ar->arWowState = WLAN_WOW_STATE_NONE;
81 if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!=A_OK) { 81 if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!= 0) {
82 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup restore host awake\n")); 82 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup restore host awake\n"));
83 } 83 }
84#if WOW_SET_SCAN_PARAMS 84#if WOW_SET_SCAN_PARAMS
@@ -99,7 +99,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar)
99 99
100 100
101#if WOW_ENABLE_MAX_INTERVAL /* we don't do it if the power consumption is already good enough. */ 101#if WOW_ENABLE_MAX_INTERVAL /* we don't do it if the power consumption is already good enough. */
102 if (wmi_listeninterval_cmd(ar->arWmi, ar->arListenIntervalT, ar->arListenIntervalB) == A_OK) { 102 if (wmi_listeninterval_cmd(ar->arWmi, ar->arListenIntervalT, ar->arListenIntervalB) == 0) {
103 } 103 }
104#endif 104#endif
105 ar6k_send_asleep_event_to_app(ar, false); 105 ar6k_send_asleep_event_to_app(ar, false);
@@ -137,7 +137,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
137 ar6000_TxDataCleanup(ar); /* IMPORTANT, otherwise there will be 11mA after listen interval as 1000*/ 137 ar6000_TxDataCleanup(ar); /* IMPORTANT, otherwise there will be 11mA after listen interval as 1000*/
138 138
139#if WOW_ENABLE_MAX_INTERVAL /* we don't do it if the power consumption is already good enough. */ 139#if WOW_ENABLE_MAX_INTERVAL /* we don't do it if the power consumption is already good enough. */
140 if (wmi_listeninterval_cmd(ar->arWmi, A_MAX_WOW_LISTEN_INTERVAL, 0) == A_OK) { 140 if (wmi_listeninterval_cmd(ar->arWmi, A_MAX_WOW_LISTEN_INTERVAL, 0) == 0) {
141 } 141 }
142#endif 142#endif
143 143
@@ -213,7 +213,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
213 213
214int ar6000_suspend_ev(void *context) 214int ar6000_suspend_ev(void *context)
215{ 215{
216 int status = A_OK; 216 int status = 0;
217 AR_SOFTC_T *ar = (AR_SOFTC_T *)context; 217 AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
218 s16 pmmode = ar->arSuspendConfig; 218 s16 pmmode = ar->arSuspendConfig;
219wow_not_connected: 219wow_not_connected:
@@ -240,7 +240,7 @@ wow_not_connected:
240 AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("Strange suspend state for not wow mode %d", ar->arWlanPowerState)); 240 AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("Strange suspend state for not wow mode %d", ar->arWlanPowerState));
241 } 241 }
242 AR_DEBUG_PRINTF(ATH_DEBUG_PM,("%s:Suspend for %d mode pwr %d status %d\n", __func__, pmmode, ar->arWlanPowerState, status)); 242 AR_DEBUG_PRINTF(ATH_DEBUG_PM,("%s:Suspend for %d mode pwr %d status %d\n", __func__, pmmode, ar->arWlanPowerState, status));
243 status = (ar->arWlanPowerState == WLAN_POWER_STATE_CUT_PWR) ? A_OK : A_EBUSY; 243 status = (ar->arWlanPowerState == WLAN_POWER_STATE_CUT_PWR) ? 0 : A_EBUSY;
244 break; 244 break;
245 } 245 }
246 246
@@ -270,7 +270,7 @@ int ar6000_resume_ev(void *context)
270 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Strange SDIO bus power mode!!\n")); 270 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Strange SDIO bus power mode!!\n"));
271 break; 271 break;
272 } 272 }
273 return A_OK; 273 return 0;
274} 274}
275 275
276void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent) 276void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent)
@@ -293,17 +293,17 @@ void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent)
293int ar6000_power_change_ev(void *context, u32 config) 293int ar6000_power_change_ev(void *context, u32 config)
294{ 294{
295 AR_SOFTC_T *ar = (AR_SOFTC_T *)context; 295 AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
296 int status = A_OK; 296 int status = 0;
297 297
298 AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: power change event callback %d \n", __func__, config)); 298 AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: power change event callback %d \n", __func__, config));
299 switch (config) { 299 switch (config) {
300 case HIF_DEVICE_POWER_UP: 300 case HIF_DEVICE_POWER_UP:
301 ar6000_restart_endpoint(ar->arNetDev); 301 ar6000_restart_endpoint(ar->arNetDev);
302 status = A_OK; 302 status = 0;
303 break; 303 break;
304 case HIF_DEVICE_POWER_DOWN: 304 case HIF_DEVICE_POWER_DOWN:
305 case HIF_DEVICE_POWER_CUT: 305 case HIF_DEVICE_POWER_CUT:
306 status = A_OK; 306 status = 0;
307 break; 307 break;
308 } 308 }
309 return status; 309 return status;
@@ -345,7 +345,7 @@ static struct platform_driver ar6000_pm_device = {
345int 345int
346ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) 346ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
347{ 347{
348 int status = A_OK; 348 int status = 0;
349 HIF_DEVICE_POWER_CHANGE_TYPE config; 349 HIF_DEVICE_POWER_CHANGE_TYPE config;
350 350
351 AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Cut power %d %d \n", __func__,state, ar->arWlanPowerState)); 351 AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Cut power %d %d \n", __func__,state, ar->arWlanPowerState));
@@ -383,10 +383,10 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
383 break; 383 break;
384 } 384 }
385#endif 385#endif
386 status = A_OK; 386 status = 0;
387 } else if (status == A_OK) { 387 } else if (status == 0) {
388 ar6000_restart_endpoint(ar->arNetDev); 388 ar6000_restart_endpoint(ar->arNetDev);
389 status = A_OK; 389 status = 0;
390 } 390 }
391 } else if (state == WLAN_DISABLED) { 391 } else if (state == WLAN_DISABLED) {
392 392
@@ -415,7 +415,7 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
415int 415int
416ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) 416ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
417{ 417{
418 int status = A_OK; 418 int status = 0;
419 419
420 AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Deep sleep %d %d \n", __func__,state, ar->arWlanPowerState)); 420 AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Deep sleep %d %d \n", __func__,state, ar->arWlanPowerState));
421#ifdef CONFIG_PM 421#ifdef CONFIG_PM
@@ -439,7 +439,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
439 hostSleepMode.awake = true; 439 hostSleepMode.awake = true;
440 hostSleepMode.asleep = false; 440 hostSleepMode.asleep = false;
441 441
442 if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)) != A_OK) { 442 if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)) != 0) {
443 break; 443 break;
444 } 444 }
445 445
@@ -456,7 +456,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
456 ar->scParams.shortScanRatio, 456 ar->scParams.shortScanRatio,
457 ar->scParams.scanCtrlFlags, 457 ar->scParams.scanCtrlFlags,
458 ar->scParams.max_dfsch_act_time, 458 ar->scParams.max_dfsch_act_time,
459 ar->scParams.maxact_scan_per_ssid)) != A_OK) 459 ar->scParams.maxact_scan_per_ssid)) != 0)
460 { 460 {
461 break; 461 break;
462 } 462 }
@@ -464,7 +464,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
464 if (ar->arNetworkType != AP_NETWORK) 464 if (ar->arNetworkType != AP_NETWORK)
465 { 465 {
466 if (ar->arSsidLen) { 466 if (ar->arSsidLen) {
467 if (ar6000_connect_to_ap(ar) != A_OK) { 467 if (ar6000_connect_to_ap(ar) != 0) {
468 /* no need to report error if connection failed */ 468 /* no need to report error if connection failed */
469 break; 469 break;
470 } 470 }
@@ -495,12 +495,12 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
495 495
496 ar->scan_triggered = 0; 496 ar->scan_triggered = 0;
497 497
498 if ((status=wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 0)) != A_OK) { 498 if ((status=wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 0)) != 0) {
499 break; 499 break;
500 } 500 }
501 501
502 /* make sure we disable wow for deep sleep */ 502 /* make sure we disable wow for deep sleep */
503 if ((status=wmi_set_wow_mode_cmd(ar->arWmi, &wowMode))!=A_OK) 503 if ((status=wmi_set_wow_mode_cmd(ar->arWmi, &wowMode))!= 0)
504 { 504 {
505 break; 505 break;
506 } 506 }
@@ -512,7 +512,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
512 512
513 hostSleepMode.awake = false; 513 hostSleepMode.awake = false;
514 hostSleepMode.asleep = true; 514 hostSleepMode.asleep = true;
515 if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode))!=A_OK) { 515 if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode))!= 0) {
516 break; 516 break;
517 } 517 }
518 if (ar->arTxPending[ar->arControlEp]) { 518 if (ar->arTxPending[ar->arControlEp]) {
@@ -539,7 +539,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
539int 539int
540ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool pmEvent) 540ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool pmEvent)
541{ 541{
542 int status = A_OK; 542 int status = 0;
543 u16 powerState, oldPowerState; 543 u16 powerState, oldPowerState;
544 AR6000_WLAN_STATE oldstate = ar->arWlanState; 544 AR6000_WLAN_STATE oldstate = ar->arWlanState;
545 bool wlanOff = ar->arWlanOff; 545 bool wlanOff = ar->arWlanOff;
@@ -631,7 +631,7 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool
631 if (status) { 631 if (status) {
632 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup WLAN state %d\n", ar->arWlanState)); 632 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup WLAN state %d\n", ar->arWlanState));
633 ar->arWlanState = oldstate; 633 ar->arWlanState = oldstate;
634 } else if (status == A_OK) { 634 } else if (status == 0) {
635 WMI_REPORT_SLEEP_STATE_EVENT wmiSleepEvent, *pSleepEvent = NULL; 635 WMI_REPORT_SLEEP_STATE_EVENT wmiSleepEvent, *pSleepEvent = NULL;
636 if ((ar->arWlanPowerState == WLAN_POWER_STATE_ON) && (oldPowerState != WLAN_POWER_STATE_ON)) { 636 if ((ar->arWlanPowerState == WLAN_POWER_STATE_ON) && (oldPowerState != WLAN_POWER_STATE_ON)) {
637 wmiSleepEvent.sleepState = WMI_REPORT_SLEEP_STATUS_IS_AWAKE; 637 wmiSleepEvent.sleepState = WMI_REPORT_SLEEP_STATUS_IS_AWAKE;
@@ -657,13 +657,13 @@ ar6000_set_bt_hw_state(struct ar6_softc *ar, u32 enable)
657 bool off = (enable == 0); 657 bool off = (enable == 0);
658 int status; 658 int status;
659 if (ar->arBTOff == off) { 659 if (ar->arBTOff == off) {
660 return A_OK; 660 return 0;
661 } 661 }
662 ar->arBTOff = off; 662 ar->arBTOff = off;
663 status = ar6000_update_wlan_pwr_state(ar, ar->arWlanOff ? WLAN_DISABLED : WLAN_ENABLED, false); 663 status = ar6000_update_wlan_pwr_state(ar, ar->arWlanOff ? WLAN_DISABLED : WLAN_ENABLED, false);
664 return status; 664 return status;
665#else 665#else
666 return A_OK; 666 return 0;
667#endif 667#endif
668} 668}
669 669
@@ -673,7 +673,7 @@ ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
673 int status; 673 int status;
674 bool off = (state == WLAN_DISABLED); 674 bool off = (state == WLAN_DISABLED);
675 if (ar->arWlanOff == off) { 675 if (ar->arWlanOff == off) {
676 return A_OK; 676 return 0;
677 } 677 }
678 ar->arWlanOff = off; 678 ar->arWlanOff = off;
679 status = ar6000_update_wlan_pwr_state(ar, state, false); 679 status = ar6000_update_wlan_pwr_state(ar, state, false);
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c
index 22d88d70c76..8a197ff9a36 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c
@@ -55,7 +55,7 @@ ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket)
55 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to down the semaphore\n")); 55 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to down the semaphore\n"));
56 } 56 }
57 57
58 A_ASSERT((pPacket->Status != A_OK) || 58 A_ASSERT((pPacket->Status != 0) ||
59 (pPacket->pBuffer == (busy->data + HTC_HEADER_LEN))); 59 (pPacket->pBuffer == (busy->data + HTC_HEADER_LEN)));
60 60
61 busy->length = pPacket->ActualLength + HTC_HEADER_LEN; 61 busy->length = pPacket->ActualLength + HTC_HEADER_LEN;
@@ -150,7 +150,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar,
150 if (status) { 150 if (status) {
151 if (response.ConnectRespCode == HTC_SERVICE_NO_MORE_EP) { 151 if (response.ConnectRespCode == HTC_SERVICE_NO_MORE_EP) {
152 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HTC RAW , No more streams allowed \n")); 152 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HTC RAW , No more streams allowed \n"));
153 status = A_OK; 153 status = 0;
154 } 154 }
155 break; 155 break;
156 } 156 }
@@ -228,7 +228,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
228 arRawStream2EndpointID(ar,streamID)); 228 arRawStream2EndpointID(ar,streamID));
229 229
230 /* Queue buffers to HTC for receive */ 230 /* Queue buffers to HTC for receive */
231 if ((status = HTCAddReceivePkt(ar->arHtcTarget, &buffer->HTCPacket)) != A_OK) 231 if ((status = HTCAddReceivePkt(ar->arHtcTarget, &buffer->HTCPacket)) != 0)
232 { 232 {
233 BMIInit(); 233 BMIInit();
234 return -EIO; 234 return -EIO;
@@ -262,7 +262,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
262 1); 262 1);
263 263
264 /* Start the HTC component */ 264 /* Start the HTC component */
265 if ((status = HTCStart(ar->arHtcTarget)) != A_OK) { 265 if ((status = HTCStart(ar->arHtcTarget)) != 0) {
266 BMIInit(); 266 BMIInit();
267 return -EIO; 267 return -EIO;
268 } 268 }
diff --git a/drivers/staging/ath6kl/os/linux/ar6k_pal.c b/drivers/staging/ath6kl/os/linux/ar6k_pal.c
index c43ec827a2e..831b2e3cf9c 100644
--- a/drivers/staging/ath6kl/os/linux/ar6k_pal.c
+++ b/drivers/staging/ath6kl/os/linux/ar6k_pal.c
@@ -120,7 +120,7 @@ static int btpal_send_frame(struct sk_buff *skb)
120 struct hci_dev *hdev = (struct hci_dev *)skb->dev; 120 struct hci_dev *hdev = (struct hci_dev *)skb->dev;
121 HCI_TRANSPORT_PACKET_TYPE type; 121 HCI_TRANSPORT_PACKET_TYPE type;
122 ar6k_hci_pal_info_t *pHciPalInfo; 122 ar6k_hci_pal_info_t *pHciPalInfo;
123 int status = A_OK; 123 int status = 0;
124 struct sk_buff *txSkb = NULL; 124 struct sk_buff *txSkb = NULL;
125 AR_SOFTC_T *ar; 125 AR_SOFTC_T *ar;
126 126
@@ -184,7 +184,7 @@ static int btpal_send_frame(struct sk_buff *skb)
184 break; 184 break;
185 } 185 }
186 186
187 if (wmi_send_hci_cmd(ar->arWmi, skb->data, skb->len) != A_OK) 187 if (wmi_send_hci_cmd(ar->arWmi, skb->data, skb->len) != 0)
188 { 188 {
189 PRIN_LOG("send hci cmd error"); 189 PRIN_LOG("send hci cmd error");
190 break; 190 break;
@@ -220,7 +220,7 @@ static int btpal_send_frame(struct sk_buff *skb)
220 /* Add WMI packet type */ 220 /* Add WMI packet type */
221 osbuf = (void *)txSkb; 221 osbuf = (void *)txSkb;
222 222
223 if (wmi_data_hdr_add(ar->arWmi, osbuf, DATA_MSGTYPE, 0, WMI_DATA_HDR_DATA_TYPE_ACL,0,NULL) != A_OK) { 223 if (wmi_data_hdr_add(ar->arWmi, osbuf, DATA_MSGTYPE, 0, WMI_DATA_HDR_DATA_TYPE_ACL,0,NULL) != 0) {
224 PRIN_LOG("XIOCTL_ACL_DATA - wmi_data_hdr_add failed\n"); 224 PRIN_LOG("XIOCTL_ACL_DATA - wmi_data_hdr_add failed\n");
225 } else { 225 } else {
226 /* Send data buffer over HTC */ 226 /* Send data buffer over HTC */
@@ -271,11 +271,11 @@ static void bt_cleanup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
271 *********************************************************/ 271 *********************************************************/
272static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo) 272static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
273{ 273{
274 int status = A_OK; 274 int status = 0;
275 struct hci_dev *pHciDev = NULL; 275 struct hci_dev *pHciDev = NULL;
276 276
277 if (!setupbtdev) { 277 if (!setupbtdev) {
278 return A_OK; 278 return 0;
279 } 279 }
280 280
281 do { 281 do {
@@ -404,7 +404,7 @@ bool ar6k_pal_recv_pkt(void *pHciPal, void *osbuf)
404 **********************************************************/ 404 **********************************************************/
405int ar6k_setup_hci_pal(void *ar_p) 405int ar6k_setup_hci_pal(void *ar_p)
406{ 406{
407 int status = A_OK; 407 int status = 0;
408 ar6k_hci_pal_info_t *pHciPalInfo; 408 ar6k_hci_pal_info_t *pHciPalInfo;
409 ar6k_pal_config_t ar6k_pal_config; 409 ar6k_pal_config_t ar6k_pal_config;
410 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar_p; 410 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar_p;
@@ -445,7 +445,7 @@ int ar6k_setup_hci_pal(void *ar_p)
445#else /* AR6K_ENABLE_HCI_PAL */ 445#else /* AR6K_ENABLE_HCI_PAL */
446int ar6k_setup_hci_pal(void *ar_p) 446int ar6k_setup_hci_pal(void *ar_p)
447{ 447{
448 return A_OK; 448 return 0;
449} 449}
450void ar6k_cleanup_hci_pal(void *ar_p) 450void ar6k_cleanup_hci_pal(void *ar_p)
451{ 451{
@@ -465,7 +465,7 @@ static int __init pal_init_module(void)
465 hciTransCallbacks.setupTransport = ar6k_setup_hci_pal; 465 hciTransCallbacks.setupTransport = ar6k_setup_hci_pal;
466 hciTransCallbacks.cleanupTransport = ar6k_cleanup_hci_pal; 466 hciTransCallbacks.cleanupTransport = ar6k_cleanup_hci_pal;
467 467
468 if(ar6k_register_hci_pal(&hciTransCallbacks) != A_OK) 468 if(ar6k_register_hci_pal(&hciTransCallbacks) != 0)
469 return -ENODEV; 469 return -ENODEV;
470 470
471 return 0; 471 return 0;
diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c
index 92aeda6b41b..1a4e315bab6 100644
--- a/drivers/staging/ath6kl/os/linux/cfg80211.c
+++ b/drivers/staging/ath6kl/os/linux/cfg80211.c
@@ -153,7 +153,7 @@ ar6k_set_wpa_version(AR_SOFTC_T *ar, enum nl80211_wpa_versions wpa_version)
153 return -ENOTSUPP; 153 return -ENOTSUPP;
154 } 154 }
155 155
156 return A_OK; 156 return 0;
157} 157}
158 158
159static int 159static int
@@ -179,7 +179,7 @@ ar6k_set_auth_type(AR_SOFTC_T *ar, enum nl80211_auth_type auth_type)
179 return -ENOTSUPP; 179 return -ENOTSUPP;
180 } 180 }
181 181
182 return A_OK; 182 return 0;
183} 183}
184 184
185static int 185static int
@@ -221,7 +221,7 @@ ar6k_set_cipher(AR_SOFTC_T *ar, u32 cipher, bool ucast)
221 return -ENOTSUPP; 221 return -ENOTSUPP;
222 } 222 }
223 223
224 return A_OK; 224 return 0;
225} 225}
226 226
227static void 227static void
@@ -378,7 +378,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
378 } 378 }
379 379
380 if (!ar->arUserBssFilter) { 380 if (!ar->arUserBssFilter) {
381 if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != A_OK) { 381 if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != 0) {
382 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Couldn't set bss filtering\n", __func__)); 382 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Couldn't set bss filtering\n", __func__));
383 up(&ar->arSem); 383 up(&ar->arSem);
384 return -EIO; 384 return -EIO;
@@ -743,7 +743,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
743 if (!ar->arUserBssFilter) { 743 if (!ar->arUserBssFilter) {
744 if (wmi_bssfilter_cmd(ar->arWmi, 744 if (wmi_bssfilter_cmd(ar->arWmi,
745 (ar->arConnected ? ALL_BUT_BSS_FILTER : ALL_BSS_FILTER), 745 (ar->arConnected ? ALL_BUT_BSS_FILTER : ALL_BSS_FILTER),
746 0) != A_OK) { 746 0) != 0) {
747 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Couldn't set bss filtering\n", __func__)); 747 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Couldn't set bss filtering\n", __func__));
748 return -EIO; 748 return -EIO;
749 } 749 }
@@ -769,7 +769,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
769 } 769 }
770 770
771 if(wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, forceFgScan, false, \ 771 if(wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, forceFgScan, false, \
772 0, 0, 0, NULL) != A_OK) { 772 0, 0, 0, NULL) != 0) {
773 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_startscan_cmd failed\n", __func__)); 773 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_startscan_cmd failed\n", __func__));
774 ret = -EIO; 774 ret = -EIO;
775 } 775 }
@@ -982,7 +982,7 @@ ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev,
982{ 982{
983 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev); 983 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev);
984 struct ar_key *key = NULL; 984 struct ar_key *key = NULL;
985 int status = A_OK; 985 int status = 0;
986 986
987 AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index)); 987 AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index));
988 988
@@ -1073,7 +1073,7 @@ ar6k_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
1073 } 1073 }
1074 1074
1075 if (changed & WIPHY_PARAM_RTS_THRESHOLD) { 1075 if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
1076 if (wmi_set_rts_cmd(ar->arWmi,wiphy->rts_threshold) != A_OK){ 1076 if (wmi_set_rts_cmd(ar->arWmi,wiphy->rts_threshold) != 0){
1077 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_set_rts_cmd failed\n", __func__)); 1077 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_set_rts_cmd failed\n", __func__));
1078 return -EIO; 1078 return -EIO;
1079 } 1079 }
@@ -1148,7 +1148,7 @@ ar6k_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm)
1148 if((ar->arConnected == true)) { 1148 if((ar->arConnected == true)) {
1149 ar->arTxPwr = 0; 1149 ar->arTxPwr = 0;
1150 1150
1151 if(wmi_get_txPwr_cmd(ar->arWmi) != A_OK) { 1151 if(wmi_get_txPwr_cmd(ar->arWmi) != 0) {
1152 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_get_txPwr_cmd failed\n", __func__)); 1152 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_get_txPwr_cmd failed\n", __func__));
1153 return -EIO; 1153 return -EIO;
1154 } 1154 }
@@ -1193,7 +1193,7 @@ ar6k_cfg80211_set_power_mgmt(struct wiphy *wiphy,
1193 pwrMode.powerMode = REC_POWER; 1193 pwrMode.powerMode = REC_POWER;
1194 } 1194 }
1195 1195
1196 if(wmi_powermode_cmd(ar->arWmi, pwrMode.powerMode) != A_OK) { 1196 if(wmi_powermode_cmd(ar->arWmi, pwrMode.powerMode) != 0) {
1197 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_powermode_cmd failed\n", __func__)); 1197 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_powermode_cmd failed\n", __func__));
1198 return -EIO; 1198 return -EIO;
1199 } 1199 }
diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
index 59b5b08aaa8..9e8ca5cafdd 100644
--- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c
+++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
@@ -66,7 +66,7 @@ int ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks)
66 _HCI_TransportSetBaudRate = HCI_TransportSetBaudRate; 66 _HCI_TransportSetBaudRate = HCI_TransportSetBaudRate;
67 _HCI_TransportEnablePowerMgmt = HCI_TransportEnablePowerMgmt; 67 _HCI_TransportEnablePowerMgmt = HCI_TransportEnablePowerMgmt;
68 68
69 return A_OK; 69 return 0;
70} 70}
71 71
72int 72int
diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c
index 82cf52fee4f..f170382c13a 100644
--- a/drivers/staging/ath6kl/os/linux/hci_bridge.c
+++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c
@@ -294,7 +294,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
294 address = TARG_VTOP(pHcidevInfo->ar->arTargetType, 294 address = TARG_VTOP(pHcidevInfo->ar->arTargetType,
295 HOST_INTEREST_ITEM_ADDRESS(pHcidevInfo->ar, hi_hci_uart_pwr_mgmt_params)); 295 HOST_INTEREST_ITEM_ADDRESS(pHcidevInfo->ar, hi_hci_uart_pwr_mgmt_params));
296 status = ar6000_ReadRegDiag(pHcidevInfo->ar->arHifDevice, &address, &hci_uart_pwr_mgmt_params); 296 status = ar6000_ReadRegDiag(pHcidevInfo->ar->arHifDevice, &address, &hci_uart_pwr_mgmt_params);
297 if (A_OK == status) { 297 if (0 == status) {
298 ar3kconfig.PwrMgmtEnabled = (hci_uart_pwr_mgmt_params & 0x1); 298 ar3kconfig.PwrMgmtEnabled = (hci_uart_pwr_mgmt_params & 0x1);
299 ar3kconfig.IdleTimeout = (hci_uart_pwr_mgmt_params & 0xFFFF0000) >> 16; 299 ar3kconfig.IdleTimeout = (hci_uart_pwr_mgmt_params & 0xFFFF0000) >> 16;
300 ar3kconfig.WakeupTimeout = (hci_uart_pwr_mgmt_params & 0xFF00) >> 8; 300 ar3kconfig.WakeupTimeout = (hci_uart_pwr_mgmt_params & 0xFF00) >> 8;
@@ -470,7 +470,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
470#endif 470#endif
471{ 471{
472 HCI_TRANSPORT_CONFIG_INFO config; 472 HCI_TRANSPORT_CONFIG_INFO config;
473 int status = A_OK; 473 int status = 0;
474 int i; 474 int i;
475 HTC_PACKET *pPacket; 475 HTC_PACKET *pPacket;
476 AR6K_HCI_BRIDGE_INFO *pHcidevInfo; 476 AR6K_HCI_BRIDGE_INFO *pHcidevInfo;
@@ -551,7 +551,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
551 if (NULL == pHcidevInfo->pHCIDev) { 551 if (NULL == pHcidevInfo->pHCIDev) {
552 /* GMBOX may not be present in older chips */ 552 /* GMBOX may not be present in older chips */
553 /* just return success */ 553 /* just return success */
554 status = A_OK; 554 status = 0;
555 } 555 }
556 } 556 }
557 ar6000_cleanup_hci(ar); 557 ar6000_cleanup_hci(ar);
@@ -601,7 +601,7 @@ int hci_test_send(void *ar, struct sk_buff *skb)
601int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) 601int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb)
602#endif 602#endif
603{ 603{
604 int status = A_OK; 604 int status = 0;
605 int length; 605 int length;
606 EPPING_HEADER *pHeader; 606 EPPING_HEADER *pHeader;
607 HTC_PACKET *pPacket; 607 HTC_PACKET *pPacket;
@@ -712,7 +712,7 @@ static int bt_send_frame(struct sk_buff *skb)
712 HCI_TRANSPORT_PACKET_TYPE type; 712 HCI_TRANSPORT_PACKET_TYPE type;
713 AR6K_HCI_BRIDGE_INFO *pHcidevInfo; 713 AR6K_HCI_BRIDGE_INFO *pHcidevInfo;
714 HTC_PACKET *pPacket; 714 HTC_PACKET *pPacket;
715 int status = A_OK; 715 int status = 0;
716 struct sk_buff *txSkb = NULL; 716 struct sk_buff *txSkb = NULL;
717 717
718 if (!hdev) { 718 if (!hdev) {
@@ -855,12 +855,12 @@ static void bt_destruct(struct hci_dev *hdev)
855 855
856static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) 856static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
857{ 857{
858 int status = A_OK; 858 int status = 0;
859 struct hci_dev *pHciDev = NULL; 859 struct hci_dev *pHciDev = NULL;
860 HIF_DEVICE_OS_DEVICE_INFO osDevInfo; 860 HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
861 861
862 if (!setupbtdev) { 862 if (!setupbtdev) {
863 return A_OK; 863 return 0;
864 } 864 }
865 865
866 do { 866 do {
@@ -938,7 +938,7 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
938static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) 938static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
939{ 939{
940 int err; 940 int err;
941 int status = A_OK; 941 int status = 0;
942 942
943 do { 943 do {
944 AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: registering HCI... \n")); 944 AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: registering HCI... \n"));
@@ -1043,7 +1043,7 @@ static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *sk
1043 /* stubs when we only want to test the HCI bridging Interface without the HT stack */ 1043 /* stubs when we only want to test the HCI bridging Interface without the HT stack */
1044static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) 1044static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
1045{ 1045{
1046 return A_OK; 1046 return 0;
1047} 1047}
1048static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) 1048static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
1049{ 1049{
@@ -1085,7 +1085,7 @@ int ar6000_setup_hci(void *ar)
1085int ar6000_setup_hci(AR_SOFTC_T *ar) 1085int ar6000_setup_hci(AR_SOFTC_T *ar)
1086#endif 1086#endif
1087{ 1087{
1088 return A_OK; 1088 return 0;
1089} 1089}
1090 1090
1091#ifdef EXPORT_HCI_BRIDGE_INTERFACE 1091#ifdef EXPORT_HCI_BRIDGE_INTERFACE
diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c
index 3463a500876..5be8ea335ee 100644
--- a/drivers/staging/ath6kl/os/linux/ioctl.c
+++ b/drivers/staging/ath6kl/os/linux/ioctl.c
@@ -45,7 +45,7 @@ ar6000_ioctl_get_roam_tbl(struct net_device *dev, struct ifreq *rq)
45 return -EIO; 45 return -EIO;
46 } 46 }
47 47
48 if(wmi_get_roam_tbl_cmd(ar->arWmi) != A_OK) { 48 if(wmi_get_roam_tbl_cmd(ar->arWmi) != 0) {
49 return -EIO; 49 return -EIO;
50 } 50 }
51 51
@@ -63,7 +63,7 @@ ar6000_ioctl_get_roam_data(struct net_device *dev, struct ifreq *rq)
63 63
64 64
65 /* currently assume only roam times are required */ 65 /* currently assume only roam times are required */
66 if(wmi_get_roam_data_cmd(ar->arWmi, ROAM_DATA_TIME) != A_OK) { 66 if(wmi_get_roam_data_cmd(ar->arWmi, ROAM_DATA_TIME) != 0) {
67 return -EIO; 67 return -EIO;
68 } 68 }
69 69
@@ -97,7 +97,7 @@ ar6000_ioctl_set_roam_ctrl(struct net_device *dev, char *userdata)
97 return -EFAULT; 97 return -EFAULT;
98 } 98 }
99 99
100 if(wmi_set_roam_ctrl_cmd(ar->arWmi, &cmd, size) != A_OK) { 100 if(wmi_set_roam_ctrl_cmd(ar->arWmi, &cmd, size) != 0) {
101 return -EIO; 101 return -EIO;
102 } 102 }
103 103
@@ -123,7 +123,7 @@ ar6000_ioctl_set_powersave_timers(struct net_device *dev, char *userdata)
123 return -EFAULT; 123 return -EFAULT;
124 } 124 }
125 125
126 if(wmi_set_powersave_timers_cmd(ar->arWmi, &cmd, size) != A_OK) { 126 if(wmi_set_powersave_timers_cmd(ar->arWmi, &cmd, size) != 0) {
127 return -EIO; 127 return -EIO;
128 } 128 }
129 129
@@ -153,7 +153,7 @@ ar6000_ioctl_set_qos_supp(struct net_device *dev, struct ifreq *rq)
153 ret = wmi_set_qos_supp_cmd(ar->arWmi, cmd.status); 153 ret = wmi_set_qos_supp_cmd(ar->arWmi, cmd.status);
154 154
155 switch (ret) { 155 switch (ret) {
156 case A_OK: 156 case 0:
157 return 0; 157 return 0;
158 case A_EBUSY : 158 case A_EBUSY :
159 return -EBUSY; 159 return -EBUSY;
@@ -194,7 +194,7 @@ ar6000_ioctl_set_wmm(struct net_device *dev, struct ifreq *rq)
194 ret = wmi_set_wmm_cmd(ar->arWmi, cmd.status); 194 ret = wmi_set_wmm_cmd(ar->arWmi, cmd.status);
195 195
196 switch (ret) { 196 switch (ret) {
197 case A_OK: 197 case 0:
198 return 0; 198 return 0;
199 case A_EBUSY : 199 case A_EBUSY :
200 return -EBUSY; 200 return -EBUSY;
@@ -229,7 +229,7 @@ ar6000_ioctl_set_txop(struct net_device *dev, struct ifreq *rq)
229 ret = wmi_set_wmm_txop(ar->arWmi, cmd.txopEnable); 229 ret = wmi_set_wmm_txop(ar->arWmi, cmd.txopEnable);
230 230
231 switch (ret) { 231 switch (ret) {
232 case A_OK: 232 case 0:
233 return 0; 233 return 0;
234 case A_EBUSY : 234 case A_EBUSY :
235 return -EBUSY; 235 return -EBUSY;
@@ -284,7 +284,7 @@ ar6000_ioctl_set_country(struct net_device *dev, struct ifreq *rq)
284 A_MEMCPY(ar->ap_country_code, cmd.countryCode, 3); 284 A_MEMCPY(ar->ap_country_code, cmd.countryCode, 3);
285 285
286 switch (ret) { 286 switch (ret) {
287 case A_OK: 287 case 0:
288 return 0; 288 return 0;
289 case A_EBUSY : 289 case A_EBUSY :
290 return -EBUSY; 290 return -EBUSY;
@@ -361,7 +361,7 @@ ar6000_ioctl_set_channelParams(struct net_device *dev, struct ifreq *rq)
361 if (!ret && 361 if (!ret &&
362 (wmi_set_channelParams_cmd(ar->arWmi, cmdp->scanParam, cmdp->phyMode, 362 (wmi_set_channelParams_cmd(ar->arWmi, cmdp->scanParam, cmdp->phyMode,
363 cmdp->numChannels, cmdp->channelList) 363 cmdp->numChannels, cmdp->channelList)
364 != A_OK)) 364 != 0))
365 { 365 {
366 ret = -EIO; 366 ret = -EIO;
367 } 367 }
@@ -394,7 +394,7 @@ ar6000_ioctl_set_snr_threshold(struct net_device *dev, struct ifreq *rq)
394 return -EFAULT; 394 return -EFAULT;
395 } 395 }
396 396
397 if( wmi_set_snr_threshold_params(ar->arWmi, &cmd) != A_OK ) { 397 if( wmi_set_snr_threshold_params(ar->arWmi, &cmd) != 0 ) {
398 ret = -EIO; 398 ret = -EIO;
399 } 399 }
400 400
@@ -480,7 +480,7 @@ ar6000_ioctl_set_rssi_threshold(struct net_device *dev, struct ifreq *rq)
480 cmd.thresholdBelow5_Val = ar->rssi_map[10].rssi; 480 cmd.thresholdBelow5_Val = ar->rssi_map[10].rssi;
481 cmd.thresholdBelow6_Val = ar->rssi_map[11].rssi; 481 cmd.thresholdBelow6_Val = ar->rssi_map[11].rssi;
482 482
483 if( wmi_set_rssi_threshold_params(ar->arWmi, &cmd) != A_OK ) { 483 if( wmi_set_rssi_threshold_params(ar->arWmi, &cmd) != 0 ) {
484 ret = -EIO; 484 ret = -EIO;
485 } 485 }
486 486
@@ -503,7 +503,7 @@ ar6000_ioctl_set_lq_threshold(struct net_device *dev, struct ifreq *rq)
503 return -EFAULT; 503 return -EFAULT;
504 } 504 }
505 505
506 if( wmi_set_lq_threshold_params(ar->arWmi, &cmd) != A_OK ) { 506 if( wmi_set_lq_threshold_params(ar->arWmi, &cmd) != 0 ) {
507 ret = -EIO; 507 ret = -EIO;
508 } 508 }
509 509
@@ -527,7 +527,7 @@ ar6000_ioctl_set_probedSsid(struct net_device *dev, struct ifreq *rq)
527 } 527 }
528 528
529 if (wmi_probedSsid_cmd(ar->arWmi, cmd.entryIndex, cmd.flag, cmd.ssidLength, 529 if (wmi_probedSsid_cmd(ar->arWmi, cmd.entryIndex, cmd.flag, cmd.ssidLength,
530 cmd.ssid) != A_OK) 530 cmd.ssid) != 0)
531 { 531 {
532 ret = -EIO; 532 ret = -EIO;
533 } 533 }
@@ -559,11 +559,11 @@ ar6000_ioctl_set_badAp(struct net_device *dev, struct ifreq *rq)
559 /* 559 /*
560 * This is a delete badAP. 560 * This is a delete badAP.
561 */ 561 */
562 if (wmi_deleteBadAp_cmd(ar->arWmi, cmd.badApIndex) != A_OK) { 562 if (wmi_deleteBadAp_cmd(ar->arWmi, cmd.badApIndex) != 0) {
563 ret = -EIO; 563 ret = -EIO;
564 } 564 }
565 } else { 565 } else {
566 if (wmi_addBadAp_cmd(ar->arWmi, cmd.badApIndex, cmd.bssid) != A_OK) { 566 if (wmi_addBadAp_cmd(ar->arWmi, cmd.badApIndex, cmd.bssid) != 0) {
567 ret = -EIO; 567 ret = -EIO;
568 } 568 }
569 } 569 }
@@ -588,11 +588,11 @@ ar6000_ioctl_create_qos(struct net_device *dev, struct ifreq *rq)
588 } 588 }
589 589
590 ret = wmi_verify_tspec_params(&cmd, tspecCompliance); 590 ret = wmi_verify_tspec_params(&cmd, tspecCompliance);
591 if (ret == A_OK) 591 if (ret == 0)
592 ret = wmi_create_pstream_cmd(ar->arWmi, &cmd); 592 ret = wmi_create_pstream_cmd(ar->arWmi, &cmd);
593 593
594 switch (ret) { 594 switch (ret) {
595 case A_OK: 595 case 0:
596 return 0; 596 return 0;
597 case A_EBUSY : 597 case A_EBUSY :
598 return -EBUSY; 598 return -EBUSY;
@@ -622,7 +622,7 @@ ar6000_ioctl_delete_qos(struct net_device *dev, struct ifreq *rq)
622 ret = wmi_delete_pstream_cmd(ar->arWmi, cmd.trafficClass, cmd.tsid); 622 ret = wmi_delete_pstream_cmd(ar->arWmi, cmd.trafficClass, cmd.tsid);
623 623
624 switch (ret) { 624 switch (ret) {
625 case A_OK: 625 case 0:
626 return 0; 626 return 0;
627 case A_EBUSY : 627 case A_EBUSY :
628 return -EBUSY; 628 return -EBUSY;
@@ -687,7 +687,7 @@ ar6000_ioctl_tcmd_get_rx_report(struct net_device *dev,
687 } 687 }
688 688
689 ar->tcmdRxReport = 0; 689 ar->tcmdRxReport = 0;
690 if (wmi_test_cmd(ar->arWmi, data, len) != A_OK) { 690 if (wmi_test_cmd(ar->arWmi, data, len) != 0) {
691 up(&ar->arSem); 691 up(&ar->arSem);
692 return -EIO; 692 return -EIO;
693 } 693 }
@@ -802,7 +802,7 @@ ar6000_ioctl_get_target_stats(struct net_device *dev, struct ifreq *rq)
802 802
803 ar->statsUpdatePending = true; 803 ar->statsUpdatePending = true;
804 804
805 if(wmi_get_stats_cmd(ar->arWmi) != A_OK) { 805 if(wmi_get_stats_cmd(ar->arWmi) != 0) {
806 up(&ar->arSem); 806 up(&ar->arSem);
807 return -EIO; 807 return -EIO;
808 } 808 }
@@ -865,7 +865,7 @@ ar6000_ioctl_get_ap_stats(struct net_device *dev, struct ifreq *rq)
865 865
866 ar->statsUpdatePending = true; 866 ar->statsUpdatePending = true;
867 867
868 if(wmi_get_stats_cmd(ar->arWmi) != A_OK) { 868 if(wmi_get_stats_cmd(ar->arWmi) != 0) {
869 up(&ar->arSem); 869 up(&ar->arSem);
870 return -EIO; 870 return -EIO;
871 } 871 }
@@ -901,7 +901,7 @@ ar6000_ioctl_set_access_params(struct net_device *dev, struct ifreq *rq)
901 } 901 }
902 902
903 if (wmi_set_access_params_cmd(ar->arWmi, cmd.ac, cmd.txop, cmd.eCWmin, cmd.eCWmax, 903 if (wmi_set_access_params_cmd(ar->arWmi, cmd.ac, cmd.txop, cmd.eCWmin, cmd.eCWmax,
904 cmd.aifsn) == A_OK) 904 cmd.aifsn) == 0)
905 { 905 {
906 ret = 0; 906 ret = 0;
907 } else { 907 } else {
@@ -926,7 +926,7 @@ ar6000_ioctl_set_disconnect_timeout(struct net_device *dev, struct ifreq *rq)
926 return -EFAULT; 926 return -EFAULT;
927 } 927 }
928 928
929 if (wmi_disctimeout_cmd(ar->arWmi, cmd.disconnectTimeout) == A_OK) 929 if (wmi_disctimeout_cmd(ar->arWmi, cmd.disconnectTimeout) == 0)
930 { 930 {
931 ret = 0; 931 ret = 0;
932 } else { 932 } else {
@@ -951,7 +951,7 @@ ar6000_xioctl_set_voice_pkt_size(struct net_device *dev, char *userdata)
951 return -EFAULT; 951 return -EFAULT;
952 } 952 }
953 953
954 if (wmi_set_voice_pkt_size_cmd(ar->arWmi, cmd.voicePktSize) == A_OK) 954 if (wmi_set_voice_pkt_size_cmd(ar->arWmi, cmd.voicePktSize) == 0)
955 { 955 {
956 ret = 0; 956 ret = 0;
957 } else { 957 } else {
@@ -977,7 +977,7 @@ ar6000_xioctl_set_max_sp_len(struct net_device *dev, char *userdata)
977 return -EFAULT; 977 return -EFAULT;
978 } 978 }
979 979
980 if (wmi_set_max_sp_len_cmd(ar->arWmi, cmd.maxSPLen) == A_OK) 980 if (wmi_set_max_sp_len_cmd(ar->arWmi, cmd.maxSPLen) == 0)
981 { 981 {
982 ret = 0; 982 ret = 0;
983 } else { 983 } else {
@@ -1003,7 +1003,7 @@ ar6000_xioctl_set_bt_status_cmd(struct net_device *dev, char *userdata)
1003 return -EFAULT; 1003 return -EFAULT;
1004 } 1004 }
1005 1005
1006 if (wmi_set_bt_status_cmd(ar->arWmi, cmd.streamType, cmd.status) == A_OK) 1006 if (wmi_set_bt_status_cmd(ar->arWmi, cmd.streamType, cmd.status) == 0)
1007 { 1007 {
1008 ret = 0; 1008 ret = 0;
1009 } else { 1009 } else {
@@ -1028,7 +1028,7 @@ ar6000_xioctl_set_bt_params_cmd(struct net_device *dev, char *userdata)
1028 return -EFAULT; 1028 return -EFAULT;
1029 } 1029 }
1030 1030
1031 if (wmi_set_bt_params_cmd(ar->arWmi, &cmd) == A_OK) 1031 if (wmi_set_bt_params_cmd(ar->arWmi, &cmd) == 0)
1032 { 1032 {
1033 ret = 0; 1033 ret = 0;
1034 } else { 1034 } else {
@@ -1052,7 +1052,7 @@ ar6000_xioctl_set_btcoex_fe_ant_cmd(struct net_device * dev, char *userdata)
1052 return -EFAULT; 1052 return -EFAULT;
1053 } 1053 }
1054 1054
1055 if (wmi_set_btcoex_fe_ant_cmd(ar->arWmi, &cmd) == A_OK) 1055 if (wmi_set_btcoex_fe_ant_cmd(ar->arWmi, &cmd) == 0)
1056 { 1056 {
1057 ret = 0; 1057 ret = 0;
1058 } else { 1058 } else {
@@ -1077,7 +1077,7 @@ ar6000_xioctl_set_btcoex_colocated_bt_dev_cmd(struct net_device * dev, char *use
1077 return -EFAULT; 1077 return -EFAULT;
1078 } 1078 }
1079 1079
1080 if (wmi_set_btcoex_colocated_bt_dev_cmd(ar->arWmi, &cmd) == A_OK) 1080 if (wmi_set_btcoex_colocated_bt_dev_cmd(ar->arWmi, &cmd) == 0)
1081 { 1081 {
1082 ret = 0; 1082 ret = 0;
1083 } else { 1083 } else {
@@ -1102,7 +1102,7 @@ ar6000_xioctl_set_btcoex_btinquiry_page_config_cmd(struct net_device * dev, cha
1102 return -EFAULT; 1102 return -EFAULT;
1103 } 1103 }
1104 1104
1105 if (wmi_set_btcoex_btinquiry_page_config_cmd(ar->arWmi, &cmd) == A_OK) 1105 if (wmi_set_btcoex_btinquiry_page_config_cmd(ar->arWmi, &cmd) == 0)
1106 { 1106 {
1107 ret = 0; 1107 ret = 0;
1108 } else { 1108 } else {
@@ -1127,7 +1127,7 @@ ar6000_xioctl_set_btcoex_sco_config_cmd(struct net_device * dev, char *userdata)
1127 return -EFAULT; 1127 return -EFAULT;
1128 } 1128 }
1129 1129
1130 if (wmi_set_btcoex_sco_config_cmd(ar->arWmi, &cmd) == A_OK) 1130 if (wmi_set_btcoex_sco_config_cmd(ar->arWmi, &cmd) == 0)
1131 { 1131 {
1132 ret = 0; 1132 ret = 0;
1133 } else { 1133 } else {
@@ -1153,7 +1153,7 @@ ar6000_xioctl_set_btcoex_a2dp_config_cmd(struct net_device * dev,
1153 return -EFAULT; 1153 return -EFAULT;
1154 } 1154 }
1155 1155
1156 if (wmi_set_btcoex_a2dp_config_cmd(ar->arWmi, &cmd) == A_OK) 1156 if (wmi_set_btcoex_a2dp_config_cmd(ar->arWmi, &cmd) == 0)
1157 { 1157 {
1158 ret = 0; 1158 ret = 0;
1159 } else { 1159 } else {
@@ -1178,7 +1178,7 @@ ar6000_xioctl_set_btcoex_aclcoex_config_cmd(struct net_device * dev, char *userd
1178 return -EFAULT; 1178 return -EFAULT;
1179 } 1179 }
1180 1180
1181 if (wmi_set_btcoex_aclcoex_config_cmd(ar->arWmi, &cmd) == A_OK) 1181 if (wmi_set_btcoex_aclcoex_config_cmd(ar->arWmi, &cmd) == 0)
1182 { 1182 {
1183 ret = 0; 1183 ret = 0;
1184 } else { 1184 } else {
@@ -1203,7 +1203,7 @@ ar60000_xioctl_set_btcoex_debug_cmd(struct net_device * dev, char *userdata)
1203 return -EFAULT; 1203 return -EFAULT;
1204 } 1204 }
1205 1205
1206 if (wmi_set_btcoex_debug_cmd(ar->arWmi, &cmd) == A_OK) 1206 if (wmi_set_btcoex_debug_cmd(ar->arWmi, &cmd) == 0)
1207 { 1207 {
1208 ret = 0; 1208 ret = 0;
1209 } else { 1209 } else {
@@ -1228,7 +1228,7 @@ ar6000_xioctl_set_btcoex_bt_operating_status_cmd(struct net_device * dev, char *
1228 return -EFAULT; 1228 return -EFAULT;
1229 } 1229 }
1230 1230
1231 if (wmi_set_btcoex_bt_operating_status_cmd(ar->arWmi, &cmd) == A_OK) 1231 if (wmi_set_btcoex_bt_operating_status_cmd(ar->arWmi, &cmd) == 0)
1232 { 1232 {
1233 ret = 0; 1233 ret = 0;
1234 } else { 1234 } else {
@@ -1261,7 +1261,7 @@ ar6000_xioctl_get_btcoex_config_cmd(struct net_device * dev, char *userdata,
1261 return -ERESTARTSYS; 1261 return -ERESTARTSYS;
1262 } 1262 }
1263 1263
1264 if (wmi_get_btcoex_config_cmd(ar->arWmi, (WMI_GET_BTCOEX_CONFIG_CMD *)&btcoexConfig.configCmd) != A_OK) 1264 if (wmi_get_btcoex_config_cmd(ar->arWmi, (WMI_GET_BTCOEX_CONFIG_CMD *)&btcoexConfig.configCmd) != 0)
1265 { 1265 {
1266 up(&ar->arSem); 1266 up(&ar->arSem);
1267 return -EIO; 1267 return -EIO;
@@ -1305,7 +1305,7 @@ ar6000_xioctl_get_btcoex_stats_cmd(struct net_device * dev, char *userdata, stru
1305 return -EFAULT; 1305 return -EFAULT;
1306 } 1306 }
1307 1307
1308 if (wmi_get_btcoex_stats_cmd(ar->arWmi) != A_OK) 1308 if (wmi_get_btcoex_stats_cmd(ar->arWmi) != 0)
1309 { 1309 {
1310 up(&ar->arSem); 1310 up(&ar->arSem);
1311 return -EIO; 1311 return -EIO;
@@ -1475,7 +1475,7 @@ ar6000_create_acl_data_osbuf(struct net_device *dev, u8 *userdata, void **p_osbu
1475 u8 tmp_space[8]; 1475 u8 tmp_space[8];
1476 HCI_ACL_DATA_PKT *acl; 1476 HCI_ACL_DATA_PKT *acl;
1477 u8 hdr_size, *datap=NULL; 1477 u8 hdr_size, *datap=NULL;
1478 int ret = A_OK; 1478 int ret = 0;
1479 1479
1480 /* ACL is in data path. There is a need to create pool 1480 /* ACL is in data path. There is a need to create pool
1481 * mechanism for allocating and freeing NETBUFs - ToDo later. 1481 * mechanism for allocating and freeing NETBUFs - ToDo later.
@@ -1508,7 +1508,7 @@ ar6000_create_acl_data_osbuf(struct net_device *dev, u8 *userdata, void **p_osbu
1508 } 1508 }
1509 } while(false); 1509 } while(false);
1510 1510
1511 if (ret == A_OK) { 1511 if (ret == 0) {
1512 *p_osbuf = osbuf; 1512 *p_osbuf = osbuf;
1513 } else { 1513 } else {
1514 A_NETBUF_FREE(osbuf); 1514 A_NETBUF_FREE(osbuf);
@@ -1878,7 +1878,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
1878 goto ioctl_done; 1878 goto ioctl_done;
1879 } 1879 }
1880 userdata = (char *)(((unsigned int *)rq->ifr_data)+1); 1880 userdata = (char *)(((unsigned int *)rq->ifr_data)+1);
1881 if(is_xioctl_allowed(ar->arNextMode, cmd) != A_OK) { 1881 if(is_xioctl_allowed(ar->arNextMode, cmd) != 0) {
1882 A_PRINTF("xioctl: cmd=%d not allowed in this mode\n",cmd); 1882 A_PRINTF("xioctl: cmd=%d not allowed in this mode\n",cmd);
1883 ret = -EOPNOTSUPP; 1883 ret = -EOPNOTSUPP;
1884 goto ioctl_done; 1884 goto ioctl_done;
@@ -2193,7 +2193,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2193 2193
2194#ifdef HTC_RAW_INTERFACE 2194#ifdef HTC_RAW_INTERFACE
2195 case AR6000_XIOCTL_HTC_RAW_OPEN: 2195 case AR6000_XIOCTL_HTC_RAW_OPEN:
2196 ret = A_OK; 2196 ret = 0;
2197 if (!arRawIfEnabled(ar)) { 2197 if (!arRawIfEnabled(ar)) {
2198 /* make sure block size is set in case the target was reset since last 2198 /* make sure block size is set in case the target was reset since last
2199 * BMI phase (i.e. flashup downloads) */ 2199 * BMI phase (i.e. flashup downloads) */
@@ -2207,7 +2207,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2207 } 2207 }
2208 /* Terminate the BMI phase */ 2208 /* Terminate the BMI phase */
2209 ret = BMIDone(hifDevice); 2209 ret = BMIDone(hifDevice);
2210 if (ret == A_OK) { 2210 if (ret == 0) {
2211 ret = ar6000_htc_raw_open(ar); 2211 ret = ar6000_htc_raw_open(ar);
2212 } 2212 }
2213 } 2213 }
@@ -2309,7 +2309,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2309 break; 2309 break;
2310 } 2310 }
2311 2311
2312 if (wmi_prof_cfg_cmd(ar->arWmi, period, nbins) != A_OK) { 2312 if (wmi_prof_cfg_cmd(ar->arWmi, period, nbins) != 0) {
2313 ret = -EIO; 2313 ret = -EIO;
2314 } 2314 }
2315 2315
@@ -2325,7 +2325,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2325 break; 2325 break;
2326 } 2326 }
2327 2327
2328 if (wmi_prof_addr_set_cmd(ar->arWmi, addr) != A_OK) { 2328 if (wmi_prof_addr_set_cmd(ar->arWmi, addr) != 0) {
2329 ret = -EIO; 2329 ret = -EIO;
2330 } 2330 }
2331 2331
@@ -2363,7 +2363,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2363 2363
2364 prof_count_available = false; 2364 prof_count_available = false;
2365 ret = prof_count_get(dev); 2365 ret = prof_count_get(dev);
2366 if (ret != A_OK) { 2366 if (ret != 0) {
2367 up(&ar->arSem); 2367 up(&ar->arSem);
2368 ret = -EIO; 2368 ret = -EIO;
2369 goto ioctl_done; 2369 goto ioctl_done;
@@ -2406,7 +2406,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2406 ret = -EFAULT; 2406 ret = -EFAULT;
2407 } else { 2407 } else {
2408 if (wmi_powermode_cmd(ar->arWmi, pwrModeCmd.powerMode) 2408 if (wmi_powermode_cmd(ar->arWmi, pwrModeCmd.powerMode)
2409 != A_OK) 2409 != 0)
2410 { 2410 {
2411 ret = -EIO; 2411 ret = -EIO;
2412 } 2412 }
@@ -2425,7 +2425,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2425 ret = -EFAULT; 2425 ret = -EFAULT;
2426 } else { 2426 } else {
2427 if (wmi_ibsspmcaps_cmd(ar->arWmi, ibssPmCaps.power_saving, ibssPmCaps.ttl, 2427 if (wmi_ibsspmcaps_cmd(ar->arWmi, ibssPmCaps.power_saving, ibssPmCaps.ttl,
2428 ibssPmCaps.atim_windows, ibssPmCaps.timeout_value) != A_OK) 2428 ibssPmCaps.atim_windows, ibssPmCaps.timeout_value) != 0)
2429 { 2429 {
2430 ret = -EIO; 2430 ret = -EIO;
2431 } 2431 }
@@ -2447,7 +2447,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2447 ret = -EFAULT; 2447 ret = -EFAULT;
2448 } else { 2448 } else {
2449 if (wmi_apps_cmd(ar->arWmi, apPsCmd.psType, apPsCmd.idle_time, 2449 if (wmi_apps_cmd(ar->arWmi, apPsCmd.psType, apPsCmd.idle_time,
2450 apPsCmd.ps_period, apPsCmd.sleep_period) != A_OK) 2450 apPsCmd.ps_period, apPsCmd.sleep_period) != 0)
2451 { 2451 {
2452 ret = -EIO; 2452 ret = -EIO;
2453 } 2453 }
@@ -2475,7 +2475,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2475#else 2475#else
2476 SEND_POWER_SAVE_FAIL_EVENT_ALWAYS 2476 SEND_POWER_SAVE_FAIL_EVENT_ALWAYS
2477#endif 2477#endif
2478 ) != A_OK) 2478 ) != 0)
2479 { 2479 {
2480 ret = -EIO; 2480 ret = -EIO;
2481 } 2481 }
@@ -2506,7 +2506,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2506 ar->scParams.shortScanRatio, 2506 ar->scParams.shortScanRatio,
2507 ar->scParams.scanCtrlFlags, 2507 ar->scParams.scanCtrlFlags,
2508 ar->scParams.max_dfsch_act_time, 2508 ar->scParams.max_dfsch_act_time,
2509 ar->scParams.maxact_scan_per_ssid) != A_OK) 2509 ar->scParams.maxact_scan_per_ssid) != 0)
2510 { 2510 {
2511 ret = -EIO; 2511 ret = -EIO;
2512 } 2512 }
@@ -2524,7 +2524,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2524 { 2524 {
2525 ret = -EFAULT; 2525 ret = -EFAULT;
2526 } else { 2526 } else {
2527 if (wmi_listeninterval_cmd(ar->arWmi, listenCmd.listenInterval, listenCmd.numBeacons) != A_OK) { 2527 if (wmi_listeninterval_cmd(ar->arWmi, listenCmd.listenInterval, listenCmd.numBeacons) != 0) {
2528 ret = -EIO; 2528 ret = -EIO;
2529 } else { 2529 } else {
2530 AR6000_SPIN_LOCK(&ar->arLock, 0); 2530 AR6000_SPIN_LOCK(&ar->arLock, 0);
@@ -2547,7 +2547,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2547 { 2547 {
2548 ret = -EFAULT; 2548 ret = -EFAULT;
2549 } else { 2549 } else {
2550 if (wmi_bmisstime_cmd(ar->arWmi, bmissCmd.bmissTime, bmissCmd.numBeacons) != A_OK) { 2550 if (wmi_bmisstime_cmd(ar->arWmi, bmissCmd.bmissTime, bmissCmd.numBeacons) != 0) {
2551 ret = -EIO; 2551 ret = -EIO;
2552 } 2552 }
2553 } 2553 }
@@ -2565,7 +2565,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2565 ret = -EFAULT; 2565 ret = -EFAULT;
2566 } else { 2566 } else {
2567 if (wmi_bssfilter_cmd(ar->arWmi, filt.bssFilter, filt.ieMask) 2567 if (wmi_bssfilter_cmd(ar->arWmi, filt.bssFilter, filt.ieMask)
2568 != A_OK) { 2568 != 0) {
2569 ret = -EIO; 2569 ret = -EIO;
2570 } else { 2570 } else {
2571 ar->arUserBssFilter = param; 2571 ar->arUserBssFilter = param;
@@ -2614,7 +2614,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2614#else 2614#else
2615 WMI_IGNORE_BARKER_IN_ERP 2615 WMI_IGNORE_BARKER_IN_ERP
2616#endif 2616#endif
2617 ) != A_OK) 2617 ) != 0)
2618 { 2618 {
2619 ret = -EIO; 2619 ret = -EIO;
2620 } 2620 }
@@ -2634,7 +2634,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2634 } else { 2634 } else {
2635 ar->arRTS = rtsCmd.threshold; 2635 ar->arRTS = rtsCmd.threshold;
2636 if (wmi_set_rts_cmd(ar->arWmi, rtsCmd.threshold) 2636 if (wmi_set_rts_cmd(ar->arWmi, rtsCmd.threshold)
2637 != A_OK) 2637 != 0)
2638 { 2638 {
2639 ret = -EIO; 2639 ret = -EIO;
2640 } 2640 }
@@ -2728,7 +2728,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2728 break; 2728 break;
2729 } 2729 }
2730 if (wmi_associnfo_cmd(ar->arWmi, cmd.ieType, 2730 if (wmi_associnfo_cmd(ar->arWmi, cmd.ieType,
2731 cmd.bufferSize, assocInfo) != A_OK) { 2731 cmd.bufferSize, assocInfo) != 0) {
2732 ret = -EIO; 2732 ret = -EIO;
2733 break; 2733 break;
2734 } 2734 }
@@ -2811,7 +2811,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2811 } 2811 }
2812 2812
2813 /* Send the challenge on the control channel */ 2813 /* Send the challenge on the control channel */
2814 if (wmi_get_challenge_resp_cmd(ar->arWmi, cookie, APP_HB_CHALLENGE) != A_OK) { 2814 if (wmi_get_challenge_resp_cmd(ar->arWmi, cookie, APP_HB_CHALLENGE) != 0) {
2815 ret = -EIO; 2815 ret = -EIO;
2816 goto ioctl_done; 2816 goto ioctl_done;
2817 } 2817 }
@@ -2868,7 +2868,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2868 gpio_output_set_cmd.clear_mask, 2868 gpio_output_set_cmd.clear_mask,
2869 gpio_output_set_cmd.enable_mask, 2869 gpio_output_set_cmd.enable_mask,
2870 gpio_output_set_cmd.disable_mask); 2870 gpio_output_set_cmd.disable_mask);
2871 if (ret != A_OK) { 2871 if (ret != 0) {
2872 ret = -EIO; 2872 ret = -EIO;
2873 } 2873 }
2874 } 2874 }
@@ -2896,7 +2896,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2896 } 2896 }
2897 2897
2898 ret = ar6000_gpio_input_get(dev); 2898 ret = ar6000_gpio_input_get(dev);
2899 if (ret != A_OK) { 2899 if (ret != 0) {
2900 up(&ar->arSem); 2900 up(&ar->arSem);
2901 ret = -EIO; 2901 ret = -EIO;
2902 goto ioctl_done; 2902 goto ioctl_done;
@@ -2948,7 +2948,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2948 ret = ar6000_gpio_register_set(dev, 2948 ret = ar6000_gpio_register_set(dev,
2949 gpio_register_cmd.gpioreg_id, 2949 gpio_register_cmd.gpioreg_id,
2950 gpio_register_cmd.value); 2950 gpio_register_cmd.value);
2951 if (ret != A_OK) { 2951 if (ret != 0) {
2952 ret = -EIO; 2952 ret = -EIO;
2953 } 2953 }
2954 2954
@@ -2989,7 +2989,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2989 ret = -EFAULT; 2989 ret = -EFAULT;
2990 } else { 2990 } else {
2991 ret = ar6000_gpio_register_get(dev, gpio_register_cmd.gpioreg_id); 2991 ret = ar6000_gpio_register_get(dev, gpio_register_cmd.gpioreg_id);
2992 if (ret != A_OK) { 2992 if (ret != 0) {
2993 up(&ar->arSem); 2993 up(&ar->arSem);
2994 ret = -EIO; 2994 ret = -EIO;
2995 goto ioctl_done; 2995 goto ioctl_done;
@@ -3039,7 +3039,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3039 ret = -EFAULT; 3039 ret = -EFAULT;
3040 } else { 3040 } else {
3041 ret = ar6000_gpio_intr_ack(dev, gpio_intr_ack_cmd.ack_mask); 3041 ret = ar6000_gpio_intr_ack(dev, gpio_intr_ack_cmd.ack_mask);
3042 if (ret != A_OK) { 3042 if (ret != 0) {
3043 ret = -EIO; 3043 ret = -EIO;
3044 } 3044 }
3045 } 3045 }
@@ -3076,7 +3076,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3076 /* Send the challenge on the control channel */ 3076 /* Send the challenge on the control channel */
3077 if (wmi_config_debug_module_cmd(ar->arWmi, config.mmask, 3077 if (wmi_config_debug_module_cmd(ar->arWmi, config.mmask,
3078 config.tsr, config.rep, 3078 config.tsr, config.rep,
3079 config.size, config.valid) != A_OK) 3079 config.size, config.valid) != 0)
3080 { 3080 {
3081 ret = -EIO; 3081 ret = -EIO;
3082 goto ioctl_done; 3082 goto ioctl_done;
@@ -3087,7 +3087,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3087 case AR6000_XIOCTL_DBGLOG_GET_DEBUG_LOGS: 3087 case AR6000_XIOCTL_DBGLOG_GET_DEBUG_LOGS:
3088 { 3088 {
3089 /* Send the challenge on the control channel */ 3089 /* Send the challenge on the control channel */
3090 if (ar6000_dbglog_get_debug_logs(ar) != A_OK) 3090 if (ar6000_dbglog_get_debug_logs(ar) != 0)
3091 { 3091 {
3092 ret = -EIO; 3092 ret = -EIO;
3093 goto ioctl_done; 3093 goto ioctl_done;
@@ -3131,7 +3131,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3131 ret = -EFAULT; 3131 ret = -EFAULT;
3132 3132
3133 } else if (wmi_set_opt_mode_cmd(ar->arWmi, optModeCmd.optMode) 3133 } else if (wmi_set_opt_mode_cmd(ar->arWmi, optModeCmd.optMode)
3134 != A_OK) 3134 != 0)
3135 { 3135 {
3136 ret = -EIO; 3136 ret = -EIO;
3137 } 3137 }
@@ -3179,7 +3179,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3179 if (wmi_set_retry_limits_cmd(ar->arWmi, setRetryParams.frameType, 3179 if (wmi_set_retry_limits_cmd(ar->arWmi, setRetryParams.frameType,
3180 setRetryParams.trafficClass, 3180 setRetryParams.trafficClass,
3181 setRetryParams.maxRetries, 3181 setRetryParams.maxRetries,
3182 setRetryParams.enableNotify) != A_OK) 3182 setRetryParams.enableNotify) != 0)
3183 { 3183 {
3184 ret = -EIO; 3184 ret = -EIO;
3185 } 3185 }
@@ -3201,7 +3201,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3201 { 3201 {
3202 ret = -EFAULT; 3202 ret = -EFAULT;
3203 } else if (wmi_set_adhoc_bconIntvl_cmd(ar->arWmi, bIntvlCmd.beaconInterval) 3203 } else if (wmi_set_adhoc_bconIntvl_cmd(ar->arWmi, bIntvlCmd.beaconInterval)
3204 != A_OK) 3204 != 0)
3205 { 3205 {
3206 ret = -EIO; 3206 ret = -EIO;
3207 } 3207 }
@@ -3266,7 +3266,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3266 AR6000_WLAN_STATE state; 3266 AR6000_WLAN_STATE state;
3267 if (get_user(state, (unsigned int *)userdata)) 3267 if (get_user(state, (unsigned int *)userdata))
3268 ret = -EFAULT; 3268 ret = -EFAULT;
3269 else if (ar6000_set_wlan_state(ar, state) != A_OK) 3269 else if (ar6000_set_wlan_state(ar, state) != 0)
3270 ret = -EIO; 3270 ret = -EIO;
3271 break; 3271 break;
3272 } 3272 }
@@ -3354,7 +3354,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3354 cmdp->homeDwellTime, 3354 cmdp->homeDwellTime,
3355 cmdp->forceScanInterval, 3355 cmdp->forceScanInterval,
3356 cmdp->numChannels, 3356 cmdp->numChannels,
3357 cmdp->channelList) != A_OK) 3357 cmdp->channelList) != 0)
3358 { 3358 {
3359 ret = -EIO; 3359 ret = -EIO;
3360 } 3360 }
@@ -3376,7 +3376,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3376 returnStatus = wmi_set_fixrates_cmd(ar->arWmi, setFixRatesCmd.fixRateMask); 3376 returnStatus = wmi_set_fixrates_cmd(ar->arWmi, setFixRatesCmd.fixRateMask);
3377 if (returnStatus == A_EINVAL) { 3377 if (returnStatus == A_EINVAL) {
3378 ret = -EINVAL; 3378 ret = -EINVAL;
3379 } else if(returnStatus != A_OK) { 3379 } else if(returnStatus != 0) {
3380 ret = -EIO; 3380 ret = -EIO;
3381 } else { 3381 } else {
3382 ar->ap_profile_flag = 1; /* There is a change in profile */ 3382 ar->ap_profile_flag = 1; /* There is a change in profile */
@@ -3415,7 +3415,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3415 } else { 3415 } else {
3416 ar->arRateMask = 0xFFFFFFFF; 3416 ar->arRateMask = 0xFFFFFFFF;
3417 3417
3418 if (wmi_get_ratemask_cmd(ar->arWmi) != A_OK) { 3418 if (wmi_get_ratemask_cmd(ar->arWmi) != 0) {
3419 up(&ar->arSem); 3419 up(&ar->arSem);
3420 ret = -EIO; 3420 ret = -EIO;
3421 goto ioctl_done; 3421 goto ioctl_done;
@@ -3450,7 +3450,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3450 { 3450 {
3451 ret = -EFAULT; 3451 ret = -EFAULT;
3452 } else { 3452 } else {
3453 if (wmi_set_authmode_cmd(ar->arWmi, setAuthMode.mode) != A_OK) 3453 if (wmi_set_authmode_cmd(ar->arWmi, setAuthMode.mode) != 0)
3454 { 3454 {
3455 ret = -EIO; 3455 ret = -EIO;
3456 } 3456 }
@@ -3468,7 +3468,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3468 { 3468 {
3469 ret = -EFAULT; 3469 ret = -EFAULT;
3470 } else { 3470 } else {
3471 if (wmi_set_reassocmode_cmd(ar->arWmi, setReassocMode.mode) != A_OK) 3471 if (wmi_set_reassocmode_cmd(ar->arWmi, setReassocMode.mode) != 0)
3472 { 3472 {
3473 ret = -EIO; 3473 ret = -EIO;
3474 } 3474 }
@@ -3483,7 +3483,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3483 break; 3483 break;
3484 } 3484 }
3485 addr = TARG_VTOP(ar->arTargetType, addr); 3485 addr = TARG_VTOP(ar->arTargetType, addr);
3486 if (ar6000_ReadRegDiag(ar->arHifDevice, &addr, &data) != A_OK) { 3486 if (ar6000_ReadRegDiag(ar->arHifDevice, &addr, &data) != 0) {
3487 ret = -EIO; 3487 ret = -EIO;
3488 } 3488 }
3489 if (put_user(data, (unsigned int *)userdata + 1)) { 3489 if (put_user(data, (unsigned int *)userdata + 1)) {
@@ -3501,7 +3501,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3501 break; 3501 break;
3502 } 3502 }
3503 addr = TARG_VTOP(ar->arTargetType, addr); 3503 addr = TARG_VTOP(ar->arTargetType, addr);
3504 if (ar6000_WriteRegDiag(ar->arHifDevice, &addr, &data) != A_OK) { 3504 if (ar6000_WriteRegDiag(ar->arHifDevice, &addr, &data) != 0) {
3505 ret = -EIO; 3505 ret = -EIO;
3506 } 3506 }
3507 break; 3507 break;
@@ -3516,7 +3516,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3516 sizeof(setKeepAlive))){ 3516 sizeof(setKeepAlive))){
3517 ret = -EFAULT; 3517 ret = -EFAULT;
3518 } else { 3518 } else {
3519 if (wmi_set_keepalive_cmd(ar->arWmi, setKeepAlive.keepaliveInterval) != A_OK) { 3519 if (wmi_set_keepalive_cmd(ar->arWmi, setKeepAlive.keepaliveInterval) != 0) {
3520 ret = -EIO; 3520 ret = -EIO;
3521 } 3521 }
3522 } 3522 }
@@ -3536,7 +3536,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3536 { 3536 {
3537 ret = -EFAULT; 3537 ret = -EFAULT;
3538 } else { 3538 } else {
3539 if (wmi_set_params_cmd(ar->arWmi, cmd.opcode, cmd.length, cmd.buffer) != A_OK) { 3539 if (wmi_set_params_cmd(ar->arWmi, cmd.opcode, cmd.length, cmd.buffer) != 0) {
3540 ret = -EIO; 3540 ret = -EIO;
3541 } 3541 }
3542 } 3542 }
@@ -3555,7 +3555,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3555 if (wmi_set_mcast_filter_cmd(ar->arWmi, cmd.multicast_mac[0], 3555 if (wmi_set_mcast_filter_cmd(ar->arWmi, cmd.multicast_mac[0],
3556 cmd.multicast_mac[1], 3556 cmd.multicast_mac[1],
3557 cmd.multicast_mac[2], 3557 cmd.multicast_mac[2],
3558 cmd.multicast_mac[3]) != A_OK) { 3558 cmd.multicast_mac[3]) != 0) {
3559 ret = -EIO; 3559 ret = -EIO;
3560 } 3560 }
3561 } 3561 }
@@ -3574,7 +3574,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3574 if (wmi_del_mcast_filter_cmd(ar->arWmi, cmd.multicast_mac[0], 3574 if (wmi_del_mcast_filter_cmd(ar->arWmi, cmd.multicast_mac[0],
3575 cmd.multicast_mac[1], 3575 cmd.multicast_mac[1],
3576 cmd.multicast_mac[2], 3576 cmd.multicast_mac[2],
3577 cmd.multicast_mac[3]) != A_OK) { 3577 cmd.multicast_mac[3]) != 0) {
3578 ret = -EIO; 3578 ret = -EIO;
3579 } 3579 }
3580 } 3580 }
@@ -3590,7 +3590,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3590 sizeof(cmd))){ 3590 sizeof(cmd))){
3591 ret = -EFAULT; 3591 ret = -EFAULT;
3592 } else { 3592 } else {
3593 if (wmi_mcast_filter_cmd(ar->arWmi, cmd.enable) != A_OK) { 3593 if (wmi_mcast_filter_cmd(ar->arWmi, cmd.enable) != 0) {
3594 ret = -EIO; 3594 ret = -EIO;
3595 } 3595 }
3596 } 3596 }
@@ -3623,7 +3623,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3623 } else { 3623 } else {
3624 getKeepAlive.keepaliveInterval = wmi_get_keepalive_cmd(ar->arWmi); 3624 getKeepAlive.keepaliveInterval = wmi_get_keepalive_cmd(ar->arWmi);
3625 ar->arKeepaliveConfigured = 0xFF; 3625 ar->arKeepaliveConfigured = 0xFF;
3626 if (wmi_get_keepalive_configured(ar->arWmi) != A_OK){ 3626 if (wmi_get_keepalive_configured(ar->arWmi) != 0){
3627 up(&ar->arSem); 3627 up(&ar->arSem);
3628 ret = -EIO; 3628 ret = -EIO;
3629 goto ioctl_done; 3629 goto ioctl_done;
@@ -3675,7 +3675,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3675 ret = -EFAULT; 3675 ret = -EFAULT;
3676 } else { 3676 } else {
3677 if (wmi_set_appie_cmd(ar->arWmi, appIEcmd.mgmtFrmType, 3677 if (wmi_set_appie_cmd(ar->arWmi, appIEcmd.mgmtFrmType,
3678 appIEcmd.ieLen, appIeInfo) != A_OK) 3678 appIEcmd.ieLen, appIeInfo) != 0)
3679 { 3679 {
3680 ret = -EIO; 3680 ret = -EIO;
3681 } 3681 }
@@ -3700,7 +3700,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3700 } else { 3700 } else {
3701 cmd.bssFilter = NONE_BSS_FILTER; 3701 cmd.bssFilter = NONE_BSS_FILTER;
3702 } 3702 }
3703 if (wmi_bssfilter_cmd(ar->arWmi, cmd.bssFilter, 0) != A_OK) { 3703 if (wmi_bssfilter_cmd(ar->arWmi, cmd.bssFilter, 0) != 0) {
3704 ret = -EIO; 3704 ret = -EIO;
3705 } else { 3705 } else {
3706 ar->arUserBssFilter = cmd.bssFilter; 3706 ar->arUserBssFilter = cmd.bssFilter;
@@ -3723,7 +3723,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3723 ret = -EFAULT; 3723 ret = -EFAULT;
3724 goto ioctl_done; 3724 goto ioctl_done;
3725 } 3725 }
3726 if (wmi_set_wsc_status_cmd(ar->arWmi, wsc_status) != A_OK) { 3726 if (wmi_set_wsc_status_cmd(ar->arWmi, wsc_status) != 0) {
3727 ret = -EIO; 3727 ret = -EIO;
3728 } 3728 }
3729 break; 3729 break;
@@ -3747,7 +3747,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3747 ROM_addr, RAM_addr, nbytes)); 3747 ROM_addr, RAM_addr, nbytes));
3748 ret = BMIrompatchInstall(hifDevice, ROM_addr, RAM_addr, 3748 ret = BMIrompatchInstall(hifDevice, ROM_addr, RAM_addr,
3749 nbytes, do_activate, &rompatch_id); 3749 nbytes, do_activate, &rompatch_id);
3750 if (ret == A_OK) { 3750 if (ret == 0) {
3751 /* return value */ 3751 /* return value */
3752 if (put_user(rompatch_id, (unsigned int *)rq->ifr_data)) { 3752 if (put_user(rompatch_id, (unsigned int *)rq->ifr_data)) {
3753 ret = -EFAULT; 3753 ret = -EFAULT;
@@ -3812,7 +3812,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3812 ret = -EFAULT; 3812 ret = -EFAULT;
3813 } else { 3813 } else {
3814 if (wmi_set_ip_cmd(ar->arWmi, 3814 if (wmi_set_ip_cmd(ar->arWmi,
3815 &setIP) != A_OK) 3815 &setIP) != 0)
3816 { 3816 {
3817 ret = -EIO; 3817 ret = -EIO;
3818 } 3818 }
@@ -3832,7 +3832,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3832 ret = -EFAULT; 3832 ret = -EFAULT;
3833 } else { 3833 } else {
3834 if (wmi_set_host_sleep_mode_cmd(ar->arWmi, 3834 if (wmi_set_host_sleep_mode_cmd(ar->arWmi,
3835 &setHostSleepMode) != A_OK) 3835 &setHostSleepMode) != 0)
3836 { 3836 {
3837 ret = -EIO; 3837 ret = -EIO;
3838 } 3838 }
@@ -3851,7 +3851,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3851 ret = -EFAULT; 3851 ret = -EFAULT;
3852 } else { 3852 } else {
3853 if (wmi_set_wow_mode_cmd(ar->arWmi, 3853 if (wmi_set_wow_mode_cmd(ar->arWmi,
3854 &setWowMode) != A_OK) 3854 &setWowMode) != 0)
3855 { 3855 {
3856 ret = -EIO; 3856 ret = -EIO;
3857 } 3857 }
@@ -3870,7 +3870,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3870 ret = -EFAULT; 3870 ret = -EFAULT;
3871 } else { 3871 } else {
3872 if (wmi_get_wow_list_cmd(ar->arWmi, 3872 if (wmi_get_wow_list_cmd(ar->arWmi,
3873 &getWowList) != A_OK) 3873 &getWowList) != 0)
3874 { 3874 {
3875 ret = -EIO; 3875 ret = -EIO;
3876 } 3876 }
@@ -3912,7 +3912,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3912 break; 3912 break;
3913 } 3913 }
3914 if (wmi_add_wow_pattern_cmd(ar->arWmi, 3914 if (wmi_add_wow_pattern_cmd(ar->arWmi,
3915 &cmd, pattern_data, mask_data, cmd.filter_size) != A_OK) 3915 &cmd, pattern_data, mask_data, cmd.filter_size) != 0)
3916 { 3916 {
3917 ret = -EIO; 3917 ret = -EIO;
3918 } 3918 }
@@ -3933,7 +3933,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3933 ret = -EFAULT; 3933 ret = -EFAULT;
3934 } else { 3934 } else {
3935 if (wmi_del_wow_pattern_cmd(ar->arWmi, 3935 if (wmi_del_wow_pattern_cmd(ar->arWmi,
3936 &delWowPattern) != A_OK) 3936 &delWowPattern) != 0)
3937 { 3937 {
3938 ret = -EIO; 3938 ret = -EIO;
3939 } 3939 }
@@ -4020,7 +4020,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4020 { 4020 {
4021 ret = -EFAULT; 4021 ret = -EFAULT;
4022 } else { 4022 } else {
4023 if (wmi_set_akmp_params_cmd(ar->arWmi, &akmpParams) != A_OK) { 4023 if (wmi_set_akmp_params_cmd(ar->arWmi, &akmpParams) != 0) {
4024 ret = -EIO; 4024 ret = -EIO;
4025 } 4025 }
4026 } 4026 }
@@ -4042,7 +4042,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4042 ret = -EFAULT; 4042 ret = -EFAULT;
4043 break; 4043 break;
4044 } 4044 }
4045 if (wmi_set_pmkid_list_cmd(ar->arWmi, &pmkidInfo) != A_OK) { 4045 if (wmi_set_pmkid_list_cmd(ar->arWmi, &pmkidInfo) != 0) {
4046 ret = -EIO; 4046 ret = -EIO;
4047 } 4047 }
4048 } 4048 }
@@ -4051,7 +4051,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4051 if (ar->arWmiReady == false) { 4051 if (ar->arWmiReady == false) {
4052 ret = -EIO; 4052 ret = -EIO;
4053 } else { 4053 } else {
4054 if (wmi_get_pmkid_list_cmd(ar->arWmi) != A_OK) { 4054 if (wmi_get_pmkid_list_cmd(ar->arWmi) != 0) {
4055 ret = -EIO; 4055 ret = -EIO;
4056 } 4056 }
4057 } 4057 }
@@ -4365,7 +4365,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4365 ret = -EFAULT; 4365 ret = -EFAULT;
4366 } else { 4366 } else {
4367 4367
4368 if (wmi_set_ht_cap_cmd(ar->arWmi, &htCap) != A_OK) 4368 if (wmi_set_ht_cap_cmd(ar->arWmi, &htCap) != 0)
4369 { 4369 {
4370 ret = -EIO; 4370 ret = -EIO;
4371 } 4371 }
@@ -4382,7 +4382,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4382 ret = -EFAULT; 4382 ret = -EFAULT;
4383 } else { 4383 } else {
4384 4384
4385 if (wmi_set_ht_op_cmd(ar->arWmi, htOp.sta_chan_width) != A_OK) 4385 if (wmi_set_ht_op_cmd(ar->arWmi, htOp.sta_chan_width) != 0)
4386 { 4386 {
4387 ret = -EIO; 4387 ret = -EIO;
4388 } 4388 }
@@ -4395,10 +4395,10 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4395 void *osbuf = NULL; 4395 void *osbuf = NULL;
4396 if (ar->arWmiReady == false) { 4396 if (ar->arWmiReady == false) {
4397 ret = -EIO; 4397 ret = -EIO;
4398 } else if (ar6000_create_acl_data_osbuf(dev, (u8 *)userdata, &osbuf) != A_OK) { 4398 } else if (ar6000_create_acl_data_osbuf(dev, (u8 *)userdata, &osbuf) != 0) {
4399 ret = -EIO; 4399 ret = -EIO;
4400 } else { 4400 } else {
4401 if (wmi_data_hdr_add(ar->arWmi, osbuf, DATA_MSGTYPE, 0, WMI_DATA_HDR_DATA_TYPE_ACL,0,NULL) != A_OK) { 4401 if (wmi_data_hdr_add(ar->arWmi, osbuf, DATA_MSGTYPE, 0, WMI_DATA_HDR_DATA_TYPE_ACL,0,NULL) != 0) {
4402 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("XIOCTL_ACL_DATA - wmi_data_hdr_add failed\n")); 4402 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("XIOCTL_ACL_DATA - wmi_data_hdr_add failed\n"));
4403 } else { 4403 } else {
4404 /* Send data buffer over HTC */ 4404 /* Send data buffer over HTC */
@@ -4422,7 +4422,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4422 } else if(copy_from_user(cmd->buf, userdata + size, cmd->cmd_buf_sz)) { 4422 } else if(copy_from_user(cmd->buf, userdata + size, cmd->cmd_buf_sz)) {
4423 ret = -EFAULT; 4423 ret = -EFAULT;
4424 } else { 4424 } else {
4425 if (wmi_send_hci_cmd(ar->arWmi, cmd->buf, cmd->cmd_buf_sz) != A_OK) { 4425 if (wmi_send_hci_cmd(ar->arWmi, cmd->buf, cmd->cmd_buf_sz) != 0) {
4426 ret = -EIO; 4426 ret = -EIO;
4427 }else if(loghci) { 4427 }else if(loghci) {
4428 A_PRINTF_LOG("HCI Command To PAL --> \n"); 4428 A_PRINTF_LOG("HCI Command To PAL --> \n");
@@ -4448,7 +4448,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4448 } else { 4448 } else {
4449 if (cmd.precedence == BT_WLAN_CONN_PRECDENCE_WLAN || 4449 if (cmd.precedence == BT_WLAN_CONN_PRECDENCE_WLAN ||
4450 cmd.precedence == BT_WLAN_CONN_PRECDENCE_PAL) { 4450 cmd.precedence == BT_WLAN_CONN_PRECDENCE_PAL) {
4451 if ( wmi_set_wlan_conn_precedence_cmd(ar->arWmi, cmd.precedence) != A_OK) { 4451 if ( wmi_set_wlan_conn_precedence_cmd(ar->arWmi, cmd.precedence) != 0) {
4452 ret = -EIO; 4452 ret = -EIO;
4453 } 4453 }
4454 } else { 4454 } else {
@@ -4474,7 +4474,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4474 ret = -EFAULT; 4474 ret = -EFAULT;
4475 } else { 4475 } else {
4476 4476
4477 if (wmi_set_tx_select_rates_cmd(ar->arWmi, masks.rateMasks) != A_OK) 4477 if (wmi_set_tx_select_rates_cmd(ar->arWmi, masks.rateMasks) != 0)
4478 { 4478 {
4479 ret = -EIO; 4479 ret = -EIO;
4480 } 4480 }
@@ -4606,7 +4606,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4606 ret = -EFAULT; 4606 ret = -EFAULT;
4607 break; 4607 break;
4608 } 4608 }
4609 if (ar6000_set_bt_hw_state(ar, state)!=A_OK) { 4609 if (ar6000_set_bt_hw_state(ar, state)!= 0) {
4610 ret = -EIO; 4610 ret = -EIO;
4611 } 4611 }
4612 } 4612 }
@@ -4626,7 +4626,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4626 sizeof(SGICmd))){ 4626 sizeof(SGICmd))){
4627 ret = -EFAULT; 4627 ret = -EFAULT;
4628 } else{ 4628 } else{
4629 if (wmi_SGI_cmd(ar->arWmi, SGICmd.sgiMask, SGICmd.sgiPERThreshold) != A_OK) { 4629 if (wmi_SGI_cmd(ar->arWmi, SGICmd.sgiMask, SGICmd.sgiPERThreshold) != 0) {
4630 ret = -EIO; 4630 ret = -EIO;
4631 } 4631 }
4632 4632
@@ -4641,7 +4641,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4641 if (copy_from_user(ap_ifname, userdata, IFNAMSIZ)) { 4641 if (copy_from_user(ap_ifname, userdata, IFNAMSIZ)) {
4642 ret = -EFAULT; 4642 ret = -EFAULT;
4643 } else { 4643 } else {
4644 if (ar6000_add_ap_interface(ar, ap_ifname) != A_OK) { 4644 if (ar6000_add_ap_interface(ar, ap_ifname) != 0) {
4645 ret = -EIO; 4645 ret = -EIO;
4646 } 4646 }
4647 } 4647 }
@@ -4652,7 +4652,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
4652 break; 4652 break;
4653 case AR6000_XIOCTL_REMOVE_AP_INTERFACE: 4653 case AR6000_XIOCTL_REMOVE_AP_INTERFACE:
4654#ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT 4654#ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT
4655 if (ar6000_remove_ap_interface(ar) != A_OK) { 4655 if (ar6000_remove_ap_interface(ar) != 0) {
4656 ret = -EIO; 4656 ret = -EIO;
4657 } 4657 }
4658#else 4658#else
diff --git a/drivers/staging/ath6kl/os/linux/netbuf.c b/drivers/staging/ath6kl/os/linux/netbuf.c
index 703a2cdf84c..0a41df03a8b 100644
--- a/drivers/staging/ath6kl/os/linux/netbuf.c
+++ b/drivers/staging/ath6kl/os/linux/netbuf.c
@@ -109,7 +109,7 @@ a_netbuf_push(void *bufPtr, s32 len)
109{ 109{
110 skb_push((struct sk_buff *)bufPtr, len); 110 skb_push((struct sk_buff *)bufPtr, len);
111 111
112 return A_OK; 112 return 0;
113} 113}
114 114
115/* 115/*
@@ -122,7 +122,7 @@ a_netbuf_push_data(void *bufPtr, char *srcPtr, s32 len)
122 skb_push((struct sk_buff *) bufPtr, len); 122 skb_push((struct sk_buff *) bufPtr, len);
123 A_MEMCPY(((struct sk_buff *)bufPtr)->data, srcPtr, len); 123 A_MEMCPY(((struct sk_buff *)bufPtr)->data, srcPtr, len);
124 124
125 return A_OK; 125 return 0;
126} 126}
127 127
128/* 128/*
@@ -134,7 +134,7 @@ a_netbuf_put(void *bufPtr, s32 len)
134{ 134{
135 skb_put((struct sk_buff *)bufPtr, len); 135 skb_put((struct sk_buff *)bufPtr, len);
136 136
137 return A_OK; 137 return 0;
138} 138}
139 139
140/* 140/*
@@ -149,7 +149,7 @@ a_netbuf_put_data(void *bufPtr, char *srcPtr, s32 len)
149 skb_put((struct sk_buff *)bufPtr, len); 149 skb_put((struct sk_buff *)bufPtr, len);
150 A_MEMCPY(start, srcPtr, len); 150 A_MEMCPY(start, srcPtr, len);
151 151
152 return A_OK; 152 return 0;
153} 153}
154 154
155 155
@@ -161,7 +161,7 @@ a_netbuf_setlen(void *bufPtr, s32 len)
161{ 161{
162 skb_trim((struct sk_buff *)bufPtr, len); 162 skb_trim((struct sk_buff *)bufPtr, len);
163 163
164 return A_OK; 164 return 0;
165} 165}
166 166
167/* 167/*
@@ -172,7 +172,7 @@ a_netbuf_trim(void *bufPtr, s32 len)
172{ 172{
173 skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len); 173 skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len);
174 174
175 return A_OK; 175 return 0;
176} 176}
177 177
178/* 178/*
@@ -187,7 +187,7 @@ a_netbuf_trim_data(void *bufPtr, char *dstPtr, s32 len)
187 A_MEMCPY(dstPtr, start, len); 187 A_MEMCPY(dstPtr, start, len);
188 skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len); 188 skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len);
189 189
190 return A_OK; 190 return 0;
191} 191}
192 192
193 193
@@ -207,7 +207,7 @@ a_netbuf_pull(void *bufPtr, s32 len)
207{ 207{
208 skb_pull((struct sk_buff *)bufPtr, len); 208 skb_pull((struct sk_buff *)bufPtr, len);
209 209
210 return A_OK; 210 return 0;
211} 211}
212 212
213/* 213/*
@@ -220,7 +220,7 @@ a_netbuf_pull_data(void *bufPtr, char *dstPtr, s32 len)
220 A_MEMCPY(dstPtr, ((struct sk_buff *)bufPtr)->data, len); 220 A_MEMCPY(dstPtr, ((struct sk_buff *)bufPtr)->data, len);
221 skb_pull((struct sk_buff *)bufPtr, len); 221 skb_pull((struct sk_buff *)bufPtr, len);
222 222
223 return A_OK; 223 return 0;
224} 224}
225 225
226#ifdef EXPORT_HCI_BRIDGE_INTERFACE 226#ifdef EXPORT_HCI_BRIDGE_INTERFACE
diff --git a/drivers/staging/ath6kl/os/linux/wireless_ext.c b/drivers/staging/ath6kl/os/linux/wireless_ext.c
index 6d3ae2ce296..1f858ca87a0 100644
--- a/drivers/staging/ath6kl/os/linux/wireless_ext.c
+++ b/drivers/staging/ath6kl/os/linux/wireless_ext.c
@@ -419,7 +419,7 @@ ar6000_ioctl_giwscan(struct net_device *dev,
419 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 419 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
420 struct ar_giwscan_param param; 420 struct ar_giwscan_param param;
421 421
422 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 422 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
423 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 423 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
424 return -EOPNOTSUPP; 424 return -EOPNOTSUPP;
425 } 425 }
@@ -466,7 +466,7 @@ ar6000_ioctl_siwessid(struct net_device *dev,
466 u8 arNetworkType; 466 u8 arNetworkType;
467 u8 prevMode = ar->arNetworkType; 467 u8 prevMode = ar->arNetworkType;
468 468
469 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 469 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
470 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 470 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
471 return -EOPNOTSUPP; 471 return -EOPNOTSUPP;
472 } 472 }
@@ -642,7 +642,7 @@ ar6000_ioctl_siwessid(struct net_device *dev,
642 ar->arSsidLen = data->length - 1; 642 ar->arSsidLen = data->length - 1;
643 A_MEMCPY(ar->arSsid, ssid, ar->arSsidLen); 643 A_MEMCPY(ar->arSsid, ssid, ar->arSsidLen);
644 644
645 if (ar6000_connect_to_ap(ar)!= A_OK) { 645 if (ar6000_connect_to_ap(ar)!= 0) {
646 up(&ar->arSem); 646 up(&ar->arSem);
647 return -EIO; 647 return -EIO;
648 }else{ 648 }else{
@@ -659,7 +659,7 @@ ar6000_ioctl_giwessid(struct net_device *dev,
659{ 659{
660 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 660 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
661 661
662 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 662 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
663 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 663 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
664 return -EOPNOTSUPP; 664 return -EOPNOTSUPP;
665 } 665 }
@@ -715,7 +715,7 @@ ar6000_ioctl_siwrate(struct net_device *dev,
715 u32 kbps; 715 u32 kbps;
716 s8 rate_idx; 716 s8 rate_idx;
717 717
718 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 718 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
719 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 719 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
720 return -EOPNOTSUPP; 720 return -EOPNOTSUPP;
721 } 721 }
@@ -725,7 +725,7 @@ ar6000_ioctl_siwrate(struct net_device *dev,
725 } else { 725 } else {
726 kbps = -1; /* -1 indicates auto rate */ 726 kbps = -1; /* -1 indicates auto rate */
727 } 727 }
728 if(kbps != -1 && wmi_validate_bitrate(ar->arWmi, kbps, &rate_idx) != A_OK) 728 if(kbps != -1 && wmi_validate_bitrate(ar->arWmi, kbps, &rate_idx) != 0)
729 { 729 {
730 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BitRate is not Valid %d\n", kbps)); 730 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BitRate is not Valid %d\n", kbps));
731 return -EINVAL; 731 return -EINVAL;
@@ -733,7 +733,7 @@ ar6000_ioctl_siwrate(struct net_device *dev,
733 ar->arBitRate = kbps; 733 ar->arBitRate = kbps;
734 if(ar->arWmiReady == true) 734 if(ar->arWmiReady == true)
735 { 735 {
736 if (wmi_set_bitrate_cmd(ar->arWmi, kbps, -1, -1) != A_OK) { 736 if (wmi_set_bitrate_cmd(ar->arWmi, kbps, -1, -1) != 0) {
737 return -EINVAL; 737 return -EINVAL;
738 } 738 }
739 } 739 }
@@ -751,7 +751,7 @@ ar6000_ioctl_giwrate(struct net_device *dev,
751 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 751 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
752 int ret = 0; 752 int ret = 0;
753 753
754 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 754 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
755 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 755 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
756 return -EOPNOTSUPP; 756 return -EOPNOTSUPP;
757 } 757 }
@@ -779,7 +779,7 @@ ar6000_ioctl_giwrate(struct net_device *dev,
779 } 779 }
780 780
781 ar->arBitRate = 0xFFFF; 781 ar->arBitRate = 0xFFFF;
782 if (wmi_get_bitrate_cmd(ar->arWmi) != A_OK) { 782 if (wmi_get_bitrate_cmd(ar->arWmi) != 0) {
783 up(&ar->arSem); 783 up(&ar->arSem);
784 return -EIO; 784 return -EIO;
785 } 785 }
@@ -814,7 +814,7 @@ ar6000_ioctl_siwtxpow(struct net_device *dev,
814 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 814 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
815 u8 dbM; 815 u8 dbM;
816 816
817 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 817 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
818 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 818 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
819 return -EOPNOTSUPP; 819 return -EOPNOTSUPP;
820 } 820 }
@@ -856,7 +856,7 @@ ar6000_ioctl_giwtxpow(struct net_device *dev,
856 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 856 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
857 int ret = 0; 857 int ret = 0;
858 858
859 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 859 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
860 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 860 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
861 return -EOPNOTSUPP; 861 return -EOPNOTSUPP;
862 } 862 }
@@ -882,7 +882,7 @@ ar6000_ioctl_giwtxpow(struct net_device *dev,
882 { 882 {
883 ar->arTxPwr = 0; 883 ar->arTxPwr = 0;
884 884
885 if (wmi_get_txPwr_cmd(ar->arWmi) != A_OK) { 885 if (wmi_get_txPwr_cmd(ar->arWmi) != 0) {
886 up(&ar->arSem); 886 up(&ar->arSem);
887 return -EIO; 887 return -EIO;
888 } 888 }
@@ -925,7 +925,7 @@ ar6000_ioctl_siwretry(struct net_device *dev,
925{ 925{
926 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 926 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
927 927
928 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 928 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
929 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 929 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
930 return -EOPNOTSUPP; 930 return -EOPNOTSUPP;
931 } 931 }
@@ -948,7 +948,7 @@ ar6000_ioctl_siwretry(struct net_device *dev,
948 if(ar->arWmiReady == true) 948 if(ar->arWmiReady == true)
949 { 949 {
950 if (wmi_set_retry_limits_cmd(ar->arWmi, DATA_FRAMETYPE, WMM_AC_BE, 950 if (wmi_set_retry_limits_cmd(ar->arWmi, DATA_FRAMETYPE, WMM_AC_BE,
951 rrq->value, 0) != A_OK){ 951 rrq->value, 0) != 0){
952 return -EINVAL; 952 return -EINVAL;
953 } 953 }
954 } 954 }
@@ -966,7 +966,7 @@ ar6000_ioctl_giwretry(struct net_device *dev,
966{ 966{
967 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 967 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
968 968
969 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 969 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
970 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 970 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
971 return -EOPNOTSUPP; 971 return -EOPNOTSUPP;
972 } 972 }
@@ -1009,7 +1009,7 @@ ar6000_ioctl_siwencode(struct net_device *dev,
1009 int index; 1009 int index;
1010 s32 auth = 0; 1010 s32 auth = 0;
1011 1011
1012 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 1012 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
1013 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 1013 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
1014 return -EOPNOTSUPP; 1014 return -EOPNOTSUPP;
1015 } 1015 }
@@ -1125,7 +1125,7 @@ ar6000_ioctl_giwencode(struct net_device *dev,
1125 u8 keyIndex; 1125 u8 keyIndex;
1126 struct ar_wep_key *wk; 1126 struct ar_wep_key *wk;
1127 1127
1128 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 1128 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
1129 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 1129 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
1130 return -EOPNOTSUPP; 1130 return -EOPNOTSUPP;
1131 } 1131 }
@@ -1557,7 +1557,7 @@ ar6000_ioctl_siwpmksa(struct net_device *dev,
1557 } 1557 }
1558 1558
1559 ret = 0; 1559 ret = 0;
1560 status = A_OK; 1560 status = 0;
1561 1561
1562 switch (pmksa->cmd) { 1562 switch (pmksa->cmd) {
1563 case IW_PMKSA_ADD: 1563 case IW_PMKSA_ADD:
@@ -1636,7 +1636,7 @@ static int ar6000_set_wapi_key(struct net_device *dev,
1636 KEY_OP_INIT_WAPIPN, 1636 KEY_OP_INIT_WAPIPN,
1637 NULL, 1637 NULL,
1638 SYNC_BEFORE_WMIFLAG); 1638 SYNC_BEFORE_WMIFLAG);
1639 if (A_OK != status) { 1639 if (0 != status) {
1640 return -EIO; 1640 return -EIO;
1641 } 1641 }
1642 return 0; 1642 return 0;
@@ -1908,7 +1908,7 @@ ar6000_ioctl_giwname(struct net_device *dev,
1908 u8 capability; 1908 u8 capability;
1909 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 1909 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
1910 1910
1911 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 1911 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
1912 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 1912 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
1913 return -EOPNOTSUPP; 1913 return -EOPNOTSUPP;
1914 } 1914 }
@@ -1962,7 +1962,7 @@ ar6000_ioctl_siwfreq(struct net_device *dev,
1962{ 1962{
1963 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 1963 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
1964 1964
1965 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 1965 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
1966 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 1966 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
1967 return -EOPNOTSUPP; 1967 return -EOPNOTSUPP;
1968 } 1968 }
@@ -2007,7 +2007,7 @@ ar6000_ioctl_giwfreq(struct net_device *dev,
2007{ 2007{
2008 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 2008 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
2009 2009
2010 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 2010 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
2011 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 2011 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
2012 return -EOPNOTSUPP; 2012 return -EOPNOTSUPP;
2013 } 2013 }
@@ -2047,7 +2047,7 @@ ar6000_ioctl_siwmode(struct net_device *dev,
2047{ 2047{
2048 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 2048 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
2049 2049
2050 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 2050 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
2051 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 2051 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
2052 return -EOPNOTSUPP; 2052 return -EOPNOTSUPP;
2053 } 2053 }
@@ -2118,7 +2118,7 @@ ar6000_ioctl_giwmode(struct net_device *dev,
2118{ 2118{
2119 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 2119 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
2120 2120
2121 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 2121 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
2122 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 2122 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
2123 return -EOPNOTSUPP; 2123 return -EOPNOTSUPP;
2124 } 2124 }
@@ -2180,7 +2180,7 @@ ar6000_ioctl_giwrange(struct net_device *dev,
2180 struct iw_range *range = (struct iw_range *) extra; 2180 struct iw_range *range = (struct iw_range *) extra;
2181 int i, ret = 0; 2181 int i, ret = 0;
2182 2182
2183 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 2183 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
2184 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 2184 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
2185 return -EOPNOTSUPP; 2185 return -EOPNOTSUPP;
2186 } 2186 }
@@ -2205,7 +2205,7 @@ ar6000_ioctl_giwrange(struct net_device *dev,
2205 ar->arNumChannels = -1; 2205 ar->arNumChannels = -1;
2206 A_MEMZERO(ar->arChannelList, sizeof (ar->arChannelList)); 2206 A_MEMZERO(ar->arChannelList, sizeof (ar->arChannelList));
2207 2207
2208 if (wmi_get_channelList_cmd(ar->arWmi) != A_OK) { 2208 if (wmi_get_channelList_cmd(ar->arWmi) != 0) {
2209 up(&ar->arSem); 2209 up(&ar->arSem);
2210 return -EIO; 2210 return -EIO;
2211 } 2211 }
@@ -2301,7 +2301,7 @@ ar6000_ioctl_siwap(struct net_device *dev,
2301{ 2301{
2302 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 2302 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
2303 2303
2304 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 2304 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
2305 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 2305 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
2306 return -EOPNOTSUPP; 2306 return -EOPNOTSUPP;
2307 } 2307 }
@@ -2333,7 +2333,7 @@ ar6000_ioctl_giwap(struct net_device *dev,
2333{ 2333{
2334 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 2334 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
2335 2335
2336 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 2336 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
2337 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 2337 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
2338 return -EOPNOTSUPP; 2338 return -EOPNOTSUPP;
2339 } 2339 }
@@ -2369,7 +2369,7 @@ ar6000_ioctl_siwmlme(struct net_device *dev,
2369{ 2369{
2370 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 2370 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
2371 2371
2372 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 2372 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
2373 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 2373 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
2374 return -EOPNOTSUPP; 2374 return -EOPNOTSUPP;
2375 } 2375 }
@@ -2462,7 +2462,7 @@ ar6000_ioctl_siwscan(struct net_device *dev,
2462 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 2462 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
2463 int ret = 0; 2463 int ret = 0;
2464 2464
2465 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 2465 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
2466 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 2466 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
2467 return -EOPNOTSUPP; 2467 return -EOPNOTSUPP;
2468 } 2468 }
@@ -2487,13 +2487,13 @@ ar6000_ioctl_siwscan(struct net_device *dev,
2487 } 2487 }
2488 2488
2489 if (!ar->arUserBssFilter) { 2489 if (!ar->arUserBssFilter) {
2490 if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != A_OK) { 2490 if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != 0) {
2491 return -EIO; 2491 return -EIO;
2492 } 2492 }
2493 } 2493 }
2494 2494
2495 if (ar->arConnected) { 2495 if (ar->arConnected) {
2496 if (wmi_get_stats_cmd(ar->arWmi) != A_OK) { 2496 if (wmi_get_stats_cmd(ar->arWmi) != 0) {
2497 return -EIO; 2497 return -EIO;
2498 } 2498 }
2499 } 2499 }
@@ -2507,14 +2507,14 @@ ar6000_ioctl_siwscan(struct net_device *dev,
2507 struct iw_scan_req req; 2507 struct iw_scan_req req;
2508 if (copy_from_user(&req, data->pointer, sizeof(struct iw_scan_req))) 2508 if (copy_from_user(&req, data->pointer, sizeof(struct iw_scan_req)))
2509 return -EIO; 2509 return -EIO;
2510 if (wmi_probedSsid_cmd(ar->arWmi, 1, SPECIFIC_SSID_FLAG, req.essid_len, req.essid) != A_OK) 2510 if (wmi_probedSsid_cmd(ar->arWmi, 1, SPECIFIC_SSID_FLAG, req.essid_len, req.essid) != 0)
2511 return -EIO; 2511 return -EIO;
2512 ar->scanSpecificSsid = true; 2512 ar->scanSpecificSsid = true;
2513 } 2513 }
2514 else 2514 else
2515 { 2515 {
2516 if (ar->scanSpecificSsid) { 2516 if (ar->scanSpecificSsid) {
2517 if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != A_OK) 2517 if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != 0)
2518 return -EIO; 2518 return -EIO;
2519 ar->scanSpecificSsid = false; 2519 ar->scanSpecificSsid = false;
2520 } 2520 }
@@ -2523,7 +2523,7 @@ ar6000_ioctl_siwscan(struct net_device *dev,
2523 else 2523 else
2524 { 2524 {
2525 if (ar->scanSpecificSsid) { 2525 if (ar->scanSpecificSsid) {
2526 if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != A_OK) 2526 if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != 0)
2527 return -EIO; 2527 return -EIO;
2528 ar->scanSpecificSsid = false; 2528 ar->scanSpecificSsid = false;
2529 } 2529 }
@@ -2532,7 +2532,7 @@ ar6000_ioctl_siwscan(struct net_device *dev,
2532#endif /* ANDROID_ENV */ 2532#endif /* ANDROID_ENV */
2533 2533
2534 if (wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, false, false, \ 2534 if (wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, false, false, \
2535 0, 0, 0, NULL) != A_OK) { 2535 0, 0, 0, NULL) != 0) {
2536 ret = -EIO; 2536 ret = -EIO;
2537 } 2537 }
2538 2538
@@ -2589,7 +2589,7 @@ ar6000_ioctl_siwcommit(struct net_device *dev,
2589{ 2589{
2590 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); 2590 AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
2591 2591
2592 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) { 2592 if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
2593 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); 2593 A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
2594 return -EOPNOTSUPP; 2594 return -EOPNOTSUPP;
2595 } 2595 }
diff --git a/drivers/staging/ath6kl/reorder/rcv_aggr.c b/drivers/staging/ath6kl/reorder/rcv_aggr.c
index dc1ea558bf3..5cb4413fbd6 100644
--- a/drivers/staging/ath6kl/reorder/rcv_aggr.c
+++ b/drivers/staging/ath6kl/reorder/rcv_aggr.c
@@ -57,7 +57,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
57 AGGR_INFO *p_aggr = NULL; 57 AGGR_INFO *p_aggr = NULL;
58 RXTID *rxtid; 58 RXTID *rxtid;
59 u8 i; 59 u8 i;
60 int status = A_OK; 60 int status = 0;
61 61
62 A_PRINTF("In aggr_init..\n"); 62 A_PRINTF("In aggr_init..\n");
63 63
@@ -90,13 +90,13 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
90 }while(false); 90 }while(false);
91 91
92 A_PRINTF("going out of aggr_init..status %s\n", 92 A_PRINTF("going out of aggr_init..status %s\n",
93 (status == A_OK) ? "OK":"Error"); 93 (status == 0) ? "OK":"Error");
94 94
95 if (status) { 95 if (status) {
96 /* Cleanup */ 96 /* Cleanup */
97 aggr_module_destroy(p_aggr); 97 aggr_module_destroy(p_aggr);
98 } 98 }
99 return ((status == A_OK) ? p_aggr : NULL); 99 return ((status == 0) ? p_aggr : NULL);
100} 100}
101 101
102/* utility function to clear rx hold_q for a tid */ 102/* utility function to clear rx hold_q for a tid */
@@ -399,7 +399,7 @@ aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf)
399 399
400 A_MEMCPY(A_NETBUF_DATA(new_buf), framep, frame_8023_len); 400 A_MEMCPY(A_NETBUF_DATA(new_buf), framep, frame_8023_len);
401 A_NETBUF_PUT(new_buf, frame_8023_len); 401 A_NETBUF_PUT(new_buf, frame_8023_len);
402 if (wmi_dot3_2_dix(new_buf) != A_OK) { 402 if (wmi_dot3_2_dix(new_buf) != 0) {
403 A_PRINTF("dot3_2_dix err..\n"); 403 A_PRINTF("dot3_2_dix err..\n");
404 A_NETBUF_FREE(new_buf); 404 A_NETBUF_FREE(new_buf);
405 break; 405 break;
diff --git a/drivers/staging/ath6kl/wlan/src/wlan_recv_beacon.c b/drivers/staging/ath6kl/wlan/src/wlan_recv_beacon.c
index fedacd2b2aa..9ebfecff54f 100644
--- a/drivers/staging/ath6kl/wlan/src/wlan_recv_beacon.c
+++ b/drivers/staging/ath6kl/wlan/src/wlan_recv_beacon.c
@@ -196,5 +196,5 @@ wlan_parse_beacon(u8 *buf, int framelen, struct ieee80211_common_ie *cie)
196 IEEE80211_VERIFY_ELEMENT(cie->ie_rates, IEEE80211_RATE_MAXSIZE); 196 IEEE80211_VERIFY_ELEMENT(cie->ie_rates, IEEE80211_RATE_MAXSIZE);
197 IEEE80211_VERIFY_ELEMENT(cie->ie_ssid, IEEE80211_NWID_LEN); 197 IEEE80211_VERIFY_ELEMENT(cie->ie_ssid, IEEE80211_NWID_LEN);
198 198
199 return A_OK; 199 return 0;
200} 200}
diff --git a/drivers/staging/ath6kl/wmi/wmi.c b/drivers/staging/ath6kl/wmi/wmi.c
index cae1c2face0..242e855f308 100644
--- a/drivers/staging/ath6kl/wmi/wmi.c
+++ b/drivers/staging/ath6kl/wmi/wmi.c
@@ -416,7 +416,7 @@ wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf)
416 * packet is already in 802.3 format - return success 416 * packet is already in 802.3 format - return success
417 */ 417 */
418 A_DPRINTF(DBG_WMI, (DBGFMT "packet already 802.3\n", DBGARG)); 418 A_DPRINTF(DBG_WMI, (DBGFMT "packet already 802.3\n", DBGARG));
419 return (A_OK); 419 return (0);
420 } 420 }
421 421
422 /* 422 /*
@@ -430,7 +430,7 @@ wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf)
430 /* 430 /*
431 * Make room for LLC+SNAP headers 431 * Make room for LLC+SNAP headers
432 */ 432 */
433 if (A_NETBUF_PUSH(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != A_OK) { 433 if (A_NETBUF_PUSH(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != 0) {
434 return A_NO_MEMORY; 434 return A_NO_MEMORY;
435 } 435 }
436 datap = A_NETBUF_DATA(osbuf); 436 datap = A_NETBUF_DATA(osbuf);
@@ -446,19 +446,19 @@ wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf)
446 llcHdr->orgCode[2] = 0x0; 446 llcHdr->orgCode[2] = 0x0;
447 llcHdr->etherType = typeorlen; 447 llcHdr->etherType = typeorlen;
448 448
449 return (A_OK); 449 return (0);
450} 450}
451 451
452int wmi_meta_add(struct wmi_t *wmip, void *osbuf, u8 *pVersion,void *pTxMetaS) 452int wmi_meta_add(struct wmi_t *wmip, void *osbuf, u8 *pVersion,void *pTxMetaS)
453{ 453{
454 switch(*pVersion){ 454 switch(*pVersion){
455 case 0: 455 case 0:
456 return (A_OK); 456 return (0);
457 case WMI_META_VERSION_1: 457 case WMI_META_VERSION_1:
458 { 458 {
459 WMI_TX_META_V1 *pV1= NULL; 459 WMI_TX_META_V1 *pV1= NULL;
460 A_ASSERT(osbuf != NULL); 460 A_ASSERT(osbuf != NULL);
461 if (A_NETBUF_PUSH(osbuf, WMI_MAX_TX_META_SZ) != A_OK) { 461 if (A_NETBUF_PUSH(osbuf, WMI_MAX_TX_META_SZ) != 0) {
462 return A_NO_MEMORY; 462 return A_NO_MEMORY;
463 } 463 }
464 464
@@ -473,23 +473,23 @@ int wmi_meta_add(struct wmi_t *wmip, void *osbuf, u8 *pVersion,void *pTxMetaS)
473 A_ASSERT(pVersion != NULL); 473 A_ASSERT(pVersion != NULL);
474 /* the version must be used to populate the meta field of the WMI_DATA_HDR */ 474 /* the version must be used to populate the meta field of the WMI_DATA_HDR */
475 *pVersion = WMI_META_VERSION_1; 475 *pVersion = WMI_META_VERSION_1;
476 return (A_OK); 476 return (0);
477 } 477 }
478#ifdef CONFIG_CHECKSUM_OFFLOAD 478#ifdef CONFIG_CHECKSUM_OFFLOAD
479 case WMI_META_VERSION_2: 479 case WMI_META_VERSION_2:
480 { 480 {
481 WMI_TX_META_V2 *pV2 ; 481 WMI_TX_META_V2 *pV2 ;
482 A_ASSERT(osbuf != NULL); 482 A_ASSERT(osbuf != NULL);
483 if (A_NETBUF_PUSH(osbuf, WMI_MAX_TX_META_SZ) != A_OK) { 483 if (A_NETBUF_PUSH(osbuf, WMI_MAX_TX_META_SZ) != 0) {
484 return A_NO_MEMORY; 484 return A_NO_MEMORY;
485 } 485 }
486 pV2 = (WMI_TX_META_V2 *)A_NETBUF_DATA(osbuf); 486 pV2 = (WMI_TX_META_V2 *)A_NETBUF_DATA(osbuf);
487 A_MEMCPY(pV2,(WMI_TX_META_V2 *)pTxMetaS,sizeof(WMI_TX_META_V2)); 487 A_MEMCPY(pV2,(WMI_TX_META_V2 *)pTxMetaS,sizeof(WMI_TX_META_V2));
488 return (A_OK); 488 return (0);
489 } 489 }
490#endif 490#endif
491 default: 491 default:
492 return (A_OK); 492 return (0);
493 } 493 }
494} 494}
495 495
@@ -506,11 +506,11 @@ wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, u8 msgType, bool bMoreData,
506 506
507 /* adds the meta data field after the wmi data hdr. If metaVersion 507 /* adds the meta data field after the wmi data hdr. If metaVersion
508 * is returns 0 then no meta field was added. */ 508 * is returns 0 then no meta field was added. */
509 if ((status = wmi_meta_add(wmip, osbuf, &metaVersion,pTxMetaS)) != A_OK) { 509 if ((status = wmi_meta_add(wmip, osbuf, &metaVersion,pTxMetaS)) != 0) {
510 return status; 510 return status;
511 } 511 }
512 512
513 if (A_NETBUF_PUSH(osbuf, sizeof(WMI_DATA_HDR)) != A_OK) { 513 if (A_NETBUF_PUSH(osbuf, sizeof(WMI_DATA_HDR)) != 0) {
514 return A_NO_MEMORY; 514 return A_NO_MEMORY;
515 } 515 }
516 516
@@ -527,7 +527,7 @@ wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, u8 msgType, bool bMoreData,
527 WMI_DATA_HDR_SET_META(dtHdr, metaVersion); 527 WMI_DATA_HDR_SET_META(dtHdr, metaVersion);
528 //dtHdr->rssi = 0; 528 //dtHdr->rssi = 0;
529 529
530 return (A_OK); 530 return (0);
531} 531}
532 532
533 533
@@ -664,7 +664,7 @@ wmi_dot11_hdr_add (struct wmi_t *wmip, void *osbuf, NETWORK_TYPE mode)
664 /* 664 /*
665 * Make room for LLC+SNAP headers 665 * Make room for LLC+SNAP headers
666 */ 666 */
667 if (A_NETBUF_PUSH(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != A_OK) { 667 if (A_NETBUF_PUSH(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != 0) {
668 return A_NO_MEMORY; 668 return A_NO_MEMORY;
669 } 669 }
670 datap = A_NETBUF_DATA(osbuf); 670 datap = A_NETBUF_DATA(osbuf);
@@ -683,7 +683,7 @@ AddDot11Hdr:
683 if (wmip->wmi_is_wmm_enabled) 683 if (wmip->wmi_is_wmm_enabled)
684 { 684 {
685 hdrsize = A_ROUND_UP(sizeof(struct ieee80211_qosframe),sizeof(u32)); 685 hdrsize = A_ROUND_UP(sizeof(struct ieee80211_qosframe),sizeof(u32));
686 if (A_NETBUF_PUSH(osbuf, hdrsize) != A_OK) 686 if (A_NETBUF_PUSH(osbuf, hdrsize) != 0)
687 { 687 {
688 return A_NO_MEMORY; 688 return A_NO_MEMORY;
689 } 689 }
@@ -693,7 +693,7 @@ AddDot11Hdr:
693 else 693 else
694 { 694 {
695 hdrsize = A_ROUND_UP(sizeof(struct ieee80211_frame),sizeof(u32)); 695 hdrsize = A_ROUND_UP(sizeof(struct ieee80211_frame),sizeof(u32));
696 if (A_NETBUF_PUSH(osbuf, hdrsize) != A_OK) 696 if (A_NETBUF_PUSH(osbuf, hdrsize) != 0)
697 { 697 {
698 return A_NO_MEMORY; 698 return A_NO_MEMORY;
699 } 699 }
@@ -710,7 +710,7 @@ AddDot11Hdr:
710 IEEE80211_ADDR_COPY(wh->i_addr1, macHdr.dstMac); 710 IEEE80211_ADDR_COPY(wh->i_addr1, macHdr.dstMac);
711 } 711 }
712 712
713 return (A_OK); 713 return (0);
714} 714}
715 715
716int 716int
@@ -774,7 +774,7 @@ wmi_dot11_hdr_remove(struct wmi_t *wmip, void *osbuf)
774 774
775 A_MEMCPY (datap, &macHdr, sizeof(ATH_MAC_HDR)); 775 A_MEMCPY (datap, &macHdr, sizeof(ATH_MAC_HDR));
776 776
777 return A_OK; 777 return 0;
778} 778}
779 779
780/* 780/*
@@ -795,7 +795,7 @@ wmi_dot3_2_dix(void *osbuf)
795 llcHdr = (ATH_LLC_SNAP_HDR *)(datap + sizeof(ATH_MAC_HDR)); 795 llcHdr = (ATH_LLC_SNAP_HDR *)(datap + sizeof(ATH_MAC_HDR));
796 macHdr.typeOrLen = llcHdr->etherType; 796 macHdr.typeOrLen = llcHdr->etherType;
797 797
798 if (A_NETBUF_PULL(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != A_OK) { 798 if (A_NETBUF_PULL(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != 0) {
799 return A_NO_MEMORY; 799 return A_NO_MEMORY;
800 } 800 }
801 801
@@ -803,7 +803,7 @@ wmi_dot3_2_dix(void *osbuf)
803 803
804 A_MEMCPY(datap, &macHdr, sizeof (ATH_MAC_HDR)); 804 A_MEMCPY(datap, &macHdr, sizeof (ATH_MAC_HDR));
805 805
806 return (A_OK); 806 return (0);
807} 807}
808 808
809/* 809/*
@@ -833,7 +833,7 @@ wmi_control_rx_xtnd(struct wmi_t *wmip, void *osbuf)
833 u16 id; 833 u16 id;
834 u8 *datap; 834 u8 *datap;
835 u32 len; 835 u32 len;
836 int status = A_OK; 836 int status = 0;
837 837
838 if (A_NETBUF_LEN(osbuf) < sizeof(WMIX_CMD_HDR)) { 838 if (A_NETBUF_LEN(osbuf) < sizeof(WMIX_CMD_HDR)) {
839 A_DPRINTF(DBG_WMI, (DBGFMT "bad packet 1\n", DBGARG)); 839 A_DPRINTF(DBG_WMI, (DBGFMT "bad packet 1\n", DBGARG));
@@ -844,7 +844,7 @@ wmi_control_rx_xtnd(struct wmi_t *wmip, void *osbuf)
844 cmd = (WMIX_CMD_HDR *)A_NETBUF_DATA(osbuf); 844 cmd = (WMIX_CMD_HDR *)A_NETBUF_DATA(osbuf);
845 id = cmd->commandId; 845 id = cmd->commandId;
846 846
847 if (A_NETBUF_PULL(osbuf, sizeof(WMIX_CMD_HDR)) != A_OK) { 847 if (A_NETBUF_PULL(osbuf, sizeof(WMIX_CMD_HDR)) != 0) {
848 A_DPRINTF(DBG_WMI, (DBGFMT "bad packet 2\n", DBGARG)); 848 A_DPRINTF(DBG_WMI, (DBGFMT "bad packet 2\n", DBGARG));
849 wmip->wmi_stats.cmd_len_err++; 849 wmip->wmi_stats.cmd_len_err++;
850 return A_ERROR; 850 return A_ERROR;
@@ -910,7 +910,7 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
910 u16 id; 910 u16 id;
911 u8 *datap; 911 u8 *datap;
912 u32 len, i, loggingReq; 912 u32 len, i, loggingReq;
913 int status = A_OK; 913 int status = 0;
914 914
915 A_ASSERT(osbuf != NULL); 915 A_ASSERT(osbuf != NULL);
916 if (A_NETBUF_LEN(osbuf) < sizeof(WMI_CMD_HDR)) { 916 if (A_NETBUF_LEN(osbuf) < sizeof(WMI_CMD_HDR)) {
@@ -923,7 +923,7 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
923 cmd = (WMI_CMD_HDR *)A_NETBUF_DATA(osbuf); 923 cmd = (WMI_CMD_HDR *)A_NETBUF_DATA(osbuf);
924 id = cmd->commandId; 924 id = cmd->commandId;
925 925
926 if (A_NETBUF_PULL(osbuf, sizeof(WMI_CMD_HDR)) != A_OK) { 926 if (A_NETBUF_PULL(osbuf, sizeof(WMI_CMD_HDR)) != 0) {
927 A_NETBUF_FREE(osbuf); 927 A_NETBUF_FREE(osbuf);
928 A_DPRINTF(DBG_WMI, (DBGFMT "bad packet 2\n", DBGARG)); 928 A_DPRINTF(DBG_WMI, (DBGFMT "bad packet 2\n", DBGARG));
929 wmip->wmi_stats.cmd_len_err++; 929 wmip->wmi_stats.cmd_len_err++;
@@ -1236,7 +1236,7 @@ wmi_ready_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1236 A_WMI_READY_EVENT(wmip->wmi_devt, ev->macaddr, ev->phyCapability, 1236 A_WMI_READY_EVENT(wmip->wmi_devt, ev->macaddr, ev->phyCapability,
1237 ev->sw_version, ev->abi_version); 1237 ev->sw_version, ev->abi_version);
1238 1238
1239 return A_OK; 1239 return 0;
1240} 1240}
1241 1241
1242#define LE_READ_4(p) \ 1242#define LE_READ_4(p) \
@@ -1314,7 +1314,7 @@ wmi_connect_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1314 ev->assocReqLen, ev->assocRespLen, 1314 ev->assocReqLen, ev->assocRespLen,
1315 ev->assocInfo); 1315 ev->assocInfo);
1316 1316
1317 return A_OK; 1317 return 0;
1318} 1318}
1319 1319
1320static int 1320static int
@@ -1329,7 +1329,7 @@ wmi_regDomain_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1329 1329
1330 A_WMI_REGDOMAIN_EVENT(wmip->wmi_devt, ev->regDomain); 1330 A_WMI_REGDOMAIN_EVENT(wmip->wmi_devt, ev->regDomain);
1331 1331
1332 return A_OK; 1332 return 0;
1333} 1333}
1334 1334
1335static int 1335static int
@@ -1350,7 +1350,7 @@ wmi_neighborReport_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1350 1350
1351 A_WMI_NEIGHBORREPORT_EVENT(wmip->wmi_devt, numAps, ev->neighbor); 1351 A_WMI_NEIGHBORREPORT_EVENT(wmip->wmi_devt, numAps, ev->neighbor);
1352 1352
1353 return A_OK; 1353 return 0;
1354} 1354}
1355 1355
1356static int 1356static int
@@ -1375,7 +1375,7 @@ wmi_disconnect_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1375 A_WMI_DISCONNECT_EVENT(wmip->wmi_devt, ev->disconnectReason, ev->bssid, 1375 A_WMI_DISCONNECT_EVENT(wmip->wmi_devt, ev->disconnectReason, ev->bssid,
1376 ev->assocRespLen, ev->assocInfo, ev->protocolReasonStatus); 1376 ev->assocRespLen, ev->assocInfo, ev->protocolReasonStatus);
1377 1377
1378 return A_OK; 1378 return 0;
1379} 1379}
1380 1380
1381static int 1381static int
@@ -1395,7 +1395,7 @@ wmi_peer_node_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1395 1395
1396 A_WMI_PEER_EVENT (wmip->wmi_devt, ev->eventCode, ev->peerMacAddr); 1396 A_WMI_PEER_EVENT (wmip->wmi_devt, ev->eventCode, ev->peerMacAddr);
1397 1397
1398 return A_OK; 1398 return 0;
1399} 1399}
1400 1400
1401static int 1401static int
@@ -1411,7 +1411,7 @@ wmi_tkip_micerr_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1411 ev = (WMI_TKIP_MICERR_EVENT *)datap; 1411 ev = (WMI_TKIP_MICERR_EVENT *)datap;
1412 A_WMI_TKIP_MICERR_EVENT(wmip->wmi_devt, ev->keyid, ev->ismcast); 1412 A_WMI_TKIP_MICERR_EVENT(wmip->wmi_devt, ev->keyid, ev->ismcast);
1413 1413
1414 return A_OK; 1414 return 0;
1415} 1415}
1416 1416
1417static int 1417static int
@@ -1434,7 +1434,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1434 1434
1435 if (bih->rssi > 0) { 1435 if (bih->rssi > 0) {
1436 if (NULL == bss) 1436 if (NULL == bss)
1437 return A_OK; //no node found in the table, just drop the node with incorrect RSSI 1437 return 0; //no node found in the table, just drop the node with incorrect RSSI
1438 else 1438 else
1439 bih->rssi = bss->ni_rssi; //Adjust RSSI in datap in case it is used in A_WMI_BSSINFO_EVENT_RX 1439 bih->rssi = bss->ni_rssi; //Adjust RSSI in datap in case it is used in A_WMI_BSSINFO_EVENT_RX
1440 } 1440 }
@@ -1443,14 +1443,14 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1443 /* What is driver config for wlan node caching? */ 1443 /* What is driver config for wlan node caching? */
1444 if(ar6000_get_driver_cfg(wmip->wmi_devt, 1444 if(ar6000_get_driver_cfg(wmip->wmi_devt,
1445 AR6000_DRIVER_CFG_GET_WLANNODECACHING, 1445 AR6000_DRIVER_CFG_GET_WLANNODECACHING,
1446 &nodeCachingAllowed) != A_OK) { 1446 &nodeCachingAllowed) != 0) {
1447 wmi_node_return(wmip, bss); 1447 wmi_node_return(wmip, bss);
1448 return A_EINVAL; 1448 return A_EINVAL;
1449 } 1449 }
1450 1450
1451 if(!nodeCachingAllowed) { 1451 if(!nodeCachingAllowed) {
1452 wmi_node_return(wmip, bss); 1452 wmi_node_return(wmip, bss);
1453 return A_OK; 1453 return 0;
1454 } 1454 }
1455 1455
1456 buf = datap + sizeof(WMI_BSS_INFO_HDR); 1456 buf = datap + sizeof(WMI_BSS_INFO_HDR);
@@ -1462,7 +1462,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1462 1462
1463 if(wps_enable && (bih->frameType == PROBERESP_FTYPE) ) { 1463 if(wps_enable && (bih->frameType == PROBERESP_FTYPE) ) {
1464 wmi_node_return(wmip, bss); 1464 wmi_node_return(wmip, bss);
1465 return A_OK; 1465 return 0;
1466 } 1466 }
1467 1467
1468 if (bss != NULL) { 1468 if (bss != NULL) {
@@ -1563,7 +1563,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1563 A_MEMCPY(bss->ni_buf, buf, len); 1563 A_MEMCPY(bss->ni_buf, buf, len);
1564 1564
1565 bss->ni_framelen = len; 1565 bss->ni_framelen = len;
1566 if (wlan_parse_beacon(bss->ni_buf, len, &bss->ni_cie) != A_OK) { 1566 if (wlan_parse_beacon(bss->ni_buf, len, &bss->ni_cie) != 0) {
1567 wlan_node_free(bss); 1567 wlan_node_free(bss);
1568 return A_EINVAL; 1568 return A_EINVAL;
1569 } 1569 }
@@ -1575,7 +1575,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1575 bss->ni_cie.ie_chan = bih->channel; 1575 bss->ni_cie.ie_chan = bih->channel;
1576 wlan_setup_node(&wmip->wmi_scan_table, bss, bih->bssid); 1576 wlan_setup_node(&wmip->wmi_scan_table, bss, bih->bssid);
1577 1577
1578 return A_OK; 1578 return 0;
1579} 1579}
1580 1580
1581static int 1581static int
@@ -1617,7 +1617,7 @@ wmi_opt_frame_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1617 A_MEMCPY(bss->ni_buf, buf, len); 1617 A_MEMCPY(bss->ni_buf, buf, len);
1618 wlan_setup_node(&wmip->wmi_scan_table, bss, bih->bssid); 1618 wlan_setup_node(&wmip->wmi_scan_table, bss, bih->bssid);
1619 1619
1620 return A_OK; 1620 return 0;
1621} 1621}
1622 1622
1623 /* This event indicates inactivity timeout of a fatpipe(pstream) 1623 /* This event indicates inactivity timeout of a fatpipe(pstream)
@@ -1650,7 +1650,7 @@ wmi_pstream_timeout_event_rx(struct wmi_t *wmip, u8 *datap, int len)
1650 /*Indicate inactivity to driver layer for this fatpipe (pstream)*/ 1650 /*Indicate inactivity to driver layer for this fatpipe (pstream)*/
1651 A_WMI_STREAM_TX_INACTIVE(wmip->wmi_devt, ev->trafficClass); 1651 A_WMI_STREAM_TX_INACTIVE(wmip->wmi_devt, ev->trafficClass);
1652 1652
1653 return A_OK; 1653 return 0;
1654} 1654}
1655 1655
1656static int 1656static int
@@ -1681,7 +1681,7 @@ wmi_bitrate_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
1681 } 1681 }
1682 1682
1683 A_WMI_BITRATE_RX(wmip->wmi_devt, rate); 1683 A_WMI_BITRATE_RX(wmip->wmi_devt, rate);
1684 return A_OK; 1684 return 0;
1685} 1685}
1686 1686
1687static int 1687static int
@@ -1698,7 +1698,7 @@ wmi_ratemask_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
1698 1698
1699 A_WMI_RATEMASK_RX(wmip->wmi_devt, reply->fixRateMask); 1699 A_WMI_RATEMASK_RX(wmip->wmi_devt, reply->fixRateMask);
1700 1700
1701 return A_OK; 1701 return 0;
1702} 1702}
1703 1703
1704static int 1704static int
@@ -1715,7 +1715,7 @@ wmi_channelList_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
1715 A_WMI_CHANNELLIST_RX(wmip->wmi_devt, reply->numChannels, 1715 A_WMI_CHANNELLIST_RX(wmip->wmi_devt, reply->numChannels,
1716 reply->channelList); 1716 reply->channelList);
1717 1717
1718 return A_OK; 1718 return 0;
1719} 1719}
1720 1720
1721static int 1721static int
@@ -1731,7 +1731,7 @@ wmi_txPwr_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
1731 1731
1732 A_WMI_TXPWR_RX(wmip->wmi_devt, reply->dbM); 1732 A_WMI_TXPWR_RX(wmip->wmi_devt, reply->dbM);
1733 1733
1734 return A_OK; 1734 return 0;
1735} 1735}
1736static int 1736static int
1737wmi_keepalive_reply_rx(struct wmi_t *wmip, u8 *datap, int len) 1737wmi_keepalive_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
@@ -1746,7 +1746,7 @@ wmi_keepalive_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
1746 1746
1747 A_WMI_KEEPALIVE_RX(wmip->wmi_devt, reply->configured); 1747 A_WMI_KEEPALIVE_RX(wmip->wmi_devt, reply->configured);
1748 1748
1749 return A_OK; 1749 return 0;
1750} 1750}
1751 1751
1752 1752
@@ -1767,7 +1767,7 @@ wmi_dset_open_req_rx(struct wmi_t *wmip, u8 *datap, int len)
1767 dsetopenreq->targ_reply_fn, 1767 dsetopenreq->targ_reply_fn,
1768 dsetopenreq->targ_reply_arg); 1768 dsetopenreq->targ_reply_arg);
1769 1769
1770 return A_OK; 1770 return 0;
1771} 1771}
1772 1772
1773#ifdef CONFIG_HOST_DSET_SUPPORT 1773#ifdef CONFIG_HOST_DSET_SUPPORT
@@ -1784,7 +1784,7 @@ wmi_dset_close_rx(struct wmi_t *wmip, u8 *datap, int len)
1784 dsetclose = (WMIX_DSETCLOSE_EVENT *)datap; 1784 dsetclose = (WMIX_DSETCLOSE_EVENT *)datap;
1785 A_WMI_DSET_CLOSE(wmip->wmi_devt, dsetclose->access_cookie); 1785 A_WMI_DSET_CLOSE(wmip->wmi_devt, dsetclose->access_cookie);
1786 1786
1787 return A_OK; 1787 return 0;
1788} 1788}
1789 1789
1790static int 1790static int
@@ -1806,7 +1806,7 @@ wmi_dset_data_req_rx(struct wmi_t *wmip, u8 *datap, int len)
1806 dsetdatareq->targ_reply_fn, 1806 dsetdatareq->targ_reply_fn,
1807 dsetdatareq->targ_reply_arg); 1807 dsetdatareq->targ_reply_arg);
1808 1808
1809 return A_OK; 1809 return 0;
1810} 1810}
1811#endif /* CONFIG_HOST_DSET_SUPPORT */ 1811#endif /* CONFIG_HOST_DSET_SUPPORT */
1812 1812
@@ -1816,13 +1816,13 @@ wmi_scanComplete_rx(struct wmi_t *wmip, u8 *datap, int len)
1816 WMI_SCAN_COMPLETE_EVENT *ev; 1816 WMI_SCAN_COMPLETE_EVENT *ev;
1817 1817
1818 ev = (WMI_SCAN_COMPLETE_EVENT *)datap; 1818 ev = (WMI_SCAN_COMPLETE_EVENT *)datap;
1819 if ((int)ev->status == A_OK) { 1819 if ((int)ev->status == 0) {
1820 wlan_refresh_inactive_nodes(&wmip->wmi_scan_table); 1820 wlan_refresh_inactive_nodes(&wmip->wmi_scan_table);
1821 } 1821 }
1822 A_WMI_SCANCOMPLETE_EVENT(wmip->wmi_devt, (int) ev->status); 1822 A_WMI_SCANCOMPLETE_EVENT(wmip->wmi_devt, (int) ev->status);
1823 is_probe_ssid = false; 1823 is_probe_ssid = false;
1824 1824
1825 return A_OK; 1825 return 0;
1826} 1826}
1827 1827
1828/* 1828/*
@@ -1851,7 +1851,7 @@ wmi_errorEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
1851 break; 1851 break;
1852 } 1852 }
1853 1853
1854 return A_OK; 1854 return 0;
1855} 1855}
1856 1856
1857 1857
@@ -1862,7 +1862,7 @@ wmi_statsEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
1862 1862
1863 A_WMI_TARGETSTATS_EVENT(wmip->wmi_devt, datap, len); 1863 A_WMI_TARGETSTATS_EVENT(wmip->wmi_devt, datap, len);
1864 1864
1865 return A_OK; 1865 return 0;
1866} 1866}
1867 1867
1868static int 1868static int
@@ -1959,14 +1959,14 @@ wmi_rssiThresholdEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
1959 1959
1960 rssi_event_value = rssi; 1960 rssi_event_value = rssi;
1961 1961
1962 if (wmi_send_rssi_threshold_params(wmip, &cmd) != A_OK) { 1962 if (wmi_send_rssi_threshold_params(wmip, &cmd) != 0) {
1963 A_DPRINTF(DBG_WMI, (DBGFMT "Unable to configure the RSSI thresholds\n", 1963 A_DPRINTF(DBG_WMI, (DBGFMT "Unable to configure the RSSI thresholds\n",
1964 DBGARG)); 1964 DBGARG));
1965 } 1965 }
1966 1966
1967 A_WMI_RSSI_THRESHOLD_EVENT(wmip->wmi_devt, newThreshold, reply->rssi); 1967 A_WMI_RSSI_THRESHOLD_EVENT(wmip->wmi_devt, newThreshold, reply->rssi);
1968 1968
1969 return A_OK; 1969 return 0;
1970} 1970}
1971 1971
1972 1972
@@ -1983,7 +1983,7 @@ wmi_reportErrorEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
1983 1983
1984 A_WMI_REPORT_ERROR_EVENT(wmip->wmi_devt, (WMI_TARGET_ERROR_VAL) reply->errorVal); 1984 A_WMI_REPORT_ERROR_EVENT(wmip->wmi_devt, (WMI_TARGET_ERROR_VAL) reply->errorVal);
1985 1985
1986 return A_OK; 1986 return 0;
1987} 1987}
1988 1988
1989static int 1989static int
@@ -2053,7 +2053,7 @@ wmi_cac_event_rx(struct wmi_t *wmip, u8 *datap, int len)
2053 reply->cac_indication, reply->statusCode, 2053 reply->cac_indication, reply->statusCode,
2054 reply->tspecSuggestion); 2054 reply->tspecSuggestion);
2055 2055
2056 return A_OK; 2056 return 0;
2057} 2057}
2058 2058
2059static int 2059static int
@@ -2070,7 +2070,7 @@ wmi_channel_change_event_rx(struct wmi_t *wmip, u8 *datap, int len)
2070 A_WMI_CHANNEL_CHANGE_EVENT(wmip->wmi_devt, reply->oldChannel, 2070 A_WMI_CHANNEL_CHANGE_EVENT(wmip->wmi_devt, reply->oldChannel,
2071 reply->newChannel); 2071 reply->newChannel);
2072 2072
2073 return A_OK; 2073 return 0;
2074} 2074}
2075 2075
2076static int 2076static int
@@ -2086,7 +2086,7 @@ wmi_hbChallengeResp_rx(struct wmi_t *wmip, u8 *datap, int len)
2086 2086
2087 A_WMI_HBCHALLENGERESP_EVENT(wmip->wmi_devt, reply->cookie, reply->source); 2087 A_WMI_HBCHALLENGERESP_EVENT(wmip->wmi_devt, reply->cookie, reply->source);
2088 2088
2089 return A_OK; 2089 return 0;
2090} 2090}
2091 2091
2092static int 2092static int
@@ -2102,7 +2102,7 @@ wmi_roam_tbl_event_rx(struct wmi_t *wmip, u8 *datap, int len)
2102 2102
2103 A_WMI_ROAM_TABLE_EVENT(wmip->wmi_devt, reply); 2103 A_WMI_ROAM_TABLE_EVENT(wmip->wmi_devt, reply);
2104 2104
2105 return A_OK; 2105 return 0;
2106} 2106}
2107 2107
2108static int 2108static int
@@ -2118,7 +2118,7 @@ wmi_roam_data_event_rx(struct wmi_t *wmip, u8 *datap, int len)
2118 2118
2119 A_WMI_ROAM_DATA_EVENT(wmip->wmi_devt, reply); 2119 A_WMI_ROAM_DATA_EVENT(wmip->wmi_devt, reply);
2120 2120
2121 return A_OK; 2121 return 0;
2122} 2122}
2123 2123
2124static int 2124static int
@@ -2131,7 +2131,7 @@ wmi_txRetryErrEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
2131 2131
2132 A_WMI_TX_RETRY_ERR_EVENT(wmip->wmi_devt); 2132 A_WMI_TX_RETRY_ERR_EVENT(wmip->wmi_devt);
2133 2133
2134 return A_OK; 2134 return 0;
2135} 2135}
2136 2136
2137static int 2137static int
@@ -2218,13 +2218,13 @@ wmi_snrThresholdEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
2218 2218
2219 snr_event_value = snr; 2219 snr_event_value = snr;
2220 2220
2221 if (wmi_send_snr_threshold_params(wmip, &cmd) != A_OK) { 2221 if (wmi_send_snr_threshold_params(wmip, &cmd) != 0) {
2222 A_DPRINTF(DBG_WMI, (DBGFMT "Unable to configure the SNR thresholds\n", 2222 A_DPRINTF(DBG_WMI, (DBGFMT "Unable to configure the SNR thresholds\n",
2223 DBGARG)); 2223 DBGARG));
2224 } 2224 }
2225 A_WMI_SNR_THRESHOLD_EVENT_RX(wmip->wmi_devt, newThreshold, reply->snr); 2225 A_WMI_SNR_THRESHOLD_EVENT_RX(wmip->wmi_devt, newThreshold, reply->snr);
2226 2226
2227 return A_OK; 2227 return 0;
2228} 2228}
2229 2229
2230static int 2230static int
@@ -2242,7 +2242,7 @@ wmi_lqThresholdEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
2242 (WMI_LQ_THRESHOLD_VAL) reply->range, 2242 (WMI_LQ_THRESHOLD_VAL) reply->range,
2243 reply->lq); 2243 reply->lq);
2244 2244
2245 return A_OK; 2245 return 0;
2246} 2246}
2247 2247
2248static int 2248static int
@@ -2283,7 +2283,7 @@ wmi_aplistEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
2283 ap_info_v1->channel)); 2283 ap_info_v1->channel));
2284 ap_info_v1++; 2284 ap_info_v1++;
2285 } 2285 }
2286 return A_OK; 2286 return 0;
2287} 2287}
2288 2288
2289static int 2289static int
@@ -2295,7 +2295,7 @@ wmi_dbglog_event_rx(struct wmi_t *wmip, u8 *datap, int len)
2295 datap += sizeof(dropped); 2295 datap += sizeof(dropped);
2296 len -= sizeof(dropped); 2296 len -= sizeof(dropped);
2297 A_WMI_DBGLOG_EVENT(wmip->wmi_devt, dropped, (s8 *)datap, len); 2297 A_WMI_DBGLOG_EVENT(wmip->wmi_devt, dropped, (s8 *)datap, len);
2298 return A_OK; 2298 return 0;
2299} 2299}
2300 2300
2301#ifdef CONFIG_HOST_GPIO_SUPPORT 2301#ifdef CONFIG_HOST_GPIO_SUPPORT
@@ -2310,7 +2310,7 @@ wmi_gpio_intr_rx(struct wmi_t *wmip, u8 *datap, int len)
2310 2310
2311 A_WMI_GPIO_INTR_RX(gpio_intr->intr_mask, gpio_intr->input_values); 2311 A_WMI_GPIO_INTR_RX(gpio_intr->intr_mask, gpio_intr->input_values);
2312 2312
2313 return A_OK; 2313 return 0;
2314} 2314}
2315 2315
2316static int 2316static int
@@ -2324,7 +2324,7 @@ wmi_gpio_data_rx(struct wmi_t *wmip, u8 *datap, int len)
2324 2324
2325 A_WMI_GPIO_DATA_RX(gpio_data->reg_id, gpio_data->value); 2325 A_WMI_GPIO_DATA_RX(gpio_data->reg_id, gpio_data->value);
2326 2326
2327 return A_OK; 2327 return 0;
2328} 2328}
2329 2329
2330static int 2330static int
@@ -2334,7 +2334,7 @@ wmi_gpio_ack_rx(struct wmi_t *wmip, u8 *datap, int len)
2334 2334
2335 A_WMI_GPIO_ACK_RX(); 2335 A_WMI_GPIO_ACK_RX();
2336 2336
2337 return A_OK; 2337 return 0;
2338} 2338}
2339#endif /* CONFIG_HOST_GPIO_SUPPORT */ 2339#endif /* CONFIG_HOST_GPIO_SUPPORT */
2340 2340
@@ -2366,7 +2366,7 @@ wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
2366 wmi_sync_point(wmip); 2366 wmi_sync_point(wmip);
2367 } 2367 }
2368 2368
2369 if (A_NETBUF_PUSH(osbuf, sizeof(WMI_CMD_HDR)) != A_OK) { 2369 if (A_NETBUF_PUSH(osbuf, sizeof(WMI_CMD_HDR)) != 0) {
2370 A_NETBUF_FREE(osbuf); 2370 A_NETBUF_FREE(osbuf);
2371 return A_NO_MEMORY; 2371 return A_NO_MEMORY;
2372 } 2372 }
@@ -2379,7 +2379,7 @@ wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
2379 * Only for OPT_TX_CMD, use BE endpoint. 2379 * Only for OPT_TX_CMD, use BE endpoint.
2380 */ 2380 */
2381 if (IS_OPT_TX_CMD(cmdId)) { 2381 if (IS_OPT_TX_CMD(cmdId)) {
2382 if ((status=wmi_data_hdr_add(wmip, osbuf, OPT_MSGTYPE, false, false,0,NULL)) != A_OK) { 2382 if ((status=wmi_data_hdr_add(wmip, osbuf, OPT_MSGTYPE, false, false,0,NULL)) != 0) {
2383 A_NETBUF_FREE(osbuf); 2383 A_NETBUF_FREE(osbuf);
2384 return status; 2384 return status;
2385 } 2385 }
@@ -2394,7 +2394,7 @@ wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
2394 */ 2394 */
2395 wmi_sync_point(wmip); 2395 wmi_sync_point(wmip);
2396 } 2396 }
2397 return (A_OK); 2397 return (0);
2398#undef IS_OPT_TX_CMD 2398#undef IS_OPT_TX_CMD
2399} 2399}
2400 2400
@@ -2404,7 +2404,7 @@ wmi_cmd_send_xtnd(struct wmi_t *wmip, void *osbuf, WMIX_COMMAND_ID cmdId,
2404{ 2404{
2405 WMIX_CMD_HDR *cHdr; 2405 WMIX_CMD_HDR *cHdr;
2406 2406
2407 if (A_NETBUF_PUSH(osbuf, sizeof(WMIX_CMD_HDR)) != A_OK) { 2407 if (A_NETBUF_PUSH(osbuf, sizeof(WMIX_CMD_HDR)) != 0) {
2408 A_NETBUF_FREE(osbuf); 2408 A_NETBUF_FREE(osbuf);
2409 return A_NO_MEMORY; 2409 return A_NO_MEMORY;
2410 } 2410 }
@@ -3067,7 +3067,7 @@ wmi_dataSync_send(struct wmi_t *wmip, void *osbuf, HTC_ENDPOINT_ID eid)
3067 A_ASSERT( eid != wmip->wmi_endpoint_id); 3067 A_ASSERT( eid != wmip->wmi_endpoint_id);
3068 A_ASSERT(osbuf != NULL); 3068 A_ASSERT(osbuf != NULL);
3069 3069
3070 if (A_NETBUF_PUSH(osbuf, sizeof(WMI_DATA_HDR)) != A_OK) { 3070 if (A_NETBUF_PUSH(osbuf, sizeof(WMI_DATA_HDR)) != 0) {
3071 return A_NO_MEMORY; 3071 return A_NO_MEMORY;
3072 } 3072 }
3073 3073
@@ -3092,7 +3092,7 @@ wmi_sync_point(struct wmi_t *wmip)
3092 WMI_SYNC_CMD *cmd; 3092 WMI_SYNC_CMD *cmd;
3093 WMI_DATA_SYNC_BUFS dataSyncBufs[WMM_NUM_AC]; 3093 WMI_DATA_SYNC_BUFS dataSyncBufs[WMM_NUM_AC];
3094 u8 i,numPriStreams=0; 3094 u8 i,numPriStreams=0;
3095 int status = A_OK; 3095 int status = 0;
3096 3096
3097 A_DPRINTF(DBG_WMI, (DBGFMT "Enter\n", DBGARG)); 3097 A_DPRINTF(DBG_WMI, (DBGFMT "Enter\n", DBGARG));
3098 3098
@@ -3528,7 +3528,7 @@ s8 wmi_validate_bitrate(struct wmi_t *wmip, s32 rate, s8 *rate_idx)
3528 } 3528 }
3529 3529
3530 *rate_idx = i; 3530 *rate_idx = i;
3531 return A_OK; 3531 return 0;
3532} 3532}
3533 3533
3534int 3534int
@@ -3857,7 +3857,7 @@ wmi_get_wow_list_event_rx(struct wmi_t *wmip, u8 *datap, int len)
3857 A_WMI_WOW_LIST_EVENT(wmip->wmi_devt, reply->num_filters, 3857 A_WMI_WOW_LIST_EVENT(wmip->wmi_devt, reply->num_filters,
3858 reply); 3858 reply);
3859 3859
3860 return A_OK; 3860 return 0;
3861} 3861}
3862 3862
3863int wmi_add_wow_pattern_cmd(struct wmi_t *wmip, 3863int wmi_add_wow_pattern_cmd(struct wmi_t *wmip,
@@ -4647,7 +4647,7 @@ u8 wmi_get_power_mode_cmd(struct wmi_t *wmip)
4647int 4647int
4648wmi_verify_tspec_params(WMI_CREATE_PSTREAM_CMD *pCmd, int tspecCompliance) 4648wmi_verify_tspec_params(WMI_CREATE_PSTREAM_CMD *pCmd, int tspecCompliance)
4649{ 4649{
4650 int ret = A_OK; 4650 int ret = 0;
4651 4651
4652#define TSPEC_SUSPENSION_INTERVAL_ATHEROS_DEF (~0) 4652#define TSPEC_SUSPENSION_INTERVAL_ATHEROS_DEF (~0)
4653#define TSPEC_SERVICE_START_TIME_ATHEROS_DEF 0 4653#define TSPEC_SERVICE_START_TIME_ATHEROS_DEF 0
@@ -4685,7 +4685,7 @@ wmi_tcmd_test_report_rx(struct wmi_t *wmip, u8 *datap, int len)
4685 4685
4686 A_WMI_TCMD_RX_REPORT_EVENT(wmip->wmi_devt, datap, len); 4686 A_WMI_TCMD_RX_REPORT_EVENT(wmip->wmi_devt, datap, len);
4687 4687
4688 return A_OK; 4688 return 0;
4689} 4689}
4690 4690
4691#endif /* CONFIG_HOST_TCMD_SUPPORT*/ 4691#endif /* CONFIG_HOST_TCMD_SUPPORT*/
@@ -5473,7 +5473,7 @@ wmi_get_pmkid_list_event_rx(struct wmi_t *wmip, u8 *datap, u32 len)
5473 A_WMI_PMKID_LIST_EVENT(wmip->wmi_devt, reply->numPMKID, 5473 A_WMI_PMKID_LIST_EVENT(wmip->wmi_devt, reply->numPMKID,
5474 reply->pmkidList, reply->bssidList[0]); 5474 reply->pmkidList, reply->bssidList[0]);
5475 5475
5476 return A_OK; 5476 return 0;
5477} 5477}
5478 5478
5479 5479
@@ -5487,7 +5487,7 @@ wmi_set_params_event_rx(struct wmi_t *wmip, u8 *datap, u32 len)
5487 } 5487 }
5488 reply = (WMI_SET_PARAMS_REPLY *)datap; 5488 reply = (WMI_SET_PARAMS_REPLY *)datap;
5489 5489
5490 if (A_OK == reply->status) 5490 if (0 == reply->status)
5491 { 5491 {
5492 5492
5493 } 5493 }
@@ -5496,7 +5496,7 @@ wmi_set_params_event_rx(struct wmi_t *wmip, u8 *datap, u32 len)
5496 5496
5497 } 5497 }
5498 5498
5499 return A_OK; 5499 return 0;
5500} 5500}
5501 5501
5502 5502
@@ -5509,7 +5509,7 @@ wmi_acm_reject_event_rx(struct wmi_t *wmip, u8 *datap, u32 len)
5509 ev = (WMI_ACM_REJECT_EVENT *)datap; 5509 ev = (WMI_ACM_REJECT_EVENT *)datap;
5510 wmip->wmi_traffic_class = ev->trafficClass; 5510 wmip->wmi_traffic_class = ev->trafficClass;
5511 printk("ACM REJECT %d\n",wmip->wmi_traffic_class); 5511 printk("ACM REJECT %d\n",wmip->wmi_traffic_class);
5512 return A_OK; 5512 return 0;
5513} 5513}
5514 5514
5515 5515
@@ -5549,7 +5549,7 @@ wmi_dset_data_reply(struct wmi_t *wmip,
5549 data_reply->targ_reply_arg = targ_reply_arg; 5549 data_reply->targ_reply_arg = targ_reply_arg;
5550 data_reply->length = length; 5550 data_reply->length = length;
5551 5551
5552 if (status == A_OK) { 5552 if (status == 0) {
5553 if (a_copy_from_user(data_reply->buf, user_buf, length)) { 5553 if (a_copy_from_user(data_reply->buf, user_buf, length)) {
5554 A_NETBUF_FREE(osbuf); 5554 A_NETBUF_FREE(osbuf);
5555 return A_ERROR; 5555 return A_ERROR;
@@ -5658,7 +5658,7 @@ wmi_prof_count_rx(struct wmi_t *wmip, u8 *datap, int len)
5658 5658
5659 A_WMI_PROF_COUNT_RX(prof_data->addr, prof_data->count); 5659 A_WMI_PROF_COUNT_RX(prof_data->addr, prof_data->count);
5660 5660
5661 return A_OK; 5661 return 0;
5662} 5662}
5663#endif /* CONFIG_TARGET_PROFILE_SUPPORT */ 5663#endif /* CONFIG_TARGET_PROFILE_SUPPORT */
5664 5664
@@ -5992,7 +5992,7 @@ bss_t *wmi_rm_current_bss (struct wmi_t *wmip, u8 *id)
5992int wmi_add_current_bss (struct wmi_t *wmip, u8 *id, bss_t *bss) 5992int wmi_add_current_bss (struct wmi_t *wmip, u8 *id, bss_t *bss)
5993{ 5993{
5994 wlan_setup_node (&wmip->wmi_scan_table, bss, id); 5994 wlan_setup_node (&wmip->wmi_scan_table, bss, id);
5995 return A_OK; 5995 return 0;
5996} 5996}
5997 5997
5998#ifdef ATH_AR6K_11N_SUPPORT 5998#ifdef ATH_AR6K_11N_SUPPORT
@@ -6003,7 +6003,7 @@ wmi_addba_req_event_rx(struct wmi_t *wmip, u8 *datap, int len)
6003 6003
6004 A_WMI_AGGR_RECV_ADDBA_REQ_EVT(wmip->wmi_devt, cmd); 6004 A_WMI_AGGR_RECV_ADDBA_REQ_EVT(wmip->wmi_devt, cmd);
6005 6005
6006 return A_OK; 6006 return 0;
6007} 6007}
6008 6008
6009 6009
@@ -6014,7 +6014,7 @@ wmi_addba_resp_event_rx(struct wmi_t *wmip, u8 *datap, int len)
6014 6014
6015 A_WMI_AGGR_RECV_ADDBA_RESP_EVT(wmip->wmi_devt, cmd); 6015 A_WMI_AGGR_RECV_ADDBA_RESP_EVT(wmip->wmi_devt, cmd);
6016 6016
6017 return A_OK; 6017 return 0;
6018} 6018}
6019 6019
6020static int 6020static int
@@ -6024,7 +6024,7 @@ wmi_delba_req_event_rx(struct wmi_t *wmip, u8 *datap, int len)
6024 6024
6025 A_WMI_AGGR_RECV_DELBA_REQ_EVT(wmip->wmi_devt, cmd); 6025 A_WMI_AGGR_RECV_DELBA_REQ_EVT(wmip->wmi_devt, cmd);
6026 6026
6027 return A_OK; 6027 return 0;
6028} 6028}
6029 6029
6030int 6030int
@@ -6034,7 +6034,7 @@ wmi_btcoex_config_event_rx(struct wmi_t *wmip, u8 *datap, int len)
6034 6034
6035 A_WMI_BTCOEX_CONFIG_EVENT(wmip->wmi_devt, datap, len); 6035 A_WMI_BTCOEX_CONFIG_EVENT(wmip->wmi_devt, datap, len);
6036 6036
6037 return A_OK; 6037 return 0;
6038} 6038}
6039 6039
6040 6040
@@ -6045,7 +6045,7 @@ wmi_btcoex_stats_event_rx(struct wmi_t * wmip,u8 *datap,int len)
6045 6045
6046 A_WMI_BTCOEX_STATS_EVENT(wmip->wmi_devt, datap, len); 6046 A_WMI_BTCOEX_STATS_EVENT(wmip->wmi_devt, datap, len);
6047 6047
6048 return A_OK; 6048 return 0;
6049 6049
6050} 6050}
6051#endif 6051#endif
@@ -6056,7 +6056,7 @@ wmi_hci_event_rx(struct wmi_t *wmip, u8 *datap, int len)
6056 WMI_HCI_EVENT *cmd = (WMI_HCI_EVENT *)datap; 6056 WMI_HCI_EVENT *cmd = (WMI_HCI_EVENT *)datap;
6057 A_WMI_HCI_EVENT_EVT(wmip->wmi_devt, cmd); 6057 A_WMI_HCI_EVENT_EVT(wmip->wmi_devt, cmd);
6058 6058
6059 return A_OK; 6059 return 0;
6060} 6060}
6061 6061
6062//////////////////////////////////////////////////////////////////////////////// 6062////////////////////////////////////////////////////////////////////////////////
@@ -6216,14 +6216,14 @@ wmi_pspoll_event_rx(struct wmi_t *wmip, u8 *datap, int len)
6216 ev = (WMI_PSPOLL_EVENT *)datap; 6216 ev = (WMI_PSPOLL_EVENT *)datap;
6217 6217
6218 A_WMI_PSPOLL_EVENT(wmip->wmi_devt, ev->aid); 6218 A_WMI_PSPOLL_EVENT(wmip->wmi_devt, ev->aid);
6219 return A_OK; 6219 return 0;
6220} 6220}
6221 6221
6222static int 6222static int
6223wmi_dtimexpiry_event_rx(struct wmi_t *wmip, u8 *datap,int len) 6223wmi_dtimexpiry_event_rx(struct wmi_t *wmip, u8 *datap,int len)
6224{ 6224{
6225 A_WMI_DTIMEXPIRY_EVENT(wmip->wmi_devt); 6225 A_WMI_DTIMEXPIRY_EVENT(wmip->wmi_devt);
6226 return A_OK; 6226 return 0;
6227} 6227}
6228 6228
6229#ifdef WAPI_ENABLE 6229#ifdef WAPI_ENABLE
@@ -6238,7 +6238,7 @@ wmi_wapi_rekey_event_rx(struct wmi_t *wmip, u8 *datap,int len)
6238 ev = (u8 *)datap; 6238 ev = (u8 *)datap;
6239 6239
6240 A_WMI_WAPI_REKEY_EVENT(wmip->wmi_devt, *ev, &ev[1]); 6240 A_WMI_WAPI_REKEY_EVENT(wmip->wmi_devt, *ev, &ev[1]);
6241 return A_OK; 6241 return 0;
6242} 6242}
6243#endif 6243#endif
6244 6244