diff options
Diffstat (limited to 'drivers/staging/vt6656/wcmd.c')
-rw-r--r-- | drivers/staging/vt6656/wcmd.c | 63 |
1 files changed, 6 insertions, 57 deletions
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index 4bb652bf7cf6..0013cb73d83b 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c @@ -38,7 +38,6 @@ * */ -#include "ttype.h" #include "tmacro.h" #include "device.h" #include "mac.h" @@ -56,17 +55,8 @@ #include "channel.h" #include "iowpa.h" -/*--------------------- Static Definitions -------------------------*/ - - - - -/*--------------------- Static Classes ----------------------------*/ - -/*--------------------- Static Variables --------------------------*/ static int msglevel =MSG_LEVEL_INFO; //static int msglevel =MSG_LEVEL_DEBUG; -/*--------------------- Static Functions --------------------------*/ static void s_vProbeChannel(struct vnt_private *); @@ -74,16 +64,10 @@ static struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *, struct vnt_manager *pMgmt, u8 *pScanBSSID, PWLAN_IE_SSID pSSID, PWLAN_IE_SUPP_RATES pCurrRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates); - static int s_bCommandComplete(struct vnt_private *); - static int s_bClearBSSID_SCAN(struct vnt_private *); -/*--------------------- Export Variables --------------------------*/ - -/*--------------------- Export Functions --------------------------*/ - /* * Description: * Stop AdHoc beacon during scan process @@ -138,7 +122,6 @@ static void vAdHocBeaconStop(struct vnt_private *pDevice) } /* vAdHocBeaconStop */ - /* * Description: * Restart AdHoc beacon after scan process complete @@ -171,7 +154,6 @@ static void vAdHocBeaconRestart(struct vnt_private *pDevice) } - /*+ * * Routine Description: @@ -200,7 +182,6 @@ static void s_vProbeChannel(struct vnt_private *pDevice) u8 *pbyRate; int ii; - if (pDevice->byBBType == BB_TYPE_11A) { pbyRate = &abyCurrSuppRatesA[0]; } else if (pDevice->byBBType == BB_TYPE_11B) { @@ -232,9 +213,6 @@ static void s_vProbeChannel(struct vnt_private *pDevice) } - - - /*+ * * Routine Description: @@ -246,7 +224,6 @@ static void s_vProbeChannel(struct vnt_private *pDevice) * -*/ - struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice, struct vnt_manager *pMgmt, u8 *pScanBSSID, PWLAN_IE_SSID pSSID, PWLAN_IE_SUPP_RATES pCurrRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates) @@ -254,13 +231,12 @@ struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice, struct vnt_tx_mgmt *pTxPacket = NULL; WLAN_FR_PROBEREQ sFrame; - pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool; memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt) + WLAN_PROBEREQ_FR_MAXLEN); pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket + sizeof(struct vnt_tx_mgmt)); - sFrame.pBuf = (PBYTE)pTxPacket->p80211Header; + sFrame.pBuf = (u8 *)pTxPacket->p80211Header; sFrame.len = WLAN_PROBEREQ_FR_MAXLEN; vMgrEncodeProbeRequest(&sFrame); sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16( @@ -316,7 +292,6 @@ void vRunCommand(struct vnt_private *pDevice) u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; u8 byData; - if (pDevice->dwDiagRefCount != 0) return; if (pDevice->bCmdRunning != true) @@ -347,29 +322,7 @@ void vRunCommand(struct vnt_private *pDevice) pMgmt->uScanChannel = pDevice->byMinChannel; } if (pMgmt->uScanChannel > pDevice->byMaxChannel) { - pMgmt->eScanState = WMAC_NO_SCANNING; - - if (pDevice->byBBType != pDevice->byScanBBType) { - pDevice->byBBType = pDevice->byScanBBType; - CARDvSetBSSMode(pDevice); - } - - if (pDevice->bUpdateBBVGA) { - BBvSetShortSlotTime(pDevice); - BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); - BBvUpdatePreEDThreshold(pDevice, false); - } - // Set channel back - vAdHocBeaconRestart(pDevice); - // Set channel back - CARDbSetMediaChannel(pDevice, pMgmt->uCurrChannel); - // Set Filter - if (pMgmt->bCurrBSSIDFilterOn) { - MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID); - pDevice->byRxMode |= RCR_BSSID; - } - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel); - pDevice->bStopDataPkt = false; + pDevice->eCommandState = WLAN_CMD_SCAN_END; s_bCommandComplete(pDevice); spin_unlock_irq(&pDevice->lock); return; @@ -377,6 +330,7 @@ void vRunCommand(struct vnt_private *pDevice) } else { if (!ChannelValid(pDevice->byZoneType, pMgmt->uScanChannel)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Invalid channel pMgmt->uScanChannel = %d \n",pMgmt->uScanChannel); + pMgmt->uScanChannel++; s_bCommandComplete(pDevice); spin_unlock_irq(&pDevice->lock); return; @@ -473,6 +427,7 @@ void vRunCommand(struct vnt_private *pDevice) pDevice->byRxMode |= RCR_BSSID; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel); + pMgmt->uScanChannel = 0; pMgmt->eScanState = WMAC_NO_SCANNING; pDevice->bStopDataPkt = false; @@ -523,7 +478,6 @@ void vRunCommand(struct vnt_private *pDevice) s_bCommandComplete(pDevice); break; - case WLAN_CMD_SSID_START: pDevice->byReAssocCount = 0; @@ -845,7 +799,7 @@ void vRunCommand(struct vnt_private *pDevice) { int ntStatus = STATUS_SUCCESS; - BYTE byTmp; + u8 byTmp; ntStatus = CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, @@ -930,7 +884,6 @@ void vRunCommand(struct vnt_private *pDevice) s_bCommandComplete(pDevice); break; - case WLAN_CMD_CHANGE_BBSENSITIVITY_START: pDevice->bStopDataPkt = true; @@ -981,7 +934,6 @@ void vRunCommand(struct vnt_private *pDevice) s_bCommandComplete(pDevice); break; - case WLAN_CMD_MAC_DISPOWERSAVING_START: ControlvReadByte (pDevice, MESSAGE_REQUEST_MACREG, MAC_REG_PSCTL, &byData); if ( (byData & PSCTL_PS) != 0 ) { @@ -1014,7 +966,6 @@ void vRunCommand(struct vnt_private *pDevice) return; } - static int s_bCommandComplete(struct vnt_private *pDevice) { struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; @@ -1022,7 +973,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice) int bRadioCmd = false; int bForceSCAN = true; - pDevice->eCommandState = WLAN_CMD_IDLE; if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) { //Command Queue Empty @@ -1147,7 +1097,7 @@ int bScheduleCommand(struct vnt_private *pDevice, break; /* case WLAN_CMD_DEAUTH: - pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((PWORD)pbyItem0); + pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((u16 *)pbyItem0); break; */ @@ -1203,7 +1153,6 @@ static int s_bClearBSSID_SCAN(struct vnt_private *pDevice) return true; } - //mike add:reset command timer void vResetCommandTimer(struct vnt_private *pDevice) { |