aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorL. Alberto Giménez <agimenez@sysvalve.es>2010-12-13 20:01:55 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-16 15:17:29 -0500
commit8c3d90921604951e306a898669c46a88578c5848 (patch)
tree58abcd1772a14eba5feed5f0b96d0997374e3e0f /drivers/staging
parent3be305fd7c0d07cdbb175467b4fe706ea10eb732 (diff)
Staging: rt2860: Sanitize DBGPRINT_ERR macro
Cleaner implementation. Avoids the need of the double parenthesis to call the macro. Signed-off-by: L. Alberto Giménez <agimenez@sysvalve.es> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rt2860/chip/rtmp_phy.h14
-rw-r--r--drivers/staging/rt2860/common/ba_action.c6
-rw-r--r--drivers/staging/rt2860/common/cmm_data.c2
-rw-r--r--drivers/staging/rt2860/common/cmm_mac_pci.c10
-rw-r--r--drivers/staging/rt2860/common/cmm_mac_usb.c2
-rw-r--r--drivers/staging/rt2860/common/cmm_wpa.c22
-rw-r--r--drivers/staging/rt2860/common/mlme.c13
-rw-r--r--drivers/staging/rt2860/common/rt_rf.c3
-rw-r--r--drivers/staging/rt2860/common/rtmp_init.c24
-rw-r--r--drivers/staging/rt2860/common/rtmp_mcu.c4
-rw-r--r--drivers/staging/rt2860/common/spectrum.c2
-rw-r--r--drivers/staging/rt2860/rt_linux.h6
-rw-r--r--drivers/staging/rt2860/sta/assoc.c2
-rw-r--r--drivers/staging/rt2860/sta/auth.c3
-rw-r--r--drivers/staging/rt2860/sta/connect.c3
-rw-r--r--drivers/staging/rt2860/sta/rtmp_data.c2
-rw-r--r--drivers/staging/rt2860/sta/sync.c6
17 files changed, 54 insertions, 70 deletions
diff --git a/drivers/staging/rt2860/chip/rtmp_phy.h b/drivers/staging/rt2860/chip/rtmp_phy.h
index 9f924ea6ca35..98454df30a22 100644
--- a/drivers/staging/rt2860/chip/rtmp_phy.h
+++ b/drivers/staging/rt2860/chip/rtmp_phy.h
@@ -247,7 +247,7 @@
247 } \ 247 } \
248 } \ 248 } \
249 if (BbpCsr.field.Busy == BUSY) { \ 249 if (BbpCsr.field.Busy == BUSY) { \
250 DBGPRINT_ERR(("BBP(viaMCU=%d) read R%d fail\n", (_bViaMCU), _bbpID)); \ 250 DBGPRINT_ERR("BBP(viaMCU=%d) read R%d fail\n", (_bViaMCU), _bbpID); \
251 *(_pV) = (_pAd)->BbpWriteLatch[_bbpID]; \ 251 *(_pV) = (_pAd)->BbpWriteLatch[_bbpID]; \
252 if ((_bViaMCU) == TRUE) { \ 252 if ((_bViaMCU) == TRUE) { \
253 RTMP_IO_READ32(_pAd, _regID, &BbpCsr.word); \ 253 RTMP_IO_READ32(_pAd, _regID, &BbpCsr.word); \
@@ -336,11 +336,11 @@
336 } \ 336 } \
337 } \ 337 } \
338 } else { \ 338 } else { \
339 DBGPRINT_ERR((" , brt30xxBanMcuCmd = %d, Read BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I))); \ 339 DBGPRINT_ERR(" , brt30xxBanMcuCmd = %d, Read BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I)); \
340 *(_pV) = (_A)->BbpWriteLatch[_I]; \ 340 *(_pV) = (_A)->BbpWriteLatch[_I]; \
341 } \ 341 } \
342 if ((BbpCsr.field.Busy == BUSY) || ((_A)->bPCIclkOff == TRUE)) { \ 342 if ((BbpCsr.field.Busy == BUSY) || ((_A)->bPCIclkOff == TRUE)) { \
343 DBGPRINT_ERR(("BBP read R%d=0x%x fail\n", _I, BbpCsr.word)); \ 343 DBGPRINT_ERR("BBP read R%d=0x%x fail\n", _I, BbpCsr.word); \
344 *(_pV) = (_A)->BbpWriteLatch[_I]; \ 344 *(_pV) = (_A)->BbpWriteLatch[_I]; \
345 } \ 345 } \
346} 346}
@@ -378,7 +378,7 @@
378 break; \ 378 break; \
379 } \ 379 } \
380 if (_busyCnt == MAX_BUSY_COUNT) { \ 380 if (_busyCnt == MAX_BUSY_COUNT) { \
381 DBGPRINT_ERR(("BBP write R%d fail\n", _bbpID)); \ 381 DBGPRINT_ERR("BBP write R%d fail\n", _bbpID); \
382 if ((_bViaMCU) == TRUE) { \ 382 if ((_bViaMCU) == TRUE) { \
383 RTMP_IO_READ32(_pAd, H2M_BBP_AGENT, &BbpCsr.word); \ 383 RTMP_IO_READ32(_pAd, H2M_BBP_AGENT, &BbpCsr.word); \
384 BbpCsr.field.Busy = 0; \ 384 BbpCsr.field.Busy = 0; \
@@ -459,15 +459,15 @@
459 break; \ 459 break; \
460 } \ 460 } \
461 } else { \ 461 } else { \
462 DBGPRINT_ERR((" brt30xxBanMcuCmd = %d. Write BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I))); \ 462 DBGPRINT_ERR(" brt30xxBanMcuCmd = %d. Write BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I)); \
463 } \ 463 } \
464 if ((BusyCnt == MAX_BUSY_COUNT) || ((_A)->bPCIclkOff == TRUE)) { \ 464 if ((BusyCnt == MAX_BUSY_COUNT) || ((_A)->bPCIclkOff == TRUE)) { \
465 if (BusyCnt == MAX_BUSY_COUNT) \ 465 if (BusyCnt == MAX_BUSY_COUNT) \
466 (_A)->AccessBBPFailCount++; \ 466 (_A)->AccessBBPFailCount++; \
467 DBGPRINT_ERR(("BBP write R%d=0x%x fail. BusyCnt= %d.bPCIclkOff = %d. \n", _I, BbpCsr.word, BusyCnt, (_A)->bPCIclkOff)); \ 467 DBGPRINT_ERR("BBP write R%d=0x%x fail. BusyCnt= %d.bPCIclkOff = %d. \n", _I, BbpCsr.word, BusyCnt, (_A)->bPCIclkOff); \
468 } \ 468 } \
469 } else { \ 469 } else { \
470 DBGPRINT_ERR(("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n")); \ 470 DBGPRINT_ERR("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n"); \
471 } \ 471 } \
472} 472}
473#endif /* RTMP_MAC_PCI // */ 473#endif /* RTMP_MAC_PCI // */
diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c
index ed8854b902d1..b046c2b814c5 100644
--- a/drivers/staging/rt2860/common/ba_action.c
+++ b/drivers/staging/rt2860/common/ba_action.c
@@ -1270,13 +1270,13 @@ BOOLEAN CntlEnqueueForRecv(struct rt_rtmp_adapter *pAd,
1270 1270
1271 /* First check the size, it MUST not exceed the mlme queue size */ 1271 /* First check the size, it MUST not exceed the mlme queue size */
1272 if (MsgLen > MGMT_DMA_BUFFER_SIZE) { 1272 if (MsgLen > MGMT_DMA_BUFFER_SIZE) {
1273 DBGPRINT_ERR(("CntlEnqueueForRecv: frame too large, size = %ld \n", MsgLen)); 1273 DBGPRINT_ERR("CntlEnqueueForRecv: frame too large, size = %ld \n", MsgLen);
1274 return FALSE; 1274 return FALSE;
1275 } else if (MsgLen != sizeof(struct rt_frame_ba_req)) { 1275 } else if (MsgLen != sizeof(struct rt_frame_ba_req)) {
1276 DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen)); 1276 DBGPRINT_ERR("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen);
1277 return FALSE; 1277 return FALSE;
1278 } else if (MsgLen != sizeof(struct rt_frame_ba_req)) { 1278 } else if (MsgLen != sizeof(struct rt_frame_ba_req)) {
1279 DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen)); 1279 DBGPRINT_ERR("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen);
1280 return FALSE; 1280 return FALSE;
1281 } 1281 }
1282 1282
diff --git a/drivers/staging/rt2860/common/cmm_data.c b/drivers/staging/rt2860/common/cmm_data.c
index 93a53479d766..2204c2bda386 100644
--- a/drivers/staging/rt2860/common/cmm_data.c
+++ b/drivers/staging/rt2860/common/cmm_data.c
@@ -1366,7 +1366,7 @@ void RTMPResumeMsduTransmission(struct rt_rtmp_adapter *pAd)
1366 /* R66 should not be 0 */ 1366 /* R66 should not be 0 */
1367 if (pAd->BbpTuning.R66CurrentValue == 0) { 1367 if (pAd->BbpTuning.R66CurrentValue == 0) {
1368 pAd->BbpTuning.R66CurrentValue = 0x38; 1368 pAd->BbpTuning.R66CurrentValue = 0x38;
1369 DBGPRINT_ERR(("RTMPResumeMsduTransmission, R66CurrentValue=0...\n")); 1369 DBGPRINT_ERR("RTMPResumeMsduTransmission, R66CurrentValue=0...\n");
1370 } 1370 }
1371 1371
1372 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66, 1372 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66,
diff --git a/drivers/staging/rt2860/common/cmm_mac_pci.c b/drivers/staging/rt2860/common/cmm_mac_pci.c
index e26ba4942877..850f0fbc6d90 100644
--- a/drivers/staging/rt2860/common/cmm_mac_pci.c
+++ b/drivers/staging/rt2860/common/cmm_mac_pci.c
@@ -89,7 +89,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
89 89
90 if (pAd->TxDescRing[num].AllocVa == NULL) { 90 if (pAd->TxDescRing[num].AllocVa == NULL) {
91 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; 91 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
92 DBGPRINT_ERR(("Failed to allocate a big buffer\n")); 92 DBGPRINT_ERR("Failed to allocate a big buffer\n");
93 Status = NDIS_STATUS_RESOURCES; 93 Status = NDIS_STATUS_RESOURCES;
94 break; 94 break;
95 } 95 }
@@ -121,7 +121,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
121 121
122 if (pAd->TxBufSpace[num].AllocVa == NULL) { 122 if (pAd->TxBufSpace[num].AllocVa == NULL) {
123 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; 123 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
124 DBGPRINT_ERR(("Failed to allocate a big buffer\n")); 124 DBGPRINT_ERR("Failed to allocate a big buffer\n");
125 Status = NDIS_STATUS_RESOURCES; 125 Status = NDIS_STATUS_RESOURCES;
126 break; 126 break;
127 } 127 }
@@ -197,7 +197,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
197 197
198 if (pAd->MgmtDescRing.AllocVa == NULL) { 198 if (pAd->MgmtDescRing.AllocVa == NULL) {
199 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; 199 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
200 DBGPRINT_ERR(("Failed to allocate a big buffer\n")); 200 DBGPRINT_ERR("Failed to allocate a big buffer\n");
201 Status = NDIS_STATUS_RESOURCES; 201 Status = NDIS_STATUS_RESOURCES;
202 break; 202 break;
203 } 203 }
@@ -251,7 +251,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
251 251
252 if (pAd->RxDescRing.AllocVa == NULL) { 252 if (pAd->RxDescRing.AllocVa == NULL) {
253 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; 253 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
254 DBGPRINT_ERR(("Failed to allocate a big buffer\n")); 254 DBGPRINT_ERR("Failed to allocate a big buffer\n");
255 Status = NDIS_STATUS_RESOURCES; 255 Status = NDIS_STATUS_RESOURCES;
256 break; 256 break;
257 } 257 }
@@ -304,7 +304,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
304 /* Error handling */ 304 /* Error handling */
305 if (pDmaBuf->AllocVa == NULL) { 305 if (pDmaBuf->AllocVa == NULL) {
306 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; 306 ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
307 DBGPRINT_ERR(("Failed to allocate RxRing's 1st buffer\n")); 307 DBGPRINT_ERR("Failed to allocate RxRing's 1st buffer\n");
308 Status = NDIS_STATUS_RESOURCES; 308 Status = NDIS_STATUS_RESOURCES;
309 break; 309 break;
310 } 310 }
diff --git a/drivers/staging/rt2860/common/cmm_mac_usb.c b/drivers/staging/rt2860/common/cmm_mac_usb.c
index 72731cbb81df..64a65a460c29 100644
--- a/drivers/staging/rt2860/common/cmm_mac_usb.c
+++ b/drivers/staging/rt2860/common/cmm_mac_usb.c
@@ -236,7 +236,7 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd)
236 os_alloc_mem(pAd, (u8 **) (&pAd->MgmtDescRing.AllocVa), 236 os_alloc_mem(pAd, (u8 **) (&pAd->MgmtDescRing.AllocVa),
237 pAd->MgmtDescRing.AllocSize); 237 pAd->MgmtDescRing.AllocSize);
238 if (pAd->MgmtDescRing.AllocVa == NULL) { 238 if (pAd->MgmtDescRing.AllocVa == NULL) {
239 DBGPRINT_ERR(("Failed to allocate a big buffer for MgmtDescRing!\n")); 239 DBGPRINT_ERR("Failed to allocate a big buffer for MgmtDescRing!\n");
240 Status = NDIS_STATUS_RESOURCES; 240 Status = NDIS_STATUS_RESOURCES;
241 goto out1; 241 goto out1;
242 } 242 }
diff --git a/drivers/staging/rt2860/common/cmm_wpa.c b/drivers/staging/rt2860/common/cmm_wpa.c
index e37b64b6a608..0040f45b629b 100644
--- a/drivers/staging/rt2860/common/cmm_wpa.c
+++ b/drivers/staging/rt2860/common/cmm_wpa.c
@@ -2794,7 +2794,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
2794 2794
2795 /* Check length */ 2795 /* Check length */
2796 if ((len <= 0) || (pEid->Len != len)) { 2796 if ((len <= 0) || (pEid->Len != len)) {
2797 DBGPRINT_ERR(("%s : The length is invalid\n", __func__)); 2797 DBGPRINT_ERR("%s : The length is invalid\n", __func__);
2798 return NULL; 2798 return NULL;
2799 } 2799 }
2800 /* Check WPA or WPA2 */ 2800 /* Check WPA or WPA2 */
@@ -2803,14 +2803,13 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
2803 u16 ucount; 2803 u16 ucount;
2804 2804
2805 if (len < sizeof(struct rt_rsnie)) { 2805 if (len < sizeof(struct rt_rsnie)) {
2806 DBGPRINT_ERR(("%s : The length is too short for WPA\n", 2806 DBGPRINT_ERR("%s : The length is too short for WPA\n", __func__);
2807 __func__));
2808 return NULL; 2807 return NULL;
2809 } 2808 }
2810 /* Get the count of pairwise cipher */ 2809 /* Get the count of pairwise cipher */
2811 ucount = cpu2le16(pRsnie->ucount); 2810 ucount = cpu2le16(pRsnie->ucount);
2812 if (ucount > 2) { 2811 if (ucount > 2) {
2813 DBGPRINT_ERR(("%s : The count(%d) of pairwise cipher is invlaid\n", __func__, ucount)); 2812 DBGPRINT_ERR("%s : The count(%d) of pairwise cipher is invlaid\n", __func__, ucount);
2814 return NULL; 2813 return NULL;
2815 } 2814 }
2816 /* Get the group cipher */ 2815 /* Get the group cipher */
@@ -2836,14 +2835,13 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
2836 isWPA2 = TRUE; 2835 isWPA2 = TRUE;
2837 2836
2838 if (len < sizeof(struct rt_rsnie2)) { 2837 if (len < sizeof(struct rt_rsnie2)) {
2839 DBGPRINT_ERR(("%s : The length is too short for WPA2\n", 2838 DBGPRINT_ERR("%s : The length is too short for WPA2\n", __func__);
2840 __func__));
2841 return NULL; 2839 return NULL;
2842 } 2840 }
2843 /* Get the count of pairwise cipher */ 2841 /* Get the count of pairwise cipher */
2844 ucount = cpu2le16(pRsnie->ucount); 2842 ucount = cpu2le16(pRsnie->ucount);
2845 if (ucount > 2) { 2843 if (ucount > 2) {
2846 DBGPRINT_ERR(("%s : The count(%d) of pairwise cipher is invlaid\n", __func__, ucount)); 2844 DBGPRINT_ERR("%s : The count(%d) of pairwise cipher is invlaid\n", __func__, ucount);
2847 return NULL; 2845 return NULL;
2848 } 2846 }
2849 /* Get the group cipher */ 2847 /* Get the group cipher */
@@ -2863,7 +2861,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
2863 offset = sizeof(struct rt_rsnie2) + (4 * (ucount - 1)); 2861 offset = sizeof(struct rt_rsnie2) + (4 * (ucount - 1));
2864 2862
2865 } else { 2863 } else {
2866 DBGPRINT_ERR(("%s : Unknown IE (%d)\n", __func__, pEid->Eid)); 2864 DBGPRINT_ERR("%s : Unknown IE (%d)\n", __func__, pEid->Eid);
2867 return NULL; 2865 return NULL;
2868 } 2866 }
2869 2867
@@ -2872,8 +2870,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
2872 len -= offset; 2870 len -= offset;
2873 2871
2874 if (len < sizeof(struct rt_rsnie_auth)) { 2872 if (len < sizeof(struct rt_rsnie_auth)) {
2875 DBGPRINT_ERR(("%s : The length of RSNIE is too short\n", 2873 DBGPRINT_ERR("%s : The length of RSNIE is too short\n", __func__);
2876 __func__));
2877 return NULL; 2874 return NULL;
2878 } 2875 }
2879 /* pointer to AKM count */ 2876 /* pointer to AKM count */
@@ -2882,8 +2879,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
2882 /* Get the count of pairwise cipher */ 2879 /* Get the count of pairwise cipher */
2883 acount = cpu2le16(pAkm->acount); 2880 acount = cpu2le16(pAkm->acount);
2884 if (acount > 2) { 2881 if (acount > 2) {
2885 DBGPRINT_ERR(("%s : The count(%d) of AKM is invlaid\n", 2882 DBGPRINT_ERR("%s : The count(%d) of AKM is invlaid\n", __func__, acount);
2886 __func__, acount));
2887 return NULL; 2883 return NULL;
2888 } 2884 }
2889 /* Get the AKM suite */ 2885 /* Get the AKM suite */
@@ -2910,7 +2906,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
2910 return pBuf; 2906 return pBuf;
2911 } 2907 }
2912 } else { 2908 } else {
2913 DBGPRINT_ERR(("%s : it can't get any more information beyond AKM \n", __func__)); 2909 DBGPRINT_ERR("%s : it can't get any more information beyond AKM \n", __func__);
2914 return NULL; 2910 return NULL;
2915 } 2911 }
2916 2912
diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c
index 7300c6e9c175..d9c3fd5c2166 100644
--- a/drivers/staging/rt2860/common/mlme.c
+++ b/drivers/staging/rt2860/common/mlme.c
@@ -550,7 +550,7 @@ void MlmeHandler(struct rt_rtmp_adapter *pAd)
550 Elem->MsgLen = 0; 550 Elem->MsgLen = 0;
551 551
552 } else { 552 } else {
553 DBGPRINT_ERR(("MlmeHandler: MlmeQueue empty\n")); 553 DBGPRINT_ERR("MlmeHandler: MlmeQueue empty\n");
554 } 554 }
555 } 555 }
556 556
@@ -4698,8 +4698,7 @@ BOOLEAN MlmeEnqueue(struct rt_rtmp_adapter *pAd,
4698 4698
4699 /* First check the size, it MUST not exceed the mlme queue size */ 4699 /* First check the size, it MUST not exceed the mlme queue size */
4700 if (MsgLen > MGMT_DMA_BUFFER_SIZE) { 4700 if (MsgLen > MGMT_DMA_BUFFER_SIZE) {
4701 DBGPRINT_ERR(("MlmeEnqueue: msg too large, size = %ld \n", 4701 DBGPRINT_ERR("MlmeEnqueue: msg too large, size = %ld \n", MsgLen);
4702 MsgLen));
4703 return FALSE; 4702 return FALSE;
4704 } 4703 }
4705 4704
@@ -4762,12 +4761,12 @@ BOOLEAN MlmeEnqueueForRecv(struct rt_rtmp_adapter *pAd,
4762 if (RTMP_TEST_FLAG 4761 if (RTMP_TEST_FLAG
4763 (pAd, 4762 (pAd,
4764 fRTMP_ADAPTER_HALT_IN_PROGRESS | fRTMP_ADAPTER_NIC_NOT_EXIST)) { 4763 fRTMP_ADAPTER_HALT_IN_PROGRESS | fRTMP_ADAPTER_NIC_NOT_EXIST)) {
4765 DBGPRINT_ERR(("MlmeEnqueueForRecv: fRTMP_ADAPTER_HALT_IN_PROGRESS\n")); 4764 DBGPRINT_ERR("MlmeEnqueueForRecv: fRTMP_ADAPTER_HALT_IN_PROGRESS\n");
4766 return FALSE; 4765 return FALSE;
4767 } 4766 }
4768 /* First check the size, it MUST not exceed the mlme queue size */ 4767 /* First check the size, it MUST not exceed the mlme queue size */
4769 if (MsgLen > MGMT_DMA_BUFFER_SIZE) { 4768 if (MsgLen > MGMT_DMA_BUFFER_SIZE) {
4770 DBGPRINT_ERR(("MlmeEnqueueForRecv: frame too large, size = %ld \n", MsgLen)); 4769 DBGPRINT_ERR("MlmeEnqueueForRecv: frame too large, size = %ld \n", MsgLen);
4771 return FALSE; 4770 return FALSE;
4772 } 4771 }
4773 4772
@@ -4777,7 +4776,7 @@ BOOLEAN MlmeEnqueueForRecv(struct rt_rtmp_adapter *pAd,
4777 4776
4778 { 4777 {
4779 if (!MsgTypeSubst(pAd, pFrame, &Machine, &MsgType)) { 4778 if (!MsgTypeSubst(pAd, pFrame, &Machine, &MsgType)) {
4780 DBGPRINT_ERR(("MlmeEnqueueForRecv: un-recongnized mgmt->subtype=%d\n", pFrame->Hdr.FC.SubType)); 4779 DBGPRINT_ERR("MlmeEnqueueForRecv: un-recongnized mgmt->subtype=%d\n", pFrame->Hdr.FC.SubType);
4781 return FALSE; 4780 return FALSE;
4782 } 4781 }
4783 } 4782 }
@@ -4867,7 +4866,7 @@ void MlmeRestartStateMachine(struct rt_rtmp_adapter *pAd)
4867 Elem->MsgLen = 0; 4866 Elem->MsgLen = 0;
4868 4867
4869 } else { 4868 } else {
4870 DBGPRINT_ERR(("MlmeRestartStateMachine: MlmeQueue empty\n")); 4869 DBGPRINT_ERR("MlmeRestartStateMachine: MlmeQueue empty\n");
4871 } 4870 }
4872 } 4871 }
4873#endif /* RTMP_MAC_PCI // */ 4872#endif /* RTMP_MAC_PCI // */
diff --git a/drivers/staging/rt2860/common/rt_rf.c b/drivers/staging/rt2860/common/rt_rf.c
index 519121d81040..2895447ffc48 100644
--- a/drivers/staging/rt2860/common/rt_rf.c
+++ b/drivers/staging/rt2860/common/rt_rf.c
@@ -131,8 +131,7 @@ int RT30xxReadRFRegister(struct rt_rtmp_adapter *pAd,
131 } 131 }
132 } 132 }
133 if (rfcsr.field.RF_CSR_KICK == BUSY) { 133 if (rfcsr.field.RF_CSR_KICK == BUSY) {
134 DBGPRINT_ERR(("RF read R%d=0x%x fail, i[%d], k[%d]\n", regID, 134 DBGPRINT_ERR("RF read R%d=0x%x fail, i[%d], k[%d]\n", regID, rfcsr.word, i, k);
135 rfcsr.word, i, k));
136 return STATUS_UNSUCCESSFUL; 135 return STATUS_UNSUCCESSFUL;
137 } 136 }
138 137
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c
index 3628e85802e3..d359a14f5d4d 100644
--- a/drivers/staging/rt2860/common/rtmp_init.c
+++ b/drivers/staging/rt2860/common/rtmp_init.c
@@ -169,14 +169,14 @@ int RTMPAllocAdapterBlock(void *handle,
169 pBeaconBuf = kmalloc(MAX_BEACON_SIZE, MEM_ALLOC_FLAG); 169 pBeaconBuf = kmalloc(MAX_BEACON_SIZE, MEM_ALLOC_FLAG);
170 if (pBeaconBuf == NULL) { 170 if (pBeaconBuf == NULL) {
171 Status = NDIS_STATUS_FAILURE; 171 Status = NDIS_STATUS_FAILURE;
172 DBGPRINT_ERR(("Failed to allocate memory - BeaconBuf!\n")); 172 DBGPRINT_ERR("Failed to allocate memory - BeaconBuf!\n");
173 break; 173 break;
174 } 174 }
175 NdisZeroMemory(pBeaconBuf, MAX_BEACON_SIZE); 175 NdisZeroMemory(pBeaconBuf, MAX_BEACON_SIZE);
176 176
177 Status = AdapterBlockAllocateMemory(handle, (void **) & pAd); 177 Status = AdapterBlockAllocateMemory(handle, (void **) & pAd);
178 if (Status != NDIS_STATUS_SUCCESS) { 178 if (Status != NDIS_STATUS_SUCCESS) {
179 DBGPRINT_ERR(("Failed to allocate memory - ADAPTER\n")); 179 DBGPRINT_ERR("Failed to allocate memory - ADAPTER\n");
180 break; 180 break;
181 } 181 }
182 pAd->BeaconBuf = pBeaconBuf; 182 pAd->BeaconBuf = pBeaconBuf;
@@ -785,8 +785,7 @@ void NICReadEEPROMParameters(struct rt_rtmp_adapter *pAd, u8 *mac_addr)
785 Version.field.Version, Version.field.FaeReleaseNumber)); 785 Version.field.Version, Version.field.FaeReleaseNumber));
786 786
787 if (Version.field.Version > VALID_EEPROM_VERSION) { 787 if (Version.field.Version > VALID_EEPROM_VERSION) {
788 DBGPRINT_ERR(("E2PROM: WRONG VERSION 0x%x, should be %d\n", 788 DBGPRINT_ERR("E2PROM: WRONG VERSION 0x%x, should be %d\n", Version.field.Version, VALID_EEPROM_VERSION);
789 Version.field.Version, VALID_EEPROM_VERSION));
790 /*pAd->SystemErrorBitmap |= 0x00000001; 789 /*pAd->SystemErrorBitmap |= 0x00000001;
791 790
792 // hard-code default value when no proper E2PROM installed 791 // hard-code default value when no proper E2PROM installed
@@ -2911,7 +2910,7 @@ void RTMPSetTimer(struct rt_ralink_timer *pTimer, unsigned long Value)
2911 RTMP_OS_Add_Timer(&pTimer->TimerObj, Value); 2910 RTMP_OS_Add_Timer(&pTimer->TimerObj, Value);
2912 } 2911 }
2913 } else { 2912 } else {
2914 DBGPRINT_ERR(("RTMPSetTimer failed, Timer hasn't been initialize!\n")); 2913 DBGPRINT_ERR("RTMPSetTimer failed, Timer hasn't been initialize!\n");
2915 } 2914 }
2916} 2915}
2917 2916
@@ -2947,7 +2946,7 @@ void RTMPModTimer(struct rt_ralink_timer *pTimer, unsigned long Value)
2947 RTMP_OS_Mod_Timer(&pTimer->TimerObj, Value); 2946 RTMP_OS_Mod_Timer(&pTimer->TimerObj, Value);
2948 } 2947 }
2949 } else { 2948 } else {
2950 DBGPRINT_ERR(("RTMPModTimer failed, Timer hasn't been initialize!\n")); 2949 DBGPRINT_ERR("RTMPModTimer failed, Timer hasn't been initialize!\n");
2951 } 2950 }
2952} 2951}
2953 2952
@@ -2989,7 +2988,7 @@ void RTMPCancelTimer(struct rt_ralink_timer *pTimer, OUT BOOLEAN * pCancelled)
2989 RtmpTimerQRemove(pTimer->pAd, pTimer); 2988 RtmpTimerQRemove(pTimer->pAd, pTimer);
2990#endif /* RTMP_TIMER_TASK_SUPPORT // */ 2989#endif /* RTMP_TIMER_TASK_SUPPORT // */
2991 } else { 2990 } else {
2992 DBGPRINT_ERR(("RTMPCancelTimer failed, Timer hasn't been initialize!\n")); 2991 DBGPRINT_ERR("RTMPCancelTimer failed, Timer hasn't been initialize!\n");
2993 } 2992 }
2994} 2993}
2995 2994
@@ -3251,8 +3250,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd,
3251 /* Load 8051 firmware */ 3250 /* Load 8051 firmware */
3252 Status = NICLoadFirmware(pAd); 3251 Status = NICLoadFirmware(pAd);
3253 if (Status != NDIS_STATUS_SUCCESS) { 3252 if (Status != NDIS_STATUS_SUCCESS) {
3254 DBGPRINT_ERR(("NICLoadFirmware failed, Status[=0x%08x]\n", 3253 DBGPRINT_ERR("NICLoadFirmware failed, Status[=0x%08x]\n", Status);
3255 Status));
3256 goto err1; 3254 goto err1;
3257 } 3255 }
3258 3256
@@ -3268,8 +3266,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd,
3268 3266
3269 Status = RTMPAllocTxRxRingMemory(pAd); 3267 Status = RTMPAllocTxRxRingMemory(pAd);
3270 if (Status != NDIS_STATUS_SUCCESS) { 3268 if (Status != NDIS_STATUS_SUCCESS) {
3271 DBGPRINT_ERR(("RTMPAllocDMAMemory failed, Status[=0x%08x]\n", 3269 DBGPRINT_ERR("RTMPAllocDMAMemory failed, Status[=0x%08x]\n", Status);
3272 Status));
3273 goto err1; 3270 goto err1;
3274 } 3271 }
3275 3272
@@ -3284,7 +3281,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd,
3284 3281
3285 Status = MlmeInit(pAd); 3282 Status = MlmeInit(pAd);
3286 if (Status != NDIS_STATUS_SUCCESS) { 3283 if (Status != NDIS_STATUS_SUCCESS) {
3287 DBGPRINT_ERR(("MlmeInit failed, Status[=0x%08x]\n", Status)); 3284 DBGPRINT_ERR("MlmeInit failed, Status[=0x%08x]\n", Status);
3288 goto err2; 3285 goto err2;
3289 } 3286 }
3290 /* Initialize pAd->StaCfg, pAd->ApCfg, pAd->CommonCfg to manufacture default */ 3287 /* Initialize pAd->StaCfg, pAd->ApCfg, pAd->CommonCfg to manufacture default */
@@ -3309,8 +3306,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd,
3309 /* */ 3306 /* */
3310 Status = NICInitializeAdapter(pAd, TRUE); 3307 Status = NICInitializeAdapter(pAd, TRUE);
3311 if (Status != NDIS_STATUS_SUCCESS) { 3308 if (Status != NDIS_STATUS_SUCCESS) {
3312 DBGPRINT_ERR(("NICInitializeAdapter failed, Status[=0x%08x]\n", 3309 DBGPRINT_ERR("NICInitializeAdapter failed, Status[=0x%08x]\n", Status);
3313 Status));
3314 if (Status != NDIS_STATUS_SUCCESS) 3310 if (Status != NDIS_STATUS_SUCCESS)
3315 goto err3; 3311 goto err3;
3316 } 3312 }
diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c
index 844d4b987b78..80fa4160ed62 100644
--- a/drivers/staging/rt2860/common/rtmp_mcu.c
+++ b/drivers/staging/rt2860/common/rtmp_mcu.c
@@ -267,7 +267,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd,
267 } while (i++ < 100); 267 } while (i++ < 100);
268 268
269 if (i > 100) { 269 if (i > 100) {
270 DBGPRINT_ERR(("H2M_MAILBOX still hold by MCU. command fail\n")); 270 DBGPRINT_ERR("H2M_MAILBOX still hold by MCU. command fail\n");
271 return FALSE; 271 return FALSE;
272 } 272 }
273 273
@@ -296,7 +296,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd,
296#ifdef RTMP_MAC_PCI 296#ifdef RTMP_MAC_PCI
297#endif /* RTMP_MAC_PCI // */ 297#endif /* RTMP_MAC_PCI // */
298 { 298 {
299 DBGPRINT_ERR(("H2M_MAILBOX still hold by MCU. command fail\n")); 299 DBGPRINT_ERR("H2M_MAILBOX still hold by MCU. command fail\n");
300 } 300 }
301 return FALSE; 301 return FALSE;
302 } 302 }
diff --git a/drivers/staging/rt2860/common/spectrum.c b/drivers/staging/rt2860/common/spectrum.c
index 2d5f847e6cc6..1dfb802aab9a 100644
--- a/drivers/staging/rt2860/common/spectrum.c
+++ b/drivers/staging/rt2860/common/spectrum.c
@@ -1837,7 +1837,7 @@ static void PeerChSwAnnAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_
1837 } 1837 }
1838 1838
1839 if (index >= pAd->ChannelListNum) { 1839 if (index >= pAd->ChannelListNum) {
1840 DBGPRINT_ERR(("&&&&&&&&&&&&&&&&&&&&&&&&&&PeerChSwAnnAction(can not find New Channel=%d in ChannelList[%d]\n", pAd->CommonCfg.Channel, pAd->ChannelListNum)); 1840 DBGPRINT_ERR("&&&&&&&&&&&&&&&&&&&&&&&&&&PeerChSwAnnAction(can not find New Channel=%d in ChannelList[%d]\n", pAd->CommonCfg.Channel, pAd->ChannelListNum);
1841 } 1841 }
1842 } 1842 }
1843 } 1843 }
diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
index a449b0bb85f1..92ff5438e777 100644
--- a/drivers/staging/rt2860/rt_linux.h
+++ b/drivers/staging/rt2860/rt_linux.h
@@ -423,11 +423,7 @@ do{ \
423 423
424#define DBGPRINT(Level, Fmt) DBGPRINT_RAW(Level, Fmt) 424#define DBGPRINT(Level, Fmt) DBGPRINT_RAW(Level, Fmt)
425 425
426#define DBGPRINT_ERR(Fmt) \ 426#define DBGPRINT_ERR(fmt, args...) printk(KERN_ERR fmt, ##args)
427{ \
428 printk("ERROR! "); \
429 printk Fmt; \
430}
431 427
432#define DBGPRINT_S(Status, Fmt) \ 428#define DBGPRINT_S(Status, Fmt) \
433{ \ 429{ \
diff --git a/drivers/staging/rt2860/sta/assoc.c b/drivers/staging/rt2860/sta/assoc.c
index ab0a83bf76ef..59e931c3190d 100644
--- a/drivers/staging/rt2860/sta/assoc.c
+++ b/drivers/staging/rt2860/sta/assoc.c
@@ -1055,7 +1055,7 @@ void AssocPostProc(struct rt_rtmp_adapter *pAd, u8 *pAddr2, u16 CapabilityInfo,
1055 /* Set New WPA information */ 1055 /* Set New WPA information */
1056 Idx = BssTableSearch(&pAd->ScanTab, pAddr2, pAd->MlmeAux.Channel); 1056 Idx = BssTableSearch(&pAd->ScanTab, pAddr2, pAd->MlmeAux.Channel);
1057 if (Idx == BSS_NOT_FOUND) { 1057 if (Idx == BSS_NOT_FOUND) {
1058 DBGPRINT_ERR(("ASSOC - Can't find BSS after receiving Assoc response\n")); 1058 DBGPRINT_ERR("ASSOC - Can't find BSS after receiving Assoc response\n");
1059 } else { 1059 } else {
1060 /* Init variable */ 1060 /* Init variable */
1061 pAd->MacTab.Content[BSSID_WCID].RSNIE_Len = 0; 1061 pAd->MacTab.Content[BSSID_WCID].RSNIE_Len = 0;
diff --git a/drivers/staging/rt2860/sta/auth.c b/drivers/staging/rt2860/sta/auth.c
index a2bfafddb20e..23ea00b896b0 100644
--- a/drivers/staging/rt2860/sta/auth.c
+++ b/drivers/staging/rt2860/sta/auth.c
@@ -509,8 +509,7 @@ BOOLEAN AUTH_ReqSend(struct rt_rtmp_adapter *pAd,
509 RTMPSetTimer(pAuthTimer, Timeout); 509 RTMPSetTimer(pAuthTimer, Timeout);
510 return TRUE; 510 return TRUE;
511 } else { 511 } else {
512 DBGPRINT_ERR(("%s - MlmeAuthReqAction() sanity check failed\n", 512 DBGPRINT_ERR("%s - MlmeAuthReqAction() sanity check failed\n", pSMName);
513 pSMName));
514 return FALSE; 513 return FALSE;
515 } 514 }
516 515
diff --git a/drivers/staging/rt2860/sta/connect.c b/drivers/staging/rt2860/sta/connect.c
index 4b2c84e6509e..4996258f6ecd 100644
--- a/drivers/staging/rt2860/sta/connect.c
+++ b/drivers/staging/rt2860/sta/connect.c
@@ -215,8 +215,7 @@ void MlmeCntlMachinePerformAction(struct rt_rtmp_adapter *pAd,
215 break; 215 break;
216#endif /* RTMP_MAC_USB // */ 216#endif /* RTMP_MAC_USB // */
217 default: 217 default:
218 DBGPRINT_ERR(("ERROR! CNTL - Illegal message type(=%ld)", 218 DBGPRINT_ERR("ERROR! CNTL - Illegal message type(=%ld)", Elem->MsgType);
219 Elem->MsgType));
220 break; 219 break;
221 } 220 }
222} 221}
diff --git a/drivers/staging/rt2860/sta/rtmp_data.c b/drivers/staging/rt2860/sta/rtmp_data.c
index d7c2012be8a5..e82c6b669eb2 100644
--- a/drivers/staging/rt2860/sta/rtmp_data.c
+++ b/drivers/staging/rt2860/sta/rtmp_data.c
@@ -645,7 +645,7 @@ void STAHandleRxMgmtFrame(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk)
645 645
646 /* First check the size, it MUST not exceed the mlme queue size */ 646 /* First check the size, it MUST not exceed the mlme queue size */
647 if (pRxWI->MPDUtotalByteCount > MGMT_DMA_BUFFER_SIZE) { 647 if (pRxWI->MPDUtotalByteCount > MGMT_DMA_BUFFER_SIZE) {
648 DBGPRINT_ERR(("STAHandleRxMgmtFrame: frame too large, size = %d \n", pRxWI->MPDUtotalByteCount)); 648 DBGPRINT_ERR("STAHandleRxMgmtFrame: frame too large, size = %d \n", pRxWI->MPDUtotalByteCount);
649 break; 649 break;
650 } 650 }
651 651
diff --git a/drivers/staging/rt2860/sta/sync.c b/drivers/staging/rt2860/sta/sync.c
index 05007d9c9b69..7054ba1323d0 100644
--- a/drivers/staging/rt2860/sta/sync.c
+++ b/drivers/staging/rt2860/sta/sync.c
@@ -284,7 +284,7 @@ void MlmeScanReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *E
284 DBGPRINT(RT_DEBUG_TRACE, ("SYNC - BBP R4 to 20MHz.l\n")); 284 DBGPRINT(RT_DEBUG_TRACE, ("SYNC - BBP R4 to 20MHz.l\n"));
285 ScanNextChannel(pAd); 285 ScanNextChannel(pAd);
286 } else { 286 } else {
287 DBGPRINT_ERR(("SYNC - MlmeScanReqAction() sanity check fail\n")); 287 DBGPRINT_ERR("SYNC - MlmeScanReqAction() sanity check fail\n");
288 pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE; 288 pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE;
289 Status = MLME_INVALID_FORMAT; 289 Status = MLME_INVALID_FORMAT;
290 MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_SCAN_CONF, 2, 290 MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_SCAN_CONF, 2,
@@ -536,7 +536,7 @@ void MlmeStartReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *
536 MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_START_CONF, 2, 536 MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_START_CONF, 2,
537 &Status); 537 &Status);
538 } else { 538 } else {
539 DBGPRINT_ERR(("SYNC - MlmeStartReqAction() sanity check fail.\n")); 539 DBGPRINT_ERR("SYNC - MlmeStartReqAction() sanity check fail.\n");
540 pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE; 540 pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE;
541 Status = MLME_INVALID_FORMAT; 541 Status = MLME_INVALID_FORMAT;
542 MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_START_CONF, 2, 542 MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_START_CONF, 2,
@@ -1208,7 +1208,7 @@ void PeerBeacon(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem)
1208 } 1208 }
1209 1209
1210 if (index >= pAd->ChannelListNum) { 1210 if (index >= pAd->ChannelListNum) {
1211 DBGPRINT_ERR(("PeerBeacon(can not find New Channel=%d in ChannelList[%d]\n", pAd->CommonCfg.Channel, pAd->ChannelListNum)); 1211 DBGPRINT_ERR("PeerBeacon(can not find New Channel=%d in ChannelList[%d]\n", pAd->CommonCfg.Channel, pAd->ChannelListNum);
1212 } 1212 }
1213 } 1213 }
1214 /* if the ssid matched & bssid unmatched, we should select the bssid with large value. */ 1214 /* if the ssid matched & bssid unmatched, we should select the bssid with large value. */