diff options
author | Jim Lieb <lieb@canonical.com> | 2009-08-12 14:54:03 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:07 -0700 |
commit | 612822f5dd1638de442cf50eb9da54632fba0e66 (patch) | |
tree | 941babacbfbe553589623c979968ef2fbf053277 /drivers/staging/vt6655 | |
parent | 77f58b133ea1da92faed89ec384b5e4279f6574f (diff) |
Staging: vt665x: Text janitor in prep for driver merge, part 2
Text only changes to remove textual differences between the vt6655
and vt6656 trees in prep for driver merge.
Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6655')
37 files changed, 216 insertions, 216 deletions
diff --git a/drivers/staging/vt6655/80211hdr.h b/drivers/staging/vt6655/80211hdr.h index b4bbb8d3c24..84cb1d020cb 100644 --- a/drivers/staging/vt6655/80211hdr.h +++ b/drivers/staging/vt6655/80211hdr.h @@ -16,10 +16,11 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: 80211hdr.h * - * Purpose: Defines the macros, types, and functions for dealing - * with 802.11 MAC headers. + * Purpose: 802.11 MAC headers related pre-defines and macros. + * * * Author: Lyndon Chen * diff --git a/drivers/staging/vt6655/80211mgr.c b/drivers/staging/vt6655/80211mgr.c index 54fc81ea96f..da7c2ab29ba 100644 --- a/drivers/staging/vt6655/80211mgr.c +++ b/drivers/staging/vt6655/80211mgr.c @@ -16,7 +16,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * * File: 80211mgr.c * * Purpose: Handles the 802.11 management support functions @@ -747,7 +746,6 @@ vMgrDecodeProbeResponse( ) { PWLAN_IE pItem; -// BYTE byCheckEID = 0; pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; @@ -765,12 +763,6 @@ vMgrDecodeProbeResponse( + WLAN_PROBERESP_OFF_SSID); while( ((PBYTE)pItem) < (pFrame->pBuf + pFrame->len) ) { - /* - if (pItem->byElementID < byCheckEID) - break; - else - byCheckEID = pItem->byElementID; -*/ switch (pItem->byElementID) { case WLAN_EID_SSID: if (pFrame->pSSID == NULL) diff --git a/drivers/staging/vt6655/80211mgr.h b/drivers/staging/vt6655/80211mgr.h index 8ec63ca23ff..18c9e3ad7fd 100644 --- a/drivers/staging/vt6655/80211mgr.h +++ b/drivers/staging/vt6655/80211mgr.h @@ -16,10 +16,11 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: 80211mgr.h * - * Purpose: Defines the macros, types, and functions for dealing - * with 802.11 management frames. + * Purpose: 802.11 managment frames pre-defines. + * * * Author: Lyndon Chen * @@ -273,7 +274,6 @@ typedef struct _WLAN_IE_FH_PARMS { BYTE byHopIndex; } WLAN_IE_FH_PARMS, *PWLAN_IE_FH_PARMS; - // DS Parameter Set #pragma pack(1) typedef struct tagWLAN_IE_DS_PARMS { diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index 30c707d127f..02cf0b73570 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: baseband.c * * Purpose: Implement functions to access baseband @@ -44,8 +45,11 @@ * Add the comments. * 09-01-2003 Bryan YC Fan: RF & BB tables updated. * Modified BBvLoopbackOn & BBvLoopbackOff(). + * + * */ + #if !defined(__TMACRO_H__) #include "tmacro.h" #endif @@ -80,6 +84,7 @@ static int msglevel =MSG_LEVEL_INFO; /*--------------------- Static Classes ----------------------------*/ /*--------------------- Static Variables --------------------------*/ + /*--------------------- Static Functions --------------------------*/ /*--------------------- Export Variables --------------------------*/ @@ -1806,6 +1811,7 @@ BBuGetFrameTime ( if (uRateIdx > RATE_54M) { + ASSERT(0); return 0; } @@ -2897,8 +2903,6 @@ TimerSQ3CallBack ( PSDevice pDevice = (PSDevice)hDeviceContext; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TimerSQ3CallBack..."); - - spin_lock_irq(&pDevice->lock); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"3.[%08x][%08x], %d\n",(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1, (int)pDevice->uDiversityCnt); @@ -2915,8 +2919,8 @@ TimerSQ3CallBack ( add_timer(&pDevice->TimerSQ3Tmax3); add_timer(&pDevice->TimerSQ3Tmax2); - spin_unlock_irq(&pDevice->lock); + spin_unlock_irq(&pDevice->lock); return; } diff --git a/drivers/staging/vt6655/baseband.h b/drivers/staging/vt6655/baseband.h index 09cf4f961ac..6fb4e5ff886 100644 --- a/drivers/staging/vt6655/baseband.h +++ b/drivers/staging/vt6655/baseband.h @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: baseband.h * * Purpose: Implement functions to access baseband @@ -26,11 +27,9 @@ * */ - #ifndef __BASEBAND_H__ #define __BASEBAND_H__ - #if !defined(__TTYPE_H__) #include "ttype.h" #endif @@ -106,12 +105,11 @@ #define TOP_RATE_2M 0x00200000 #define TOP_RATE_1M 0x00100000 + /*--------------------- Export Types ------------------------------*/ /*--------------------- Export Macros ------------------------------*/ - - #define BBvClearFOE(dwIoBase) \ { \ BBbWriteEmbeded(dwIoBase, 0xB1, 0); \ @@ -173,13 +171,15 @@ VOID BBvSetDeepSleep(DWORD_PTR dwIoBase, BYTE byLocalID); VOID BBvExitDeepSleep(DWORD_PTR dwIoBase, BYTE byLocalID); // timer for antenna diversity + VOID -TimerSQ3CallBack( - IN HANDLE hDeviceContext +TimerSQ3CallBack ( + IN HANDLE hDeviceContext ); + VOID TimerState1CallBack( - IN HANDLE hDeviceContext + IN HANDLE hDeviceContext ); void BBvAntennaDiversity(PSDevice pDevice, BYTE byRxRate, BYTE bySQ3); @@ -188,11 +188,8 @@ BBvClearAntDivSQ3Value (PSDevice pDevice); #ifdef __cplusplus -} /* End of extern "C" { */ +} /* End of extern "C" { */ #endif /* __cplusplus */ #endif // __BASEBAND_H__ - - - diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 3833ea63415..0c5b72f7794 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -170,7 +170,7 @@ BSSpSearchBSSList( IN HANDLE hDeviceContext, IN PBYTE pbyDesireBSSID, IN PBYTE pbyDesireSSID, - IN CARD_PHY_TYPE ePhyType + IN CARD_PHY_TYPE ePhyType ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -187,7 +187,7 @@ BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; *pbyDesireBSSID,*(pbyDesireBSSID+1),*(pbyDesireBSSID+2), *(pbyDesireBSSID+3),*(pbyDesireBSSID+4),*(pbyDesireBSSID+5)); if ((!IS_BROADCAST_ADDRESS(pbyDesireBSSID)) && - (memcmp(pbyDesireBSSID, ZeroBSSID, 6)!= 0)) { + (memcmp(pbyDesireBSSID, ZeroBSSID, 6)!= 0)){ pbyBSSID = pbyDesireBSSID; } } @@ -246,11 +246,11 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; (pSSID->len != ((PWLAN_IE_SSID)pCurrBSS->abySSID)->len)) { // SSID not match skip this BSS continue; - } + } } if (((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) || ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) - ) { + ){ // Type not match skip this BSS DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSS type mismatch.... Config[%d] BSS[0x%04x]\n", pMgmt->eConfigMode, pCurrBSS->wCapInfo); continue; @@ -399,6 +399,7 @@ BSSpAddrIsInBSSList( + /*+ * * Routine Description: @@ -450,7 +451,7 @@ BSSbInsertToBSSList ( } if (ii == MAX_BSS_NUM){ - DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Get free KnowBSS node failed.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Get free KnowBSS node failed.\n"); return FALSE; } // save the BSS info @@ -575,8 +576,6 @@ BSSbInsertToBSSList ( pIE_Country); } - - if ((bParsingQuiet == TRUE) && (pIE_Quiet != NULL)) { if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) && (((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) { @@ -663,6 +662,7 @@ BSSbUpdateToBSSList ( if (pBSSList == NULL) return FALSE; + HIDWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(HIDWORD(qwTimestamp)); LODWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(LODWORD(qwTimestamp)); pBSSList->wBeaconInterval = cpu_to_le16(wBeaconInterval); @@ -711,7 +711,7 @@ BSSbUpdateToBSSList ( } } - WPA_ClearRSN(pBSSList); //mike update + WPA_ClearRSN(pBSSList); //mike update if (pRSNWPA != NULL) { UINT uLen = pRSNWPA->len + 2; @@ -722,7 +722,7 @@ BSSbUpdateToBSSList ( } } - WPA2_ClearRSN(pBSSList); //mike update + WPA2_ClearRSN(pBSSList); //mike update if (pRSN != NULL) { UINT uLen = pRSN->len + 2; @@ -1067,7 +1067,7 @@ BSSvSecondCallBack( UINT uSleepySTACnt = 0; UINT uNonShortSlotSTACnt = 0; UINT uLongPreambleSTACnt = 0; -viawget_wpa_header* wpahdr; + viawget_wpa_header* wpahdr; //DavidWang spin_lock_irq(&pDevice->lock); @@ -1145,7 +1145,7 @@ start: union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); wrqu.ap_addr.sa_family = ARPHRD_ETHER; - printk("wireless_send_event--->SIOCGIWAP(disassociated)\n"); + PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n"); wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); } #endif @@ -1161,14 +1161,13 @@ start: for (ii = 0; ii < (MAX_NODE_NUM + 1); ii++) { if (pMgmt->sNodeDBTable[ii].bActive) { - // Increase in-activity counter pMgmt->sNodeDBTable[ii].uInActiveCount++; if (ii > 0) { if (pMgmt->sNodeDBTable[ii].uInActiveCount > MAX_INACTIVE_COUNT) { BSSvRemoveOneNode(pDevice, ii); - DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Inactive timeout [%d] sec, STA index = [%d] remove\n", MAX_INACTIVE_COUNT, ii); continue; } @@ -1200,7 +1199,6 @@ start: } // Rate fallback check - if (!pDevice->bFixRate) { /* if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (ii == 0)) @@ -1300,7 +1298,7 @@ start: pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; pCurrSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; -//printk("pCurrSSID=%s\n",pCurrSSID->abySSID); + if ((pMgmt->eCurrMode == WMAC_MODE_STANDBY) || (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)) { @@ -1309,17 +1307,18 @@ start: //if (pDevice->bUpdateBBVGA) { // s_vCheckSensitivity((HANDLE) pDevice); //} + if (pDevice->bUpdateBBVGA) { // s_vCheckSensitivity((HANDLE) pDevice); s_vCheckPreEDThreshold((HANDLE)pDevice); } + if ((pMgmt->sNodeDBTable[0].uInActiveCount >= (LOST_BEACON_COUNT/2)) && (pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) ) { pDevice->byBBVGANew = pDevice->abyBBVGA[0]; bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_BBSENSITIVITY, NULL); } - if (pMgmt->sNodeDBTable[0].uInActiveCount >= LOST_BEACON_COUNT) { pMgmt->sNodeDBTable[0].bActive = FALSE; pMgmt->eCurrMode = WMAC_MODE_STANDBY; @@ -1348,29 +1347,29 @@ start: union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); wrqu.ap_addr.sa_family = ARPHRD_ETHER; - printk("wireless_send_event--->SIOCGIWAP(disassociated)\n"); + PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n"); wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); } #endif - } + } } else if (pItemSSID->len != 0) { if (pDevice->uAutoReConnectTime < 10) { pDevice->uAutoReConnectTime++; - #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT + #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //network manager support need not do Roaming scan??? if(pDevice->bWPASuppWextEnabled ==TRUE) pDevice->uAutoReConnectTime = 0; #endif - } else { - //mike use old encryption status for wpa reauthen + //mike use old encryption status for wpa reauthen if(pDevice->bWPADEVUp) pDevice->eEncryptionStatus = pDevice->eOldEncryptionStatus; + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Roaming ...\n"); BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); - pMgmt->eScanType = WMAC_SCAN_ACTIVE; + pMgmt->eScanType = WMAC_SCAN_ACTIVE; bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); pDevice->uAutoReConnectTime = 0; @@ -1386,13 +1385,14 @@ start: } else { DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Adhoc re-scaning ...\n"); - pMgmt->eScanType = WMAC_SCAN_ACTIVE; + pMgmt->eScanType = WMAC_SCAN_ACTIVE; bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); pDevice->uAutoReConnectTime = 0; }; } if (pMgmt->eCurrState == WMAC_STATE_JOINTED) { + if (pDevice->bUpdateBBVGA) { //s_vCheckSensitivity((HANDLE) pDevice); s_vCheckPreEDThreshold((HANDLE)pDevice); @@ -1600,6 +1600,7 @@ BSSvUpdateNodeTxCounter( return; + } @@ -1784,3 +1785,4 @@ VOID s_vCheckPreEDThreshold( } return; } + diff --git a/drivers/staging/vt6655/bssdb.h b/drivers/staging/vt6655/bssdb.h index d35616d4883..b3b538bc7f3 100644 --- a/drivers/staging/vt6655/bssdb.h +++ b/drivers/staging/vt6655/bssdb.h @@ -33,7 +33,9 @@ //#if !defined(__DEVICE_H__) //#include "device.h" //#endif + #include <linux/skbuff.h> + #if !defined(__80211HDR_H__) #include "80211hdr.h" #endif @@ -103,13 +105,13 @@ typedef enum _NDIS_802_11_NETWORK_TYPE typedef struct tagSERPObject { BOOL bERPExist; BYTE byERP; -} ERPObject, DEF* PERPObject; +}ERPObject, DEF* PERPObject; typedef struct tagSRSNCapObject { BOOL bRSNCapExist; WORD wRSNCap; -} SRSNCapObject, DEF* PSRSNCapObject; +}SRSNCapObject, DEF* PSRSNCapObject; // BSS info(AP) #pragma pack(1) @@ -126,11 +128,12 @@ typedef struct tagKnownBSS { WORD wCapInfo; BYTE abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE byRxRate; + // WORD wATIMWindow; BYTE byRSSIStatCnt; LONG ldBmMAX; LONG ldBmAverage[RSSI_STAT_COUNT]; - LONG ldBmAverRange; + LONG ldBmAverRange; //For any BSSID selection improvment BOOL bSelected; @@ -345,6 +348,7 @@ BSSvSecondCallBack( IN HANDLE hDeviceContext ); + VOID BSSvUpdateNodeTxCounter( IN HANDLE hDeviceContext, diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h index 087a3e0e267..8243ecb290c 100644 --- a/drivers/staging/vt6655/desc.h +++ b/drivers/staging/vt6655/desc.h @@ -43,6 +43,9 @@ #endif + + + /*--------------------- Export Definitions -------------------------*/ #define B_OWNED_BY_CHIP 1 // @@ -129,6 +132,7 @@ #define CB_PROTOCOL_RESERVED_SECTION 16 + // if retrys excess 15 times , tx will abort, and // if tx fifo underflow, tx will fail // we should try to resend it diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index 33d5a4452d9..d95f39444e1 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -81,9 +81,10 @@ // - -// device specific // +// device specific +// + #if !defined(_KCOMPAT_H) #include "kcompat.h" #endif @@ -122,11 +123,9 @@ #if !defined(__DESC_H__) #include "desc.h" #endif - #if !defined(__KEY_H__) #include "key.h" #endif - #if !defined(__MAC_H__) #include "mac.h" #endif @@ -189,6 +188,7 @@ #define BB_VGA_CHANGE_THRESHOLD 16 + #ifndef RUN_AT #define RUN_AT(x) (jiffies+(x)) #endif @@ -312,7 +312,6 @@ typedef struct tagSPMKIDCandidateEvent { PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST]; } SPMKIDCandidateEvent, DEF* PSPMKIDCandidateEvent; - //-- //++ 802.11h related @@ -347,7 +346,6 @@ typedef struct tagSCacheEntry{ BYTE abyAddr2[U_ETHER_ADDR_LEN]; } SCacheEntry, *PSCacheEntry; - typedef struct tagSCache{ /* The receive cache is updated circularly. The next entry to be written is * indexed by the "InPtr". @@ -372,7 +370,6 @@ typedef struct tagSDeFragControlBlock - //flags for options #define DEVICE_FLAGS_IP_ALIGN 0x00000001UL #define DEVICE_FLAGS_PREAMBLE_TYPE 0x00000002UL @@ -417,11 +414,11 @@ typedef struct _RxManagementQueue typedef struct __device_opt { - int nRxDescs0; //Number of RX descriptors0 - int nRxDescs1; //Number of RX descriptors1 - int nTxDescs[2]; //Number of TX descriptors 0, 1 - int int_works; //interrupt limits - int rts_thresh; //rts threshold + int nRxDescs0; //Number of RX descriptors0 + int nRxDescs1; //Number of RX descriptors1 + int nTxDescs[2]; //Number of TX descriptors 0, 1 + int int_works; //interrupt limits + int rts_thresh; //rts threshold int frag_thresh; int data_rate; int channel_num; @@ -609,8 +606,8 @@ typedef struct __device_info { BYTE byERPFlag; WORD wUseProtectCntDown; - BOOL bRadioControlOff; - BOOL bRadioOff; + BOOL bRadioControlOff; + BOOL bRadioOff; BOOL bEnablePSMode; WORD wListenInterval; BOOL bPWBitOn; @@ -666,6 +663,7 @@ typedef struct __device_info { //2007-0925-01<Add>by MikeLiu //mike add :save old Encryption NDIS_802_11_WEP_STATUS eOldEncryptionStatus; + SKeyManagement sKey; DWORD dwIVCounter; @@ -674,7 +672,6 @@ typedef struct __device_info { RC4Ext SBox; BYTE abyPRNG[WLAN_WEPMAX_KEYLEN+3]; - BYTE byKeyIndex; UINT uKeyLength; BYTE abyKey[WLAN_WEP232_KEYLEN]; @@ -713,6 +710,7 @@ typedef struct __device_info { BYTE byBBPreEDRSSI; BYTE byBBPreEDIndex; + BOOL bRadioCmd; DWORD dwDiagRefCount; diff --git a/drivers/staging/vt6655/device_cfg.h b/drivers/staging/vt6655/device_cfg.h index 1cbb4440b46..90b540874b8 100644 --- a/drivers/staging/vt6655/device_cfg.h +++ b/drivers/staging/vt6655/device_cfg.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 1996, 2003 VIA Networking, Inc. All rights reserved. + * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. + * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +16,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * * File: device_cfg.h * * Purpose: Driver configuration header @@ -100,6 +100,7 @@ struct _version { #ifndef DEVICE_VERSION #define DEVICE_VERSION "1.19.12" #endif + //config file #include <linux/fs.h> #include <linux/fcntl.h> diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index f7a5a662a3b..5ab8f943c58 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -144,6 +144,7 @@ static BOOL s_bAPModeRxCtl( ); + static BOOL s_bAPModeRxData ( IN PSDevice pDevice, IN struct sk_buff* skb, @@ -532,6 +533,8 @@ device_receive_frame ( return FALSE; } } + + if (IS_FC_WEP(pbyFrame)) { BOOL bRxDecryOK = FALSE; @@ -718,7 +721,6 @@ device_receive_frame ( } return FALSE; } - //mike add:station mode check eapol-key challenge---> { BYTE Protocol_Version; //802.1x Authentication @@ -742,8 +744,10 @@ device_receive_frame ( } } + // Data frame Handle + if (pDevice->bEnablePSMode) { if (IS_FC_MOREDATA((skb->data+4))) { if (BITbIsBitOn(*pbyRsr, RSR_ADDROK)) { @@ -890,12 +894,11 @@ device_receive_frame ( pDevice->dev->name); } } - -//2008-0409-07, <Add> by Einsn Liu + //2008-0409-07, <Add> by Einsn Liu #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //send event to wpa_supplicant //if(pDevice->bWPADevEnable == TRUE) - { + { union iwreq_data wrqu; struct iw_michaelmicfailure ev; int keyidx = pbyFrame[cbHeaderSize+3] >> 6; //top two-bits @@ -917,6 +920,8 @@ device_receive_frame ( } #endif + + if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { wpahdr = (viawget_wpa_header *)pDevice->skb->data; if ((pDevice->pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && @@ -1067,6 +1072,7 @@ device_receive_frame ( } return FALSE; } + return TRUE; } @@ -1429,6 +1435,7 @@ static BOOL s_bHostWepRxEncryption ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); if (byDecMode == KEY_CTL_TKIP) { + if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || (bOnFly == FALSE)) { // Software TKIP // 1. 3253 A @@ -1471,8 +1478,6 @@ static BOOL s_bHostWepRxEncryption ( - - static BOOL s_bAPModeRxData ( IN PSDevice pDevice, IN struct sk_buff* skb, @@ -1487,9 +1492,9 @@ static BOOL s_bAPModeRxData ( BOOL bRelayOnly = FALSE; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; WORD wAID; - struct sk_buff* skbcpy = NULL; + struct sk_buff* skbcpy = NULL; if (FrameSize > CB_MAX_BUF_SIZE) return FALSE; @@ -1498,6 +1503,7 @@ static BOOL s_bAPModeRxData ( if (pMgmt->sNodeDBTable[0].bPSEnable) { skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz); + // if any node in PS mode, buffer packet until DTIM. if (skbcpy == NULL) { DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "relay multicast no skb available \n"); @@ -1507,6 +1513,7 @@ static BOOL s_bAPModeRxData ( skbcpy->len = FrameSize; memcpy(skbcpy->data, skb->data+cbHeaderOffset, FrameSize); skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skbcpy); + pMgmt->sNodeDBTable[0].wEnQueueCnt++; // set tx map pMgmt->abyPSTxMap[0] |= byMask[0]; diff --git a/drivers/staging/vt6655/dpc.h b/drivers/staging/vt6655/dpc.h index 68447c44dc2..6295c99902e 100644 --- a/drivers/staging/vt6655/dpc.h +++ b/drivers/staging/vt6655/dpc.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * File: whdr.h + * File: dpc.h * * Purpose: * diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index dfe4e0aa352..658e1aec8f3 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/ |