Commit 8c3d9092 authored by L. Alberto Giménez's avatar L. Alberto Giménez Committed by Greg Kroah-Hartman

Staging: rt2860: Sanitize DBGPRINT_ERR macro

Cleaner implementation. Avoids the need of the double parenthesis to call the
macro.
Signed-off-by: default avatarL. Alberto Giménez <agimenez@sysvalve.es>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3be305fd
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
} \ } \
} \ } \
if (BbpCsr.field.Busy == BUSY) { \ if (BbpCsr.field.Busy == BUSY) { \
DBGPRINT_ERR(("BBP(viaMCU=%d) read R%d fail\n", (_bViaMCU), _bbpID)); \ DBGPRINT_ERR("BBP(viaMCU=%d) read R%d fail\n", (_bViaMCU), _bbpID); \
*(_pV) = (_pAd)->BbpWriteLatch[_bbpID]; \ *(_pV) = (_pAd)->BbpWriteLatch[_bbpID]; \
if ((_bViaMCU) == TRUE) { \ if ((_bViaMCU) == TRUE) { \
RTMP_IO_READ32(_pAd, _regID, &BbpCsr.word); \ RTMP_IO_READ32(_pAd, _regID, &BbpCsr.word); \
...@@ -336,11 +336,11 @@ ...@@ -336,11 +336,11 @@
} \ } \
} \ } \
} else { \ } else { \
DBGPRINT_ERR((" , brt30xxBanMcuCmd = %d, Read BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I))); \ DBGPRINT_ERR(" , brt30xxBanMcuCmd = %d, Read BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I)); \
*(_pV) = (_A)->BbpWriteLatch[_I]; \ *(_pV) = (_A)->BbpWriteLatch[_I]; \
} \ } \
if ((BbpCsr.field.Busy == BUSY) || ((_A)->bPCIclkOff == TRUE)) { \ if ((BbpCsr.field.Busy == BUSY) || ((_A)->bPCIclkOff == TRUE)) { \
DBGPRINT_ERR(("BBP read R%d=0x%x fail\n", _I, BbpCsr.word)); \ DBGPRINT_ERR("BBP read R%d=0x%x fail\n", _I, BbpCsr.word); \
*(_pV) = (_A)->BbpWriteLatch[_I]; \ *(_pV) = (_A)->BbpWriteLatch[_I]; \
} \ } \
} }
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
break; \ break; \
} \ } \
if (_busyCnt == MAX_BUSY_COUNT) { \ if (_busyCnt == MAX_BUSY_COUNT) { \
DBGPRINT_ERR(("BBP write R%d fail\n", _bbpID)); \ DBGPRINT_ERR("BBP write R%d fail\n", _bbpID); \
if ((_bViaMCU) == TRUE) { \ if ((_bViaMCU) == TRUE) { \
RTMP_IO_READ32(_pAd, H2M_BBP_AGENT, &BbpCsr.word); \ RTMP_IO_READ32(_pAd, H2M_BBP_AGENT, &BbpCsr.word); \
BbpCsr.field.Busy = 0; \ BbpCsr.field.Busy = 0; \
...@@ -459,15 +459,15 @@ ...@@ -459,15 +459,15 @@
break; \ break; \
} \ } \
} else { \ } else { \
DBGPRINT_ERR((" brt30xxBanMcuCmd = %d. Write BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I))); \ DBGPRINT_ERR(" brt30xxBanMcuCmd = %d. Write BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I)); \
} \ } \
if ((BusyCnt == MAX_BUSY_COUNT) || ((_A)->bPCIclkOff == TRUE)) { \ if ((BusyCnt == MAX_BUSY_COUNT) || ((_A)->bPCIclkOff == TRUE)) { \
if (BusyCnt == MAX_BUSY_COUNT) \ if (BusyCnt == MAX_BUSY_COUNT) \
(_A)->AccessBBPFailCount++; \ (_A)->AccessBBPFailCount++; \
DBGPRINT_ERR(("BBP write R%d=0x%x fail. BusyCnt= %d.bPCIclkOff = %d. \n", _I, BbpCsr.word, BusyCnt, (_A)->bPCIclkOff)); \ DBGPRINT_ERR("BBP write R%d=0x%x fail. BusyCnt= %d.bPCIclkOff = %d. \n", _I, BbpCsr.word, BusyCnt, (_A)->bPCIclkOff); \
} \ } \
} else { \ } else { \
DBGPRINT_ERR(("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n")); \ DBGPRINT_ERR("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n"); \
} \ } \
} }
#endif /* RTMP_MAC_PCI // */ #endif /* RTMP_MAC_PCI // */
......
...@@ -1270,13 +1270,13 @@ BOOLEAN CntlEnqueueForRecv(struct rt_rtmp_adapter *pAd, ...@@ -1270,13 +1270,13 @@ BOOLEAN CntlEnqueueForRecv(struct rt_rtmp_adapter *pAd,
/* First check the size, it MUST not exceed the mlme queue size */ /* First check the size, it MUST not exceed the mlme queue size */
if (MsgLen > MGMT_DMA_BUFFER_SIZE) { if (MsgLen > MGMT_DMA_BUFFER_SIZE) {
DBGPRINT_ERR(("CntlEnqueueForRecv: frame too large, size = %ld \n", MsgLen)); DBGPRINT_ERR("CntlEnqueueForRecv: frame too large, size = %ld \n", MsgLen);
return FALSE; return FALSE;
} else if (MsgLen != sizeof(struct rt_frame_ba_req)) { } else if (MsgLen != sizeof(struct rt_frame_ba_req)) {
DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen)); DBGPRINT_ERR("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen);
return FALSE; return FALSE;
} else if (MsgLen != sizeof(struct rt_frame_ba_req)) { } else if (MsgLen != sizeof(struct rt_frame_ba_req)) {
DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen)); DBGPRINT_ERR("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen);
return FALSE; return FALSE;
} }
......
...@@ -1366,7 +1366,7 @@ void RTMPResumeMsduTransmission(struct rt_rtmp_adapter *pAd) ...@@ -1366,7 +1366,7 @@ void RTMPResumeMsduTransmission(struct rt_rtmp_adapter *pAd)
/* R66 should not be 0 */ /* R66 should not be 0 */
if (pAd->BbpTuning.R66CurrentValue == 0) { if (pAd->BbpTuning.R66CurrentValue == 0) {
pAd->BbpTuning.R66CurrentValue = 0x38; pAd->BbpTuning.R66CurrentValue = 0x38;
DBGPRINT_ERR(("RTMPResumeMsduTransmission, R66CurrentValue=0...\n")); DBGPRINT_ERR("RTMPResumeMsduTransmission, R66CurrentValue=0...\n");
} }
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66, RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66,
......
...@@ -89,7 +89,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd) ...@@ -89,7 +89,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
if (pAd->TxDescRing[num].AllocVa == NULL) { if (pAd->TxDescRing[num].AllocVa == NULL) {
ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
DBGPRINT_ERR(("Failed to allocate a big buffer\n")); DBGPRINT_ERR("Failed to allocate a big buffer\n");
Status = NDIS_STATUS_RESOURCES; Status = NDIS_STATUS_RESOURCES;
break; break;
} }
...@@ -121,7 +121,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd) ...@@ -121,7 +121,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
if (pAd->TxBufSpace[num].AllocVa == NULL) { if (pAd->TxBufSpace[num].AllocVa == NULL) {
ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
DBGPRINT_ERR(("Failed to allocate a big buffer\n")); DBGPRINT_ERR("Failed to allocate a big buffer\n");
Status = NDIS_STATUS_RESOURCES; Status = NDIS_STATUS_RESOURCES;
break; break;
} }
...@@ -197,7 +197,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd) ...@@ -197,7 +197,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
if (pAd->MgmtDescRing.AllocVa == NULL) { if (pAd->MgmtDescRing.AllocVa == NULL) {
ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
DBGPRINT_ERR(("Failed to allocate a big buffer\n")); DBGPRINT_ERR("Failed to allocate a big buffer\n");
Status = NDIS_STATUS_RESOURCES; Status = NDIS_STATUS_RESOURCES;
break; break;
} }
...@@ -251,7 +251,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd) ...@@ -251,7 +251,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
if (pAd->RxDescRing.AllocVa == NULL) { if (pAd->RxDescRing.AllocVa == NULL) {
ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
DBGPRINT_ERR(("Failed to allocate a big buffer\n")); DBGPRINT_ERR("Failed to allocate a big buffer\n");
Status = NDIS_STATUS_RESOURCES; Status = NDIS_STATUS_RESOURCES;
break; break;
} }
...@@ -304,7 +304,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd) ...@@ -304,7 +304,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
/* Error handling */ /* Error handling */
if (pDmaBuf->AllocVa == NULL) { if (pDmaBuf->AllocVa == NULL) {
ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY; ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
DBGPRINT_ERR(("Failed to allocate RxRing's 1st buffer\n")); DBGPRINT_ERR("Failed to allocate RxRing's 1st buffer\n");
Status = NDIS_STATUS_RESOURCES; Status = NDIS_STATUS_RESOURCES;
break; break;
} }
......
...@@ -236,7 +236,7 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd) ...@@ -236,7 +236,7 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd)
os_alloc_mem(pAd, (u8 **) (&pAd->MgmtDescRing.AllocVa), os_alloc_mem(pAd, (u8 **) (&pAd->MgmtDescRing.AllocVa),
pAd->MgmtDescRing.AllocSize); pAd->MgmtDescRing.AllocSize);
if (pAd->MgmtDescRing.AllocVa == NULL) { if (pAd->MgmtDescRing.AllocVa == NULL) {
DBGPRINT_ERR(("Failed to allocate a big buffer for MgmtDescRing!\n")); DBGPRINT_ERR("Failed to allocate a big buffer for MgmtDescRing!\n");
Status = NDIS_STATUS_RESOURCES; Status = NDIS_STATUS_RESOURCES;
goto out1; goto out1;
} }
......
...@@ -2794,7 +2794,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, ...@@ -2794,7 +2794,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
/* Check length */ /* Check length */
if ((len <= 0) || (pEid->Len != len)) { if ((len <= 0) || (pEid->Len != len)) {
DBGPRINT_ERR(("%s : The length is invalid\n", __func__)); DBGPRINT_ERR("%s : The length is invalid\n", __func__);
return NULL; return NULL;
} }
/* Check WPA or WPA2 */ /* Check WPA or WPA2 */
...@@ -2803,14 +2803,13 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, ...@@ -2803,14 +2803,13 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
u16 ucount; u16 ucount;
if (len < sizeof(struct rt_rsnie)) { if (len < sizeof(struct rt_rsnie)) {
DBGPRINT_ERR(("%s : The length is too short for WPA\n", DBGPRINT_ERR("%s : The length is too short for WPA\n", __func__);
__func__));
return NULL; return NULL;
} }
/* Get the count of pairwise cipher */ /* Get the count of pairwise cipher */
ucount = cpu2le16(pRsnie->ucount); ucount = cpu2le16(pRsnie->ucount);
if (ucount > 2) { if (ucount > 2) {
DBGPRINT_ERR(("%s : The count(%d) of pairwise cipher is invlaid\n", __func__, ucount)); DBGPRINT_ERR("%s : The count(%d) of pairwise cipher is invlaid\n", __func__, ucount);
return NULL; return NULL;
} }
/* Get the group cipher */ /* Get the group cipher */
...@@ -2836,14 +2835,13 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, ...@@ -2836,14 +2835,13 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
isWPA2 = TRUE; isWPA2 = TRUE;
if (len < sizeof(struct rt_rsnie2)) { if (len < sizeof(struct rt_rsnie2)) {
DBGPRINT_ERR(("%s : The length is too short for WPA2\n", DBGPRINT_ERR("%s : The length is too short for WPA2\n", __func__);
__func__));
return NULL; return NULL;
} }
/* Get the count of pairwise cipher */ /* Get the count of pairwise cipher */
ucount = cpu2le16(pRsnie->ucount); ucount = cpu2le16(pRsnie->ucount);
if (ucount > 2) { if (ucount > 2) {
DBGPRINT_ERR(("%s : The count(%d) of pairwise cipher is invlaid\n", __func__, ucount)); DBGPRINT_ERR("%s : The count(%d) of pairwise cipher is invlaid\n", __func__, ucount);
return NULL; return NULL;
} }
/* Get the group cipher */ /* Get the group cipher */
...@@ -2863,7 +2861,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, ...@@ -2863,7 +2861,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
offset = sizeof(struct rt_rsnie2) + (4 * (ucount - 1)); offset = sizeof(struct rt_rsnie2) + (4 * (ucount - 1));
} else { } else {
DBGPRINT_ERR(("%s : Unknown IE (%d)\n", __func__, pEid->Eid)); DBGPRINT_ERR("%s : Unknown IE (%d)\n", __func__, pEid->Eid);
return NULL; return NULL;
} }
...@@ -2872,8 +2870,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, ...@@ -2872,8 +2870,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
len -= offset; len -= offset;
if (len < sizeof(struct rt_rsnie_auth)) { if (len < sizeof(struct rt_rsnie_auth)) {
DBGPRINT_ERR(("%s : The length of RSNIE is too short\n", DBGPRINT_ERR("%s : The length of RSNIE is too short\n", __func__);
__func__));
return NULL; return NULL;
} }
/* pointer to AKM count */ /* pointer to AKM count */
...@@ -2882,8 +2879,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, ...@@ -2882,8 +2879,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
/* Get the count of pairwise cipher */ /* Get the count of pairwise cipher */
acount = cpu2le16(pAkm->acount); acount = cpu2le16(pAkm->acount);
if (acount > 2) { if (acount > 2) {
DBGPRINT_ERR(("%s : The count(%d) of AKM is invlaid\n", DBGPRINT_ERR("%s : The count(%d) of AKM is invlaid\n", __func__, acount);
__func__, acount));
return NULL; return NULL;
} }
/* Get the AKM suite */ /* Get the AKM suite */
...@@ -2910,7 +2906,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, ...@@ -2910,7 +2906,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie,
return pBuf; return pBuf;
} }
} else { } else {
DBGPRINT_ERR(("%s : it can't get any more information beyond AKM \n", __func__)); DBGPRINT_ERR("%s : it can't get any more information beyond AKM \n", __func__);
return NULL; return NULL;
} }
......
...@@ -550,7 +550,7 @@ void MlmeHandler(struct rt_rtmp_adapter *pAd) ...@@ -550,7 +550,7 @@ void MlmeHandler(struct rt_rtmp_adapter *pAd)
Elem->MsgLen = 0; Elem->MsgLen = 0;
} else { } else {
DBGPRINT_ERR(("MlmeHandler: MlmeQueue empty\n")); DBGPRINT_ERR("MlmeHandler: MlmeQueue empty\n");
} }
} }
...@@ -4698,8 +4698,7 @@ BOOLEAN MlmeEnqueue(struct rt_rtmp_adapter *pAd, ...@@ -4698,8 +4698,7 @@ BOOLEAN MlmeEnqueue(struct rt_rtmp_adapter *pAd,
/* First check the size, it MUST not exceed the mlme queue size */ /* First check the size, it MUST not exceed the mlme queue size */
if (MsgLen > MGMT_DMA_BUFFER_SIZE) { if (MsgLen > MGMT_DMA_BUFFER_SIZE) {
DBGPRINT_ERR(("MlmeEnqueue: msg too large, size = %ld \n", DBGPRINT_ERR("MlmeEnqueue: msg too large, size = %ld \n", MsgLen);
MsgLen));
return FALSE; return FALSE;
} }
...@@ -4762,12 +4761,12 @@ BOOLEAN MlmeEnqueueForRecv(struct rt_rtmp_adapter *pAd, ...@@ -4762,12 +4761,12 @@ BOOLEAN MlmeEnqueueForRecv(struct rt_rtmp_adapter *pAd,
if (RTMP_TEST_FLAG if (RTMP_TEST_FLAG
(pAd, (pAd,
fRTMP_ADAPTER_HALT_IN_PROGRESS | fRTMP_ADAPTER_NIC_NOT_EXIST)) { fRTMP_ADAPTER_HALT_IN_PROGRESS | fRTMP_ADAPTER_NIC_NOT_EXIST)) {
DBGPRINT_ERR(("MlmeEnqueueForRecv: fRTMP_ADAPTER_HALT_IN_PROGRESS\n")); DBGPRINT_ERR("MlmeEnqueueForRecv: fRTMP_ADAPTER_HALT_IN_PROGRESS\n");
return FALSE; return FALSE;
} }
/* First check the size, it MUST not exceed the mlme queue size */ /* First check the size, it MUST not exceed the mlme queue size */
if (MsgLen > MGMT_DMA_BUFFER_SIZE) { if (MsgLen > MGMT_DMA_BUFFER_SIZE) {
DBGPRINT_ERR(("MlmeEnqueueForRecv: frame too large, size = %ld \n", MsgLen)); DBGPRINT_ERR("MlmeEnqueueForRecv: frame too large, size = %ld \n", MsgLen);
return FALSE; return FALSE;
} }
...@@ -4777,7 +4776,7 @@ BOOLEAN MlmeEnqueueForRecv(struct rt_rtmp_adapter *pAd, ...@@ -4777,7 +4776,7 @@ BOOLEAN MlmeEnqueueForRecv(struct rt_rtmp_adapter *pAd,
{ {
if (!MsgTypeSubst(pAd, pFrame, &Machine, &MsgType)) { if (!MsgTypeSubst(pAd, pFrame, &Machine, &MsgType)) {
DBGPRINT_ERR(("MlmeEnqueueForRecv: un-recongnized mgmt->subtype=%d\n", pFrame->Hdr.FC.SubType)); DBGPRINT_ERR("MlmeEnqueueForRecv: un-recongnized mgmt->subtype=%d\n", pFrame->Hdr.FC.SubType);
return FALSE; return FALSE;
} }
} }
...@@ -4867,7 +4866,7 @@ void MlmeRestartStateMachine(struct rt_rtmp_adapter *pAd) ...@@ -4867,7 +4866,7 @@ void MlmeRestartStateMachine(struct rt_rtmp_adapter *pAd)
Elem->MsgLen = 0; Elem->MsgLen = 0;
} else { } else {
DBGPRINT_ERR(("MlmeRestartStateMachine: MlmeQueue empty\n")); DBGPRINT_ERR("MlmeRestartStateMachine: MlmeQueue empty\n");
} }
} }
#endif /* RTMP_MAC_PCI // */ #endif /* RTMP_MAC_PCI // */
......
...@@ -131,8 +131,7 @@ int RT30xxReadRFRegister(struct rt_rtmp_adapter *pAd, ...@@ -131,8 +131,7 @@ int RT30xxReadRFRegister(struct rt_rtmp_adapter *pAd,
} }
} }
if (rfcsr.field.RF_CSR_KICK == BUSY) { if (rfcsr.field.RF_CSR_KICK == BUSY) {
DBGPRINT_ERR(("RF read R%d=0x%x fail, i[%d], k[%d]\n", regID, DBGPRINT_ERR("RF read R%d=0x%x fail, i[%d], k[%d]\n", regID, rfcsr.word, i, k);
rfcsr.word, i, k));
return STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL;
} }
......
...@@ -169,14 +169,14 @@ int RTMPAllocAdapterBlock(void *handle, ...@@ -169,14 +169,14 @@ int RTMPAllocAdapterBlock(void *handle,
pBeaconBuf = kmalloc(MAX_BEACON_SIZE, MEM_ALLOC_FLAG); pBeaconBuf = kmalloc(MAX_BEACON_SIZE, MEM_ALLOC_FLAG);
if (pBeaconBuf == NULL) { if (pBeaconBuf == NULL) {
Status = NDIS_STATUS_FAILURE; Status = NDIS_STATUS_FAILURE;
DBGPRINT_ERR(("Failed to allocate memory - BeaconBuf!\n")); DBGPRINT_ERR("Failed to allocate memory - BeaconBuf!\n");
break; break;
} }
NdisZeroMemory(pBeaconBuf, MAX_BEACON_SIZE); NdisZeroMemory(pBeaconBuf, MAX_BEACON_SIZE);
Status = AdapterBlockAllocateMemory(handle, (void **) & pAd); Status = AdapterBlockAllocateMemory(handle, (void **) & pAd);
if (Status != NDIS_STATUS_SUCCESS) { if (Status != NDIS_STATUS_SUCCESS) {
DBGPRINT_ERR(("Failed to allocate memory - ADAPTER\n")); DBGPRINT_ERR("Failed to allocate memory - ADAPTER\n");
break; break;
} }
pAd->BeaconBuf = pBeaconBuf; pAd->BeaconBuf = pBeaconBuf;
...@@ -785,8 +785,7 @@ void NICReadEEPROMParameters(struct rt_rtmp_adapter *pAd, u8 *mac_addr) ...@@ -785,8 +785,7 @@ void NICReadEEPROMParameters(struct rt_rtmp_adapter *pAd, u8 *mac_addr)
Version.field.Version, Version.field.FaeReleaseNumber)); Version.field.Version, Version.field.FaeReleaseNumber));
if (Version.field.Version > VALID_EEPROM_VERSION) { if (Version.field.Version > VALID_EEPROM_VERSION) {
DBGPRINT_ERR(("E2PROM: WRONG VERSION 0x%x, should be %d\n", DBGPRINT_ERR("E2PROM: WRONG VERSION 0x%x, should be %d\n", Version.field.Version, VALID_EEPROM_VERSION);
Version.field.Version, VALID_EEPROM_VERSION));
/*pAd->SystemErrorBitmap |= 0x00000001; /*pAd->SystemErrorBitmap |= 0x00000001;
// hard-code default value when no proper E2PROM installed // hard-code default value when no proper E2PROM installed
...@@ -2911,7 +2910,7 @@ void RTMPSetTimer(struct rt_ralink_timer *pTimer, unsigned long Value) ...@@ -2911,7 +2910,7 @@ void RTMPSetTimer(struct rt_ralink_timer *pTimer, unsigned long Value)
RTMP_OS_Add_Timer(&pTimer->TimerObj, Value); RTMP_OS_Add_Timer(&pTimer->TimerObj, Value);
} }
} else { } else {
DBGPRINT_ERR(("RTMPSetTimer failed, Timer hasn't been initialize!\n")); DBGPRINT_ERR("RTMPSetTimer failed, Timer hasn't been initialize!\n");
} }
} }
...@@ -2947,7 +2946,7 @@ void RTMPModTimer(struct rt_ralink_timer *pTimer, unsigned long Value) ...@@ -2947,7 +2946,7 @@ void RTMPModTimer(struct rt_ralink_timer *pTimer, unsigned long Value)
RTMP_OS_Mod_Timer(&pTimer->TimerObj, Value); RTMP_OS_Mod_Timer(&pTimer->TimerObj, Value);
} }
} else { } else {
DBGPRINT_ERR(("RTMPModTimer failed, Timer hasn't been initialize!\n")); DBGPRINT_ERR("RTMPModTimer failed, Timer hasn't been initialize!\n");
} }
} }
...@@ -2989,7 +2988,7 @@ void RTMPCancelTimer(struct rt_ralink_timer *pTimer, OUT BOOLEAN * pCancelled) ...@@ -2989,7 +2988,7 @@ void RTMPCancelTimer(struct rt_ralink_timer *pTimer, OUT BOOLEAN * pCancelled)
RtmpTimerQRemove(pTimer->pAd, pTimer); RtmpTimerQRemove(pTimer->pAd, pTimer);
#endif /* RTMP_TIMER_TASK_SUPPORT // */ #endif /* RTMP_TIMER_TASK_SUPPORT // */
} else { } else {
DBGPRINT_ERR(("RTMPCancelTimer failed, Timer hasn't been initialize!\n")); DBGPRINT_ERR("RTMPCancelTimer failed, Timer hasn't been initialize!\n");
} }
} }
...@@ -3251,8 +3250,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd, ...@@ -3251,8 +3250,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd,
/* Load 8051 firmware */ /* Load 8051 firmware */
Status = NICLoadFirmware(pAd); Status = NICLoadFirmware(pAd);
if (Status != NDIS_STATUS_SUCCESS) { if (Status != NDIS_STATUS_SUCCESS) {
DBGPRINT_ERR(("NICLoadFirmware failed, Status[=0x%08x]\n", DBGPRINT_ERR("NICLoadFirmware failed, Status[=0x%08x]\n", Status);
Status));
goto err1; goto err1;
} }
...@@ -3268,8 +3266,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd, ...@@ -3268,8 +3266,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd,
Status = RTMPAllocTxRxRingMemory(pAd); Status = RTMPAllocTxRxRingMemory(pAd);
if (Status != NDIS_STATUS_SUCCESS) { if (Status != NDIS_STATUS_SUCCESS) {
DBGPRINT_ERR(("RTMPAllocDMAMemory failed, Status[=0x%08x]\n", DBGPRINT_ERR("RTMPAllocDMAMemory failed, Status[=0x%08x]\n", Status);
Status));
goto err1; goto err1;
} }
...@@ -3284,7 +3281,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd, ...@@ -3284,7 +3281,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd,
Status = MlmeInit(pAd); Status = MlmeInit(pAd);
if (Status != NDIS_STATUS_SUCCESS) { if (Status != NDIS_STATUS_SUCCESS) {
DBGPRINT_ERR(("MlmeInit failed, Status[=0x%08x]\n", Status)); DBGPRINT_ERR("MlmeInit failed, Status[=0x%08x]\n", Status);
goto err2; goto err2;
} }
/* Initialize pAd->StaCfg, pAd->ApCfg, pAd->CommonCfg to manufacture default */ /* Initialize pAd->StaCfg, pAd->ApCfg, pAd->CommonCfg to manufacture default */
...@@ -3309,8 +3306,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd, ...@@ -3309,8 +3306,7 @@ int rt28xx_init(struct rt_rtmp_adapter *pAd,
/* */ /* */
Status = NICInitializeAdapter(pAd, TRUE); Status = NICInitializeAdapter(pAd, TRUE);
if (Status != NDIS_STATUS_SUCCESS) { if (Status != NDIS_STATUS_SUCCESS) {
DBGPRINT_ERR(("NICInitializeAdapter failed, Status[=0x%08x]\n", DBGPRINT_ERR("NICInitializeAdapter failed, Status[=0x%08x]\n", Status);
Status));
if (Status != NDIS_STATUS_SUCCESS) if (Status != NDIS_STATUS_SUCCESS)
goto err3; goto err3;
} }
......
...@@ -267,7 +267,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd, ...@@ -267,7 +267,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd,
} while (i++ < 100); } while (i++ < 100);
if (i > 100) { if (i > 100) {
DBGPRINT_ERR(("H2M_MAILBOX still hold by MCU. command fail\n")); DBGPRINT_ERR("H2M_MAILBOX still hold by MCU. command fail\n");
return FALSE; return FALSE;
} }
...@@ -296,7 +296,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd, ...@@ -296,7 +296,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd,
#ifdef RTMP_MAC_PCI #ifdef RTMP_MAC_PCI
#endif /* RTMP_MAC_PCI // */ #endif /* RTMP_MAC_PCI // */
{ {
DBGPRINT_ERR(("H2M_MAILBOX still hold by MCU. command fail\n")); DBGPRINT_ERR("H2M_MAILBOX still hold by MCU. command fail\n");
} }
return FALSE; return FALSE;
} }
......
...@@ -1837,7 +1837,7 @@ static void PeerChSwAnnAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_ ...@@ -1837,7 +1837,7 @@ static void PeerChSwAnnAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_
} }
if (index >= pAd->ChannelListNum) { if (index >= pAd->ChannelListNum) {
DBGPRINT_ERR(("&&&&&&&&&&&&&&&&&&&&&&&&&&PeerChSwAnnAction(can not find New Channel=%d in ChannelList[%d]\n", pAd->CommonCfg.Channel, pAd->ChannelListNum)); DBGPRINT_ERR("&&&&&&&&&&&&&&&&&&&&&&&&&&PeerChSwAnnAction(can not find New Channel=%d in ChannelList[%d]\n", pAd->CommonCfg.Channel, pAd->ChannelListNum);
} }
} }
} }
......
...@@ -423,11 +423,7 @@ do{ \ ...@@ -423,11 +423,7 @@ do{ \
#define DBGPRINT(Level, Fmt) DBGPRINT_RAW(Level, Fmt) #define DBGPRINT(Level, Fmt) DBGPRINT_RAW(Level, Fmt)
#define DBGPRINT_ERR(Fmt) \ #define DBGPRINT_ERR(fmt, args...) printk(KERN_ERR fmt, ##args)
{ \
printk("ERROR! "); \
printk Fmt; \
}
#define DBGPRINT_S(Status, Fmt) \ #define DBGPRINT_S(Status, Fmt) \
{ \ { \
......
...@@ -1055,7 +1055,7 @@ void AssocPostProc(struct rt_rtmp_adapter *pAd, u8 *pAddr2, u16 CapabilityInfo, ...@@ -1055,7 +1055,7 @@ void AssocPostProc(struct rt_rtmp_adapter *pAd, u8 *pAddr2, u16 CapabilityInfo,
/* Set New WPA information */ /* Set New WPA information */
Idx = BssTableSearch(&pAd->ScanTab, pAddr2, pAd->MlmeAux.Channel); Idx = BssTableSearch(&pAd->ScanTab, pAddr2, pAd->MlmeAux.Channel);
if (Idx == BSS_NOT_FOUND) { if (Idx == BSS_NOT_FOUND) {
DBGPRINT_ERR(("ASSOC - Can't find BSS after receiving Assoc response\n")); DBGPRINT_ERR("ASSOC - Can't find BSS after receiving Assoc response\n");
} else { } else {
/* Init variable */ /* Init variable */
pAd->MacTab.Content[BSSID_WCID].RSNIE_Len = 0; pAd->MacTab.Content[BSSID_WCID].RSNIE_Len = 0;
......
...@@ -509,8 +509,7 @@ BOOLEAN AUTH_ReqSend(struct rt_rtmp_adapter *pAd, ...@@ -509,8 +509,7 @@ BOOLEAN AUTH_ReqSend(struct rt_rtmp_adapter *pAd,
RTMPSetTimer(pAuthTimer, Timeout); RTMPSetTimer(pAuthTimer, Timeout);
return TRUE; return TRUE;
} else { } else {
DBGPRINT_ERR(("%s - MlmeAuthReqAction() sanity check failed\n", DBGPRINT_ERR("%s - MlmeAuthReqAction() sanity check failed\n", pSMName);
pSMName));
return FALSE; return FALSE;
} }
......
...@@ -215,8 +215,7 @@ void MlmeCntlMachinePerformAction(struct rt_rtmp_adapter *pAd, ...@@ -215,8 +215,7 @@ void MlmeCntlMachinePerformAction(struct rt_rtmp_adapter *pAd,
break; break;
#endif /* RTMP_MAC_USB // */ #endif /* RTMP_MAC_USB // */
default: default:
DBGPRINT_ERR(("ERROR! CNTL - Illegal message type(=%ld)", DBGPRINT_ERR("ERROR! CNTL - Illegal message type(=%ld)", Elem->MsgType);
Elem->MsgType));
break; break;
} }
} }
......
...@@ -645,7 +645,7 @@ void STAHandleRxMgmtFrame(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk) ...@@ -645,7 +645,7 @@ void STAHandleRxMgmtFrame(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk)
/* First check the size, it MUST not exceed the mlme queue size */ /* First check the size, it MUST not exceed the mlme queue size */
if (pRxWI->MPDUtotalByteCount > MGMT_DMA_BUFFER_SIZE) { if (pRxWI->MPDUtotalByteCount > MGMT_DMA_BUFFER_SIZE) {
DBGPRINT_ERR(("STAHandleRxMgmtFrame: frame too large, size = %d \n", pRxWI->MPDUtotalByteCount)); DBGPRINT_ERR("STAHandleRxMgmtFrame: frame too large, size = %d \n", pRxWI->MPDUtotalByteCount);
break; break;
} }
......
...@@ -284,7 +284,7 @@ void MlmeScanReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *E ...@@ -284,7 +284,7 @@ void MlmeScanReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *E
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - BBP R4 to 20MHz.l\n")); DBGPRINT(RT_DEBUG_TRACE, ("SYNC - BBP R4 to 20MHz.l\n"));
ScanNextChannel(pAd); ScanNextChannel(pAd);
} else { } else {
DBGPRINT_ERR(("SYNC - MlmeScanReqAction() sanity check fail\n")); DBGPRINT_ERR("SYNC - MlmeScanReqAction() sanity check fail\n");
pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE; pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE;
Status = MLME_INVALID_FORMAT; Status = MLME_INVALID_FORMAT;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_SCAN_CONF, 2, 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,7 +536,7 @@ void MlmeStartReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_START_CONF, 2, MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_START_CONF, 2,
&Status); &Status);
} else { } else {
DBGPRINT_ERR(("SYNC - MlmeStartReqAction() sanity check fail.\n")); DBGPRINT_ERR("SYNC - MlmeStartReqAction() sanity check fail.\n");
pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE; pAd->Mlme.SyncMachine.CurrState = SYNC_IDLE;
Status = MLME_INVALID_FORMAT; Status = MLME_INVALID_FORMAT;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_START_CONF, 2, 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,7 +1208,7 @@ void PeerBeacon(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem)
} }
if (index >= pAd->ChannelListNum) { if (index >= pAd->ChannelListNum) {
DBGPRINT_ERR(("PeerBeacon(can not find New Channel=%d in ChannelList[%d]\n", pAd->CommonCfg.Channel, pAd->ChannelListNum)); DBGPRINT_ERR("PeerBeacon(can not find New Channel=%d in ChannelList[%d]\n", pAd->CommonCfg.Channel, pAd->ChannelListNum);
} }
} }
/* if the ssid matched & bssid unmatched, we should select the bssid with large value. */ /* if the ssid matched & bssid unmatched, we should select the bssid with large value. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment