diff options
author | Andres More <more.andres@gmail.com> | 2013-03-26 18:18:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-28 16:06:27 -0700 |
commit | 9fbafdd9add10e349deeb1f38290943d5107e276 (patch) | |
tree | 54ad92d792967727d0ca7f37579a3ecf4c313d96 | |
parent | 1cedfa317eb15a82b4e44ed868f4e451238d5aea (diff) |
staging: vt6656: remove consecutive newlines
Several sed -i '/^$/{ N /^\n$/ D }' drivers/staging/vt6656/*.[ch]
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
68 files changed, 0 insertions, 875 deletions
diff --git a/drivers/staging/vt6656/80211hdr.h b/drivers/staging/vt6656/80211hdr.h index 2b42f8a7cc2c..000304ffad6c 100644 --- a/drivers/staging/vt6656/80211hdr.h +++ b/drivers/staging/vt6656/80211hdr.h @@ -28,7 +28,6 @@ #ifndef __80211HDR_H__ #define __80211HDR_H__ - /* bit type */ #define BIT0 0x00000001 #define BIT1 0x00000002 @@ -322,7 +321,4 @@ typedef union tagUWLAN_80211HDR { } UWLAN_80211HDR, *PUWLAN_80211HDR; - - - #endif /* __80211HDR_H__ */ diff --git a/drivers/staging/vt6656/80211mgr.c b/drivers/staging/vt6656/80211mgr.c index 368eb2e19f0f..61edb51f3836 100644 --- a/drivers/staging/vt6656/80211mgr.c +++ b/drivers/staging/vt6656/80211mgr.c @@ -56,20 +56,9 @@ #include "80211hdr.h" #include "wpa.h" - - - - - static int msglevel = MSG_LEVEL_INFO; /*static int msglevel =MSG_LEVEL_DEBUG;*/ - - - - - - /*+ * * Routine Description: @@ -112,7 +101,6 @@ vMgrEncodeBeacon( * -*/ - void vMgrDecodeBeacon( PWLAN_FR_BEACON pFrame @@ -237,14 +225,12 @@ vMgrEncodeDisassociation( { pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; - /* Fixed Fields */ pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) + WLAN_DISASSOC_OFF_REASON); pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_DISASSOC_OFF_REASON + sizeof(*(pFrame->pwReason)); } - /*+ * * Routine Description: @@ -279,7 +265,6 @@ vMgrDecodeDisassociation( * -*/ - void vMgrEncodeAssocRequest( PWLAN_FR_ASSOCREQ pFrame @@ -294,7 +279,6 @@ vMgrEncodeAssocRequest( pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_ASSOCREQ_OFF_LISTEN_INT + sizeof(*(pFrame->pwListenInterval)); } - /*+ * * Routine Description: (AP) @@ -388,7 +372,6 @@ vMgrEncodeAssocResponse( + sizeof(*(pFrame->pwAid)); } - /*+ * * Routine Description: @@ -431,7 +414,6 @@ vMgrDecodeAssocResponse( pFrame->pExtSuppRates = NULL; } - /*+ * * Routine Description: @@ -460,7 +442,6 @@ vMgrEncodeReassocRequest( pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_REASSOCREQ_OFF_CURR_AP + sizeof(*(pFrame->pAddrCurrAP)); } - /*+ * * Routine Description: (AP) @@ -472,7 +453,6 @@ vMgrEncodeReassocRequest( * -*/ - void vMgrDecodeReassocRequest( PWLAN_FR_REASSOCREQ pFrame @@ -528,8 +508,6 @@ vMgrDecodeReassocRequest( } } - - /*+ * * Routine Description: @@ -541,7 +519,6 @@ vMgrDecodeReassocRequest( * -*/ - void vMgrEncodeProbeRequest( PWLAN_FR_PROBEREQ pFrame @@ -601,7 +578,6 @@ vMgrDecodeProbeRequest( } } - /*+ * * Routine Description: @@ -613,7 +589,6 @@ vMgrDecodeProbeRequest( * -*/ - void vMgrEncodeProbeResponse( PWLAN_FR_PROBERESP pFrame @@ -634,8 +609,6 @@ vMgrEncodeProbeResponse( sizeof(*(pFrame->pwCapInfo)); } - - /*+ * * Routine Description: @@ -654,7 +627,6 @@ vMgrDecodeProbeResponse( { PWLAN_IE pItem; - pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; /* Fixed Fields */ @@ -748,7 +720,6 @@ vMgrDecodeProbeResponse( } } - /*+ * * Routine Description: @@ -777,7 +748,6 @@ vMgrEncodeAuthen( pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_AUTHEN_OFF_STATUS + sizeof(*(pFrame->pwStatus)); } - /*+ * * Routine Description: @@ -814,7 +784,6 @@ vMgrDecodeAuthen( pFrame->pChallenge = (PWLAN_IE_CHALLENGE)pItem; } - /*+ * * Routine Description: @@ -839,7 +808,6 @@ vMgrEncodeDeauthen( pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_DEAUTHEN_OFF_REASON + sizeof(*(pFrame->pwReason)); } - /*+ * * Routine Description: @@ -863,7 +831,6 @@ vMgrDecodeDeauthen( + WLAN_DEAUTHEN_OFF_REASON); } - /*+ * * Routine Description: (AP) diff --git a/drivers/staging/vt6656/80211mgr.h b/drivers/staging/vt6656/80211mgr.h index 87d260499aaf..39cde1a0b66c 100644 --- a/drivers/staging/vt6656/80211mgr.h +++ b/drivers/staging/vt6656/80211mgr.h @@ -33,7 +33,6 @@ #include "80211hdr.h" - #define WLAN_MIN_ARRAY 1 /* Information Element ID value */ @@ -211,9 +210,6 @@ #define MEASURE_MODE_INCAPABLE 0x02 #define MEASURE_MODE_REFUSED 0x04 - - - /* Information Element types */ #pragma pack(1) @@ -477,7 +473,6 @@ typedef struct _WLAN_IE_TPC_REP { u8 byLinkMargin; } WLAN_IE_TPC_REP, *PWLAN_IE_TPC_REP; - typedef struct _WLAN_IE_IBSS_DFS { u8 byElementID; u8 len; @@ -715,7 +710,6 @@ typedef struct tagWLAN_FR_DEAUTHEN { } WLAN_FR_DEAUTHEN, *PWLAN_FR_DEAUTHEN; - void vMgrEncodeBeacon( PWLAN_FR_BEACON pFrame diff --git a/drivers/staging/vt6656/aes_ccmp.c b/drivers/staging/vt6656/aes_ccmp.c index 61883316a264..28a4c4c30416 100644 --- a/drivers/staging/vt6656/aes_ccmp.c +++ b/drivers/staging/vt6656/aes_ccmp.c @@ -33,9 +33,6 @@ #include "device.h" #include "80211hdr.h" - - - /* * SBOX Table */ @@ -97,9 +94,6 @@ u8 dot3_table[256] = { 0x0b, 0x08, 0x0d, 0x0e, 0x07, 0x04, 0x01, 0x02, 0x13, 0x10, 0x15, 0x16, 0x1f, 0x1c, 0x19, 0x1a }; - - - static void xor_128(u8 *a, u8 *b, u8 *out) { u32 * dwPtrA = (u32 *) a; @@ -112,7 +106,6 @@ static void xor_128(u8 *a, u8 *b, u8 *out) (*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++); } - static void xor_32(u8 *a, u8 *b, u8 *out) { u32 * dwPtrA = (u32 *) a; diff --git a/drivers/staging/vt6656/aes_ccmp.h b/drivers/staging/vt6656/aes_ccmp.h index 775d8c23575d..ed6a9ae315de 100644 --- a/drivers/staging/vt6656/aes_ccmp.h +++ b/drivers/staging/vt6656/aes_ccmp.h @@ -30,10 +30,6 @@ #ifndef __AES_H__ #define __AES_H__ - - - - bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, u16 wFrameSize); #endif /* __AES_CCMP_H__ */ diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index e0c7b7ae152e..33fa76759bf1 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -48,14 +48,6 @@ static int msglevel =MSG_LEVEL_INFO; //static int msglevel =MSG_LEVEL_DEBUG; - - - - - - - - u8 abyVT3184_AGC[] = { 0x00, //0 0x00, //1 @@ -123,7 +115,6 @@ u8 abyVT3184_AGC[] = { 0x3E //3F }; - u8 abyVT3184_AL2230[] = { 0x31,//00 0x00, @@ -383,8 +374,6 @@ u8 abyVT3184_AL2230[] = { 0x00 }; - - //{{RobertYu:20060515, new BB setting for VT3226D0 u8 abyVT3184_VT3226D0[] = { 0x31,//00 @@ -648,7 +637,6 @@ u8 abyVT3184_VT3226D0[] = { const u16 awcFrameTime[MAX_RATE] = {10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216}; - /* static unsigned long @@ -691,7 +679,6 @@ BBuGetFrameTime( unsigned int uRateIdx = (unsigned int)wRate; unsigned int uRate = 0; - if (uRateIdx > RATE_54M) { ASSERT(0); return 0; @@ -896,7 +883,6 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength, } } - /* * Description: Set Antenna mode * @@ -925,7 +911,6 @@ void BBvSetAntennaMode(struct vnt_private *pDevice, u8 byAntennaMode) break; } - CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_SET_ANTMD, (u16) byAntennaMode, @@ -967,7 +952,6 @@ int BBbVT3184Init(struct vnt_private *pDevice) return false; } - // if ((pDevice->abyEEPROM[EEP_OFS_RADIOCTL]&0x06)==0x04) // return false; @@ -1106,7 +1090,6 @@ else { abyArray ); - if ((pDevice->byRFType == RF_VT3226) || //RobertYu:20051116, 20060111 remove VT3226D0 (pDevice->byRFType == RF_VT3342A0) //RobertYu:20060609 ) { @@ -1119,7 +1102,6 @@ else { MACvRegBitsOn(pDevice,MAC_REG_PAPEDELAY,0x01); } - ControlvWriteByte(pDevice,MESSAGE_REQUEST_BBREG,0x04,0x7F); ControlvWriteByte(pDevice,MESSAGE_REQUEST_BBREG,0x0D,0x01); @@ -1155,7 +1137,6 @@ void BBvSetShortSlotTime(struct vnt_private *pDevice) ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x0A, pDevice->byBBRxConf); } - void BBvSetVGAGainOffset(struct vnt_private *pDevice, u8 byData) { @@ -1194,7 +1175,6 @@ void BBvExitDeepSleep(struct vnt_private *pDevice) ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x0D, 0x01);//CR13 } - static unsigned long s_ulGetLowSQ3(struct vnt_private *pDevice) { int ii; @@ -1241,7 +1221,6 @@ static unsigned long s_ulGetRatio(struct vnt_private *pDevice) return ulRatio; } - static void s_vClearSQ3Value(struct vnt_private *pDevice) { int ii; @@ -1253,7 +1232,6 @@ static void s_vClearSQ3Value(struct vnt_private *pDevice) } } - /* * Description: Antenna Diversity * @@ -1385,7 +1363,6 @@ void BBvAntennaDiversity(struct vnt_private *pDevice, } //byAntennaState } - /*+ * * Description: @@ -1418,11 +1395,9 @@ void TimerSQ3CallBack(struct vnt_private *pDevice) add_timer(&pDevice->TimerSQ3Tmax3); add_timer(&pDevice->TimerSQ3Tmax2); - spin_unlock_irq(&pDevice->lock); } - /*+ * * Description: @@ -1471,7 +1446,6 @@ void TimerSQ3Tmax3CallBack(struct vnt_private *pDevice) void BBvUpdatePreEDThreshold(struct vnt_private *pDevice, int bScanning) { - switch(pDevice->byRFType) { case RF_AL2230: diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h index e24f201ca311..0a634adabf0e 100644 --- a/drivers/staging/vt6656/baseband.h +++ b/drivers/staging/vt6656/baseband.h @@ -36,7 +36,6 @@ #include "tether.h" #include "device.h" - #define PREAMBLE_LONG 0 #define PREAMBLE_SHORT 1 @@ -82,12 +81,6 @@ #define TOP_RATE_2M 0x00200000 #define TOP_RATE_1M 0x00100000 - - - - - - unsigned int BBuGetFrameTime( u8 byPreambleType, diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c index 101417e1660c..ee79bbdf1a06 100644 --- a/drivers/staging/vt6656/bssdb.c +++ b/drivers/staging/vt6656/bssdb.c @@ -58,16 +58,9 @@ #include "rndis.h" #include "iowpa.h" - - - - - static int msglevel =MSG_LEVEL_INFO; //static int msglevel =MSG_LEVEL_DEBUG; - - const u16 awHWRetry0[5][5] = { {RATE_18M, RATE_18M, RATE_12M, RATE_12M, RATE_12M}, {RATE_24M, RATE_24M, RATE_18M, RATE_12M, RATE_12M}, @@ -83,20 +76,10 @@ const u16 awHWRetry1[5][5] = { {RATE_54M, RATE_54M, RATE_36M, RATE_18M, RATE_18M} }; - - - static void s_vCheckSensitivity(struct vnt_private *pDevice); static void s_vCheckPreEDThreshold(struct vnt_private *pDevice); static void s_uCalculateLinkQual(struct vnt_private *pDevice); - - - - - - - /*+ * * Routine Description: @@ -214,7 +197,6 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, pCurrBSS->abyBSSID); jj++; - if (pSelect == NULL) { pSelect = pCurrBSS; } else { @@ -242,7 +224,6 @@ pDevice->bSameBSSMaxNum = jj; } - /*+ * * Routine Description: @@ -253,7 +234,6 @@ pDevice->bSameBSSMaxNum = jj; * -*/ - void BSSvClearBSSList(struct vnt_private *pDevice, int bKeepCurrBSSID) { struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; @@ -278,8 +258,6 @@ void BSSvClearBSSList(struct vnt_private *pDevice, int bKeepCurrBSSID) BSSvClearAnyBSSJoinRecord(pDevice); } - - /*+ * * Routine Description: @@ -313,8 +291,6 @@ PKnownBSS BSSpAddrIsInBSSList(struct vnt_private *pDevice, return NULL; }; - - /*+ * * Routine Description: @@ -350,7 +326,6 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, unsigned int ii; bool bParsingQuiet = false; - pBSSList = (PKnownBSS)&(pMgmt->sBSSList[0]); for (ii = 0; ii < MAX_BSS_NUM; ii++) { @@ -491,7 +466,6 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, return true; } - /*+ * * Routine Description: @@ -532,7 +506,6 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, if (pBSSList == NULL) return false; - pBSSList->qwBSSTimestamp = cpu_to_le64(qwTimestamp); pBSSList->wBeaconInterval = cpu_to_le16(wBeaconInterval); @@ -631,10 +604,6 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, return true; } - - - - /*+ * * Routine Description: @@ -665,8 +634,6 @@ int BSSbIsSTAInNodeDB(struct vnt_private *pDevice, return false; }; - - /*+ * * Routine Description: @@ -724,8 +691,6 @@ void BSSvCreateOneNode(struct vnt_private *pDevice, u32 *puNodeIndex) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create node index = %d\n", ii); }; - - /*+ * * Routine Description: @@ -743,7 +708,6 @@ void BSSvRemoveOneNode(struct vnt_private *pDevice, u32 uNodeIndex) u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; struct sk_buff *skb; - while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[uNodeIndex].sTxPSQueue)) != NULL) dev_kfree_skb(skb); // clear context @@ -941,7 +905,6 @@ if(pDevice->byReAssocCount > 0) { if (pMgmt->sNodeDBTable[ii].bPSEnable) uSleepySTACnt++; - } // Rate fallback check @@ -974,7 +937,6 @@ if(pDevice->byReAssocCount > 0) { } - if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->byBBType == BB_TYPE_11G)) { // on/off protect mode @@ -1024,7 +986,6 @@ if(pDevice->byReAssocCount > 0) { } - // Check if any STA in PS mode, enable DTIM multicast deliver if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { if (uSleepySTACnt > 0) diff --git a/drivers/staging/vt6656/bssdb.h b/drivers/staging/vt6656/bssdb.h index 562f8f033b41..bce3b4654165 100644 --- a/drivers/staging/vt6656/bssdb.h +++ b/drivers/staging/vt6656/bssdb.h @@ -36,7 +36,6 @@ #include "card.h" #include "mib.h" - #define MAX_NODE_NUM 64 #define MAX_BSS_NUM 42 #define LOST_BEACON_COUNT 10 /* 10 sec, XP defined */ @@ -65,11 +64,6 @@ #define MAX_WPA_IE_LEN 64 - - - - - // // IEEE 802.11 Structures and definitions // @@ -79,7 +73,6 @@ typedef struct tagSERPObject { u8 byERP; } ERPObject, *PERPObject; - typedef struct tagSRSNCapObject { bool bRSNCapExist; u16 wRSNCap; @@ -149,8 +142,6 @@ typedef struct tagKnownBSS { } __attribute__ ((__packed__)) KnownBSS , *PKnownBSS; - - typedef enum tagNODE_STATE { NODE_FREE, NODE_AGED, @@ -159,7 +150,6 @@ typedef enum tagNODE_STATE { NODE_ASSOC } NODE_STATE, *PNODE_STATE; - // STA node info typedef struct tagKnownNodeDB { // STA info @@ -219,7 +209,6 @@ typedef struct tagKnownNodeDB { } KnownNodeDB, *PKnownNodeDB; - PKnownBSS BSSpSearchBSSList(struct vnt_private *, u8 *pbyDesireBSSID, u8 *pbyDesireSSID, CARD_PHY_TYPE ePhyType); diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 2fad79354106..24291aee58b5 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -60,21 +60,15 @@ #include "rndis.h" #include "control.h" - //static int msglevel =MSG_LEVEL_DEBUG; static int msglevel =MSG_LEVEL_INFO; - - - //const u16 cwRXBCNTSFOff[MAX_RATE] = //{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; const u16 cwRXBCNTSFOff[MAX_RATE] = {192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3}; - - /* * Description: Set NIC media channel * @@ -630,7 +624,6 @@ u8 CARDbyGetPktType(struct vnt_private *pDevice) } } - /* * Description: Calculate TSF offset of two TSF input * Get TSF Offset from RxBCN's TSF and local TSF @@ -660,8 +653,6 @@ u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2) return qwTSFOffset; } - - /* * Description: Sync. TSF counter to BSS * Get TSF offset and write to HW @@ -683,7 +674,6 @@ void CARDvAdjustTSF(struct vnt_private *pDevice, u8 byRxRate, u64 qwTSFOffset = 0; u8 pbyData[8]; - qwTSFOffset = CARDqGetTSFOffset(byRxRate, qwBSSTimestamp, qwLocalTSF); // adjust TSF // HW's TSF add TSF Offset reg @@ -727,7 +717,6 @@ bool CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF) return true; } - /* * Description: Clear NIC TSF counter * Clear local TSF counter @@ -789,7 +778,6 @@ u64 CARDqGetNextTBTT(u64 qwTSF, u16 wBeaconInterval) return (qwTSF); } - /* * Description: Set NIC TSF counter for first Beacon time * Get NEXTTBTT from adjusted TSF and Beacon Interval @@ -834,7 +822,6 @@ void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, u16 wBeaconInterval) return; } - /* * Description: Sync NIC TSF counter for Beacon time * Get NEXTTBTT and write to HW @@ -876,7 +863,6 @@ void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF, pbyData ); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Card:Update Next TBTT[%8lx]\n", (unsigned long)qwTSF); @@ -922,7 +908,6 @@ int CARDbRadioPowerOff(struct vnt_private *pDevice) return bResult; } - /* * Description: Turn on Radio power * diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h index 307340f7fd2c..c3017a74fa0f 100644 --- a/drivers/staging/vt6656/card.h +++ b/drivers/staging/vt6656/card.h @@ -30,8 +30,6 @@ #define __CARD_H__ #include "device.h" - - /* init card type */ typedef enum _CARD_PHY_TYPE { @@ -52,7 +50,6 @@ typedef enum _CARD_OP_MODE { #define CB_MAX_CHANNEL_5G 42 /* add channel9(5045MHz), 41==>42 */ #define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G) - struct vnt_private; void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel); diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c index 8f2b04e3d0e7..5158ff4b346a 100644 --- a/drivers/staging/vt6656/channel.c +++ b/drivers/staging/vt6656/channel.c @@ -42,9 +42,6 @@ static int msglevel = MSG_LEVEL_INFO; //static int msglevel =MSG_LEVEL_DEBUG; - - - static SChannelTblElement sChannelTbl[CB_MAX_CHANNEL+1] = { {0, 0, false}, @@ -106,8 +103,6 @@ static SChannelTblElement sChannelTbl[CB_MAX_CHANNEL+1] = {165, 5825, true} //56 }; - - /************************************************************************ * The Radar regulation rules for each country ************************************************************************/ diff --git a/drivers/staging/vt6656/channel.h b/drivers/staging/vt6656/channel.h index 9331974eef1c..95701e0cbee3 100644 --- a/drivers/staging/vt6656/channel.h +++ b/drivers/staging/vt6656/channel.h @@ -32,16 +32,12 @@ #include "device.h" - - typedef struct tagSChannelTblElement { u8 byChannelNumber; unsigned int uFrequency; bool bValid; } SChannelTblElement, *PSChannelTblElement; - - bool ChannelValid(unsigned int CountryCode, unsigned int ChannelNum); void CHvInitChannelTable(struct vnt_private *pDevice); diff --git a/drivers/staging/vt6656/control.c b/drivers/staging/vt6656/control.c index eda0de3c2a58..026784fcde82 100644 --- a/drivers/staging/vt6656/control.c +++ b/drivers/staging/vt6656/control.c @@ -46,10 +46,6 @@ /* static int msglevel =MSG_LEVEL_INFO; */ /* static int msglevel =MSG_LEVEL_DEBUG; */ - - - - void ControlvWriteByte(struct vnt_private *pDevice, u8 reg, u8 reg_off, u8 data) { diff --git a/drivers/staging/vt6656/control.h b/drivers/staging/vt6656/control.h index d286b33b99e6..9da9b96add70 100644 --- a/drivers/staging/vt6656/control.h +++ b/drivers/staging/vt6656/control.h @@ -33,7 +33,6 @@ #include "device.h" #include "usbpipe.h" - #define CONTROLnsRequestOut(Device, Request, Value, Index, Length, Buffer) \ PIPEnsControlOut(Device, Request, Value, Index, Length, Buffer) @@ -43,9 +42,6 @@ #define CONTROLnsRequestIn(Device, Request, Value, Index, Length, Buffer) \ PIPEnsControlIn(Device, Request, Value, Index, Length, Buffer) - - - void ControlvWriteByte(struct vnt_private *pDevice, u8 reg, u8 reg_off, u8 data); @@ -55,5 +51,4 @@ void ControlvReadByte(struct vnt_private *pDevice, u8 reg, u8 reg_off, void ControlvMaskByte(struct vnt_private *pDevice, u8 reg_type, u8 reg_off, u8 reg_mask, u8 data); - #endif /* __CONTROL_H__ */ diff --git a/drivers/staging/vt6656/country.h b/drivers/staging/vt6656/country.h index 7bdc8d47aedb..a0320d8f1362 100644 --- a/drivers/staging/vt6656/country.h +++ b/drivers/staging/vt6656/country.h @@ -156,7 +156,6 @@ typedef enum _COUNTRY_CODE { CCODE_MAX } COUNTRY_CODE; - /************************************************************************ * Function prototype ************************************************************************/ diff --git a/drivers/staging/vt6656/datarate.c b/drivers/staging/vt6656/datarate.c index 6be3246b6f71..17fbc35ebcbf 100644 --- a/drivers/staging/vt6656/datarate.c +++ b/drivers/staging/vt6656/datarate.c @@ -43,14 +43,6 @@ #include "srom.h" #include "rf.h" - - - - - - - - /* static int msglevel = MSG_LEVEL_DEBUG; */ static int msglevel =MSG_LEVEL_INFO; const u8 acbyIERate[MAX_RATE] = @@ -60,7 +52,6 @@ const u8 acbyIERate[MAX_RATE] = #define AUTORATE_TXFAIL_CNT 0x0064 #define AUTORATE_TIMEOUT 10 - void s_vResetCounter(PKnownNodeDB psNodeDBTable); void s_vResetCounter(PKnownNodeDB psNodeDBTable) @@ -74,9 +65,6 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable) } } - - - /*+ * * Routine Description: @@ -95,9 +83,6 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable) #define AUTORATE_TXCNT_THRESHOLD 20 #define AUTORATE_INC_THRESHOLD 30 - - - /*+ * * Description: @@ -241,7 +226,6 @@ void RATEvParseMaxRate(struct vnt_private *pDevice, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Exit ParseMaxRate\n"); } - /*+ * * Routine Description: diff --git a/drivers/staging/vt6656/datarate.h b/drivers/staging/vt6656/datarate.h index bdbdc1c99d04..43cb77894b66 100644 --- a/drivers/staging/vt6656/datarate.h +++ b/drivers/staging/vt6656/datarate.h @@ -29,8 +29,6 @@ #ifndef __DATARATE_H__ #define __DATARATE_H__ - - #define FALLBACK_PKT_COLLECT_TR_H 50 /* pkts */ #define FALLBACK_PKT_COLLECT_TR_L 10 /* pkts */ #define FALLBACK_POLL_SECOND 5 /* 5 sec */ @@ -56,14 +54,6 @@ #define RATE_AUTO 12 #define MAX_RATE 12 - - - - - - - - void RATEvParseMaxRate(struct vnt_private *, PWLAN_IE_SUPP_RATES pItemRates, PWLAN_IE_SUPP_RATES pItemExtRates, int bUpdateBasicRate, u16 *pwMaxBasicRate, u16 *pwMaxSuppRate, u16 *pwSuppRate, diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index e3f858a00b3d..f07ba242811b 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -45,7 +45,6 @@ #include <linux/timer.h> #include <linux/usb.h> - #ifdef SIOCETHTOOL #define DEVICE_ETHTOOL_IOCTL_SUPPORT #include <linux/ethtool.h> @@ -120,7 +119,6 @@ #define ANT_RXA 2 #define ANT_RXB 3 - #define MAXCHECKHANGCNT 4 /* Packet type */ @@ -140,7 +138,6 @@ #define PRIVATE_Message 0 - #define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); } #define PRINT_K(p, args...) { if (PRIVATE_Message) printk(p, ##args); } @@ -248,7 +245,6 @@ typedef enum __DEVICE_NDIS_STATUS { /* PMKID Structures */ typedef unsigned char NDIS_802_11_PMKID_VALUE[16]; - typedef enum _NDIS_802_11_WEP_STATUS { Ndis802_11WEPEnabled, @@ -266,7 +262,6 @@ typedef enum _NDIS_802_11_WEP_STATUS } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS, NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS; - typedef enum _NDIS_802_11_STATUS_TYPE { Ndis802_11StatusType_Authentication, @@ -281,7 +276,6 @@ typedef struct _PMKID_CANDIDATE { unsigned long Flags; } PMKID_CANDIDATE, *PPMKID_CANDIDATE; - typedef struct _BSSID_INFO { NDIS_802_11_MAC_ADDRESS BSSID; @@ -368,7 +362,6 @@ typedef struct tagSDeFragControlBlock /* for device_set_media_duplex */ #define DEVICE_LINK_CHANGE 0x00000001UL - typedef struct __device_opt { int nRxDescs0; /* number of RX descriptors 0 */ int nTxDescs0; /* number of TX descriptors 0, 1, 2, 3 */ @@ -383,7 +376,6 @@ typedef struct __device_opt { u32 flags; } OPTIONS, *POPTIONS; - struct vnt_private { /* netdev */ struct usb_device *usb; @@ -417,7 +409,6 @@ struct vnt_private { u32 cbFreeDFCB; u32 uCurrentDFCBIdx; - /* USB */ struct urb *pControlURB; struct urb *pInterruptURB; @@ -450,7 +441,6 @@ struct vnt_private { /* default config from file by user setting */ DEFAULT_CONFIG config_file; - /* Statistic for USB */ unsigned long ulBulkInPosted; unsigned long ulBulkInError; @@ -467,14 +457,12 @@ struct vnt_private { unsigned long ulIntInContCRCError; unsigned long ulIntInBytesRead; - /* Version control */ u16 wFirmwareVersion; u8 byLocalID; u8 byRFType; u8 byBBRxConf; - u8 byZoneType; int bZoneRegExist; @@ -568,7 +556,6 @@ struct vnt_private { u8 byTopOFDMBasicRate; u8 byTopCCKBasicRate; - u32 dwAotoRateTxOkCnt; u32 dwAotoRateTxFailCnt; u32 dwErrorRateThreshold[13]; @@ -681,7 +668,6 @@ struct vnt_private { SKeyManagement sKey; u32 dwIVCounter; - RC4Ext SBox; u8 abyPRNG[WLAN_WEPMAX_KEYLEN+3]; u8 byKeyIndex; @@ -698,13 +684,11 @@ struct vnt_private { /* QoS */ int bGrpAckPolicy; - u8 byAutoFBCtrl; int bTxMICFail; int bRxMICFail; - /* For Update BaseBand VGA Gain Offset */ int bUpdateBBVGA; u32 uBBVGADiffCount; @@ -716,7 +700,6 @@ struct vnt_private { u8 byBBPreEDRSSI; u8 byBBPreEDIndex; - int bRadioCmd; u32 dwDiagRefCount; @@ -754,7 +737,6 @@ struct vnt_private { SPMKID gsPMKID; SPMKIDCandidateEvent gsPMKIDCandidate; - /* for 802.11h */ int b11hEnable; @@ -785,9 +767,6 @@ struct vnt_private { }; - - - #define EnqueueRCB(_Head, _Tail, _RCB) \ { \ if (!_Head) { \ @@ -809,7 +788,6 @@ struct vnt_private { Head = RCB->Next; \ } - #define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) { \ if ((uVar) >= ((uModulo) - 1)) \ (uVar) = 0; \ @@ -817,7 +795,6 @@ struct vnt_private { (uVar)++; \ } - #define fMP_RESET_IN_PROGRESS 0x00000001 #define fMP_DISCONNECTED 0x00000002 #define fMP_HALT_IN_PROGRESS 0x00000004 @@ -838,7 +815,6 @@ struct vnt_private { #define MP_IS_READY(_M) (((_M)->Flags & \ (fMP_DISCONNECTED | fMP_RESET_IN_PROGRESS | fMP_HALT_IN_PROGRESS | fMP_INIT_IN_PROGRESS | fMP_SURPRISE_REMOVED)) == 0) - int device_alloc_frag_buf(struct vnt_private *, PSDeFragControlBlock pDeF); #endif diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 675b609a32e3..7ec166a2ac81 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -56,18 +56,12 @@ #include "datarate.h" #include "usbpipe.h" - - //static int msglevel =MSG_LEVEL_DEBUG; static int msglevel =MSG_LEVEL_INFO; const u8 acbyRxRate[MAX_RATE] = {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108}; - - - - static u8 s_byGetRateIdx(u8 byRate); static @@ -96,7 +90,6 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, u32 FrameSize, u8 *pbyRsr, int bOnFly, PSKeyItem pKey, u8 *pbyNewRsr, s32 *pbExtIV, u16 *pwRxTSC15_0, u32 *pdwRxTSC47_16); - /*+ * * Description: @@ -125,7 +118,6 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, struct ieee80211_hdr *pMACHeader; int ii; - pMACHeader = (struct ieee80211_hdr *) (pbyRxBufferAddr + cbHeaderSize); s_vGetDASA((u8 *)pMACHeader, &cbHeaderSize, &pDevice->sRxEthHeader); @@ -190,9 +182,6 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, *pcbHeadSize = cbHeaderSize; } - - - static u8 s_byGetRateIdx(u8 byRate) { u8 byRateIdx; @@ -204,7 +193,6 @@ static u8 s_byGetRateIdx(u8 byRate) return 0; } - static void s_vGetDASA ( @@ -258,7 +246,6 @@ s_vGetDASA ( *pcbHeaderSize = cbHeaderSize; } - int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, unsigned long BytesToIndicate) { @@ -293,7 +280,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, struct ieee80211_hdr *pMACHeader; int bRxeapol_key = false; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- RXbBulkInProcessData---\n"); skb = pRCB->skb; @@ -370,7 +356,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, FrameSize ); - pMACHeader = (struct ieee80211_hdr *) pbyFrame; //mike add: to judge if current AP is activated? @@ -396,7 +381,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } } - // Use for TKIP MIC s_vGetDASA(pbyFrame, &cbHeaderSize, &pDevice->sRxEthHeader); @@ -421,7 +405,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } } - if (IS_FC_WEP(pbyFrame)) { bool bRxDecryOK = false; @@ -490,7 +473,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, FrameSize -= 4; // 4 is ICV } - // // RX OK // @@ -646,10 +628,8 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } } - // Data frame Handle - if (pDevice->bEnablePSMode) { if (IS_FC_MOREDATA((pbyFrame))) { if (*pbyRsr & RSR_ADDROK) { @@ -692,7 +672,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } */ - // ----------------------------------------------- if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == true)){ @@ -732,7 +711,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, return false; } - if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_TKIP)) { if (bIsWEP) { FrameSize -= 8; //MIC @@ -750,7 +728,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, u32 dwLocalMIC_L = 0; u32 dwLocalMIC_R = 0; - if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[24])); dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[28])); @@ -781,7 +758,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, pdwMIC_L = (u32 *)(skb->data + 8 + FrameSize); pdwMIC_R = (u32 *)(skb->data + 8 + FrameSize + 4); - if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) || (pDevice->bRxMICFail == true)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n"); @@ -869,7 +845,6 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } } // ----- End of Reply Counter Check -------------------------- - s_vProcessRxMACHeader(pDevice, (u8 *)(skb->data+8), FrameSize, bIsWEP, bExtIV, &cbHeaderOffset); FrameSize -= cbHeaderOffset; cbHeaderOffset += 8; // 8 is Rcv buffer header @@ -924,7 +899,6 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, struct ieee80211_hdr *p802_11Header; CMD_STATUS Status; - if (IS_CTL_PSPOLL(pbyFrame) || !IS_TYPE_CONTROL(pbyFrame)) { p802_11Header = (struct ieee80211_hdr *) (pbyFrame); @@ -1035,7 +1009,6 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, PSKeyItem pKey = NULL; u8 byDecMode = KEY_CTL_WEP; - *pwRxTSC15_0 = 0; *pdwRxTSC47_16 = 0; @@ -1185,7 +1158,6 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, byKeyIdx >>= 6; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\nKeyIdx: %d\n", byKeyIdx); - if (pMgmt->byCSSGK == KEY_CTL_TKIP) byDecMode = KEY_CTL_TKIP; else if (pMgmt->byCSSGK == KEY_CTL_CCMP) @@ -1290,7 +1262,6 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; u16 wAID; - if (FrameSize > CB_MAX_BUF_SIZE) return false; // check DA @@ -1363,9 +1334,6 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, return true; } - - - void RXvWorkItem(struct vnt_private *pDevice) { int ntStatus; @@ -1388,12 +1356,10 @@ void RXvWorkItem(struct vnt_private *pDevice) } - void RXvFreeRCB(PRCB pRCB, int bReAllocSkb) { struct vnt_private *pDevice = pRCB->pDevice; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->RXvFreeRCB\n"); ASSERT(!pRCB->Ref); // should be 0 @@ -1419,7 +1385,6 @@ void RXvFreeRCB(PRCB pRCB, int bReAllocSkb) EnqueueRCB(pDevice->FirstRecvFreeList, pDevice->LastRecvFreeList, pRCB); pDevice->NumRecvFreeList++; - if ((pDevice->Flags & fMP_POST_READS) && MP_IS_READY(pDevice) && (pDevice->bIsRxWorkItemQueued == false) ) { @@ -1429,7 +1394,6 @@ void RXvFreeRCB(PRCB pRCB, int bReAllocSkb) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d %d\n",pDevice->NumRecvFreeList, pDevice->NumRecvMngList); } - void RXvMngWorkItem(struct vnt_private *pDevice) { PRCB pRCB = NULL; @@ -1464,4 +1428,3 @@ void RXvMngWorkItem(struct vnt_private *pDevice) } - diff --git a/drivers/staging/vt6656/dpc.h b/drivers/staging/vt6656/dpc.h index 8f2f9325b9af..876468f2c3d2 100644 --- a/drivers/staging/vt6656/dpc.h +++ b/drivers/staging/vt6656/dpc.h @@ -32,10 +32,6 @@ #include "device.h" #include "wcmd.h" - - - - void RXvWorkItem(void *Context); void RXvMngWorkItem(void *Context); diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c index cb4a65af754d..a1dc3a4cfd9c 100644 --- a/drivers/staging/vt6656/firmware.c +++ b/drivers/staging/vt6656/firmware.c @@ -35,7 +35,6 @@ #include "control.h" #include "rndis.h" - static int msglevel =MSG_LEVEL_INFO; //static int msglevel =MSG_LEVEL_DEBUG; @@ -44,12 +43,6 @@ static int msglevel =MSG_LEVEL_INFO; #define FIRMWARE_CHUNK_SIZE 0x400 - - - - - - int FIRMWAREbDownload(struct vnt_private *pDevice) { struct device *dev = &pDevice->usb->dev; @@ -60,7 +53,6 @@ int FIRMWAREbDownload(struct vnt_private *pDevice) u16 wLength; int ii, rc; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Download firmware\n"); spin_unlock_irq(&pDevice->lock); @@ -126,7 +118,6 @@ int FIRMWAREbBrach2Sram(struct vnt_private *pDevice) } } - int FIRMWAREbCheckVersion(struct vnt_private *pDevice) { int ntStatus; diff --git a/drivers/staging/vt6656/firmware.h b/drivers/staging/vt6656/firmware.h index 60468e64eb65..e3b08db6a734 100644 --- a/drivers/staging/vt6656/firmware.h +++ b/drivers/staging/vt6656/firmware.h @@ -32,10 +32,6 @@ #include "device.h" - - - - int FIRMWAREbDownload(struct vnt_private *); int FIRMWAREbBrach2Sram(struct vnt_private *); int FIRMWAREbCheckVersion(struct vnt_private *); diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index 94cee3d5f059..f4f1bf7a30fd 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c @@ -142,7 +142,6 @@ static int hostap_disable_hostapd(struct vnt_private *pDevice, int rtnl_locked) return 0; } - /* * Description: * Set enable/disable hostapd mode @@ -174,7 +173,6 @@ int vt6656_hostap_set_hostapd(struct vnt_private *pDevice, return hostap_disable_hostapd(pDevice, rtnl_locked); } - /* * Description: * remove station function supported for hostap daemon @@ -193,7 +191,6 @@ static int hostap_remove_sta(struct vnt_private *pDevice, { unsigned int uNodeIndex; - if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { BSSvRemoveOneNode(pDevice, uNodeIndex); } @@ -294,7 +291,6 @@ static int hostap_get_info_sta(struct vnt_private *pDevice, return 0; } - /* * Description: * set station flag @@ -327,8 +323,6 @@ static int hostap_set_flags_sta(struct vnt_private *pDevice, return 0; } - - /* * Description: * set generic element (wpa ie) @@ -347,8 +341,6 @@ static int hostap_set_generic_element(struct vnt_private *pDevice, { struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; - - memcpy( pMgmt->abyWPAIE, param->u.generic_elem.data, param->u.generic_elem.len @@ -425,13 +417,11 @@ static int hostap_set_encryption(struct vnt_private *pDevice, int bKeyTableFull = false; u16 wKeyCtl = 0; - param->u.crypt.err = 0; if (param->u.crypt.alg > WPA_ALG_CCMP) return -EINVAL; - if ((param->u.crypt.idx > 3) || (param->u.crypt.key_len > MAX_KEY_LEN)) { param->u.crypt.err = HOSTAP_CRYPT_ERR_KEY_SET_FAILED; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " HOSTAP_CRYPT_ERR_KEY_SET_FAILED\n"); @@ -519,7 +509,6 @@ static int hostap_set_encryption(struct vnt_private *pDevice, KEY_CTL_WEP ) == true) { - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { @@ -565,7 +554,6 @@ static int hostap_set_encryption(struct vnt_private *pDevice, pMgmt->byCSSGK = KEY_CTL_CCMP; } - if (iNodeIndex == 0) { KeybSetDefaultKey( pDevice, &(pDevice->sKey), @@ -631,8 +619,6 @@ static int hostap_set_encryption(struct vnt_private *pDevice, return ret; } - - /* * Description: * get each stations encryption key @@ -655,7 +641,6 @@ static int hostap_get_encryption(struct vnt_private *pDevice, int ii; s32 iNodeIndex = 0; - param->u.crypt.err = 0; if (is_broadcast_ether_addr(param->sta_addr)) { @@ -676,7 +661,6 @@ static int hostap_get_encryption(struct vnt_private *pDevice, return ret; } - /* * Description: * vt6656_hostap_ioctl main function supported for hostap daemon. @@ -779,7 +763,6 @@ int vt6656_hostap_ioctl(struct vnt_private *pDevice, struct iw_point *p) goto out; } - if ((ret == 0) && ap_ioctl) { if (copy_to_user(p->pointer, param, p->length)) { ret = -EFAULT; diff --git a/drivers/staging/vt6656/hostap.h b/drivers/staging/vt6656/hostap.h index ba093b97da22..6a68f7e69cff 100644 --- a/drivers/staging/vt6656/hostap.h +++ b/drivers/staging/vt6656/hostap.h @@ -31,7 +31,6 @@ #include "device.h" - #define WLAN_RATE_1M BIT0 #define WLAN_RATE_2M BIT1 #define WLAN_RATE_5M5 BIT2 @@ -45,10 +44,6 @@ #define WLAN_RATE_48M BIT10 #define WLAN_RATE_54M BIT11 - - - - #ifndef ETH_P_PAE #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ #endif /* ETH_P_PAE */ diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c index ab3937cf7ac0..a2b4ba6d4f01 100644 --- a/drivers/staging/vt6656/int.c +++ b/drivers/staging/vt6656/int.c @@ -42,11 +42,6 @@ static int msglevel = MSG_LEVEL_INFO; /* MSG_LEVEL_DEBUG */ - - - - - /*+ * * Function: InterruptPollingThread diff --git a/drivers/staging/vt6656/int.h b/drivers/staging/vt6656/int.h index a34b3d858891..8e6e217ba4ff 100644 --- a/drivers/staging/vt6656/int.h +++ b/drivers/staging/vt6656/int.h @@ -56,9 +56,6 @@ typedef struct tagSINTData { } __attribute__ ((__packed__)) SINTData, *PSINTData; - - - void INTvWorkItem(struct vnt_private *); void INTnsProcessData(struct vnt_private *); diff --git a/drivers/staging/vt6656/iocmd.h b/drivers/staging/vt6656/iocmd.h index b75ce1ee03c5..f3406da7336e 100644 --- a/drivers/staging/vt6656/iocmd.h +++ b/drivers/staging/vt6656/iocmd.h @@ -29,7 +29,6 @@ #ifndef __IOCMD_H__ #define __IOCMD_H__ - // ioctl Command code #define MAGIC_CODE 0x3142 #define IOCTL_CMD_TEST (SIOCDEVPRIVATE + 0) @@ -178,14 +177,12 @@ typedef struct tagSBSSIDItem { } __packed SBSSIDItem; - typedef struct tagSBSSIDList { u32 uItem; SBSSIDItem sBSSIDList[0]; } __packed SBSSIDList, *PSBSSIDList; - typedef struct tagSNodeItem { // STA info u16 wAID; @@ -206,7 +203,6 @@ typedef struct tagSNodeItem { } __packed SNodeItem; - typedef struct tagSNodeList { u32 uItem; @@ -214,7 +210,6 @@ typedef struct tagSNodeList { } __packed SNodeList, *PSNodeList; - typedef struct tagSCmdLinkStatus { bool bLink; @@ -245,8 +240,6 @@ typedef struct tagSDot11MIBCount { u32 FCSErrorCount; } __packed SDot11MIBCount, *PSDot11MIBCount; - - // // statistic counter // @@ -429,8 +422,4 @@ struct viawget_hostapd_param { } u; } __packed; - - - - #endif /* __IOCMD_H__ */ diff --git a/drivers/staging/vt6656/iowpa.h b/drivers/staging/vt6656/iowpa.h index bf28ac3b7e88..97af32e1fa44 100644 --- a/drivers/staging/vt6656/iowpa.h +++ b/drivers/staging/vt6656/iowpa.h @@ -29,7 +29,6 @@ #ifndef __IOWPA_H__ #define __IOWPA_H__ - #define WPA_IE_LEN 64 //WPA related @@ -54,7 +53,6 @@ enum { VIAWGET_SET_DISASSOCIATE = 10 }; - enum { VIAWGET_ASSOC_MSG = 1, VIAWGET_DISASSOC_MSG = 2, @@ -64,8 +62,6 @@ enum { VIAWGET_DEVICECLOSE_MSG = 6 }; - - typedef struct viawget_wpa_header { u8 type; u16 req_ie_len; @@ -129,8 +125,4 @@ struct viawget_scan_result { int maxrate; } __packed; - - - - #endif /* __IOWPA_H__ */ diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index 598c1386c0e2..c335808211ee 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c @@ -42,7 +42,6 @@ #include "control.h" #include "rndis.h" - static const long frequency_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484, 4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980, @@ -357,7 +356,6 @@ int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info, if (pMgmt == NULL) return -EFAULT; - #ifdef WEXT_USECHANNELS wrq->m = (int)pMgmt->uCurrChannel; wrq->e = 0; @@ -482,7 +480,6 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info, pDevice->bCommit = false; } - return rc; } diff --git a/drivers/staging/vt6656/iwctl.h b/drivers/staging/vt6656/iwctl.h index 2d13153e9931..dceda0dbdfe1 100644 --- a/drivers/staging/vt6656/iwctl.h +++ b/drivers/staging/vt6656/iwctl.h @@ -31,10 +31,6 @@ #include "device.h" - - - - struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev); int iwctl_siwap(struct net_device *dev, struct iw_request_info *info, diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c index babc3d8ca394..205590b0e9c8 100644 --- a/drivers/staging/vt6656/key.c +++ b/drivers/staging/vt6656/key.c @@ -42,15 +42,9 @@ #include "rndis.h" #include "control.h" - - static int msglevel =MSG_LEVEL_INFO; //static int msglevel =MSG_LEVEL_DEBUG; - - - - static void s_vCheckKeyTableValid(struct vnt_private *pDevice, PSKeyManagement pTable) { @@ -86,9 +80,6 @@ static void s_vCheckKeyTableValid(struct vnt_private *pDevice, } - - - /* * Description: Init Key management table * @@ -136,7 +127,6 @@ void KeyvInitTable(struct vnt_private *pDevice, PSKeyManagement pTable) return; } - /* * Description: Get Key from table * @@ -187,7 +177,6 @@ int KeybGetKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyIndex, return (false); } - /* * Description: Set Key to table * @@ -360,7 +349,6 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, return (false); } - /* * Description: Remove Key from table * @@ -435,10 +423,8 @@ int KeybRemoveKey(struct vnt_private *pDevice, PSKeyManagement pTable, s_vCheckKeyTableValid(pDevice,pTable); return bReturnValue; - } - /* * Description: Remove Key from table * @@ -508,7 +494,6 @@ int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType, } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); - return (true); } else { @@ -636,11 +621,9 @@ int KeybSetDefaultKey(struct vnt_private *pDevice, PSKeyManagement pTable, else pKey->KeyRSC = *KeyRSC; - pKey->dwTSC47_16 = 0; pKey->wTSC15_0 = 0; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n", pKey->bKeyValid); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n", (int)pKey->uKeyLength); @@ -659,7 +642,6 @@ int KeybSetDefaultKey(struct vnt_private *pDevice, PSKeyManagement pTable, return (true); } - /* * Description: Set Key to table * @@ -688,7 +670,6 @@ int KeybSetAllGroupKey(struct vnt_private *pDevice, PSKeyManagement pTable, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetAllGroupKey: %X\n", dwKeyIndex); - if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key return (false); } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) { diff --git a/drivers/staging/vt6656/key.h b/drivers/staging/vt6656/key.h index d39c8f5ea695..23e188d125ba 100644 --- a/drivers/staging/vt6656/key.h +++ b/drivers/staging/vt6656/key.h @@ -38,7 +38,6 @@ #define MAX_KEY_LEN 32 #define AES_KEY_LEN 16 - #define AUTHENTICATOR_KEY 0x10000000 #define USE_KEYRSC 0x20000000 #define PAIRWISE_KEY 0x40000000 @@ -52,7 +51,6 @@ #define KEY_CTL_CCMP 0x03 #define KEY_CTL_INVALID 0xFF - typedef struct tagSKeyItem { bool bKeyValid; @@ -85,11 +83,6 @@ typedef struct tagSKeyManagement SKeyTable KeyTable[MAX_KEY_TABLE]; } SKeyManagement, *PSKeyManagement; - - - - - void KeyvInitTable(struct vnt_private *, PSKeyManagement pTable); int KeybGetKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyIndex, diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c index e003b1092b21..343db19283a2 100644 --- a/drivers/staging/vt6656/mac.c +++ b/drivers/staging/vt6656/mac.c @@ -41,10 +41,6 @@ //static int msglevel =MSG_LEVEL_DEBUG; static int msglevel =MSG_LEVEL_INFO; - - - - /* * Description: * Write MAC Multicast Address Mask @@ -72,7 +68,6 @@ void MACvWriteMultiAddr(struct vnt_private *pDevice, u32 uByteIdx, u8 byData) &byData1); } - /* * Description: * Shut Down MAC @@ -99,7 +94,6 @@ void MACvSetBBType(struct vnt_private *pDevice, u8 byType) { u8 pbyData[2]; - pbyData[0] = byType; pbyData[1] = EnCFG_BBType_MASK; @@ -131,7 +125,6 @@ void MACvDisableKeyEntry(struct vnt_private *pDevice, u32 uEntryIdx) u16 wOffset; u8 byData; - byData = (u8) uEntryIdx; wOffset = MISCFIFO_KEYETRY0; @@ -151,7 +144,6 @@ void MACvDisableKeyEntry(struct vnt_private *pDevice, u32 uEntryIdx) ); } - /* * Description: * Set the Key by MISCFIFO @@ -244,10 +236,8 @@ void MACvSetKeyEntry(struct vnt_private *pDevice, u16 wKeyCtl, u32 uEntryIdx, pbyData ); - } - void MACvRegBitsOff(struct vnt_private *pDevice, u8 byRegOfs, u8 byBits) { u8 pbyData[2]; @@ -264,12 +254,10 @@ void MACvRegBitsOff(struct vnt_private *pDevice, u8 byRegOfs, u8 byBits) ); } - void MACvRegBitsOn(struct vnt_private *pDevice, u8 byRegOfs, u8 byBits) { u8 pbyData[2]; - pbyData[0] = byBits; pbyData[1] = byBits; @@ -286,7 +274,6 @@ void MACvWriteWord(struct vnt_private *pDevice, u8 byRegOfs, u16 wData) { u8 pbyData[2]; - pbyData[0] = (u8)(wData & 0xff); pbyData[1] = (u8)(wData >> 8); @@ -304,7 +291,6 @@ void MACvWriteBSSIDAddress(struct vnt_private *pDevice, u8 *pbyEtherAddr) { u8 pbyData[6]; - pbyData[0] = *((u8 *)pbyEtherAddr); pbyData[1] = *((u8 *)pbyEtherAddr+1); pbyData[2] = *((u8 *)pbyEtherAddr+2); @@ -325,7 +311,6 @@ void MACvEnableProtectMD(struct vnt_private *pDevice) { u8 pbyData[2]; - pbyData[0] = EnCFG_ProtectMd; pbyData[1] = EnCFG_ProtectMd; @@ -342,7 +327,6 @@ void MACvDisableProtectMD(struct vnt_private *pDevice) { u8 pbyData[2]; - pbyData[0] = 0; pbyData[1] = EnCFG_ProtectMd; @@ -359,7 +343,6 @@ void MACvEnableBarkerPreambleMd(struct vnt_private *pDevice) { u8 pbyData[2]; - pbyData[0] = EnCFG_BarkerPream; pbyData[1] = EnCFG_BarkerPream; @@ -376,7 +359,6 @@ void MACvDisableBarkerPreambleMd(struct vnt_private *pDevice) { u8 pbyData[2]; - pbyData[0] = 0; pbyData[1] = EnCFG_BarkerPream; @@ -389,7 +371,6 @@ void MACvDisableBarkerPreambleMd(struct vnt_private *pDevice) ); } - void MACvWriteBeaconInterval(struct vnt_private *pDevice, u16 wInterval) { u8 pbyData[2]; diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h index bcea63a95fe5..0db1be5b01c8 100644 --- a/drivers/staging/vt6656/mac.h +++ b/drivers/staging/vt6656/mac.h @@ -37,7 +37,6 @@ #include "device.h" #include "tmacro.h" - #define REV_ID_VT3253_A0 0x00 #define REV_ID_VT3253_A1 0x01 #define REV_ID_VT3253_B0 0x08 @@ -154,7 +153,6 @@ #define MAC_REG_RSPINF_A_54 0xFA #define MAC_REG_RSPINF_A_72 0xFC - // // Bits in the I2MCFG EEPROM register // @@ -279,7 +277,6 @@ #define TCR_SYNCDCFOPT 0x02 // #define TCR_AUTOBCNTX 0x01 // Beacon automatically transmit enable - //ISR1 #define ISR_GPIO3 0x40 #define ISR_RXNOBUF 0x08 @@ -375,7 +372,6 @@ // #define MISCFFCTL_WRITE 0x0001 // - // Loopback mode #define MAC_LB_EXT 0x02 // #define MAC_LB_INTERNAL 0x01 // @@ -407,12 +403,6 @@ #define MAC_REVISION_A0 0x00 #define MAC_REVISION_A1 0x01 - - - - - - void MACvWriteMultiAddr(struct vnt_private *, u32, u8); void MACbShutdown(struct vnt_private *); void MACvSetBBType(struct vnt_private *, u8); diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 052e50fde530..2161af83eaa0 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -94,14 +94,12 @@ MODULE_DESCRIPTION(DEVICE_FULL_DRV_NAM); #define RX_DESC_DEF0 64 DEVICE_PARAM(RxDescriptors0,"Number of receive usb desc buffer"); - #define TX_DESC_DEF0 64 DEVICE_PARAM(TxDescriptors0,"Number of transmit usb desc buffer"); #define CHANNEL_DEF 6 DEVICE_PARAM(Channel, "Channel number"); - /* PreambleType[] is the preamble length used for transmit. 0: indicate allows long preamble type 1: indicate allows short preamble type @@ -117,7 +115,6 @@ DEVICE_PARAM(RTSThreshold, "RTS threshold"); #define FRAG_THRESH_DEF 2346 DEVICE_PARAM(FragThreshold, "Fragmentation threshold"); - #define DATA_RATE_DEF 13 /* datarate[] index 0: indicate 1 Mbps 0x02 @@ -147,7 +144,6 @@ DEVICE_PARAM(OPMode, "Infrastruct, adhoc, AP mode "); 2: indicate AP mode used */ - /* PSMode[] 0: indicate disable power saving mode 1: indicate enable power saving mode @@ -156,7 +152,6 @@ DEVICE_PARAM(OPMode, "Infrastruct, adhoc, AP mode "); #define PS_MODE_DEF 0 DEVICE_PARAM(PSMode, "Power saving mode"); - #define SHORT_RETRY_DEF 8 DEVICE_PARAM(ShortRetryLimit, "Short frame retry limits"); @@ -172,8 +167,6 @@ DEVICE_PARAM(LongRetryLimit, "long frame retry limits"); #define BBP_TYPE_DEF 2 DEVICE_PARAM(BasebandType, "baseband type"); - - /* 80211hEnable[] 0: indicate disable 802.11h 1: indicate enable 802.11h @@ -183,7 +176,6 @@ DEVICE_PARAM(BasebandType, "baseband type"); DEVICE_PARAM(b80211hEnable, "802.11h mode"); - /* * Static vars definitions */ @@ -203,11 +195,9 @@ static const long frequency_list[] = { 5700, 5745, 5765, 5785, 5805, 5825 }; - static const struct iw_handler_def iwctl_handler_def; */ - static int vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id); static void vt6656_disconnect(struct usb_interface *intf); @@ -243,14 +233,8 @@ static int Config_FileGetParameter(unsigned char *string, unsigned char *dest, unsigned char *source); - static void usb_device_reset(struct vnt_private *pDevice); - - - - - static void device_set_options(struct vnt_private *pDevice) { @@ -289,7 +273,6 @@ device_set_options(struct vnt_private *pDevice) { pDevice->bDiversityRegCtlON = false; } - static void device_init_diversity_timer(struct vnt_private *pDevice) { init_timer(&pDevice->TimerSQ3Tmax1); @@ -310,7 +293,6 @@ static void device_init_diversity_timer(struct vnt_private *pDevice) return; } - /* * initialization of MAC & BBP registers */ @@ -767,7 +749,6 @@ static void device_free_tx_bufs(struct vnt_private *pDevice) return; } - static void device_free_rx_bufs(struct vnt_private *pDevice) { PRCB pRCB; @@ -805,7 +786,6 @@ static void device_free_int_bufs(struct vnt_private *pDevice) return; } - static bool device_alloc_bufs(struct vnt_private *pDevice) { @@ -813,7 +793,6 @@ static bool device_alloc_bufs(struct vnt_private *pDevice) PRCB pRCB; int ii; - for (ii = 0; ii < pDevice->cbTD; ii++) { pTxContext = kmalloc(sizeof(USB_SEND_CONTEXT), GFP_KERNEL); @@ -839,7 +818,6 @@ static bool device_alloc_bufs(struct vnt_private *pDevice) goto free_tx; } - pDevice->FirstRecvFreeList = NULL; pDevice->LastRecvFreeList = NULL; pDevice->FirstRecvMngList = NULL; @@ -870,7 +848,6 @@ static bool device_alloc_bufs(struct vnt_private *pDevice) pRCB++; } - pDevice->pControlURB = usb_alloc_urb(0, GFP_ATOMIC); if (pDevice->pControlURB == NULL) { DBG_PRT(MSG_LEVEL_ERR,KERN_ERR"Failed to alloc control urb\n"); @@ -903,9 +880,6 @@ free_tx: return false; } - - - static bool device_init_defrag_cb(struct vnt_private *pDevice) { int i; @@ -929,8 +903,6 @@ free_frag: return false; } - - static void device_free_frag_bufs(struct vnt_private *pDevice) { PSDeFragControlBlock pDeF; @@ -945,8 +917,6 @@ static void device_free_frag_bufs(struct vnt_private *pDevice) } } - - int device_alloc_frag_buf(struct vnt_private *pDevice, PSDeFragControlBlock pDeF) { @@ -960,8 +930,6 @@ int device_alloc_frag_buf(struct vnt_private *pDevice, return true; } - - static int device_open(struct net_device *dev) { struct vnt_private *pDevice = netdev_priv(dev); @@ -970,7 +938,6 @@ static int device_open(struct net_device *dev) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " device_open...\n"); - pDevice->rx_buf_sz = MAX_TOTAL_SIZE_WITH_ALL_HEADERS; if (device_alloc_bufs(pDevice) == false) { @@ -1056,7 +1023,6 @@ static int device_open(struct net_device *dev) else bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL); - netif_stop_queue(pDevice->dev); pDevice->flags |= DEVICE_FLAGS_OPENED; @@ -1078,8 +1044,6 @@ free_rx_tx: return -ENOMEM; } - - static int device_close(struct net_device *dev) { struct vnt_private *pDevice = netdev_priv(dev); @@ -1095,7 +1059,6 @@ static int device_close(struct net_device *dev) mdelay(30); } - memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); pMgmt->bShareKeyAlgorithm = false; pDevice->bEncryptionEnable = false; @@ -1160,7 +1123,6 @@ static void vt6656_disconnect(struct usb_interface *intf) if (!device) return; - usb_set_intfdata(intf, NULL); usb_put_dev(interface_to_usbdev(intf)); @@ -1425,7 +1387,6 @@ static void device_set_multi(struct net_device *dev) u8 byTmpMode = 0; int rc; - spin_lock_irq(&pDevice->lock); rc = CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, @@ -1513,7 +1474,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) return rc; } - static int ethtool_ioctl(struct net_device *dev, void *useraddr) { u32 ethcmd; diff --git a/drivers/staging/vt6656/mib.c b/drivers/staging/vt6656/mib.c index 8adea29f071d..12333cdcbc6a 100644 --- a/drivers/staging/vt6656/mib.c +++ b/drivers/staging/vt6656/mib.c @@ -43,10 +43,6 @@ static int msglevel =MSG_LEVEL_INFO; - - - - /* * Description: Update Isr Statistic Counter * @@ -71,7 +67,6 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, u8 byIsr0, u8 byIsr1) return; } - if (byIsr0 & ISR_ACTX) // ISR, bit0 pStatistic->ISRStat.dwIsrTx0OK++; // TXDMA0 successful @@ -90,7 +85,6 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, u8 byIsr0, u8 byIsr1) if (byIsr0 & ISR_WATCHDOG) // ISR, bit7 pStatistic->ISRStat.dwIsrWatchDog++; - if (byIsr1 & ISR_FETALERR) // ISR, bit8 pStatistic->ISRStat.dwIsrUnrecoverableError++; @@ -105,7 +99,6 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, u8 byIsr0, u8 byIsr1) } - /* * Description: Update Rx Statistic Counter * @@ -298,7 +291,6 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic, pStatistic->dwRsrRxPacket++; pStatistic->dwRsrRxOctet += cbFrameLength; - if (IS_TYPE_DATA(pbyBuffer)) { pStatistic->dwRsrRxData++; } else if (IS_TYPE_MGMT(pbyBuffer)){ @@ -430,8 +422,6 @@ STAvUpdateTDStatCounter ( } } - - /* * Description: Update 802.11 mib counter * diff --git a/drivers/staging/vt6656/mib.h b/drivers/staging/vt6656/mib.h index dcde3e62dfd2..35375325a777 100644 --- a/drivers/staging/vt6656/mib.h +++ b/drivers/staging/vt6656/mib.h @@ -32,8 +32,6 @@ #include "tether.h" #include "desc.h" - - // // USB counter // @@ -42,13 +40,10 @@ typedef struct tagSUSBCounter { } SUSBCounter, *PSUSBCounter; - - // // 802.11 counter // - typedef struct tagSDot11Counters { /* unsigned long Length; // Length of structure */ unsigned long long TransmittedFragmentCount; @@ -79,7 +74,6 @@ typedef struct tagSDot11Counters { */ } SDot11Counters, *PSDot11Counters; - // // MIB2 counter // @@ -117,7 +111,6 @@ typedef struct tagSMib2Counter { #define DOWN 2 // #define TESTING 3 // - // // RMON counter // @@ -183,7 +176,6 @@ typedef struct tagSCustomCounters { } SCustomCounters, *PSCustomCounters; - // // Custom counter // @@ -214,14 +206,12 @@ typedef struct tagSISRCounters { ///////////////////////////////////// } SISRCounters, *PSISRCounters; - // Value in the etherStatsStatus entry #define VALID 1 // #define CREATE_REQUEST 2 // #define UNDER_CREATION 3 // #define INVALID 4 // - // // Tx packet information // @@ -232,7 +222,6 @@ typedef struct tagSTxPktInfo { u8 abyDestAddr[ETH_ALEN]; } STxPktInfo, *PSTxPktInfo; - #define MAX_RATE 12 // // statistic counter @@ -319,14 +308,11 @@ typedef struct tagSStatCounter { u8 abyCntRxPattern[16]; u8 abyCntTxPattern[16]; - - // Software check.... u32 dwCntRxDataErr; // rx buffer data software compare CRC err count u32 dwCntDecryptErr; // rx buffer data software compare CRC err count u32 dwCntRxICVErr; // rx buffer data software compare CRC err count - // 64-bit OID unsigned long long ullTsrOK; @@ -365,9 +351,6 @@ typedef struct tagSStatCounter { } SStatCounter, *PSStatCounter; - - - void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, u8 byIsr0, u8 byIsr1); diff --git a/drivers/staging/vt6656/michael.c b/drivers/staging/vt6656/michael.c index ee1fdb01ae99..9a5a0b6761ed 100644 --- a/drivers/staging/vt6656/michael.c +++ b/drivers/staging/vt6656/michael.c @@ -42,8 +42,6 @@ #include "tmacro.h" #include "michael.h" - - /* * static u32 s_dwGetUINT32(u8 * p); Get u32 from * 4 bytes LSByte first @@ -62,7 +60,6 @@ static u32 K0, K1; /* Key */ static u32 M; /* Message accumulator (single word) */ static unsigned int nBytesInM; /* # bytes in M */ - /* static u32 s_dwGetUINT32 (u8 * p) // Convert from u8[] to u32 in a portable way @@ -131,7 +128,6 @@ void MIC_vInit(u32 dwK0, u32 dwK1) s_vSetKey(dwK0, dwK1); } - void MIC_vUnInit(void) { /* Wipe the key material */ diff --git a/drivers/staging/vt6656/michael.h b/drivers/staging/vt6656/michael.h index d5604c890c20..9c69a42640a7 100644 --- a/drivers/staging/vt6656/michael.h +++ b/drivers/staging/vt6656/michael.h @@ -33,8 +33,6 @@ #include <linux/types.h> - - void MIC_vInit(u32 dwK0, u32 dwK1); void MIC_vUnInit(void); @@ -46,7 +44,6 @@ void MIC_vAppend(u8 * src, unsigned int nBytes); // This also resets the message to empty. void MIC_vGetMIC(u32 * pdwL, u32 * pdwR); - // Rotation functions on 32 bit values #define ROL32(A, n) \ (((A) << (n)) | (((A)>>(32-(n))) & ((1UL << (n)) - 1))) diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c index 31f2b8b18c27..edc8975b2e2a 100644 --- a/drivers/staging/vt6656/power.c +++ b/drivers/staging/vt6656/power.c @@ -47,12 +47,8 @@ #include "control.h" #include "rndis.h" - - static int msglevel = MSG_LEVEL_INFO; - - /* * * Routine Description: diff --git a/drivers/staging/vt6656/power.h b/drivers/staging/vt6656/power.h index 38edff6f13ce..778358239437 100644 --- a/drivers/staging/vt6656/power.h +++ b/drivers/staging/vt6656/power.h @@ -29,17 +29,10 @@ #ifndef __POWER_H__ #define __POWER_H__ - #define C_PWBT 1000 // micro sec. power up before TBTT #define PS_FAST_INTERVAL 1 // Fast power saving listen interval #define PS_MAX_INTERVAL 4 // MAX power saving listen interval - - - - - - /* PSDevice pDevice */ /* PSDevice hDeviceContext */ diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index c7d81b2ea19e..44cfe0b14180 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -61,11 +61,6 @@ static int msglevel =MSG_LEVEL_INFO; #define VT3342_PWR_IDX_LEN 64 //}} - - - - - u8 abyAL2230InitTable[CB_AL2230_INIT_SEQ][3] = { {0x03, 0xF7, 0x90}, {0x03, 0x33, 0x31}, @@ -385,7 +380,6 @@ u8 abyVT3226D0_InitTable[CB_VT3226_INIT_SEQ][3] = { {0x02, 0x01, 0xAA} //RobertYu:20060523 }; - u8 abyVT3226_ChannelTable0[CB_MAX_CHANNEL_24G][3] = { {0x01, 0x97, 0x83}, // channel = 1, Tf = 2412MHz {0x01, 0x97, 0x83}, // channel = 2, Tf = 2417MHz @@ -421,7 +415,6 @@ u8 abyVT3226_ChannelTable1[CB_MAX_CHANNEL_24G][3] = { }; ///}}RobertYu - //{{RobertYu:20060502, TWIF 1.14, LO Current for 11b mode u32 dwVT3226D0LoCurrentTable[CB_MAX_CHANNEL_24G] = { 0x0135C600+(BY_VT3226_REG_LEN<<3)+IFREGCTL_REGW, // channel = 1, Tf = 2412MHz @@ -441,7 +434,6 @@ u32 dwVT3226D0LoCurrentTable[CB_MAX_CHANNEL_24G] = { }; //}} - //{{RobertYu:20060609 u8 abyVT3342A0_InitTable[CB_VT3342_INIT_SEQ][3] = { /* 11b/g mode */ {0x03, 0xFF, 0x80}, //update for mode// @@ -596,7 +588,6 @@ u8 abyVT3342_ChannelTable1[CB_MAX_CHANNEL][3] = { {0x03, 0x00, 0x04} // channel = 165, Tf = 5825MHz (56), TBD }; - /*+ * * Power Table @@ -670,8 +661,6 @@ const u32 dwAL2230PowerTable[AL2230_PWR_IDX_LEN] = { 0x0407F900+(BY_AL2230_REG_LEN<<3)+IFREGCTL_REGW }; - - //{{ RobertYu:20050103, Channel 11a Number To Index // 4.9G => Ch 183, 184, 185, 187, 188, 189, 192, 196 (Value:15 ~ 22) // 5G => Ch 7, 8, 9, 11, 12, 16, 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64, @@ -703,7 +692,6 @@ const u8 RFaby11aChannelIndex[200] = { }; //}} RobertYu - /* * Description: Write to IF/RF, by embedded programming * @@ -728,11 +716,9 @@ int IFRFbWriteEmbedded(struct vnt_private *pDevice, u32 dwData) CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE_IFRF, 0, 0, 4, pbyData); - return true; } - /* * Description: Set Tx power * @@ -784,7 +770,6 @@ int RFbSetPower(struct vnt_private *pDevice, u32 uRATE, u32 uCH) return bResult; } - /* * Description: Set Tx power * @@ -833,7 +818,6 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) } break; - case RF_AIROHA7230: { u32 dwMax7230Pwr; @@ -970,8 +954,6 @@ void RFvRSSITodBm(struct vnt_private *pDevice, u8 byCurrRSSI, long *pldBm) *pldBm = -1 * (a + b * 2); } - - void RFbRFTableDownload(struct vnt_private *pDevice) { u16 wLength1 = 0, wLength2 = 0, wLength3 = 0; diff --git a/drivers/staging/vt6656/rf.h b/drivers/staging/vt6656/rf.h index 35c35017fbbb..de5c613b4ef9 100644 --- a/drivers/staging/vt6656/rf.h +++ b/drivers/staging/vt6656/rf.h @@ -53,9 +53,6 @@ #define RF_EMU 0x80 #define RF_MASK 0x7F - - - extern const u8 RFaby11aChannelIndex[200]; int IFRFbWriteEmbedded(struct vnt_private *, u32 dwData); diff --git a/drivers/staging/vt6656/rndis.h b/drivers/staging/vt6656/rndis.h index 96fc2685f980..5e073062017a 100644 --- a/drivers/staging/vt6656/rndis.h +++ b/drivers/staging/vt6656/rndis.h @@ -27,7 +27,6 @@ * */ - #ifndef __RNDIS_H__ #define __RNDIS_H__ @@ -65,11 +64,8 @@ #define MESSAGE_REQUEST_RF_CH1 0x0C #define MESSAGE_REQUEST_RF_CH2 0x0D - #define VIAUSB20_PACKET_HEADER 0x04 - - typedef struct _CMD_MESSAGE { u8 byData[256]; @@ -148,9 +144,6 @@ typedef struct _CMD_CHANGE_BBTYPE u16 wRSPINF_a[9]; } CMD_CHANGE_BBTYPE, *PCMD_CHANGE_BBTYPE; - #define EXCH_WORD(w) ((u16)((u16)(w)<<8) | (u16)((u16)(w)>>8)) - - #endif /* _RNDIS_H_ */ diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 57a5cdb2c51d..9bf2f8d562c3 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -63,12 +63,8 @@ #include "usbpipe.h" #include "iocmd.h" - - static int msglevel = MSG_LEVEL_INFO; - - const u16 wTimeStampOff[2][MAX_RATE] = { {384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23}, // Long Preamble {384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23}, // Short Preamble @@ -83,7 +79,6 @@ const u16 wFB_Opt1[2][5] = { {RATE_6M , RATE_6M, RATE_12M, RATE_12M, RATE_18M}, // fallback_rate1 }; - #define RTSDUR_BB 0 #define RTSDUR_BA 1 #define RTSDUR_AA 2 @@ -99,7 +94,6 @@ const u16 wFB_Opt1[2][5] = { #define DATADUR_A_F0 12 #define DATADUR_A_F1 13 - static void s_vSaveTxPktInfo(struct vnt_private *pDevice, u8 byPktNum, u8 *pbyDestAddr, u16 wPktLength, u16 wFIFOCtl); @@ -115,7 +109,6 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice, u32 uDMAIdx, int bNeedAck, u32 uFragIdx, u32 cbLastFragmentSize, u32 uMACfragNum, u8 byFBOption); - static void s_vGenerateMACHeader(struct vnt_private *pDevice, u8 *pbyBufferAddr, u16 wDuration, struct ethhdr *psEthHeader, int bNeedEncrypt, u16 wFragType, u32 uDMAIdx, u32 uFragIdx); @@ -150,8 +143,6 @@ static unsigned int s_uGetRTSCTSDuration(struct vnt_private *pDevice, u8 byDurType, u32 cbFrameLength, u8 byPktType, u16 wRate, int bNeedAck, u8 byFBOption); - - static void *s_vGetFreeContext(struct vnt_private *pDevice) { PUSB_SEND_CONTEXT pContext = NULL; @@ -174,7 +165,6 @@ static void *s_vGetFreeContext(struct vnt_private *pDevice) return (void *) pReturnContext; } - static void s_vSaveTxPktInfo(struct vnt_private *pDevice, u8 byPktNum, u8 *pbyDestAddr, u16 wPktLength, u16 wFIFOCtl) { @@ -204,7 +194,6 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf, struct ieee80211_hdr *pMACHeader = (struct ieee80211_hdr *)pbyHdrBuf; u32 dwRevIVCounter; - //Fill TXKEY if (pTransmitKey == NULL) return; @@ -302,7 +291,6 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf, } } - static void s_vSWencryption(struct vnt_private *pDevice, PSKeyItem pTransmitKey, u8 *pbyPayloadHead, u16 wPayloadSize) { @@ -338,9 +326,6 @@ static void s_vSWencryption(struct vnt_private *pDevice, } } - - - /*byPktType : PK_TYPE_11A 0 PK_TYPE_11B 1 PK_TYPE_11GB 2 @@ -374,7 +359,6 @@ static u32 s_uGetRTSCTSRsvTime(struct vnt_private *pDevice, uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime = 0; - uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wCurrentRate); if (byRTSRsvType == 0) { //RTSTxRrvTime_bb uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 20, pDevice->byTopCCKBasicRate); @@ -440,7 +424,6 @@ static u32 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType, } break; - case DATADUR_A: //DATADUR_A if (((uMACfragNum==1)) || (bLastFrag==1)) {//Non Frag or Last Frag if(bNeedAck){ @@ -559,7 +542,6 @@ static u32 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType, return 0; } - //byFreqType: 0=>5GHZ 1=>2.4GHZ static u32 s_uGetRTSCTSDuration(struct vnt_private *pDevice, u8 byDurType, u32 cbFrameLength, u8 byPktType, u16 wRate, int bNeedAck, @@ -567,7 +549,6 @@ static u32 s_uGetRTSCTSDuration(struct vnt_private *pDevice, u8 byDurType, { u32 uCTSTime = 0, uDurTime = 0; - switch (byDurType) { case RTSDUR_BB: //RTSDuration_bb @@ -1319,7 +1300,6 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } } - if ((bNeedEncryption) && (pTransmitKey != NULL)) { if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) { cbIVlen = 4; @@ -1434,7 +1414,6 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pbyIVHead = (u8 *)(pbyMacHdr + cbMACHdLen + uPadding); pbyPayloadHead = (u8 *)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen); - //========================= // No Fragmentation //========================= @@ -1443,7 +1422,6 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, //uDMAIdx = TYPE_AC0DMA; //pTxBufHead = (PSTxBufHead) &(pTxBufHead->adwTxKey[0]); - //Fill FIFO,RrvTime,RTS,and CTS s_vGenerateTxParameter(pDevice, byPktType, wCurrentRate, (void *)pbyTxBufferAddr, pvRrvTime, pvRTS, pvCTS, @@ -1485,7 +1463,6 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } - if (pPacket != NULL) { // Copy the Packet into a tx Buffer memcpy((pbyPayloadHead + cb802_1_H_len), @@ -1550,7 +1527,6 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC:%lX, %lX\n", *pdwMIC_L, *pdwMIC_R); } - if (bSoftWEP == true) { s_vSWencryption(pDevice, pTransmitKey, (pbyPayloadHead), (u16)(cbFrameBodySize + cbMIClen)); @@ -1581,16 +1557,13 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, *pcbHeaderLen = cbHeaderLength; *pcbTotalLen = cbHeaderLength + cbFrameSize ; - //Set FragCtl in TxBufferHead pTxBufHead->wFragCtl |= (u16)byFragType; - return true; } - /*+ * * Description: @@ -1684,8 +1657,6 @@ static void s_vGenerateMACHeader(struct vnt_private *pDevice, } } - - /*+ * * Description: @@ -1723,8 +1694,6 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, u32 cbMacHdLen; u16 wCurrentRate = RATE_1M; - - pContext = (PUSB_SEND_CONTEXT)s_vGetFreeContext(pDevice); if (NULL == pContext) { @@ -1758,7 +1727,6 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, } pDevice->wCurrentRate = wCurrentRate; - //Set packet type if (byPktType == PK_TYPE_11A) {//0000 0000 0000 0000 pTxBufHead->wFIFOCtl = 0; @@ -1881,7 +1849,6 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, //========================= pTxBufHead->wFragCtl |= (u16)FRAGCTL_NONFRAG; - //Fill FIFO,RrvTime,RTS,and CTS s_vGenerateTxParameter(pDevice, byPktType, wCurrentRate, pbyTxBufferAddr, pvRrvTime, pvRTS, pCTS, cbFrameSize, bNeedACK, TYPE_TXDMA0, &sEthHeader); @@ -1959,7 +1926,6 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, } } - pTX_Buffer->wTxByteCount = cpu_to_le16((u16)(cbReqCount)); pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->byType = 0x00; @@ -1979,7 +1945,6 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, return CMD_STATUS_PENDING; } - CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, struct vnt_tx_mgmt *pPacket) { @@ -1997,7 +1962,6 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, PUSB_SEND_CONTEXT pContext; CMD_STATUS status; - pContext = (PUSB_SEND_CONTEXT)s_vGetFreeContext(pDevice); if (NULL == pContext) { status = CMD_STATUS_RESOURCES; @@ -2065,7 +2029,6 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, } - void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) { struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; @@ -2099,7 +2062,6 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) PTX_BUFFER pTX_Buffer; PUSB_SEND_CONTEXT pContext; - pvRrvTime = pMICHDR = pvRTS = pvCTS = pvTxDataHd = NULL; if(skb->len <= WLAN_HDR_ADDR3_LEN) { @@ -2216,7 +2178,6 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } } - //Set FRAGCTL_MACHDCNT pTxBufHead->wFragCtl |= cpu_to_le16((u16)cbMacHdLen << 10); @@ -2225,7 +2186,6 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) // no one will send a MMPDU under fragmentation. With RTS may occur. pDevice->bAES = false; //Set FRAGCTL_WEPTYP - if (WLAN_GET_FC_ISWEP(p80211Header->sA4.wFrameCtl) != 0) { if (pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) { cbIVlen = 4; @@ -2261,7 +2221,6 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } //the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter() - if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize); @@ -2294,7 +2253,6 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) //========================= pTxBufHead->wFragCtl |= (u16)FRAGCTL_NONFRAG; - //Fill FIFO,RrvTime,RTS,and CTS s_vGenerateTxParameter(pDevice, byPktType, wCurrentRate, pbyTxBufferAddr, pvRrvTime, pvRTS, pvCTS, cbFrameSize, bNeedACK, TYPE_TXDMA0, &sEthHeader); @@ -2404,7 +2362,6 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) if (pDevice->wSeqCounter > 0x0fff) pDevice->wSeqCounter = 0; - if (bIsPSPOLL) { // The MAC will automatically replace the Duration-field of MAC header by Duration-field // of FIFO control header. @@ -2438,9 +2395,6 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) } - - - //TYPE_AC0DMA data tx /* * Description: @@ -2481,7 +2435,6 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, u16 wKeepRate = pDevice->wCurrentRate; int bTxeapol_key = false; - if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { if (pDevice->uAssocCount == 0) { @@ -2836,8 +2789,6 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, } - - /* * Description: * Relay packet send (AC1DMA) from rx dpc. @@ -2870,8 +2821,6 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, u32 status; u16 wKeepRate = pDevice->wCurrentRate; - - pContext = (PUSB_SEND_CONTEXT)s_vGetFreeContext(pDevice); if (NULL == pContext) { diff --git a/drivers/staging/vt6656/rxtx.h b/drivers/staging/vt6656/rxtx.h index a26031943f46..dd7e85dde1a2 100644 --- a/drivers/staging/vt6656/rxtx.h +++ b/drivers/staging/vt6656/rxtx.h @@ -32,8 +32,6 @@ #include "device.h" #include "wcmd.h" - - // // RTS buffer header // @@ -63,7 +61,6 @@ typedef struct tagSMICHDR { u32 adwHDR2[4]; } SMICHDR, *PSMICHDR; - typedef struct tagSTX_NAF_G_RTS { //RsvTime @@ -170,7 +167,6 @@ typedef struct tagSTX_NAF_G_CTS } TX_NAF_G_CTS, *PTX_NAF_G_CTS; - typedef struct tagSTX_NAF_G_CTS_MIC { //RsvTime @@ -179,7 +175,6 @@ typedef struct tagSTX_NAF_G_CTS_MIC u16 wTxRrvTime_b; u16 wTxRrvTime_a; - SMICHDR sMICHDR; //CTS @@ -204,7 +199,6 @@ typedef struct tagSTX_NAF_G_CTS_MIC } TX_NAF_G_CTS_MIC, *PTX_NAF_G_CTS_MIC; - typedef struct tagSTX_NAF_G_BEACON { u16 wFIFOCtl; @@ -225,10 +219,8 @@ typedef struct tagSTX_NAF_G_BEACON u16 wDuration_a; u16 wTimeStampOff_a; - } TX_NAF_G_BEACON, *PTX_NAF_G_BEACON; - typedef struct tagSTX_NAF_AB_RTS { //RsvTime @@ -250,10 +242,8 @@ typedef struct tagSTX_NAF_AB_RTS u16 wDuration_ab; u16 wTimeStampOff_ab; - } TX_NAF_AB_RTS, *PTX_NAF_AB_RTS; - typedef struct tagSTX_NAF_AB_RTS_MIC { //RsvTime @@ -277,11 +267,8 @@ typedef struct tagSTX_NAF_AB_RTS_MIC u16 wDuration_ab; u16 wTimeStampOff_ab; - } TX_NAF_AB_RTS_MIC, *PTX_NAF_AB_RTS_MIC; - - typedef struct tagSTX_NAF_AB_CTS { //RsvTime @@ -314,7 +301,6 @@ typedef struct tagSTX_NAF_AB_CTS_MIC } TX_NAF_AB_CTS_MIC, *PTX_NAF_AB_CTS_MIC; - typedef struct tagSTX_NAF_AB_BEACON { u16 wFIFOCtl; @@ -372,7 +358,6 @@ typedef struct tagSTX_AF_G_RTS } TX_AF_G_RTS, *PTX_AF_G_RTS; - typedef struct tagSTX_AF_G_RTS_MIC { //RsvTime @@ -418,8 +403,6 @@ typedef struct tagSTX_AF_G_RTS_MIC } TX_AF_G_RTS_MIC, *PTX_AF_G_RTS_MIC; - - typedef struct tagSTX_AF_G_CTS { //RsvTime @@ -454,7 +437,6 @@ typedef struct tagSTX_AF_G_CTS } TX_AF_G_CTS, *PTX_AF_G_CTS; - typedef struct tagSTX_AF_G_CTS_MIC { //RsvTime @@ -463,7 +445,6 @@ typedef struct tagSTX_AF_G_CTS_MIC u16 wTxRrvTime_b; u16 wTxRrvTime_a; - SMICHDR sMICHDR; //CTS @@ -492,8 +473,6 @@ typedef struct tagSTX_AF_G_CTS_MIC } TX_AF_G_CTS_MIC, *PTX_AF_G_CTS_MIC; - - typedef struct tagSTX_AF_A_RTS { //RsvTime @@ -521,7 +500,6 @@ typedef struct tagSTX_AF_A_RTS } TX_AF_A_RTS, *PTX_AF_A_RTS; - typedef struct tagSTX_AF_A_RTS_MIC { //RsvTime @@ -551,8 +529,6 @@ typedef struct tagSTX_AF_A_RTS_MIC } TX_AF_A_RTS_MIC, *PTX_AF_A_RTS_MIC; - - typedef struct tagSTX_AF_A_CTS { //RsvTime @@ -570,7 +546,6 @@ typedef struct tagSTX_AF_A_CTS } TX_AF_A_CTS, *PTX_AF_A_CTS; - typedef struct tagSTX_AF_A_CTS_MIC { //RsvTime @@ -590,7 +565,6 @@ typedef struct tagSTX_AF_A_CTS_MIC } TX_AF_A_CTS_MIC, *PTX_AF_A_CTS_MIC; - // // union with all of the TX Buffer Type // @@ -617,7 +591,6 @@ typedef union tagUTX_BUFFER_CONTAINER } TX_BUFFER_CONTAINER, *PTX_BUFFER_CONTAINER; - // // Remote NDIS message format // @@ -633,13 +606,11 @@ typedef struct tagSTX_BUFFER u16 wFragCtl; u16 wReserved; - // Actual message TX_BUFFER_CONTAINER BufferHeader; } TX_BUFFER, *PTX_BUFFER; - // // Remote NDIS message format // @@ -657,9 +628,6 @@ typedef struct tagSBEACON_BUFFER } BEACON_BUFFER, *PBEACON_BUFFER; - - - void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb); int nsDMA_tx_packet(struct vnt_private *, u32 uDMAIdx, struct sk_buff *skb); CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *); diff --git a/drivers/staging/vt6656/srom.h b/drivers/staging/vt6656/srom.h index 8f9296d10c00..488192d79ac9 100644 --- a/drivers/staging/vt6656/srom.h +++ b/drivers/staging/vt6656/srom.h @@ -30,7 +30,6 @@ #ifndef __SROM_H__ #define __SROM_H__ - #define EEP_MAX_CONTEXT_SIZE 256 #define CB_EEPROM_READBYTE_WAIT 900 //us @@ -53,7 +52,6 @@ #define EEP_OFS_SETPT_CCK 0x21 #define EEP_OFS_PWR_OFDMG 0x23 - #define EEP_OFS_CALIB_TX_IQ 0x24 #define EEP_OFS_CALIB_TX_DC 0x25 #define EEP_OFS_CALIB_RX_IQ 0x26 @@ -77,7 +75,6 @@ // #define EEP_RADIOCTL_ENABLE 0x80 - // AT24C02 eeprom contents // 2048 bits = 256 bytes = 128 words // @@ -112,8 +109,4 @@ typedef struct tagSSromReg { u8 abyCIS[128]; // 0x80 (u16) } SSromReg, *PSSromReg; - - - - #endif /* __EEPROM_H__ */ diff --git a/drivers/staging/vt6656/tcrc.c b/drivers/staging/vt6656/tcrc.c index fa1d7486d672..7229f26c052c 100644 --- a/drivers/staging/vt6656/tcrc.c +++ b/drivers/staging/vt6656/tcrc.c @@ -35,9 +35,6 @@ #include "tcrc.h" - - - /* 32-bit CRC table */ static const u32 s_adwCrc32Table[256] = { 0x00000000L, 0x77073096L, 0xEE0E612CL, 0x990951BAL, @@ -106,11 +103,6 @@ static const u32 s_adwCrc32Table[256] = { 0xB40BBE37L, 0xC30C8EA1L, 0x5A05DF1BL, 0x2D02EF8DL }; - - - - - /*+ * * Description: @@ -141,7 +133,6 @@ u32 CRCdwCrc32(u8 * pbyData, unsigned int cbByte, u32 dwCrcSeed) return dwCrc; } - /*+ * * Description: @@ -165,7 +156,6 @@ u32 CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte) return ~CRCdwCrc32(pbyData, cbByte, 0xFFFFFFFFL); } - /*+ * * Description: @@ -191,4 +181,3 @@ u32 CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, u32 dwPreCRC) return CRCdwCrc32(pbyData, cbByte, dwPreCRC); } - diff --git a/drivers/staging/vt6656/tcrc.h b/drivers/staging/vt6656/tcrc.h index 98edcdd97553..5b1f368964eb 100644 --- a/drivers/staging/vt6656/tcrc.h +++ b/drivers/staging/vt6656/tcrc.h @@ -31,12 +31,6 @@ #include <linux/types.h> - - - - - - u32 CRCdwCrc32(u8 * pbyData, unsigned int cbByte, u32 dwCrcSeed); u32 CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte); u32 CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, u32 dwPreCRC); diff --git a/drivers/staging/vt6656/tether.c b/drivers/staging/vt6656/tether.c index 32aa98089cda..1db1e8419a9a 100644 --- a/drivers/staging/vt6656/tether.c +++ b/drivers/staging/vt6656/tether.c @@ -36,11 +36,6 @@ #include "tcrc.h" #include "tether.h" - - - - - /* * Description: Check CRC value of the buffer if Ok or not * diff --git a/drivers/staging/vt6656/tether.h b/drivers/staging/vt6656/tether.h index e85e28e989d8..24465cfe3e6d 100644 --- a/drivers/staging/vt6656/tether.h +++ b/drivers/staging/vt6656/tether.h @@ -64,8 +64,6 @@ #define TYPE_CTL_CTS 0xc400 #define TYPE_CTL_ACK 0xd400 - - #else //if LITTLE_ENDIAN // // wType field in the SEthernetHeader @@ -97,8 +95,6 @@ #define TYPE_CTL_CTS 0x00c4 #define TYPE_CTL_ACK 0x00d4 - - #endif //#ifdef __BIG_ENDIAN #define WEP_IV_MASK 0x00FFFFFF @@ -113,10 +109,6 @@ typedef struct tagS802_3Header { } __attribute__ ((__packed__)) S802_3Header, *PS802_3Header; - - - - //u8 ETHbyGetHashIndexByCrc(u8 * pbyMultiAddr); bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength); diff --git a/drivers/staging/vt6656/tkip.c b/drivers/staging/vt6656/tkip.c index f315656c88b1..9d643e449ac3 100644 --- a/drivers/staging/vt6656/tkip.c +++ b/drivers/staging/vt6656/tkip.c @@ -35,14 +35,6 @@ #include "tmacro.h" #include "tkip.h" - - - - - - - - /* The Sbox is reduced to 2 16-bit wide tables, each with 256 entries. */ /* The 2nd table is the same as the 1st but with the upper and lower */ /* bytes swapped. To allow an endian tolerant implementation, the byte */ @@ -117,11 +109,8 @@ const u8 TKIP_Sbox_Upper[256] = { 0x82,0x29,0x5A,0x1E,0x7B,0xA8,0x6D,0x2C }; - //STKIPKeyManagement sTKIPKeyTable[MAX_TKIP_KEY]; - - /************************************************************/ /* tkip_sbox() */ /* Returns a 16 bit value from a 64K entry table. The Table */ @@ -142,7 +131,6 @@ static unsigned int tkip_sbox(unsigned int index) return (left ^ right); }; - static unsigned int rotr1(unsigned int a) { unsigned int b; @@ -156,7 +144,6 @@ static unsigned int rotr1(unsigned int a) return b; } - /* * Description: Calculate RC4Key fom TK, TA, and TSC * diff --git a/drivers/staging/vt6656/tkip.h b/drivers/staging/vt6656/tkip.h index 5182fd956e14..4fba7ef38266 100644 --- a/drivers/staging/vt6656/tkip.h +++ b/drivers/staging/vt6656/tkip.h @@ -34,11 +34,6 @@ #define TKIP_KEY_LEN 16 - - - - - void TKIPvMixKey( u8 * pbyTKey, u8 * pbyTA, diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index 62e80ed0ca97..098be609107c 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -54,23 +54,18 @@ //static int msglevel =MSG_LEVEL_DEBUG; static int msglevel =MSG_LEVEL_INFO; - #define USB_CTL_WAIT 500 //ms #ifndef URB_ASYNC_UNLINK #define URB_ASYNC_UNLINK 0 #endif - - static void s_nsInterruptUsbIoCompleteRead(struct urb *urb); static void s_nsBulkInUsbIoCompleteRead(struct urb *urb); static void s_nsBulkOutIoCompleteWrite(struct urb *urb); static void s_nsControlInUsbIoCompleteRead(struct urb *urb); static void s_nsControlInUsbIoCompleteWrite(struct urb *urb); - - int PIPEnsControlOutAsyn(struct vnt_private *pDevice, u8 byRequest, u16 wValue, u16 wIndex, u16 wLength, u8 *pbyBuffer) { @@ -245,8 +240,6 @@ static void s_nsControlInUsbIoCompleteWrite(struct urb *urb) MP_CLEAR_FLAG(pDevice, fMP_CONTROL_WRITES); } - - /* * Description: * Complete function of usb Control callback @@ -282,9 +275,6 @@ static void s_nsControlInUsbIoCompleteRead(struct urb *urb) MP_CLEAR_FLAG(pDevice, fMP_CONTROL_READS); } - - - /* * Description: * Allocates an usb interrupt in irp and calls USBD. @@ -335,7 +325,6 @@ usb_fill_bulk_urb(pDevice->pInterruptURB, return ntStatus; } - /* * Description: * Complete function of usb interrupt in irp. @@ -397,7 +386,6 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb) STAvUpdateUSBCounter(&pDevice->scStatistic.USB_InterruptStat, ntStatus); - if (pDevice->fKillEventPollingThread != true) { usb_fill_bulk_urb(pDevice->pInterruptURB, pDevice->usb, @@ -438,7 +426,6 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB) int ntStatus = 0; struct urb *pUrb; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsStartBulkInUsbRead\n"); if (pDevice->Flags & fMP_DISCONNECTED) @@ -446,7 +433,6 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB) pDevice->ulBulkInPosted++; - pUrb = pRCB->pUrb; // // Now that we have created the urb, we will send a @@ -476,9 +462,6 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB) return ntStatus; } - - - /* * Description: * Complete function of usb BulkIn irp. @@ -529,7 +512,6 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) pDevice->scStatistic.RxOkCnt ++; } - STAvUpdateUSBCounter(&pDevice->scStatistic.USB_BulkInStat, status); if (bIndicateReceive) { @@ -547,7 +529,6 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) spin_unlock(&pDevice->lock); } - return; } @@ -570,8 +551,6 @@ int PIPEnsSendBulkOut(struct vnt_private *pDevice, PUSB_SEND_CONTEXT pContext) int status; struct urb *pUrb; - - pDevice->bPWBitOn = false; /* @@ -651,7 +630,6 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb) unsigned long ulBufLen; PUSB_SEND_CONTEXT pContext; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n"); // // The context given to IoSetCompletionRoutine is an USB_CONTEXT struct @@ -699,7 +677,6 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb) pDevice->dev->trans_start = jiffies; - if (status == STATUS_SUCCESS) { pDevice->packetsSent++; } diff --git a/drivers/staging/vt6656/usbpipe.h b/drivers/staging/vt6656/usbpipe.h index 5b1a288926ba..bb7a61111a62 100644 --- a/drivers/staging/vt6656/usbpipe.h +++ b/drivers/staging/vt6656/usbpipe.h @@ -32,10 +32,6 @@ #include "device.h" - - - - int PIPEnsControlOut(struct vnt_private *, u8 byRequest, u16 wValue, u16 wIndex, u16 wLength, u8 *pbyBuffer); int PIPEnsControlOutAsyn(struct vnt_private *, u8 byRequest, diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index d150d050df82..0013cb73d83b 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c @@ -55,11 +55,6 @@ #include "channel.h" #include "iowpa.h" - - - - - static int msglevel =MSG_LEVEL_INFO; //static int msglevel =MSG_LEVEL_DEBUG; @@ -69,14 +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 *); - - /* * Description: * Stop AdHoc beacon during scan process @@ -131,7 +122,6 @@ static void vAdHocBeaconStop(struct vnt_private *pDevice) } /* vAdHocBeaconStop */ - /* * Description: * Restart AdHoc beacon after scan process complete @@ -164,7 +154,6 @@ static void vAdHocBeaconRestart(struct vnt_private *pDevice) } - /*+ * * Routine Description: @@ -193,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) { @@ -225,9 +213,6 @@ static void s_vProbeChannel(struct vnt_private *pDevice) } - - - /*+ * * Routine Description: @@ -239,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) @@ -247,7 +231,6 @@ 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); @@ -309,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) @@ -496,7 +478,6 @@ void vRunCommand(struct vnt_private *pDevice) s_bCommandComplete(pDevice); break; - case WLAN_CMD_SSID_START: pDevice->byReAssocCount = 0; @@ -903,7 +884,6 @@ void vRunCommand(struct vnt_private *pDevice) s_bCommandComplete(pDevice); break; - case WLAN_CMD_CHANGE_BBSENSITIVITY_START: pDevice->bStopDataPkt = true; @@ -954,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 ) { @@ -987,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; @@ -995,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 @@ -1176,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) { diff --git a/drivers/staging/vt6656/wcmd.h b/drivers/staging/vt6656/wcmd.h index a37ea0d47e6a..db8b4cf7fd60 100644 --- a/drivers/staging/vt6656/wcmd.h +++ b/drivers/staging/vt6656/wcmd.h @@ -32,13 +32,9 @@ #include "80211hdr.h" #include "80211mgr.h" - - - #define AUTHENTICATE_TIMEOUT 1000 //ms #define ASSOCIATE_TIMEOUT 1000 //ms - // Command code typedef enum tagCMD_CODE { WLAN_CMD_BSSID_SCAN, @@ -103,9 +99,6 @@ typedef enum tagCMD_STATE { WLAN_CMD_IDLE } CMD_STATE, *PCMD_STATE; - - - struct vnt_private; void vResetCommandTimer(struct vnt_private *); diff --git a/drivers/staging/vt6656/wctl.c b/drivers/staging/vt6656/wctl.c index 433dcb1882dc..47a655db51ef 100644 --- a/drivers/staging/vt6656/wctl.c +++ b/drivers/staging/vt6656/wctl.c @@ -39,13 +39,8 @@ #include "card.h" #include "tmacro.h" - - // static int msglevel =MSG_LEVEL_INFO; - - - /* * Description: * Scan Rx cache. Return true if packet is duplicate, else @@ -160,7 +155,6 @@ unsigned int WCTLuInsertDFCB(struct vnt_private *pDevice, return(pDevice->cbDFCB); } - /* * Description: * Handle received fragment packet @@ -181,7 +175,6 @@ bool WCTLbHandleFragment(struct vnt_private *pDevice, struct ieee80211_hdr *pMAC { unsigned int uHeaderSize; - if (bWEP == true) { uHeaderSize = 28; if (bExtIV) @@ -250,4 +243,3 @@ bool WCTLbHandleFragment(struct vnt_private *pDevice, struct ieee80211_hdr *pMAC } } - diff --git a/drivers/staging/vt6656/wctl.h b/drivers/staging/vt6656/wctl.h index de5af1a7b7e7..14cb41177045 100644 --- a/drivers/staging/vt6656/wctl.h +++ b/drivers/staging/vt6656/wctl.h @@ -32,7 +32,6 @@ #include "tether.h" #include "device.h" - #define IS_TYPE_DATA(pMACHeader) \ ((((struct ieee80211_hdr *) pMACHeader)->frame_control & TYPE_802_11_MASK) == TYPE_802_11_DATA) @@ -80,7 +79,6 @@ #define IS_CTL_PSPOLL(pMACHeader) \ ((((struct ieee80211_hdr *) pMACHeader)->frame_control & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) - #define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) { \ if ((uVar) >= ((uModulo) - 1)) \ (uVar) = 0; \ @@ -88,9 +86,6 @@ (uVar)++; \ } - - - bool WCTLbIsDuplicate(PSCache pCache, struct ieee80211_hdr *pMACHeader); bool WCTLbHandleFragment(struct vnt_private *, struct ieee80211_hdr *pMACHeader, unsigned int cbFrameLength, bool bWEP, bool bExtIV); unsigned int WCTLuSearchDFCB(struct vnt_private *, struct ieee80211_hdr *pMACHeader); diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c index fc436ee7f90a..6d1ff5eeafa9 100644 --- a/drivers/staging/vt6656/wmgr.c +++ b/drivers/staging/vt6656/wmgr.c @@ -81,14 +81,9 @@ #include "control.h" #include "rndis.h" - - - - static int msglevel =MSG_LEVEL_INFO; //static int msglevel =MSG_LEVEL_DEBUG; - static int ChannelExceedZoneType(struct vnt_private *, u8 byCurrChannel); /* Association/diassociation functions */ @@ -154,7 +149,6 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, u8 *pCurrBSSID, PWLAN_IE_SUPP_RATES pCurrSuppRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates); - /* Association response */ static struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *, struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wAssocStatus, @@ -178,11 +172,9 @@ static struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *, /* received status */ static void s_vMgrLogStatus(struct vnt_manager *pMgmt, u16 wStatus); - static void s_vMgrSynchBSS(struct vnt_private *, u32 uBSSMode, PKnownBSS pCurr, PCMD_STATUS pStatus); - static bool s_bCipherMatch ( PKnownBSS pBSSNode, @@ -193,8 +185,6 @@ s_bCipherMatch ( static void Encyption_Rebuild(struct vnt_private *, PKnownBSS pCurr); - - /*+ * * Routine Description: @@ -210,7 +200,6 @@ void vMgrObjectInit(struct vnt_private *pDevice) struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; int ii; - pMgmt->pbyPSPacketPool = &pMgmt->byPSPacketPool[0]; pMgmt->pbyMgmtPacketPool = &pMgmt->byMgmtPacketPool[0]; pMgmt->uCurrChannel = pDevice->uChannel; @@ -268,7 +257,6 @@ void vMgrAssocBeginSta(struct vnt_private *pDevice, { struct vnt_tx_mgmt *pTxPacket; - pMgmt->wCurrCapInfo = 0; pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_ESS(1); if (pDevice->bEncryptionEnable) { @@ -323,7 +311,6 @@ void vMgrAssocBeginSta(struct vnt_private *pDevice, return ; } - /*+ * * Routine Description: @@ -353,7 +340,6 @@ void vMgrReAssocBeginSta(struct vnt_private *pDevice, if (pMgmt->wListenInterval == 0) pMgmt->wListenInterval = 1; // at least one. - // ERP Phy (802.11g) should support short preamble. if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); @@ -368,7 +354,6 @@ void vMgrReAssocBeginSta(struct vnt_private *pDevice, if (pMgmt->b11hEnable == true) pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1); - pTxPacket = s_MgrMakeReAssocRequest ( pDevice, @@ -392,7 +377,6 @@ void vMgrReAssocBeginSta(struct vnt_private *pDevice, } } - return ; } @@ -452,8 +436,6 @@ void vMgrDisassocBeginSta(struct vnt_private *pDevice, return; } - - /*+ * * Routine Description:(AP function) @@ -477,7 +459,6 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, u8 abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; u8 abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; - if (pMgmt->eCurrMode != WMAC_MODE_ESS_AP) return; // node index not found @@ -517,7 +498,6 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, abyCurrExtSuppRates[1] = 0; } - RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)abyCurrSuppRates, (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRates, @@ -566,7 +546,6 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate); } - // assoc response reply.. pTxPacket = s_MgrMakeAssocResponse ( @@ -598,7 +577,6 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, return; } - /*+ * * Description:(AP function) @@ -665,7 +643,6 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice, abyCurrExtSuppRates[1] = 0; } - RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)abyCurrSuppRates, (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRates, @@ -716,7 +693,6 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice, } - // assoc response reply.. pTxPacket = s_MgrMakeReAssocResponse ( @@ -746,7 +722,6 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice, return; } - /*+ * * Routine Description: @@ -765,8 +740,6 @@ static void s_vMgrRxAssocResponse(struct vnt_private *pDevice, PWLAN_IE_SSID pItemSSID; u8 *pbyIEs; - - if (pMgmt->eCurrState == WMAC_STATE_ASSOCPENDING || pMgmt->eCurrState == WMAC_STATE_ASSOC) { @@ -978,11 +951,9 @@ void vMgrDeAuthenBeginSta(struct vnt_private *pDevice, *pStatus = CMD_STATUS_SUCCESS; } - return ; } - /*+ * * Routine Description: @@ -1031,8 +1002,6 @@ static void s_vMgrRxAuthentication(struct vnt_private *pDevice, return; } - - /*+ * * Routine Description: @@ -1045,7 +1014,6 @@ static void s_vMgrRxAuthentication(struct vnt_private *pDevice, * -*/ - static void s_vMgrRxAuthenSequence_1(struct vnt_private *pDevice, struct vnt_manager *pMgmt, PWLAN_FR_AUTHEN pFrame) { @@ -1136,8 +1104,6 @@ static void s_vMgrRxAuthenSequence_1(struct vnt_private *pDevice, return; } - - /*+ * * Routine Description: @@ -1156,7 +1122,6 @@ static void s_vMgrRxAuthenSequence_2(struct vnt_private *pDevice, WLAN_FR_AUTHEN sFrame; struct vnt_tx_mgmt *pTxPacket = NULL; - switch (cpu_to_le16((*(pFrame->pwAuthAlgorithm)))) { case WLAN_AUTH_ALG_OPENSYSTEM: @@ -1235,8 +1200,6 @@ static void s_vMgrRxAuthenSequence_2(struct vnt_private *pDevice, return; } - - /*+ * * Routine Description: @@ -1323,8 +1286,6 @@ reply: } - - /*+ * * Routine Description: @@ -1424,7 +1385,6 @@ static void s_vMgrRxDisassociation(struct vnt_private *pDevice, return; } - /*+ * * Routine Description: @@ -1442,7 +1402,6 @@ static void s_vMgrRxDeauthentication(struct vnt_private *pDevice, WLAN_FR_DEAUTHEN sFrame; u32 uNodeIndex = 0; - if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP ){ //Todo: // if is acting an AP.. @@ -1563,8 +1522,6 @@ static void s_vMgrRxBeacon(struct vnt_private *pDevice, int bChannelHit = false; u8 byOldPreambleType; - - if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) return; @@ -1833,7 +1790,6 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) if (qwTSFOffset > TRIVIAL_SYNC_DIFFERENCE) bTSFLargeDiff = true; - // if infra mode if (bIsAPBeacon == true) { @@ -2005,7 +1961,6 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) if (pDevice->byPreambleType != byOldPreambleType) CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType); - // MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID); // set highest basic rate // s_vSetHighestBasicRate(pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates); @@ -2055,8 +2010,6 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus) u8 abyOFDM_RATE[] = {0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C}; u16 wSuppRate; - - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create Basic Service Set .......\n"); if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) { @@ -2095,7 +2048,6 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus) pMgmt->abyCurrSuppRates[2+ii] = abyRATE[ii]; } - if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) { pMgmt->abyCurrSuppRates[1] = 8; pMgmt->abyCurrExtSuppRates[1] = 4; @@ -2107,7 +2059,6 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus) pMgmt->abyCurrExtSuppRates[2+ii] = abyOFDM_RATE[ii+4]; } - // Disable Protect Mode pDevice->bProtectMode = 0; MACvDisableProtectMD(pDevice); @@ -2150,8 +2101,6 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus) &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, &byTopCCKBasicRate, &byTopOFDMBasicRate); - - if (pDevice->byBBType == BB_TYPE_11A) { pDevice->bShortSlotTime = true; } else { @@ -2215,7 +2164,6 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus) pMgmt->abyCurrBSSID[0] &= ~IEEE_ADDR_GROUP; pMgmt->abyCurrBSSID[0] |= IEEE_ADDR_UNIVERSAL; - DBG_PRT(MSG_LEVEL_INFO, KERN_INFO"Adhoc beacon created bssid:" "%pM\n", pMgmt->abyCurrBSSID); } @@ -2307,7 +2255,6 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) u8 byTopOFDMBasicRate = RATE_1M; u8 bShortSlotTime = false; - for (ii = 0; ii < MAX_BSS_NUM; ii++) { if (pMgmt->sBSSList[ii].bActive == true) break; @@ -2513,7 +2460,6 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) pMgmt->eCurrState = WMAC_STATE_IDLE; }; - } else { // ad-hoc mode BSS @@ -2553,7 +2499,6 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) // TODO: check if CapInfo privacy on, but we don't.. pMgmt->uCurrChannel = pCurr->uChannel; - // Parse Support Rate IE pMgmt->abyCurrSuppRates[0] = WLAN_EID_SUPP_RATES; pMgmt->abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)pCurr->abySuppRates, @@ -2603,8 +2548,6 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) return; } - - /*+ * * Routine Description: @@ -2800,7 +2743,6 @@ static void Encyption_Rebuild(struct vnt_private *pDevice, PKnownBSS pCurr) return; } - /*+ * * Routine Description: @@ -2822,7 +2764,6 @@ static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM) u16 wStartIndex = 0; u16 wEndIndex = 0; - // Find size of partial virtual bitmap for (ii = 0; ii < (MAX_NODE_NUM + 1); ii++) { byMap = pMgmt->abyPSTxMap[ii]; @@ -2843,7 +2784,6 @@ static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM) } } - // Round start index down to nearest even number wStartIndex &= ~BIT0; @@ -2870,7 +2810,6 @@ static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM) pTIM->byVirtBitMap[0] &= ~BIT0; } - /*+ * * Routine Description: @@ -2892,7 +2831,6 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, WLAN_FR_BEACON sFrame; u8 abyBroadcastAddr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - /* prepare beacon frame */ pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool; memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt) @@ -2992,7 +2930,6 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, } } - if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) { sFrame.pERP = (PWLAN_IE_ERP)(sFrame.pBuf + sFrame.len); sFrame.len += 1 + WLAN_IEHDR_LEN; @@ -3032,10 +2969,6 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, return pTxPacket; } - - - - /*+ * * Routine Description: @@ -3047,9 +2980,6 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, * -*/ - - - struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wCurrBeaconPeriod, u32 uCurrChannel, u16 wCurrATIMWinodw, u8 *pDstAddr, @@ -3060,7 +2990,6 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, struct vnt_tx_mgmt *pTxPacket = NULL; WLAN_FR_PROBERESP sFrame; - pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool; memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt) + WLAN_PROBERESP_FR_MAXLEN); @@ -3160,8 +3089,6 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, return pTxPacket; } - - /*+ * * Routine Description: @@ -3173,7 +3100,6 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, * -*/ - struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, struct vnt_manager *pMgmt, u8 *pDAddr, u16 wCurrCapInfo, u16 wListenInterval, @@ -3186,7 +3112,6 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, u8 *pbyIEs; u8 *pbyRSN; - pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool; memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt) + WLAN_ASSOCREQ_FR_MAXLEN); @@ -3241,7 +3166,6 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, memcpy(pbyIEs, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN); pbyIEs += pCurrRates->len + WLAN_IEHDR_LEN; - if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA) || (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) || (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE)) && @@ -3407,20 +3331,12 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, pbyIEs += sFrame.pRSN->len + WLAN_IEHDR_LEN; } - // Adjust the length fields pTxPacket->cbMPDULen = sFrame.len; pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN; return pTxPacket; } - - - - - - - /*+ * * Routine Description: @@ -3432,7 +3348,6 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, * -*/ - struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, struct vnt_manager *pMgmt, u8 *pDAddr, u16 wCurrCapInfo, u16 wListenInterval, PWLAN_IE_SSID pCurrSSID, @@ -3444,7 +3359,6 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, u8 *pbyIEs; u8 *pbyRSN; - pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool; memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt) + WLAN_REASSOCREQ_FR_MAXLEN); @@ -3663,8 +3577,6 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, pbyIEs += sFrame.pRSN->len + WLAN_IEHDR_LEN; } - - /* Adjust the length fields */ pTxPacket->cbMPDULen = sFrame.len; pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN; @@ -3691,7 +3603,6 @@ struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice, struct vnt_tx_mgmt *pTxPacket = NULL; WLAN_FR_ASSOCRESP sFrame; - pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool; memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt) + WLAN_ASSOCREQ_FR_MAXLEN); @@ -3739,7 +3650,6 @@ struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice, return pTxPacket; } - /*+ * * Routine Description: @@ -3751,7 +3661,6 @@ struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice, * -*/ - struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice, struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wAssocStatus, u16 wAssocAID, u8 *pDstAddr, PWLAN_IE_SUPP_RATES pCurrSuppRates, @@ -3760,7 +3669,6 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice, struct vnt_tx_mgmt *pTxPacket = NULL; WLAN_FR_REASSOCRESP sFrame; - pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool; memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt) + WLAN_ASSOCREQ_FR_MAXLEN); @@ -3808,7 +3716,6 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice, return pTxPacket; } - /*+ * * Routine Description: @@ -3829,7 +3736,6 @@ static void s_vMgrRxProbeResponse(struct vnt_private *pDevice, ERPObject sERP; int bChannelHit = true; - memset(&sFrame, 0, sizeof(WLAN_FR_PROBERESP)); // decode the frame sFrame.len = pRxPacket->cbMPDULen; @@ -3851,7 +3757,6 @@ static void s_vMgrRxProbeResponse(struct vnt_private *pDevice, if(sFrame.pSSID->len == 0) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx Probe resp: SSID len = 0 \n"); - //{{ RobertYu:20050201, 11a byCurrChannel != sFrame.pDSParms->byCurrChannel mapping if( byCurrChannel > CB_MAX_CHANNEL_24G ) { @@ -3886,7 +3791,6 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) sERP.byERP = 0; } - // update or insert the bss pBSSList = BSSpAddrIsInBSSList((void *) pDevice, sFrame.pHdr->sA3.abyAddr3, @@ -3946,7 +3850,6 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) * -*/ - static void s_vMgrRxProbeRequest(struct vnt_private *pDevice, struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket) { @@ -4036,7 +3939,6 @@ void vMgrRxManagePacket(struct vnt_private *pDevice, struct vnt_manager *pMgmt, NODE_STATE eNodeState = 0; CMD_STATUS Status; - if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { if (BSSbIsSTAInNodeDB(pDevice, pRxPacket->p80211Header->sA3.abyAddr2, &uNodeIndex)) eNodeState = pMgmt->sNodeDBTable[uNodeIndex].eNodeState; @@ -4208,9 +4110,6 @@ int bMgrPrepareBeaconToSend(struct vnt_private *pDevice, return true; } - - - /*+ * * Routine Description: @@ -4302,8 +4201,6 @@ int bAdd_PMKID_Candidate(struct vnt_private *pDevice, u8 *pbyBSSID, if (pDevice->gsPMKIDCandidate.NumCandidates >= MAX_PMKIDLIST) return false; - - // Update Old Candidate for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) { pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii]; @@ -4509,4 +4406,3 @@ s_bCipherMatch ( return true; } - diff --git a/drivers/staging/vt6656/wmgr.h b/drivers/staging/vt6656/wmgr.h index 409d8d09adfb..5424c7f820ad 100644 --- a/drivers/staging/vt6656/wmgr.h +++ b/drivers/staging/vt6656/wmgr.h @@ -41,9 +41,6 @@ #include "wpa2.h" #include "card.h" - - - // Scan time #define PROBE_DELAY 100 // (us) #define SWITCH_CHANNEL_DELAY 200 // (us) @@ -55,7 +52,6 @@ #define WCMD_ACTIVE_SCAN_TIME 20 //(ms) #define WCMD_PASSIVE_SCAN_TIME 100 //(ms) - #define DEFAULT_MSDU_LIFETIME 512 // ms #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 // 64us @@ -64,7 +60,6 @@ #define MAKE_BEACON_RESERVED 10 //(us) - #define TIM_MULTICAST_MASK 0x01 #define TIM_BITMAPOFFSET_MASK 0xFE #define DEFAULT_DTIM_PERIOD 1 @@ -73,15 +68,11 @@ #define DEFAULT_IBSS_CHANNEL 6 //2.4G - - - //mike define: make timer to expire after desired times #define timer_expire(timer, next_tick) mod_timer(&timer, RUN_AT(next_tick)) typedef void (*TimerFunction)(unsigned long); - //+++ NDIS related typedef u8 NDIS_802_11_MAC_ADDRESS[ETH_ALEN]; @@ -112,8 +103,6 @@ typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION u32 OffsetResponseIEs; } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION; - - typedef struct tagSAssocInfo { NDIS_802_11_ASSOCIATION_INFORMATION AssocInfo; u8 abyIEs[WLAN_BEACON_FR_MAXLEN+WLAN_BEACON_FR_MAXLEN]; @@ -122,9 +111,6 @@ typedef struct tagSAssocInfo { u8 abyReqIEs[WLAN_BEACON_FR_MAXLEN]; } SAssocInfo, *PSAssocInfo; - - - typedef enum tagWMAC_AUTHENTICATION_MODE { WMAC_AUTH_OPEN, @@ -138,8 +124,6 @@ typedef enum tagWMAC_AUTHENTICATION_MODE { WMAC_AUTH_MAX // Not a real mode, defined as upper bound } WMAC_AUTHENTICATION_MODE, *PWMAC_AUTHENTICATION_MODE; - - // Pre-configured Mode (from XP) typedef enum tagWMAC_CONFIG_MODE { @@ -150,7 +134,6 @@ typedef enum tagWMAC_CONFIG_MODE { } WMAC_CONFIG_MODE, *PWMAC_CONFIG_MODE; - typedef enum tagWMAC_SCAN_TYPE { WMAC_SCAN_ACTIVE, @@ -159,7 +142,6 @@ typedef enum tagWMAC_SCAN_TYPE { } WMAC_SCAN_TYPE, *PWMAC_SCAN_TYPE; - typedef enum tagWMAC_SCAN_STATE { WMAC_NO_SCANNING, @@ -168,8 +150,6 @@ typedef enum tagWMAC_SCAN_STATE { } WMAC_SCAN_STATE, *PWMAC_SCAN_STATE; - - // Notes: // Basic Service Set state explained as following: // WMAC_STATE_IDLE : no BSS is selected (Adhoc or Infra) @@ -202,7 +182,6 @@ typedef enum tagWMAC_CURRENT_MODE { } WMAC_CURRENT_MODE, *PWMAC_CURRENT_MODE; - typedef enum tagWMAC_POWER_MODE { WMAC_POWER_CAM, @@ -211,8 +190,6 @@ typedef enum tagWMAC_POWER_MODE { } WMAC_POWER_MODE, *PWMAC_POWER_MODE; - - /* Tx Management Packet descriptor */ struct vnt_tx_mgmt { PUWLAN_80211HDR p80211Header; @@ -220,7 +197,6 @@ struct vnt_tx_mgmt { u32 cbPayloadLen; }; - /* Rx Management Packet descriptor */ struct vnt_rx_mgmt { PUWLAN_80211HDR p80211Header; @@ -233,7 +209,6 @@ struct vnt_rx_mgmt { u8 byRxChannel; }; - struct vnt_manager { void *pAdapter; @@ -335,7 +310,6 @@ struct vnt_manager { u8 byMgmtPacketPool[sizeof(struct vnt_tx_mgmt) + WLAN_A3FR_MAXLEN]; - /* One second callback timer */ struct timer_list sTimerSecondCallback; @@ -379,8 +353,6 @@ struct vnt_manager { }; - - void vMgrObjectInit(struct vnt_private *pDevice); void vMgrAssocBeginSta(struct vnt_private *pDevice, diff --git a/drivers/staging/vt6656/wpa.c b/drivers/staging/vt6656/wpa.c index 9486d0dea0a6..01db4e7154da 100644 --- a/drivers/staging/vt6656/wpa.c +++ b/drivers/staging/vt6656/wpa.c @@ -50,7 +50,6 @@ const u8 abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 }; const u8 abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 }; const u8 abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 }; - /*+ * * Description: @@ -86,7 +85,6 @@ WPA_ClearRSN( pBSSList->bWPAValid = false; } - /*+ * * Description: diff --git a/drivers/staging/vt6656/wpa.h b/drivers/staging/vt6656/wpa.h index 24b97acf0d6f..2a724c064e59 100644 --- a/drivers/staging/vt6656/wpa.h +++ b/drivers/staging/vt6656/wpa.h @@ -33,7 +33,6 @@ #include "80211hdr.h" - #define WPA_NONE 0 #define WPA_WEP40 1 #define WPA_TKIP 2 @@ -47,11 +46,6 @@ #define WPA_REPLAYBITSSHIFT 2 #define WPA_REPLAYBITS 0x03 - - - - - void WPA_ClearRSN( PKnownBSS pBSSList diff --git a/drivers/staging/vt6656/wpa2.c b/drivers/staging/vt6656/wpa2.c index 14f7d2c1e44d..aa2216184345 100644 --- a/drivers/staging/vt6656/wpa2.c +++ b/drivers/staging/vt6656/wpa2.c @@ -37,7 +37,6 @@ static int msglevel =MSG_LEVEL_INFO; //static int msglevel =MSG_LEVEL_DEBUG; - const u8 abyOUIGK[4] = { 0x00, 0x0F, 0xAC, 0x00 }; const u8 abyOUIWEP40[4] = { 0x00, 0x0F, 0xAC, 0x01 }; const u8 abyOUIWEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 }; @@ -47,10 +46,6 @@ const u8 abyOUICCMP[4] = { 0x00, 0x0F, 0xAC, 0x04 }; const u8 abyOUI8021X[4] = { 0x00, 0x0F, 0xAC, 0x01 }; const u8 abyOUIPSK[4] = { 0x00, 0x0F, 0xAC, 0x02 }; - - - - /*+ * * Description: diff --git a/drivers/staging/vt6656/wpa2.h b/drivers/staging/vt6656/wpa2.h index bd4bc3d1bfd6..dc505ce7a7e4 100644 --- a/drivers/staging/vt6656/wpa2.h +++ b/drivers/staging/vt6656/wpa2.h @@ -47,11 +47,6 @@ typedef struct tagSPMKIDCache { PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE]; } SPMKIDCache, *PSPMKIDCache; - - - - - void WPA2_ClearRSN(PKnownBSS pBSSNode); void WPA2vParseRSN(PKnownBSS pBSSNode, PWLAN_IE_RSN pRSN); diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c index 20b83b6a5b51..9f1b413ce86f 100644 --- a/drivers/staging/vt6656/wpactl.c +++ b/drivers/staging/vt6656/wpactl.c @@ -42,13 +42,8 @@ #include "rndis.h" #include "rf.h" - - static int msglevel = MSG_LEVEL_INFO; - - - /* * Description: * Set WPA algorithm & keys @@ -122,7 +117,6 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) return ret; } - if (param->u.wpa_key.seq && param->u.wpa_key.seq_len > sizeof(abySeq)) return -EINVAL; @@ -154,7 +148,6 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) if (param->u.wpa_key.set_tx) dwKeyIndex |= (1 << 31); - if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) byKeyDecMode = KEY_CTL_CCMP; else if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) @@ -253,4 +246,3 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) return ret; } - diff --git a/drivers/staging/vt6656/wpactl.h b/drivers/staging/vt6656/wpactl.h index ea05de34226d..e032a1b94ae8 100644 --- a/drivers/staging/vt6656/wpactl.h +++ b/drivers/staging/vt6656/wpactl.h @@ -32,8 +32,6 @@ #include "device.h" #include "iowpa.h" - - //WPA related typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg; @@ -42,12 +40,8 @@ typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg; #define AUTH_ALG_SHARED_KEY 0x02 #define AUTH_ALG_LEAP 0x04 - typedef unsigned long long NDIS_802_11_KEY_RSC; - - - int wpa_set_keys(struct vnt_private *, void *ctx); #endif /* __WPACL_H__ */ |