Commit 97d59f87 authored by Nandini Hanumanthagowda's avatar Nandini Hanumanthagowda Committed by Greg Kroah-Hartman

staging: vt6656: indented the code under all function blocks

indented the code under all functions to remove unnecessary space
at start of a line and indent code wherver possible errors
thrown from checkpatch script
Signed-off-by: default avatarNandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cab086d3
...@@ -87,18 +87,18 @@ static void vAdHocBeaconStop(struct vnt_private *pDevice) ...@@ -87,18 +87,18 @@ static void vAdHocBeaconStop(struct vnt_private *pDevice)
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
int bStop; int bStop;
/* /*
* temporarily stop Beacon packet for AdHoc Server * temporarily stop Beacon packet for AdHoc Server
* if all of the following coditions are met: * if all of the following coditions are met:
* (1) STA is in AdHoc mode * (1) STA is in AdHoc mode
* (2) VT3253 is programmed as automatic Beacon Transmitting * (2) VT3253 is programmed as automatic Beacon Transmitting
* (3) One of the following conditions is met * (3) One of the following conditions is met
* (3.1) AdHoc channel is in B/G band and the * (3.1) AdHoc channel is in B/G band and the
* current scan channel is in A band * current scan channel is in A band
* or * or
* (3.2) AdHoc channel is in A mode * (3.2) AdHoc channel is in A mode
*/ */
bStop = false; bStop = false;
if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
(pMgmt->eCurrState >= WMAC_STATE_STARTED)) { (pMgmt->eCurrState >= WMAC_STATE_STARTED)) {
if ((pMgmt->uIBSSChannel <= CB_MAX_CHANNEL_24G) && if ((pMgmt->uIBSSChannel <= CB_MAX_CHANNEL_24G) &&
...@@ -183,16 +183,16 @@ static void s_vProbeChannel(struct vnt_private *pDevice) ...@@ -183,16 +183,16 @@ static void s_vProbeChannel(struct vnt_private *pDevice)
else else
pbyRate = &abyCurrSuppRatesG[0]; pbyRate = &abyCurrSuppRatesG[0];
// build an assocreq frame and send it // build an assocreq frame and send it
pTxPacket = s_MgrMakeProbeRequest pTxPacket = s_MgrMakeProbeRequest
( (
pDevice, pDevice,
pMgmt, pMgmt,
pMgmt->abyScanBSSID, pMgmt->abyScanBSSID,
(PWLAN_IE_SSID)pMgmt->abyScanSSID, (PWLAN_IE_SSID)pMgmt->abyScanSSID,
(PWLAN_IE_SUPP_RATES)pbyRate, (PWLAN_IE_SUPP_RATES)pbyRate,
(PWLAN_IE_SUPP_RATES)abyCurrExtSuppRatesG (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRatesG
); );
if (pTxPacket != NULL) { if (pTxPacket != NULL) {
for (ii = 0; ii < 1; ii++) { for (ii = 0; ii < 1; ii++) {
...@@ -229,34 +229,34 @@ static struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice, ...@@ -229,34 +229,34 @@ static struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice,
+ WLAN_PROBEREQ_FR_MAXLEN); + WLAN_PROBEREQ_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
+ sizeof(struct vnt_tx_mgmt)); + sizeof(struct vnt_tx_mgmt));
sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
sFrame.len = WLAN_PROBEREQ_FR_MAXLEN; sFrame.len = WLAN_PROBEREQ_FR_MAXLEN;
vMgrEncodeProbeRequest(&sFrame); vMgrEncodeProbeRequest(&sFrame);
sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16( sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
( (
WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) | WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_PROBEREQ) WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_PROBEREQ)
)); ));
memcpy(sFrame.pHdr->sA3.abyAddr1, pScanBSSID, WLAN_ADDR_LEN); memcpy(sFrame.pHdr->sA3.abyAddr1, pScanBSSID, WLAN_ADDR_LEN);
memcpy(sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN); memcpy(sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
memcpy(sFrame.pHdr->sA3.abyAddr3, pScanBSSID, WLAN_BSSID_LEN); memcpy(sFrame.pHdr->sA3.abyAddr3, pScanBSSID, WLAN_BSSID_LEN);
// Copy the SSID, pSSID->len=0 indicate broadcast SSID // Copy the SSID, pSSID->len=0 indicate broadcast SSID
sFrame.pSSID = (PWLAN_IE_SSID)(sFrame.pBuf + sFrame.len); sFrame.pSSID = (PWLAN_IE_SSID)(sFrame.pBuf + sFrame.len);
sFrame.len += pSSID->len + WLAN_IEHDR_LEN; sFrame.len += pSSID->len + WLAN_IEHDR_LEN;
memcpy(sFrame.pSSID, pSSID, pSSID->len + WLAN_IEHDR_LEN); memcpy(sFrame.pSSID, pSSID, pSSID->len + WLAN_IEHDR_LEN);
sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
sFrame.len += pCurrRates->len + WLAN_IEHDR_LEN; sFrame.len += pCurrRates->len + WLAN_IEHDR_LEN;
memcpy(sFrame.pSuppRates, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN); memcpy(sFrame.pSuppRates, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN);
// Copy the extension rate set // Copy the extension rate set
if (pDevice->byBBType == BB_TYPE_11G) { if (pDevice->byBBType == BB_TYPE_11G) {
sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
sFrame.len += pCurrExtSuppRates->len + WLAN_IEHDR_LEN; sFrame.len += pCurrExtSuppRates->len + WLAN_IEHDR_LEN;
memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, pCurrExtSuppRates->len + WLAN_IEHDR_LEN); memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, pCurrExtSuppRates->len + WLAN_IEHDR_LEN);
} }
pTxPacket->cbMPDULen = sFrame.len; pTxPacket->cbMPDULen = sFrame.len;
pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN; pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
return pTxPacket; return pTxPacket;
} }
static void static void
...@@ -288,11 +288,11 @@ void vRunCommand(struct work_struct *work) ...@@ -288,11 +288,11 @@ void vRunCommand(struct work_struct *work)
if (pDevice->bCmdRunning != true) if (pDevice->bCmdRunning != true)
return; return;
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
switch (pDevice->eCommandState) { switch (pDevice->eCommandState) {
case WLAN_CMD_SCAN_START: case WLAN_CMD_SCAN_START:
pDevice->byReAssocCount = 0; pDevice->byReAssocCount = 0;
if (pDevice->bRadioOff == true) { if (pDevice->bRadioOff == true) {
...@@ -307,7 +307,7 @@ void vRunCommand(struct work_struct *work) ...@@ -307,7 +307,7 @@ void vRunCommand(struct work_struct *work)
return; return;
} }
pItemSSID = (PWLAN_IE_SSID)pMgmt->abyScanSSID; pItemSSID = (PWLAN_IE_SSID)pMgmt->abyScanSSID;
if (pMgmt->uScanChannel == 0) if (pMgmt->uScanChannel == 0)
pMgmt->uScanChannel = pDevice->byMinChannel; pMgmt->uScanChannel = pDevice->byMinChannel;
...@@ -387,11 +387,11 @@ void vRunCommand(struct work_struct *work) ...@@ -387,11 +387,11 @@ void vRunCommand(struct work_struct *work)
} }
} }
break; break;
case WLAN_CMD_SCAN_END: case WLAN_CMD_SCAN_END:
// Set Baseband's sensitivity back. // Set Baseband's sensitivity back.
if (pDevice->byBBType != pDevice->byScanBBType) { if (pDevice->byBBType != pDevice->byScanBBType) {
pDevice->byBBType = pDevice->byScanBBType; pDevice->byBBType = pDevice->byScanBBType;
CARDvSetBSSMode(pDevice); CARDvSetBSSMode(pDevice);
...@@ -403,29 +403,29 @@ void vRunCommand(struct work_struct *work) ...@@ -403,29 +403,29 @@ void vRunCommand(struct work_struct *work)
BBvUpdatePreEDThreshold(pDevice, false); BBvUpdatePreEDThreshold(pDevice, false);
} }
// Set channel back // Set channel back
vAdHocBeaconRestart(pDevice); vAdHocBeaconRestart(pDevice);
// Set channel back // Set channel back
CARDbSetMediaChannel(pDevice, pMgmt->uCurrChannel); CARDbSetMediaChannel(pDevice, pMgmt->uCurrChannel);
// Set Filter // Set Filter
if (pMgmt->bCurrBSSIDFilterOn) { if (pMgmt->bCurrBSSIDFilterOn) {
MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID); MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
pDevice->byRxMode |= RCR_BSSID; pDevice->byRxMode |= RCR_BSSID;
} }
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel);
pMgmt->uScanChannel = 0; pMgmt->uScanChannel = 0;
pMgmt->eScanState = WMAC_NO_SCANNING; pMgmt->eScanState = WMAC_NO_SCANNING;
pDevice->bStopDataPkt = false; pDevice->bStopDataPkt = false;
/*send scan event to wpa_Supplicant*/ /*send scan event to wpa_Supplicant*/
PRINT_K("wireless_send_event--->SIOCGIWSCAN(scan done)\n"); PRINT_K("wireless_send_event--->SIOCGIWSCAN(scan done)\n");
memset(&wrqu, 0, sizeof(wrqu)); memset(&wrqu, 0, sizeof(wrqu));
wireless_send_event(pDevice->dev, SIOCGIWSCAN, &wrqu, NULL); wireless_send_event(pDevice->dev, SIOCGIWSCAN, &wrqu, NULL);
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_DISASSOCIATE_START: case WLAN_CMD_DISASSOCIATE_START:
pDevice->byReAssocCount = 0; pDevice->byReAssocCount = 0;
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
(pMgmt->eCurrState != WMAC_STATE_ASSOC)) { (pMgmt->eCurrState != WMAC_STATE_ASSOC)) {
...@@ -457,13 +457,13 @@ void vRunCommand(struct work_struct *work) ...@@ -457,13 +457,13 @@ void vRunCommand(struct work_struct *work)
pMgmt->sNodeDBTable[0].bActive = false; pMgmt->sNodeDBTable[0].bActive = false;
// pDevice->bBeaconBufReady = false; // pDevice->bBeaconBufReady = false;
} }
netif_stop_queue(pDevice->dev); netif_stop_queue(pDevice->dev);
if (pDevice->bNeedRadioOFF == true) if (pDevice->bNeedRadioOFF == true)
CARDbRadioPowerOff(pDevice); CARDbRadioPowerOff(pDevice);
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_SSID_START: case WLAN_CMD_SSID_START:
pDevice->byReAssocCount = 0; pDevice->byReAssocCount = 0;
if (pDevice->bRadioOff == true) { if (pDevice->bRadioOff == true) {
...@@ -472,13 +472,13 @@ void vRunCommand(struct work_struct *work) ...@@ -472,13 +472,13 @@ void vRunCommand(struct work_struct *work)
return; return;
} }
memcpy(pMgmt->abyAdHocSSID, pMgmt->abyDesireSSID, memcpy(pMgmt->abyAdHocSSID, pMgmt->abyDesireSSID,
((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len + WLAN_IEHDR_LEN); ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len + WLAN_IEHDR_LEN);
pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
pItemSSIDCurr = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; pItemSSIDCurr = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: desire ssid = %s\n", pItemSSID->abySSID); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: desire ssid = %s\n", pItemSSID->abySSID);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: curr ssid = %s\n", pItemSSIDCurr->abySSID); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: curr ssid = %s\n", pItemSSIDCurr->abySSID);
if (pMgmt->eCurrState == WMAC_STATE_ASSOC) { if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Cmd pMgmt->eCurrState == WMAC_STATE_ASSOC\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Cmd pMgmt->eCurrState == WMAC_STATE_ASSOC\n");
...@@ -501,13 +501,13 @@ void vRunCommand(struct work_struct *work) ...@@ -501,13 +501,13 @@ void vRunCommand(struct work_struct *work)
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);
} }
// set initial state // set initial state
pMgmt->eCurrState = WMAC_STATE_IDLE; pMgmt->eCurrState = WMAC_STATE_IDLE;
pMgmt->eCurrMode = WMAC_MODE_STANDBY; pMgmt->eCurrMode = WMAC_MODE_STANDBY;
PSvDisablePowerSaving((void *) pDevice); PSvDisablePowerSaving((void *) pDevice);
BSSvClearNodeDBTable(pDevice, 0); BSSvClearNodeDBTable(pDevice, 0);
vMgrJoinBSSBegin((void *) pDevice, &Status); vMgrJoinBSSBegin((void *) pDevice, &Status);
// if Infra mode // if Infra mode
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) { if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) {
// Call mgr to begin the deauthentication // Call mgr to begin the deauthentication
// reason = (3) because sta has left ESS // reason = (3) because sta has left ESS
...@@ -584,11 +584,11 @@ void vRunCommand(struct work_struct *work) ...@@ -584,11 +584,11 @@ void vRunCommand(struct work_struct *work)
} }
} }
} }
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_AUTHENTICATE_WAIT: case WLAN_AUTHENTICATE_WAIT:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_AUTHENTICATE_WAIT\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_AUTHENTICATE_WAIT\n");
if (pMgmt->eCurrState == WMAC_STATE_AUTH) { if (pMgmt->eCurrState == WMAC_STATE_AUTH) {
pDevice->byLinkWaitCount = 0; pDevice->byLinkWaitCount = 0;
// Call mgr to begin the association // Call mgr to begin the association
...@@ -611,12 +611,12 @@ void vRunCommand(struct work_struct *work) ...@@ -611,12 +611,12 @@ void vRunCommand(struct work_struct *work)
vCommandTimerWait((void *) pDevice, AUTHENTICATE_TIMEOUT/2); vCommandTimerWait((void *) pDevice, AUTHENTICATE_TIMEOUT/2);
return; return;
} }
pDevice->byLinkWaitCount = 0; pDevice->byLinkWaitCount = 0;
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_ASSOCIATE_WAIT: case WLAN_ASSOCIATE_WAIT:
if (pMgmt->eCurrState == WMAC_STATE_ASSOC) { if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_ASSOC\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_ASSOC\n");
if (pDevice->ePSMode != WMAC_POWER_CAM) { if (pDevice->ePSMode != WMAC_POWER_CAM) {
...@@ -647,10 +647,10 @@ void vRunCommand(struct work_struct *work) ...@@ -647,10 +647,10 @@ void vRunCommand(struct work_struct *work)
return; return;
} }
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_AP_MODE_START: case WLAN_CMD_AP_MODE_START:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_AP_MODE_START\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_AP_MODE_START\n");
if (pMgmt->eConfigMode == WMAC_CONFIG_AP) { if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
...@@ -686,8 +686,8 @@ void vRunCommand(struct work_struct *work) ...@@ -686,8 +686,8 @@ void vRunCommand(struct work_struct *work)
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_TX_PSPACKET_START: case WLAN_CMD_TX_PSPACKET_START:
// DTIM Multicast tx // DTIM Multicast tx
if (pMgmt->sNodeDBTable[0].bRxPSPoll) { if (pMgmt->sNodeDBTable[0].bRxPSPoll) {
while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[0].sTxPSQueue)) != NULL) { while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[0].sTxPSQueue)) != NULL) {
if (skb_queue_empty(&pMgmt->sNodeDBTable[0].sTxPSQueue)) { if (skb_queue_empty(&pMgmt->sNodeDBTable[0].sTxPSQueue)) {
...@@ -739,12 +739,12 @@ void vRunCommand(struct work_struct *work) ...@@ -739,12 +739,12 @@ void vRunCommand(struct work_struct *work)
} }
} }
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_RADIO_START: case WLAN_CMD_RADIO_START:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n");
// if (pDevice->bRadioCmd == true) // if (pDevice->bRadioCmd == true)
// CARDbRadioPowerOn(pDevice); // CARDbRadioPowerOn(pDevice);
// else // else
...@@ -833,38 +833,38 @@ void vRunCommand(struct work_struct *work) ...@@ -833,38 +833,38 @@ void vRunCommand(struct work_struct *work)
} }
} }
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_CHANGE_BBSENSITIVITY_START: case WLAN_CMD_CHANGE_BBSENSITIVITY_START:
pDevice->bStopDataPkt = true; pDevice->bStopDataPkt = true;
pDevice->byBBVGACurrent = pDevice->byBBVGANew; pDevice->byBBVGACurrent = pDevice->byBBVGANew;
BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Change sensitivity pDevice->byBBVGACurrent = %x\n", pDevice->byBBVGACurrent); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Change sensitivity pDevice->byBBVGACurrent = %x\n", pDevice->byBBVGACurrent);
pDevice->bStopDataPkt = false; pDevice->bStopDataPkt = false;
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_TBTT_WAKEUP_START: case WLAN_CMD_TBTT_WAKEUP_START:
PSbIsNextTBTTWakeUp(pDevice); PSbIsNextTBTTWakeUp(pDevice);
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_BECON_SEND_START: case WLAN_CMD_BECON_SEND_START:
bMgrPrepareBeaconToSend(pDevice, pMgmt); bMgrPrepareBeaconToSend(pDevice, pMgmt);
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_SETPOWER_START: case WLAN_CMD_SETPOWER_START:
RFbSetPower(pDevice, pDevice->wCurrentRate, pMgmt->uCurrChannel); RFbSetPower(pDevice, pDevice->wCurrentRate, pMgmt->uCurrChannel);
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_CHANGE_ANTENNA_START: case WLAN_CMD_CHANGE_ANTENNA_START:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Change from Antenna%d to", (int)pDevice->dwRxAntennaSel); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Change from Antenna%d to", (int)pDevice->dwRxAntennaSel);
if (pDevice->dwRxAntennaSel == 0) { if (pDevice->dwRxAntennaSel == 0) {
pDevice->dwRxAntennaSel = 1; pDevice->dwRxAntennaSel = 1;
if (pDevice->bTxRxAntInv == true) if (pDevice->bTxRxAntInv == true)
...@@ -878,16 +878,16 @@ void vRunCommand(struct work_struct *work) ...@@ -878,16 +878,16 @@ void vRunCommand(struct work_struct *work)
else else
BBvSetAntennaMode(pDevice, ANT_RXA); BBvSetAntennaMode(pDevice, ANT_RXA);
} }
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_REMOVE_ALLKEY_START: case WLAN_CMD_REMOVE_ALLKEY_START:
KeybRemoveAllKey(pDevice, &(pDevice->sKey), pDevice->abyBSSID); KeybRemoveAllKey(pDevice, &(pDevice->sKey), pDevice->abyBSSID);
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_MAC_DISPOWERSAVING_START: case WLAN_CMD_MAC_DISPOWERSAVING_START:
ControlvReadByte(pDevice, MESSAGE_REQUEST_MACREG, MAC_REG_PSCTL, &byData); ControlvReadByte(pDevice, MESSAGE_REQUEST_MACREG, MAC_REG_PSCTL, &byData);
if ((byData & PSCTL_PS) != 0) { if ((byData & PSCTL_PS) != 0) {
// disable power saving hw function // disable power saving hw function
CONTROLnsRequestOut(pDevice, CONTROLnsRequestOut(pDevice,
...@@ -898,24 +898,24 @@ void vRunCommand(struct work_struct *work) ...@@ -898,24 +898,24 @@ void vRunCommand(struct work_struct *work)
NULL NULL
); );
} }
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
case WLAN_CMD_11H_CHSW_START: case WLAN_CMD_11H_CHSW_START:
CARDbSetMediaChannel(pDevice, pDevice->byNewChannel); CARDbSetMediaChannel(pDevice, pDevice->byNewChannel);
pDevice->bChannelSwitch = false; pDevice->bChannelSwitch = false;
pMgmt->uCurrChannel = pDevice->byNewChannel; pMgmt->uCurrChannel = pDevice->byNewChannel;
pDevice->bStopDataPkt = false; pDevice->bStopDataPkt = false;
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
default: default:
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
break; break;
} //switch } //switch
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
return; return;
} }
static int s_bCommandComplete(struct vnt_private *pDevice) static int s_bCommandComplete(struct vnt_private *pDevice)
...@@ -925,7 +925,7 @@ static int s_bCommandComplete(struct vnt_private *pDevice) ...@@ -925,7 +925,7 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
int bRadioCmd = false; int bRadioCmd = false;
int bForceSCAN = true; int bForceSCAN = true;
pDevice->eCommandState = WLAN_CMD_IDLE; pDevice->eCommandState = WLAN_CMD_IDLE;
if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) { if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) {
//Command Queue Empty //Command Queue Empty
pDevice->bCmdRunning = false; pDevice->bCmdRunning = false;
...@@ -1015,7 +1015,7 @@ static int s_bCommandComplete(struct vnt_private *pDevice) ...@@ -1015,7 +1015,7 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
vCommandTimerWait(pDevice, 0); vCommandTimerWait(pDevice, 0);
} }
return true; return true;
} }
int bScheduleCommand(struct vnt_private *pDevice, int bScheduleCommand(struct vnt_private *pDevice,
...@@ -1058,13 +1058,13 @@ int bScheduleCommand(struct vnt_private *pDevice, ...@@ -1058,13 +1058,13 @@ int bScheduleCommand(struct vnt_private *pDevice,
} }
} }
ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdEnqueueIdx, CMD_Q_SIZE); ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdEnqueueIdx, CMD_Q_SIZE);
pDevice->cbFreeCmdQueue--; pDevice->cbFreeCmdQueue--;
if (pDevice->bCmdRunning == false) if (pDevice->bCmdRunning == false)
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
return (true); return (true);
} }
...@@ -1096,7 +1096,7 @@ static int s_bClearBSSID_SCAN(struct vnt_private *pDevice) ...@@ -1096,7 +1096,7 @@ static int s_bClearBSSID_SCAN(struct vnt_private *pDevice)
break; break;
} }
} }
return true; return true;
} }
//mike add:reset command timer //mike add:reset command timer
......
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