Commit 9fc86028 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging: Remove unnecessary semicolons when if (foo) {...};

Done via perl script:

$ cat remove_semi_if.pl
my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
my $match_balanced_braces      = qr/(\{(?:[^\{\}]++|(?-1))*\})/;

foreach my $file (@ARGV) {
    my $f;
    my $text;
    my $oldtext;

    next if ((-d $file));

    open($f, '<', $file)
	or die "$P: Can't open $file for read\n";
    $oldtext = do { local($/) ; <$f> };
    close($f);

    next if ($oldtext eq "");

    $text = $oldtext;

    my $count = 0;
    do {
	$count = 0;
	$count += $text =~ s@\b(if\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
    } while ($count > 0);

    if ($text ne $oldtext) {
	my $newfile = $file;

	open($f, '>', $newfile)
	    or die "$P: Can't open $newfile for write\n";
	print $f $text;
	close($f);
    }
}

$
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 60b0fa1a
...@@ -203,7 +203,7 @@ int sst_create_large_msg(struct ipc_post **arg) ...@@ -203,7 +203,7 @@ int sst_create_large_msg(struct ipc_post **arg)
kfree(msg); kfree(msg);
pr_err("kzalloc mailbox_data failed"); pr_err("kzalloc mailbox_data failed");
return -ENOMEM; return -ENOMEM;
}; }
*arg = msg; *arg = msg;
return 0; return 0;
} }
......
...@@ -1289,7 +1289,7 @@ CARDbRadioPowerOn(pDevice); ...@@ -1289,7 +1289,7 @@ CARDbRadioPowerOn(pDevice);
memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
netif_rx(pDevice->skb); netif_rx(pDevice->skb);
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
}; }
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == true) // if(pDevice->bWPASuppWextEnabled == true)
{ {
...@@ -1489,7 +1489,7 @@ BSSvUpdateNodeTxCounter( ...@@ -1489,7 +1489,7 @@ BSSvUpdateNodeTxCounter(
} }
} }
} }
}; }
if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) || if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) ||
(pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) { (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) {
...@@ -1543,9 +1543,9 @@ BSSvUpdateNodeTxCounter( ...@@ -1543,9 +1543,9 @@ BSSvUpdateNodeTxCounter(
} }
} }
} }
}; }
} }
}; }
return; return;
......
...@@ -900,7 +900,7 @@ static bool device_release_WPADEV(PSDevice pDevice) ...@@ -900,7 +900,7 @@ static bool device_release_WPADEV(PSDevice pDevice)
if(ii>20) if(ii>20)
break; break;
} }
}; }
return true; return true;
} }
...@@ -1446,7 +1446,7 @@ static void device_init_defrag_cb(PSDevice pDevice) { ...@@ -1446,7 +1446,7 @@ static void device_init_defrag_cb(PSDevice pDevice) {
if (!device_alloc_frag_buf(pDevice, pDeF)) { if (!device_alloc_frag_buf(pDevice, pDeF)) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n", DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n",
pDevice->dev->name); pDevice->dev->name);
}; }
} }
pDevice->cbDFCB = CB_MAX_RX_FRAG; pDevice->cbDFCB = CB_MAX_RX_FRAG;
pDevice->cbFreeDFCB = pDevice->cbDFCB; pDevice->cbFreeDFCB = pDevice->cbDFCB;
...@@ -2104,7 +2104,7 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) { ...@@ -2104,7 +2104,7 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
return 0; return 0;
}; }
cbMPDULen = skb->len; cbMPDULen = skb->len;
pbMPDU = skb->data; pbMPDU = skb->data;
...@@ -2136,7 +2136,7 @@ bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI ...@@ -2136,7 +2136,7 @@ bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
if (pDevice->bStopTx0Pkt == true) { if (pDevice->bStopTx0Pkt == true) {
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
return false; return false;
}; }
if (AVAIL_TD(pDevice, TYPE_TXDMA0) <= 0) { if (AVAIL_TD(pDevice, TYPE_TXDMA0) <= 0) {
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
...@@ -2865,7 +2865,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { ...@@ -2865,7 +2865,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
pDevice->bBeaconSent = false; pDevice->bBeaconSent = false;
if (pDevice->bEnablePSMode) { if (pDevice->bEnablePSMode) {
PSbIsNextTBTTWakeUp((void *)pDevice); PSbIsNextTBTTWakeUp((void *)pDevice);
}; }
if ((pDevice->eOPMode == OP_MODE_AP) || if ((pDevice->eOPMode == OP_MODE_AP) ||
(pDevice->eOPMode == OP_MODE_ADHOC)) { (pDevice->eOPMode == OP_MODE_ADHOC)) {
...@@ -2876,7 +2876,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { ...@@ -2876,7 +2876,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if (pDevice->eOPMode == OP_MODE_ADHOC && pDevice->pMgmt->wCurrATIMWindow > 0) { if (pDevice->eOPMode == OP_MODE_ADHOC && pDevice->pMgmt->wCurrATIMWindow > 0) {
// todo adhoc PS mode // todo adhoc PS mode
}; }
} }
...@@ -2885,7 +2885,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { ...@@ -2885,7 +2885,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if (pDevice->eOPMode == OP_MODE_ADHOC) { if (pDevice->eOPMode == OP_MODE_ADHOC) {
pDevice->bIsBeaconBufReadySet = false; pDevice->bIsBeaconBufReadySet = false;
pDevice->cbBeaconBufReadySetCnt = 0; pDevice->cbBeaconBufReadySetCnt = 0;
}; }
if (pDevice->eOPMode == OP_MODE_AP) { if (pDevice->eOPMode == OP_MODE_AP) {
if(pMgmt->byDTIMCount > 0) { if(pMgmt->byDTIMCount > 0) {
......
...@@ -700,7 +700,7 @@ device_receive_frame ( ...@@ -700,7 +700,7 @@ device_receive_frame (
pDevice->pMgmt->bInTIMWake = false; pDevice->pMgmt->bInTIMWake = false;
} }
} }
}; }
// Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps // Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps
if (pDevice->bDiversityEnable && (FrameSize>50) && if (pDevice->bDiversityEnable && (FrameSize>50) &&
...@@ -884,7 +884,7 @@ device_receive_frame ( ...@@ -884,7 +884,7 @@ device_receive_frame (
memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
netif_rx(pDevice->skb); netif_rx(pDevice->skb);
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
}; }
return false; return false;
...@@ -1049,7 +1049,7 @@ static bool s_bAPModeRxCtl ( ...@@ -1049,7 +1049,7 @@ static bool s_bAPModeRxCtl (
); );
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n");
return true; return true;
}; }
if (pMgmt->sNodeDBTable[iSANodeIndex].eNodeState < NODE_ASSOC) { if (pMgmt->sNodeDBTable[iSANodeIndex].eNodeState < NODE_ASSOC) {
// send deassoc notification // send deassoc notification
// reason = (7) class 3 received from nonassoc sta // reason = (7) class 3 received from nonassoc sta
...@@ -1061,7 +1061,7 @@ static bool s_bAPModeRxCtl ( ...@@ -1061,7 +1061,7 @@ static bool s_bAPModeRxCtl (
); );
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n");
return true; return true;
}; }
if (pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable) { if (pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable) {
// delcare received ps-poll event // delcare received ps-poll event
...@@ -1486,7 +1486,7 @@ static bool s_bAPModeRxData ( ...@@ -1486,7 +1486,7 @@ static bool s_bAPModeRxData (
bRelayOnly = true; bRelayOnly = true;
} }
} }
}; }
} }
if (bRelayOnly || bRelayAndForward) { if (bRelayOnly || bRelayAndForward) {
......
...@@ -91,7 +91,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -91,7 +91,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sScanCmd, pReq->data, sizeof(SCmdScan))) { if (copy_from_user(&sScanCmd, pReq->data, sizeof(SCmdScan))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pItemSSID = (PWLAN_IE_SSID)sScanCmd.ssid; pItemSSID = (PWLAN_IE_SSID)sScanCmd.ssid;
if (pItemSSID->len != 0) { if (pItemSSID->len != 0) {
...@@ -128,7 +128,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -128,7 +128,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sZoneTypeCmd, pReq->data, sizeof(SCmdZoneTypeSet))) { if (copy_from_user(&sZoneTypeCmd, pReq->data, sizeof(SCmdZoneTypeSet))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if(sZoneTypeCmd.bWrite==true) { if(sZoneTypeCmd.bWrite==true) {
//////write zonetype //////write zonetype
...@@ -167,7 +167,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -167,7 +167,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sZoneTypeCmd, sizeof(SCmdZoneTypeSet))) { if (copy_to_user(pReq->data, &sZoneTypeCmd, sizeof(SCmdZoneTypeSet))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
} }
break; break;
...@@ -186,7 +186,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -186,7 +186,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sJoinCmd, pReq->data, sizeof(SCmdBSSJoin))) { if (copy_from_user(&sJoinCmd, pReq->data, sizeof(SCmdBSSJoin))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pItemSSID = (PWLAN_IE_SSID)sJoinCmd.ssid; pItemSSID = (PWLAN_IE_SSID)sJoinCmd.ssid;
memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
...@@ -234,7 +234,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -234,7 +234,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) { if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sWEPCmd.bEnableWep != true) { if (sWEPCmd.bEnableWep != true) {
pDevice->bEncryptionEnable = false; pDevice->bEncryptionEnable = false;
pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
...@@ -300,7 +300,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -300,7 +300,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sLinkStatus, sizeof(SCmdLinkStatus))) { if (copy_to_user(pReq->data, &sLinkStatus, sizeof(SCmdLinkStatus))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
break; break;
...@@ -317,7 +317,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -317,7 +317,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sList, sizeof(SBSSIDList))) { if (copy_to_user(pReq->data, &sList, sizeof(SBSSIDList))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pReq->wResult = 0; pReq->wResult = 0;
break; break;
...@@ -325,7 +325,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -325,7 +325,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sList, pReq->data, sizeof(SBSSIDList))) { if (copy_from_user(&sList, pReq->data, sizeof(SBSSIDList))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pList = (PSBSSIDList)kmalloc(sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)), (int)GFP_ATOMIC); pList = (PSBSSIDList)kmalloc(sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)), (int)GFP_ATOMIC);
if (pList == NULL) { if (pList == NULL) {
result = -ENOMEM; result = -ENOMEM;
...@@ -367,7 +367,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -367,7 +367,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, pList, sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)))) { if (copy_to_user(pReq->data, pList, sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
kfree(pList); kfree(pList);
pReq->wResult = 0; pReq->wResult = 0;
break; break;
...@@ -376,14 +376,14 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -376,14 +376,14 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &(pDevice->s802_11Counter), sizeof(SDot11MIBCount))) { if (copy_to_user(pReq->data, &(pDevice->s802_11Counter), sizeof(SDot11MIBCount))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
break; break;
case WLAN_CMD_GET_STAT: case WLAN_CMD_GET_STAT:
if (copy_to_user(pReq->data, &(pDevice->scStatistic), sizeof(SStatCounter))) { if (copy_to_user(pReq->data, &(pDevice->scStatistic), sizeof(SStatCounter))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
break; break;
case WLAN_CMD_STOP_MAC: case WLAN_CMD_STOP_MAC:
...@@ -427,7 +427,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -427,7 +427,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sValue.dwValue == 1) { if (sValue.dwValue == 1) {
if (vt6655_hostap_set_hostapd(pDevice, 1, 1) == 0){ if (vt6655_hostap_set_hostapd(pDevice, 1, 1) == 0){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HOSTAP\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HOSTAP\n");
...@@ -455,7 +455,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -455,7 +455,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sValue.dwValue == 1) { if (sValue.dwValue == 1) {
pDevice->bEnable8021x = true; pDevice->bEnable8021x = true;
...@@ -475,7 +475,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -475,7 +475,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sValue.dwValue == 1) { if (sValue.dwValue == 1) {
pDevice->bEnableHostWEP = true; pDevice->bEnableHostWEP = true;
...@@ -494,7 +494,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -494,7 +494,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sValue.dwValue == 1) { if (sValue.dwValue == 1) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n");
memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, ETH_ALEN); memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, ETH_ALEN);
...@@ -519,7 +519,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -519,7 +519,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sStartAPCmd, pReq->data, sizeof(SCmdStartAP))) { if (copy_from_user(&sStartAPCmd, pReq->data, sizeof(SCmdStartAP))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sStartAPCmd.wBSSType == AP) { if (sStartAPCmd.wBSSType == AP) {
pMgmt->eConfigMode = WMAC_CONFIG_AP; pMgmt->eConfigMode = WMAC_CONFIG_AP;
...@@ -612,7 +612,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -612,7 +612,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sNodeList, sizeof(SNodeList))) { if (copy_to_user(pReq->data, &sNodeList, sizeof(SNodeList))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pReq->wResult = 0; pReq->wResult = 0;
break; break;
...@@ -621,7 +621,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -621,7 +621,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sNodeList, pReq->data, sizeof(SNodeList))) { if (copy_from_user(&sNodeList, pReq->data, sizeof(SNodeList))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pNodeList = (PSNodeList)kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC); pNodeList = (PSNodeList)kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
if (pNodeList == NULL) { if (pNodeList == NULL) {
result = -ENOMEM; result = -ENOMEM;
...@@ -661,7 +661,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -661,7 +661,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) { if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
kfree(pNodeList); kfree(pNodeList);
pReq->wResult = 0; pReq->wResult = 0;
break; break;
......
...@@ -221,7 +221,7 @@ PSbConsiderPowerDown( ...@@ -221,7 +221,7 @@ PSbConsiderPowerDown(
((pDevice->dwIsr& ISR_RXDMA0) != 0) && ((pDevice->dwIsr& ISR_RXDMA0) != 0) &&
((pDevice->dwIsr & ISR_RXDMA1) != 0)){ ((pDevice->dwIsr & ISR_RXDMA1) != 0)){
return false; return false;
}; }
if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
if (bCheckCountToWakeUp && if (bCheckCountToWakeUp &&
......
...@@ -2902,13 +2902,13 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un ...@@ -2902,13 +2902,13 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
if (pDevice->bEnableHostWEP) { if (pDevice->bEnableHostWEP) {
uNodeIndex = 0; uNodeIndex = 0;
bNodeExist = true; bNodeExist = true;
}; }
} }
else { else {
if (pDevice->bEnableHostWEP) { if (pDevice->bEnableHostWEP) {
if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, (unsigned char *)(p80211Header->sA3.abyAddr1), &uNodeIndex)) if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, (unsigned char *)(p80211Header->sA3.abyAddr1), &uNodeIndex))
bNodeExist = true; bNodeExist = true;
}; }
bNeedACK = true; bNeedACK = true;
pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
}; };
......
...@@ -385,7 +385,7 @@ vCommandTimer ( ...@@ -385,7 +385,7 @@ vCommandTimer (
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
vCommandTimerWait((void *)pDevice, 10); vCommandTimerWait((void *)pDevice, 10);
return; return;
}; }
if (pMgmt->uScanChannel == 0 ) { if (pMgmt->uScanChannel == 0 ) {
pMgmt->uScanChannel = pDevice->byMinChannel; pMgmt->uScanChannel = pDevice->byMinChannel;
...@@ -519,7 +519,7 @@ vCommandTimer ( ...@@ -519,7 +519,7 @@ vCommandTimer (
vCommandTimerWait((void *)pDevice, 10); vCommandTimerWait((void *)pDevice, 10);
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
return; return;
}; }
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" CARDbRadioPowerOff\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" CARDbRadioPowerOff\n");
//2008-09-02 <mark> by chester //2008-09-02 <mark> by chester
// CARDbRadioPowerOff(pDevice); // CARDbRadioPowerOff(pDevice);
...@@ -532,7 +532,7 @@ vCommandTimer ( ...@@ -532,7 +532,7 @@ vCommandTimer (
vCommandTimerWait((void *)pDevice, 10); vCommandTimerWait((void *)pDevice, 10);
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
return; return;
}; }
//2008-09-02 <mark> by chester //2008-09-02 <mark> by chester
// CARDbRadioPowerOff(pDevice); // CARDbRadioPowerOff(pDevice);
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
...@@ -619,7 +619,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS ...@@ -619,7 +619,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
vMgrCreateOwnIBSS((void *)pDevice, &Status); vMgrCreateOwnIBSS((void *)pDevice, &Status);
if (Status != CMD_STATUS_SUCCESS){ if (Status != CMD_STATUS_SUCCESS){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " WLAN_CMD_IBSS_CREATE fail ! \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " WLAN_CMD_IBSS_CREATE fail ! \n");
}; }
BSSvAddMulticastNode(pDevice); BSSvAddMulticastNode(pDevice);
} }
} }
...@@ -631,7 +631,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS ...@@ -631,7 +631,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
vMgrCreateOwnIBSS((void *)pDevice, &Status); vMgrCreateOwnIBSS((void *)pDevice, &Status);
if (Status != CMD_STATUS_SUCCESS){ if (Status != CMD_STATUS_SUCCESS){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_IBSS_CREATE fail ! \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_IBSS_CREATE fail ! \n");
}; }
BSSvAddMulticastNode(pDevice); BSSvAddMulticastNode(pDevice);
if (netif_queue_stopped(pDevice->dev)){ if (netif_queue_stopped(pDevice->dev)){
netif_wake_queue(pDevice->dev); netif_wake_queue(pDevice->dev);
...@@ -783,7 +783,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS ...@@ -783,7 +783,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
vMgrCreateOwnIBSS((void *)pDevice, &Status); vMgrCreateOwnIBSS((void *)pDevice, &Status);
if (Status != CMD_STATUS_SUCCESS){ if (Status != CMD_STATUS_SUCCESS){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " vMgrCreateOwnIBSS fail ! \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " vMgrCreateOwnIBSS fail ! \n");
}; }
// alway turn off unicast bit // alway turn off unicast bit
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_UNICAST); MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_UNICAST);
pDevice->byRxMode &= ~RCR_UNICAST; pDevice->byRxMode &= ~RCR_UNICAST;
...@@ -814,7 +814,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS ...@@ -814,7 +814,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
} }
pMgmt->sNodeDBTable[0].wEnQueueCnt--; pMgmt->sNodeDBTable[0].wEnQueueCnt--;
} }
}; }
// PS nodes tx // PS nodes tx
for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) { for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) {
......
...@@ -661,7 +661,7 @@ vMgrDisassocBeginSta( ...@@ -661,7 +661,7 @@ vMgrDisassocBeginSta(
if (*pStatus == CMD_STATUS_PENDING) { if (*pStatus == CMD_STATUS_PENDING) {
pMgmt->eCurrState = WMAC_STATE_IDLE; pMgmt->eCurrState = WMAC_STATE_IDLE;
*pStatus = CMD_STATUS_SUCCESS; *pStatus = CMD_STATUS_SUCCESS;
}; }
return; return;
} }
...@@ -1019,7 +1019,7 @@ s_vMgrRxAssocResponse( ...@@ -1019,7 +1019,7 @@ s_vMgrRxAssocResponse(
(sFrame.pSuppRates == 0)){ (sFrame.pSuppRates == 0)){
DBG_PORT80(0xCC); DBG_PORT80(0xCC);
return; return;
}; }
pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.Capabilities = *(sFrame.pwCapInfo); pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.Capabilities = *(sFrame.pwCapInfo);
pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.StatusCode = *(sFrame.pwStatus); pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.StatusCode = *(sFrame.pwStatus);
...@@ -1039,7 +1039,7 @@ s_vMgrRxAssocResponse( ...@@ -1039,7 +1039,7 @@ s_vMgrRxAssocResponse(
if ( (pMgmt->wCurrAID >> 14) != (BIT0 | BIT1) ) if ( (pMgmt->wCurrAID >> 14) != (BIT0 | BIT1) )
{ {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "AID from AP, has two msb clear.\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "AID from AP, has two msb clear.\n");
}; }
DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Association Successful, AID=%d.\n", pMgmt->wCurrAID & ~(BIT14|BIT15)); DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Association Successful, AID=%d.\n", pMgmt->wCurrAID & ~(BIT14|BIT15));
pMgmt->eCurrState = WMAC_STATE_ASSOC; pMgmt->eCurrState = WMAC_STATE_ASSOC;
BSSvUpdateAPNode((void *)pDevice, sFrame.pwCapInfo, sFrame.pSuppRates, sFrame.pExtSuppRates); BSSvUpdateAPNode((void *)pDevice, sFrame.pwCapInfo, sFrame.pSuppRates, sFrame.pExtSuppRates);
...@@ -1692,7 +1692,7 @@ s_vMgrRxDisassociation( ...@@ -1692,7 +1692,7 @@ s_vMgrRxDisassociation(
//try to send associate packet again because of inactivity timeout //try to send associate packet again because of inactivity timeout
// if (pMgmt->eCurrState == WMAC_STATE_ASSOC) { // if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
// vMgrReAssocBeginSta((PSDevice)pDevice, pMgmt, &CmdStatus); // vMgrReAssocBeginSta((PSDevice)pDevice, pMgmt, &CmdStatus);
// }; // }
if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
wpahdr = (viawget_wpa_header *)pDevice->skb->data; wpahdr = (viawget_wpa_header *)pDevice->skb->data;
wpahdr->type = VIAWGET_DISASSOC_MSG; wpahdr->type = VIAWGET_DISASSOC_MSG;
...@@ -1707,7 +1707,7 @@ s_vMgrRxDisassociation( ...@@ -1707,7 +1707,7 @@ s_vMgrRxDisassociation(
memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
netif_rx(pDevice->skb); netif_rx(pDevice->skb);
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
}; }
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == true) // if(pDevice->bWPASuppWextEnabled == true)
...@@ -1778,7 +1778,7 @@ s_vMgrRxDeauthentication( ...@@ -1778,7 +1778,7 @@ s_vMgrRxDeauthentication(
netif_stop_queue(pDevice->dev); netif_stop_queue(pDevice->dev);
pDevice->bLinkPass = false; pDevice->bLinkPass = false;
} }
}; }
if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
wpahdr = (viawget_wpa_header *)pDevice->skb->data; wpahdr = (viawget_wpa_header *)pDevice->skb->data;
...@@ -1793,7 +1793,7 @@ s_vMgrRxDeauthentication( ...@@ -1793,7 +1793,7 @@ s_vMgrRxDeauthentication(
memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
netif_rx(pDevice->skb); netif_rx(pDevice->skb);
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
}; }
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == true) // if(pDevice->bWPASuppWextEnabled == true)
...@@ -1912,7 +1912,7 @@ s_vMgrRxBeacon( ...@@ -1912,7 +1912,7 @@ s_vMgrRxBeacon(
(sFrame.pSuppRates == 0) ) { (sFrame.pSuppRates == 0) ) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n");
return; return;
}; }
if (sFrame.pDSParms != NULL) { if (sFrame.pDSParms != NULL) {
...@@ -2054,7 +2054,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) ...@@ -2054,7 +2054,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
sFrame.pSSID->len sFrame.pSSID->len
) == 0) { ) == 0) {
bIsSSIDEqual = true; bIsSSIDEqual = true;
}; }
} }
if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== true) && if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== true) &&
...@@ -2138,8 +2138,8 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) ...@@ -2138,8 +2138,8 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
if (WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)) { if (WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)) {
if (sFrame.pCFParms->wCFPDurRemaining > 0) { if (sFrame.pCFParms->wCFPDurRemaining > 0) {
// TODO: deal with CFP period to set NAV // TODO: deal with CFP period to set NAV
}; }
}; }
HIDWORD(qwTimestamp) = cpu_to_le32(HIDWORD(*sFrame.pqwTimestamp)); HIDWORD(qwTimestamp) = cpu_to_le32(HIDWORD(*sFrame.pqwTimestamp));
LODWORD(qwTimestamp) = cpu_to_le32(LODWORD(*sFrame.pqwTimestamp)); LODWORD(qwTimestamp) = cpu_to_le32(LODWORD(*sFrame.pqwTimestamp));
...@@ -2160,7 +2160,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) ...@@ -2160,7 +2160,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
} }
else if (HIDWORD(qwTimestamp) < HIDWORD(qwLocalTSF)) { else if (HIDWORD(qwTimestamp) < HIDWORD(qwLocalTSF)) {
bTSFOffsetPostive = false; bTSFOffsetPostive = false;
}; }
if (bTSFOffsetPostive) { if (bTSFOffsetPostive) {
qwTSFOffset = CARDqGetTSFOffset(pRxPacket->byRxRate, (qwTimestamp), (qwLocalTSF)); qwTSFOffset = CARDqGetTSFOffset(pRxPacket->byRxRate, (qwTimestamp), (qwLocalTSF));
...@@ -2218,7 +2218,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) ...@@ -2218,7 +2218,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
if (pMgmt->bInTIM) { if (pMgmt->bInTIM) {
PSvSendPSPOLL((PSDevice)pDevice); PSvSendPSPOLL((PSDevice)pDevice);
// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:PS-POLL sent..\n"); // DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:PS-POLL sent..\n");
}; }
} }
else { else {
...@@ -2231,7 +2231,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) ...@@ -2231,7 +2231,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
} }
if(PSbConsiderPowerDown(pDevice, false, false)) { if(PSbConsiderPowerDown(pDevice, false, false)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n");
}; }
} }
} }
...@@ -2316,7 +2316,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) ...@@ -2316,7 +2316,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
pMgmt->sNodeDBTable[0].bActive = true; pMgmt->sNodeDBTable[0].bActive = true;
pMgmt->sNodeDBTable[0].uInActiveCount = 0; pMgmt->sNodeDBTable[0].uInActiveCount = 0;
}; }
} }
else if (bIsSSIDEqual) { else if (bIsSSIDEqual) {
...@@ -2356,9 +2356,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) ...@@ -2356,9 +2356,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
// Prepare beacon frame // Prepare beacon frame
bMgrPrepareBeaconToSend((void *)pDevice, pMgmt); bMgrPrepareBeaconToSend((void *)pDevice, pMgmt);
// } // }
}; }
} }
}; }
// endian issue ??? // endian issue ???
// Update TSF // Update TSF
if (bUpdateTSF) { if (bUpdateTSF) {
...@@ -2590,7 +2590,7 @@ vMgrCreateOwnIBSS( ...@@ -2590,7 +2590,7 @@ vMgrCreateOwnIBSS(
pMgmt->byCSSPK = KEY_CTL_WEP; pMgmt->byCSSPK = KEY_CTL_WEP;
pMgmt->byCSSGK = KEY_CTL_WEP; pMgmt->byCSSGK = KEY_CTL_WEP;
} }
}; }
pMgmt->byERPContext = 0; pMgmt->byERPContext = 0;
...@@ -2683,7 +2683,7 @@ vMgrJoinBSSBegin( ...@@ -2683,7 +2683,7 @@ vMgrJoinBSSBegin(
*pStatus = CMD_STATUS_RESOURCES; *pStatus = CMD_STATUS_RESOURCES;
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "BSS finding:BSS list is empty.\n"); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "BSS finding:BSS list is empty.\n");
return; return;
}; }
// memset(pMgmt->abyDesireBSSID, 0, WLAN_BSSID_LEN); // memset(pMgmt->abyDesireBSSID, 0, WLAN_BSSID_LEN);
// Search known BSS list for prefer BSSID or SSID // Search known BSS list for prefer BSSID or SSID
...@@ -2699,7 +2699,7 @@ vMgrJoinBSSBegin( ...@@ -2699,7 +2699,7 @@ vMgrJoinBSSBegin(
pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Scanning [%s] not found, disconnected !\n", pItemSSID->abySSID); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Scanning [%s] not found, disconnected !\n", pItemSSID->abySSID);
return; return;
}; }
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP(BSS) finding:Found a AP(BSS)..\n"); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP(BSS) finding:Found a AP(BSS)..\n");
if (WLAN_GET_CAP_INFO_ESS(cpu_to_le16(pCurr->wCapInfo))){ if (WLAN_GET_CAP_INFO_ESS(cpu_to_le16(pCurr->wCapInfo))){
...@@ -4343,7 +4343,7 @@ s_vMgrRxProbeResponse( ...@@ -4343,7 +4343,7 @@ s_vMgrRxProbeResponse(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe resp:Fail addr:[%p] \n", pRxPacket->p80211Header); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe resp:Fail addr:[%p] \n", pRxPacket->p80211Header);
DBG_PORT80(0xCC); DBG_PORT80(0xCC);
return; return;
}; }
if(sFrame.pSSID->len == 0) if(sFrame.pSSID->len == 0)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx Probe resp: SSID len = 0 \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx Probe resp: SSID len = 0 \n");
...@@ -4625,7 +4625,7 @@ vMgrRxManagePacket( ...@@ -4625,7 +4625,7 @@ vMgrRxManagePacket(
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n"); //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n");
if (pMgmt->eScanState != WMAC_NO_SCANNING) { if (pMgmt->eScanState != WMAC_NO_SCANNING) {
bInScan = true; bInScan = true;
}; }
s_vMgrRxBeacon(pDevice, pMgmt, pRxPacket, bInScan); s_vMgrRxBeacon(pDevice, pMgmt, pRxPacket, bInScan);
break; break;
......
...@@ -723,7 +723,7 @@ static int wpa_get_scan(PSDevice pDevice, ...@@ -723,7 +723,7 @@ static int wpa_get_scan(PSDevice pDevice,
if (copy_to_user(param->u.scan_results.buf, pBuf, sizeof(struct viawget_scan_result) * count)) { if (copy_to_user(param->u.scan_results.buf, pBuf, sizeof(struct viawget_scan_result) * count)) {
ret = -EFAULT; ret = -EFAULT;
}; }
param->u.scan_results.scan_count = count; param->u.scan_results.scan_count = count;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count)
...@@ -875,7 +875,7 @@ if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) || ...@@ -875,7 +875,7 @@ if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) ||
if (pCurr == NULL){ if (pCurr == NULL){
printk("wpa_set_associate---->hidden mode site survey before associate.......\n"); printk("wpa_set_associate---->hidden mode site survey before associate.......\n");
bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
}; }
} }
/****************************************************************/ /****************************************************************/
bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL);
......
...@@ -1192,7 +1192,7 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) && ...@@ -1192,7 +1192,7 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) &&
memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
netif_rx(pDevice->skb); netif_rx(pDevice->skb);
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
}; }
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == TRUE) // if(pDevice->bWPASuppWextEnabled == TRUE)
{ {
...@@ -1416,7 +1416,7 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, ...@@ -1416,7 +1416,7 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext,
} }
} }
} }
}; }
if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) || if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) ||
(pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) { (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) {
...@@ -1472,9 +1472,9 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, ...@@ -1472,9 +1472,9 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext,
} }
} }
} }
}; }
} }
}; }
return; return;
......
...@@ -730,7 +730,7 @@ RXbBulkInProcessData ( ...@@ -730,7 +730,7 @@ RXbBulkInProcessData (
pMgmt->bInTIMWake = FALSE; pMgmt->bInTIMWake = FALSE;
} }
} }
}; }
// Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps // Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps
if (pDevice->bDiversityEnable && (FrameSize>50) && if (pDevice->bDiversityEnable && (FrameSize>50) &&
...@@ -913,7 +913,7 @@ RXbBulkInProcessData ( ...@@ -913,7 +913,7 @@ RXbBulkInProcessData (
memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
netif_rx(pDevice->skb); netif_rx(pDevice->skb);
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
}; }
return FALSE; return FALSE;
...@@ -1045,7 +1045,7 @@ static BOOL s_bAPModeRxCtl ( ...@@ -1045,7 +1045,7 @@ static BOOL s_bAPModeRxCtl (
); );
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n");
return TRUE; return TRUE;
}; }
if (pMgmt->sNodeDBTable[iSANodeIndex].eNodeState < NODE_ASSOC) { if (pMgmt->sNodeDBTable[iSANodeIndex].eNodeState < NODE_ASSOC) {
// send deassoc notification // send deassoc notification
// reason = (7) class 3 received from nonassoc sta // reason = (7) class 3 received from nonassoc sta
...@@ -1057,7 +1057,7 @@ static BOOL s_bAPModeRxCtl ( ...@@ -1057,7 +1057,7 @@ static BOOL s_bAPModeRxCtl (
); );
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n");
return TRUE; return TRUE;
}; }
if (pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable) { if (pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable) {
// delcare received ps-poll event // delcare received ps-poll event
...@@ -1488,7 +1488,7 @@ static BOOL s_bAPModeRxData ( ...@@ -1488,7 +1488,7 @@ static BOOL s_bAPModeRxData (
bRelayOnly = TRUE; bRelayOnly = TRUE;
} }
} }
}; }
} }
if (bRelayOnly || bRelayAndForward) { if (bRelayOnly || bRelayAndForward) {
......
...@@ -90,7 +90,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -90,7 +90,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sScanCmd, pReq->data, sizeof(SCmdScan))) { if (copy_from_user(&sScanCmd, pReq->data, sizeof(SCmdScan))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pItemSSID = (PWLAN_IE_SSID)sScanCmd.ssid; pItemSSID = (PWLAN_IE_SSID)sScanCmd.ssid;
if (pItemSSID->len != 0) { if (pItemSSID->len != 0) {
...@@ -124,7 +124,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -124,7 +124,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sZoneTypeCmd, pReq->data, sizeof(SCmdZoneTypeSet))) { if (copy_from_user(&sZoneTypeCmd, pReq->data, sizeof(SCmdZoneTypeSet))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if(sZoneTypeCmd.bWrite==TRUE) { if(sZoneTypeCmd.bWrite==TRUE) {
//////write zonetype //////write zonetype
...@@ -163,7 +163,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -163,7 +163,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sZoneTypeCmd, sizeof(SCmdZoneTypeSet))) { if (copy_to_user(pReq->data, &sZoneTypeCmd, sizeof(SCmdZoneTypeSet))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
} }
break; break;
...@@ -173,7 +173,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -173,7 +173,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sJoinCmd, pReq->data, sizeof(SCmdBSSJoin))) { if (copy_from_user(&sJoinCmd, pReq->data, sizeof(SCmdBSSJoin))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pItemSSID = (PWLAN_IE_SSID)sJoinCmd.ssid; pItemSSID = (PWLAN_IE_SSID)sJoinCmd.ssid;
memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
...@@ -223,7 +223,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -223,7 +223,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) { if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sWEPCmd.bEnableWep != TRUE) { if (sWEPCmd.bEnableWep != TRUE) {
int uu; int uu;
...@@ -295,7 +295,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -295,7 +295,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sLinkStatus, sizeof(SCmdLinkStatus))) { if (copy_to_user(pReq->data, &sLinkStatus, sizeof(SCmdLinkStatus))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
break; break;
...@@ -312,7 +312,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -312,7 +312,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sList, sizeof(SBSSIDList))) { if (copy_to_user(pReq->data, &sList, sizeof(SBSSIDList))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pReq->wResult = 0; pReq->wResult = 0;
break; break;
...@@ -320,7 +320,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -320,7 +320,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sList, pReq->data, sizeof(SBSSIDList))) { if (copy_from_user(&sList, pReq->data, sizeof(SBSSIDList))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pList = (PSBSSIDList)kmalloc(sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)), (int)GFP_ATOMIC); pList = (PSBSSIDList)kmalloc(sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)), (int)GFP_ATOMIC);
if (pList == NULL) { if (pList == NULL) {
result = -ENOMEM; result = -ENOMEM;
...@@ -362,7 +362,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -362,7 +362,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, pList, sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)))) { if (copy_to_user(pReq->data, pList, sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
kfree(pList); kfree(pList);
pReq->wResult = 0; pReq->wResult = 0;
break; break;
...@@ -371,14 +371,14 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -371,14 +371,14 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &(pDevice->s802_11Counter), sizeof(SDot11MIBCount))) { if (copy_to_user(pReq->data, &(pDevice->s802_11Counter), sizeof(SDot11MIBCount))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
break; break;
case WLAN_CMD_GET_STAT: case WLAN_CMD_GET_STAT:
if (copy_to_user(pReq->data, &(pDevice->scStatistic), sizeof(SStatCounter))) { if (copy_to_user(pReq->data, &(pDevice->scStatistic), sizeof(SStatCounter))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
break; break;
case WLAN_CMD_STOP_MAC: case WLAN_CMD_STOP_MAC:
...@@ -415,7 +415,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -415,7 +415,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sValue.dwValue == 1) { if (sValue.dwValue == 1) {
if (vt6656_hostap_set_hostapd(pDevice, 1, 1) == 0){ if (vt6656_hostap_set_hostapd(pDevice, 1, 1) == 0){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HOSTAP\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HOSTAP\n");
...@@ -443,7 +443,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -443,7 +443,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sValue.dwValue == 1) { if (sValue.dwValue == 1) {
pDevice->bEnable8021x = TRUE; pDevice->bEnable8021x = TRUE;
...@@ -463,7 +463,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -463,7 +463,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sValue.dwValue == 1) { if (sValue.dwValue == 1) {
pDevice->bEnableHostWEP = TRUE; pDevice->bEnableHostWEP = TRUE;
...@@ -482,7 +482,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -482,7 +482,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sValue.dwValue == 1) { if (sValue.dwValue == 1) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n");
memcpy(pDevice->wpadev->dev_addr, memcpy(pDevice->wpadev->dev_addr,
...@@ -507,7 +507,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -507,7 +507,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sStartAPCmd, pReq->data, sizeof(SCmdStartAP))) { if (copy_from_user(&sStartAPCmd, pReq->data, sizeof(SCmdStartAP))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
if (sStartAPCmd.wBSSType == AP) { if (sStartAPCmd.wBSSType == AP) {
pMgmt->eConfigMode = WMAC_CONFIG_AP; pMgmt->eConfigMode = WMAC_CONFIG_AP;
...@@ -600,7 +600,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -600,7 +600,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, &sNodeList, sizeof(SNodeList))) { if (copy_to_user(pReq->data, &sNodeList, sizeof(SNodeList))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pReq->wResult = 0; pReq->wResult = 0;
break; break;
...@@ -609,7 +609,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -609,7 +609,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_from_user(&sNodeList, pReq->data, sizeof(SNodeList))) { if (copy_from_user(&sNodeList, pReq->data, sizeof(SNodeList))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
pNodeList = (PSNodeList)kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC); pNodeList = (PSNodeList)kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
if (pNodeList == NULL) { if (pNodeList == NULL) {
result = -ENOMEM; result = -ENOMEM;
...@@ -649,7 +649,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -649,7 +649,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) { if (copy_to_user(pReq->data, pNodeList, sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)))) {
result = -EFAULT; result = -EFAULT;
break; break;
}; }
kfree(pNodeList); kfree(pNodeList);
pReq->wResult = 0; pReq->wResult = 0;
break; break;
......
...@@ -709,7 +709,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice) ...@@ -709,7 +709,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
if(ii>20) if(ii>20)
break; break;
} }
}; }
return TRUE; return TRUE;
} }
...@@ -995,7 +995,7 @@ static BOOL device_init_defrag_cb(PSDevice pDevice) { ...@@ -995,7 +995,7 @@ static BOOL device_init_defrag_cb(PSDevice pDevice) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n", DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n",
pDevice->dev->name); pDevice->dev->name);
goto free_frag; goto free_frag;
}; }
} }
pDevice->cbDFCB = CB_MAX_RX_FRAG; pDevice->cbDFCB = CB_MAX_RX_FRAG;
pDevice->cbFreeDFCB = pDevice->cbDFCB; pDevice->cbFreeDFCB = pDevice->cbDFCB;
......
...@@ -2441,13 +2441,13 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) { ...@@ -2441,13 +2441,13 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) {
if (pDevice->bEnableHostWEP) { if (pDevice->bEnableHostWEP) {
uNodeIndex = 0; uNodeIndex = 0;
bNodeExist = TRUE; bNodeExist = TRUE;
}; }
} }
else { else {
if (pDevice->bEnableHostWEP) { if (pDevice->bEnableHostWEP) {
if (BSSbIsSTAInNodeDB(pDevice, (PBYTE)(p80211Header->sA3.abyAddr1), &uNodeIndex)) if (BSSbIsSTAInNodeDB(pDevice, (PBYTE)(p80211Header->sA3.abyAddr1), &uNodeIndex))
bNodeExist = TRUE; bNodeExist = TRUE;
}; }
bNeedACK = TRUE; bNeedACK = TRUE;
pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
}; };
......
...@@ -642,7 +642,7 @@ void vRunCommand(void *hDeviceContext) ...@@ -642,7 +642,7 @@ void vRunCommand(void *hDeviceContext)
if (Status != CMD_STATUS_SUCCESS){ if (Status != CMD_STATUS_SUCCESS){
DBG_PRT(MSG_LEVEL_DEBUG, DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO "WLAN_CMD_IBSS_CREATE fail!\n"); KERN_INFO "WLAN_CMD_IBSS_CREATE fail!\n");
}; }
BSSvAddMulticastNode(pDevice); BSSvAddMulticastNode(pDevice);
} }
s_bClearBSSID_SCAN(pDevice); s_bClearBSSID_SCAN(pDevice);
...@@ -658,7 +658,7 @@ void vRunCommand(void *hDeviceContext) ...@@ -658,7 +658,7 @@ void vRunCommand(void *hDeviceContext)
if (Status != CMD_STATUS_SUCCESS){ if (Status != CMD_STATUS_SUCCESS){
DBG_PRT(MSG_LEVEL_DEBUG, DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO "WLAN_CMD_IBSS_CREATE fail!\n"); KERN_INFO "WLAN_CMD_IBSS_CREATE fail!\n");
}; }
BSSvAddMulticastNode(pDevice); BSSvAddMulticastNode(pDevice);
s_bClearBSSID_SCAN(pDevice); s_bClearBSSID_SCAN(pDevice);
/* /*
...@@ -793,7 +793,7 @@ void vRunCommand(void *hDeviceContext) ...@@ -793,7 +793,7 @@ void vRunCommand(void *hDeviceContext)
if (Status != CMD_STATUS_SUCCESS) { if (Status != CMD_STATUS_SUCCESS) {
DBG_PRT(MSG_LEVEL_DEBUG, DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO "vMgrCreateOwnIBSS fail!\n"); KERN_INFO "vMgrCreateOwnIBSS fail!\n");
}; }
// alway turn off unicast bit // alway turn off unicast bit
MACvRegBitsOff(pDevice, MAC_REG_RCR, RCR_UNICAST); MACvRegBitsOff(pDevice, MAC_REG_RCR, RCR_UNICAST);
pDevice->byRxMode &= ~RCR_UNICAST; pDevice->byRxMode &= ~RCR_UNICAST;
...@@ -827,7 +827,7 @@ void vRunCommand(void *hDeviceContext) ...@@ -827,7 +827,7 @@ void vRunCommand(void *hDeviceContext)
pMgmt->sNodeDBTable[0].wEnQueueCnt--; pMgmt->sNodeDBTable[0].wEnQueueCnt--;
} }
}; }
// PS nodes tx // PS nodes tx
for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) { for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) {
......
...@@ -593,7 +593,7 @@ void vMgrDisassocBeginSta(void *hDeviceContext, ...@@ -593,7 +593,7 @@ void vMgrDisassocBeginSta(void *hDeviceContext,
if (*pStatus == CMD_STATUS_PENDING) { if (*pStatus == CMD_STATUS_PENDING) {
pMgmt->eCurrState = WMAC_STATE_IDLE; pMgmt->eCurrState = WMAC_STATE_IDLE;
*pStatus = CMD_STATUS_SUCCESS; *pStatus = CMD_STATUS_SUCCESS;
}; }
return; return;
} }
...@@ -942,7 +942,7 @@ s_vMgrRxAssocResponse( ...@@ -942,7 +942,7 @@ s_vMgrRxAssocResponse(
|| (sFrame.pSuppRates == NULL)) { || (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);
pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.StatusCode = *(sFrame.pwStatus); pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.StatusCode = *(sFrame.pwStatus);
...@@ -962,7 +962,7 @@ s_vMgrRxAssocResponse( ...@@ -962,7 +962,7 @@ s_vMgrRxAssocResponse(
if ( (pMgmt->wCurrAID >> 14) != (BIT0 | BIT1) ) if ( (pMgmt->wCurrAID >> 14) != (BIT0 | BIT1) )
{ {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "AID from AP, has two msb clear.\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "AID from AP, has two msb clear.\n");
}; }
DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Association Successful, AID=%d.\n", pMgmt->wCurrAID & ~(BIT14|BIT15)); DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Association Successful, AID=%d.\n", pMgmt->wCurrAID & ~(BIT14|BIT15));
pMgmt->eCurrState = WMAC_STATE_ASSOC; pMgmt->eCurrState = WMAC_STATE_ASSOC;
BSSvUpdateAPNode((void *) pDevice, BSSvUpdateAPNode((void *) pDevice,
...@@ -1621,7 +1621,7 @@ s_vMgrRxDisassociation( ...@@ -1621,7 +1621,7 @@ s_vMgrRxDisassociation(
memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
netif_rx(pDevice->skb); netif_rx(pDevice->skb);
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
}; }
//TODO: do something let upper layer know or //TODO: do something let upper layer know or
//try to send associate packet again because of inactivity timeout //try to send associate packet again because of inactivity timeout
...@@ -1636,7 +1636,7 @@ s_vMgrRxDisassociation( ...@@ -1636,7 +1636,7 @@ s_vMgrRxDisassociation(
pDevice->byReAssocCount ++; pDevice->byReAssocCount ++;
return; //mike add: you'll retry for many times, so it cann't be regarded as disconnected! return; //mike add: you'll retry for many times, so it cann't be regarded as disconnected!
} }
}; }
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == TRUE) // if(pDevice->bWPASuppWextEnabled == TRUE)
...@@ -1710,7 +1710,7 @@ s_vMgrRxDeauthentication( ...@@ -1710,7 +1710,7 @@ s_vMgrRxDeauthentication(
pDevice->bLinkPass = FALSE; pDevice->bLinkPass = FALSE;
ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW); ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW);
} }
}; }
if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
wpahdr = (viawget_wpa_header *)pDevice->skb->data; wpahdr = (viawget_wpa_header *)pDevice->skb->data;
...@@ -1725,7 +1725,7 @@ s_vMgrRxDeauthentication( ...@@ -1725,7 +1725,7 @@ s_vMgrRxDeauthentication(
memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
netif_rx(pDevice->skb); netif_rx(pDevice->skb);
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
}; }
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == TRUE) // if(pDevice->bWPASuppWextEnabled == TRUE)
...@@ -1845,7 +1845,7 @@ s_vMgrRxBeacon( ...@@ -1845,7 +1845,7 @@ s_vMgrRxBeacon(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n");
return; return;
}; }
if( byCurrChannel > CB_MAX_CHANNEL_24G ) if( byCurrChannel > CB_MAX_CHANNEL_24G )
{ {
...@@ -1974,7 +1974,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ...@@ -1974,7 +1974,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
sFrame.pSSID->len sFrame.pSSID->len
) == 0) { ) == 0) {
bIsSSIDEqual = TRUE; bIsSSIDEqual = TRUE;
}; }
} }
if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== TRUE) && if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== TRUE) &&
...@@ -2074,8 +2074,8 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ...@@ -2074,8 +2074,8 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
if (WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)) { if (WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)) {
if (sFrame.pCFParms->wCFPDurRemaining > 0) { if (sFrame.pCFParms->wCFPDurRemaining > 0) {
// TODO: deal with CFP period to set NAV // TODO: deal with CFP period to set NAV
}; }
}; }
HIDWORD(qwTimestamp) = cpu_to_le32(HIDWORD(*sFrame.pqwTimestamp)); HIDWORD(qwTimestamp) = cpu_to_le32(HIDWORD(*sFrame.pqwTimestamp));
LODWORD(qwTimestamp) = cpu_to_le32(LODWORD(*sFrame.pqwTimestamp)); LODWORD(qwTimestamp) = cpu_to_le32(LODWORD(*sFrame.pqwTimestamp));
...@@ -2096,7 +2096,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ...@@ -2096,7 +2096,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
} }
else if (HIDWORD(qwTimestamp) < HIDWORD(qwLocalTSF)) { else if (HIDWORD(qwTimestamp) < HIDWORD(qwLocalTSF)) {
bTSFOffsetPostive = FALSE; bTSFOffsetPostive = FALSE;
}; }
if (bTSFOffsetPostive) { if (bTSFOffsetPostive) {
qwTSFOffset = CARDqGetTSFOffset(pRxPacket->byRxRate, (qwTimestamp), (qwLocalTSF)); qwTSFOffset = CARDqGetTSFOffset(pRxPacket->byRxRate, (qwTimestamp), (qwLocalTSF));
...@@ -2154,7 +2154,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ...@@ -2154,7 +2154,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
if (pMgmt->bInTIM) { if (pMgmt->bInTIM) {
PSvSendPSPOLL((PSDevice)pDevice); PSvSendPSPOLL((PSDevice)pDevice);
// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:PS-POLL sent..\n"); // DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:PS-POLL sent..\n");
}; }
} }
else { else {
...@@ -2167,7 +2167,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ...@@ -2167,7 +2167,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
} }
if(PSbConsiderPowerDown(pDevice, FALSE, FALSE)) { if(PSbConsiderPowerDown(pDevice, FALSE, FALSE)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n");
}; }
} }
} }
...@@ -2247,7 +2247,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ...@@ -2247,7 +2247,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
pMgmt->sNodeDBTable[0].bActive = TRUE; pMgmt->sNodeDBTable[0].bActive = TRUE;
pMgmt->sNodeDBTable[0].uInActiveCount = 0; pMgmt->sNodeDBTable[0].uInActiveCount = 0;
}; }
} }
else if (bIsSSIDEqual) { else if (bIsSSIDEqual) {
...@@ -2292,9 +2292,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ...@@ -2292,9 +2292,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
// Prepare beacon frame // Prepare beacon frame
bMgrPrepareBeaconToSend((void *) pDevice, pMgmt); bMgrPrepareBeaconToSend((void *) pDevice, pMgmt);
// } // }
}; }
} }
}; }
// endian issue ??? // endian issue ???
// Update TSF // Update TSF
if (bUpdateTSF) { if (bUpdateTSF) {
...@@ -2556,7 +2556,7 @@ void vMgrCreateOwnIBSS(void *hDeviceContext, ...@@ -2556,7 +2556,7 @@ void vMgrCreateOwnIBSS(void *hDeviceContext,
pMgmt->byCSSPK = KEY_CTL_WEP; pMgmt->byCSSPK = KEY_CTL_WEP;
pMgmt->byCSSGK = KEY_CTL_WEP; pMgmt->byCSSGK = KEY_CTL_WEP;
} }
}; }
pMgmt->byERPContext = 0; pMgmt->byERPContext = 0;
...@@ -2614,7 +2614,7 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus) ...@@ -2614,7 +2614,7 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus)
*pStatus = CMD_STATUS_RESOURCES; *pStatus = CMD_STATUS_RESOURCES;
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "BSS finding:BSS list is empty.\n"); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "BSS finding:BSS list is empty.\n");
return; return;
}; }
// memset(pMgmt->abyDesireBSSID, 0, WLAN_BSSID_LEN); // memset(pMgmt->abyDesireBSSID, 0, WLAN_BSSID_LEN);
// Search known BSS list for prefer BSSID or SSID // Search known BSS list for prefer BSSID or SSID
...@@ -2630,7 +2630,7 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus) ...@@ -2630,7 +2630,7 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus)
pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Scanning [%s] not found, disconnected !\n", pItemSSID->abySSID); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Scanning [%s] not found, disconnected !\n", pItemSSID->abySSID);
return; return;
}; }
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP(BSS) finding:Found a AP(BSS)..\n"); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP(BSS) finding:Found a AP(BSS)..\n");
...@@ -3061,7 +3061,7 @@ s_vMgrSynchBSS ( ...@@ -3061,7 +3061,7 @@ s_vMgrSynchBSS (
MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID); MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
pDevice->byRxMode |= RCR_BSSID; pDevice->byRxMode |= RCR_BSSID;
pMgmt->bCurrBSSIDFilterOn = TRUE; pMgmt->bCurrBSSIDFilterOn = TRUE;
}; }
if (pDevice->byBBType == BB_TYPE_11A) { if (pDevice->byBBType == BB_TYPE_11A) {
memcpy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesA[0], sizeof(abyCurrSuppRatesA)); memcpy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesA[0], sizeof(abyCurrSuppRatesA));
...@@ -4209,7 +4209,7 @@ s_vMgrRxProbeResponse( ...@@ -4209,7 +4209,7 @@ s_vMgrRxProbeResponse(
pRxPacket->p80211Header); pRxPacket->p80211Header);
DBG_PORT80(0xCC); DBG_PORT80(0xCC);
return; return;
}; }
if(sFrame.pSSID->len == 0) if(sFrame.pSSID->len == 0)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx Probe resp: SSID len = 0 \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx Probe resp: SSID len = 0 \n");
...@@ -4491,7 +4491,7 @@ void vMgrRxManagePacket(void *hDeviceContext, ...@@ -4491,7 +4491,7 @@ void vMgrRxManagePacket(void *hDeviceContext,
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n"); //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n");
if (pMgmt->eScanState != WMAC_NO_SCANNING) { if (pMgmt->eScanState != WMAC_NO_SCANNING) {
bInScan = TRUE; bInScan = TRUE;
}; }
s_vMgrRxBeacon(pDevice, pMgmt, pRxPacket, bInScan); s_vMgrRxBeacon(pDevice, pMgmt, pRxPacket, bInScan);
break; break;
......
...@@ -729,7 +729,7 @@ static int wpa_get_scan(PSDevice pDevice, ...@@ -729,7 +729,7 @@ static int wpa_get_scan(PSDevice pDevice,
if (copy_to_user(param->u.scan_results.buf, pBuf, sizeof(struct viawget_scan_result) * count)) { if (copy_to_user(param->u.scan_results.buf, pBuf, sizeof(struct viawget_scan_result) * count)) {
ret = -EFAULT; ret = -EFAULT;
}; }
param->u.scan_results.scan_count = count; param->u.scan_results.scan_count = count;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count)
...@@ -886,7 +886,7 @@ static int wpa_set_associate(PSDevice pDevice, ...@@ -886,7 +886,7 @@ static int wpa_set_associate(PSDevice pDevice,
bScheduleCommand((void *) pDevice, bScheduleCommand((void *) pDevice,
WLAN_CMD_BSSID_SCAN, WLAN_CMD_BSSID_SCAN,
pMgmt->abyDesireSSID); pMgmt->abyDesireSSID);
}; }
} }
/****************************************************************/ /****************************************************************/
......
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