Commit 6e1b4e24 authored by Andres More's avatar Andres More Committed by Greg Kroah-Hartman

Staging: vt6656: code cleanup, resolved sparse finding

Cleared sparse warning 'Using plain integer as NULL pointer'
Signed-off-by: default avatarAndres More <more.andres@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6f8c13c7
...@@ -958,12 +958,12 @@ s_vMgrRxAssocResponse( ...@@ -958,12 +958,12 @@ s_vMgrRxAssocResponse(
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
// decode the frame // decode the frame
vMgrDecodeAssocResponse(&sFrame); vMgrDecodeAssocResponse(&sFrame);
if ((sFrame.pwCapInfo == 0) || if ((sFrame.pwCapInfo == NULL)
(sFrame.pwStatus == 0) || || (sFrame.pwStatus == NULL)
(sFrame.pwAid == 0) || || (sFrame.pwAid == NULL)
(sFrame.pSuppRates == 0)){ || (sFrame.pSuppRates == NULL)) {
DBG_PORT80(0xCC); DBG_PORT80(0xCC);
return; return;
}; };
pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.Capabilities = *(sFrame.pwCapInfo); pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.Capabilities = *(sFrame.pwCapInfo);
...@@ -1871,14 +1871,14 @@ s_vMgrRxBeacon( ...@@ -1871,14 +1871,14 @@ s_vMgrRxBeacon(
// decode the beacon frame // decode the beacon frame
vMgrDecodeBeacon(&sFrame); vMgrDecodeBeacon(&sFrame);
if ((sFrame.pwBeaconInterval == 0) || if ((sFrame.pwBeaconInterval == NULL)
(sFrame.pwCapInfo == 0) || || (sFrame.pwCapInfo == NULL)
(sFrame.pSSID == 0) || || (sFrame.pSSID == NULL)
(sFrame.pSuppRates == 0) ) { || (sFrame.pSuppRates == NULL)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n");
return;
};
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n");
return;
};
if( byCurrChannel > CB_MAX_CHANNEL_24G ) if( byCurrChannel > CB_MAX_CHANNEL_24G )
{ {
...@@ -2152,9 +2152,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ...@@ -2152,9 +2152,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
if (bTSFLargeDiff) if (bTSFLargeDiff)
bUpdateTSF = TRUE; bUpdateTSF = TRUE;
if ((pDevice->bEnablePSMode == TRUE) &&(sFrame.pTIM != 0)) { if ((pDevice->bEnablePSMode == TRUE) && (sFrame.pTIM)) {
// deal with DTIM, analysis TIM /* deal with DTIM, analysis TIM */
pMgmt->bMulticastTIM = WLAN_MGMT_IS_MULTICAST_TIM(sFrame.pTIM->byBitMapCtl) ? TRUE : FALSE ; pMgmt->bMulticastTIM = WLAN_MGMT_IS_MULTICAST_TIM(sFrame.pTIM->byBitMapCtl) ? TRUE : FALSE ;
pMgmt->byDTIMCount = sFrame.pTIM->byDTIMCount; pMgmt->byDTIMCount = sFrame.pTIM->byDTIMCount;
pMgmt->byDTIMPeriod = sFrame.pTIM->byDTIMPeriod; pMgmt->byDTIMPeriod = sFrame.pTIM->byDTIMPeriod;
...@@ -4246,14 +4246,16 @@ s_vMgrRxProbeResponse( ...@@ -4246,14 +4246,16 @@ s_vMgrRxProbeResponse(
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
vMgrDecodeProbeResponse(&sFrame); vMgrDecodeProbeResponse(&sFrame);
if ((sFrame.pqwTimestamp == 0) || if ((sFrame.pqwTimestamp == NULL)
(sFrame.pwBeaconInterval == 0) || || (sFrame.pwBeaconInterval == NULL)
(sFrame.pwCapInfo == 0) || || (sFrame.pwCapInfo == NULL)
(sFrame.pSSID == 0) || || (sFrame.pSSID == NULL)
(sFrame.pSuppRates == 0)) { || (sFrame.pSuppRates == NULL)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe resp:Fail addr:[%p] \n", pRxPacket->p80211Header);
DBG_PORT80(0xCC); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe resp:Fail addr:[%p]\n",
return; pRxPacket->p80211Header);
DBG_PORT80(0xCC);
return;
}; };
if(sFrame.pSSID->len == 0) if(sFrame.pSSID->len == 0)
...@@ -4263,22 +4265,23 @@ s_vMgrRxProbeResponse( ...@@ -4263,22 +4265,23 @@ s_vMgrRxProbeResponse(
//{{ RobertYu:20050201, 11a byCurrChannel != sFrame.pDSParms->byCurrChannel mapping //{{ RobertYu:20050201, 11a byCurrChannel != sFrame.pDSParms->byCurrChannel mapping
if( byCurrChannel > CB_MAX_CHANNEL_24G ) if( byCurrChannel > CB_MAX_CHANNEL_24G )
{ {
if (sFrame.pDSParms != 0) { if (sFrame.pDSParms) {
if (byCurrChannel == RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1]) if (byCurrChannel ==
bChannelHit = TRUE; RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1])
byCurrChannel = RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1]; bChannelHit = TRUE;
byCurrChannel =
RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1];
} else { } else {
bChannelHit = TRUE; bChannelHit = TRUE;
} }
} else { } else {
if (sFrame.pDSParms != 0) { if (sFrame.pDSParms) {
if (byCurrChannel == sFrame.pDSParms->byCurrChannel) if (byCurrChannel == sFrame.pDSParms->byCurrChannel)
bChannelHit = TRUE; bChannelHit = TRUE;
byCurrChannel = sFrame.pDSParms->byCurrChannel; byCurrChannel = sFrame.pDSParms->byCurrChannel;
} else { } else {
bChannelHit = TRUE; bChannelHit = TRUE;
} }
} }
//RobertYu:20050201 //RobertYu:20050201
...@@ -4286,7 +4289,7 @@ s_vMgrRxProbeResponse( ...@@ -4286,7 +4289,7 @@ s_vMgrRxProbeResponse(
if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
return; return;
if (sFrame.pERP != NULL) { if (sFrame.pERP) {
sERP.byERP = sFrame.pERP->byContext; sERP.byERP = sFrame.pERP->byContext;
sERP.bERPExist = TRUE; sERP.bERPExist = TRUE;
} else { } else {
......
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