diff options
Diffstat (limited to 'drivers/staging/rt2860/sta')
-rw-r--r-- | drivers/staging/rt2860/sta/assoc.c | 26 | ||||
-rw-r--r-- | drivers/staging/rt2860/sta/connect.c | 15 | ||||
-rw-r--r-- | drivers/staging/rt2860/sta/rtmp_data.c | 15 | ||||
-rw-r--r-- | drivers/staging/rt2860/sta/sync.c | 2 | ||||
-rw-r--r-- | drivers/staging/rt2860/sta/wpa.c | 9 |
5 files changed, 7 insertions, 60 deletions
diff --git a/drivers/staging/rt2860/sta/assoc.c b/drivers/staging/rt2860/sta/assoc.c index a0734c6..1a58715 100644 --- a/drivers/staging/rt2860/sta/assoc.c +++ b/drivers/staging/rt2860/sta/assoc.c @@ -454,11 +454,7 @@ VOID MlmeAssocReqAction( RSNIe = IE_WPA2; } -#ifdef RT30xx -#ifdef SIOCSIWGENIE if (pAd->StaCfg.WpaSupplicantUP != 1) -#endif // SIOCSIWGENIE // -#endif RTMPMakeRSNIE(pAd, pAd->StaCfg.AuthMode, pAd->StaCfg.WepStatus, BSS0); // Check for WPA PMK cache list @@ -485,8 +481,6 @@ VOID MlmeAssocReqAction( } } -#ifdef RT30xx -#ifdef SIOCSIWGENIE if (pAd->StaCfg.WpaSupplicantUP == 1) { MakeOutgoingFrame(pOutBuffer + FrameLen, &tmp, @@ -494,8 +488,6 @@ VOID MlmeAssocReqAction( END_OF_ARGS); } else -#endif -#endif { MakeOutgoingFrame(pOutBuffer + FrameLen, &tmp, 1, &RSNIe, @@ -506,11 +498,7 @@ VOID MlmeAssocReqAction( FrameLen += tmp; -#ifdef RT30xx -#ifdef SIOCSIWGENIE if (pAd->StaCfg.WpaSupplicantUP != 1) -#endif -#endif { // Append Variable IE NdisMoveMemory(pAd->StaCfg.ReqVarIEs + VarIesOffset, &RSNIe, 1); @@ -1503,7 +1491,6 @@ int wext_notify_event_assoc( union iwreq_data wrqu; char custom[IW_CUSTOM_MAX] = {0}; -#if WIRELESS_EXT > 17 if (pAd->StaCfg.ReqVarIELen <= IW_CUSTOM_MAX) { wrqu.data.length = pAd->StaCfg.ReqVarIELen; @@ -1512,19 +1499,6 @@ int wext_notify_event_assoc( } else DBGPRINT(RT_DEBUG_TRACE, ("pAd->StaCfg.ReqVarIELen > MAX_CUSTOM_LEN\n")); -#else - if (((pAd->StaCfg.ReqVarIELen*2) + 17) <= IW_CUSTOM_MAX) - { - UCHAR idx; - wrqu.data.length = (pAd->StaCfg.ReqVarIELen*2) + 17; - sprintf(custom, "ASSOCINFO(ReqIEs="); - for (idx=0; idx<pAd->StaCfg.ReqVarIELen; idx++) - sprintf(custom + strlen(custom), "%02x", pAd->StaCfg.ReqVarIEs[idx]); - wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, custom); - } - else - DBGPRINT(RT_DEBUG_TRACE, ("(pAd->StaCfg.ReqVarIELen*2) + 17 > MAX_CUSTOM_LEN\n")); -#endif return 0; diff --git a/drivers/staging/rt2860/sta/connect.c b/drivers/staging/rt2860/sta/connect.c index ac71351..7bc75ab 100644 --- a/drivers/staging/rt2860/sta/connect.c +++ b/drivers/staging/rt2860/sta/connect.c @@ -1171,7 +1171,6 @@ VOID LinkUp( OPSTATUS_SET_FLAG(pAd, fOP_STATUS_ADHOC_ON); OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_INFRA_ON); -#ifdef RT30xx if ((pAd->CommonCfg.HtCapability.HtCapInfo.ChannelWidth == BW_40) && (pAd->CommonCfg.AddHTInfo.AddHtInfo.ExtChanOffset == EXTCHA_ABOVE)) { @@ -1183,7 +1182,6 @@ VOID LinkUp( { pAd->CommonCfg.CentralChannel = pAd->CommonCfg.Channel - 2; } -#endif #ifdef RT2870 if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED) AdhocTurnOnQos(pAd); @@ -1585,9 +1583,7 @@ VOID LinkUp( pAd->MacTab.Size = 1; // infra mode always set MACtab size =1. pAd->MacTab.Content[BSSID_WCID].Sst = SST_ASSOC; pAd->MacTab.Content[BSSID_WCID].AuthState = SST_ASSOC; -#ifdef RT30xx pAd->MacTab.Content[BSSID_WCID].AuthMode = pAd->StaCfg.AuthMode; -#endif pAd->MacTab.Content[BSSID_WCID].WepStatus = pAd->StaCfg.WepStatus; NdisReleaseSpinLock(&pAd->MacTabLock); @@ -1711,15 +1707,10 @@ VOID LinkUp( // Txop can only be modified when RDG is off, WMM is disable and TxBurst is enable // // if 1. Legacy AP WMM on, or 2. 11n AP, AMPDU disable. Force turn off burst no matter what bEnableTxBurst is. -#ifdef RT30xx - if (!((pAd->CommonCfg.RxStream == 1)&&(pAd->CommonCfg.TxStream == 1)) && + if ( + !(pAd->CommonCfg.RxStream == 1 && pAd->CommonCfg.TxStream == 1) && (((pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) && OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED)) || ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE) && (pAd->CommonCfg.BACapability.field.Policy == BA_NOTUSE)))) -#endif -#ifndef RT30xx - if (((pAd->StaActive.SupportedPhyInfo.bHtEnable == FALSE) && (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_WMM_INUSED))) - || ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE) && (pAd->CommonCfg.BACapability.field.Policy == BA_NOTUSE))) -#endif { RTMP_IO_READ32(pAd, EDCA_AC0_CFG, &Data); Data &= 0xFFFFFF00; @@ -2101,7 +2092,6 @@ VOID LinkDown( wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL); } -#ifdef RT30xx if (IS_RT3090(pAd)) { UINT32 macdata; @@ -2115,7 +2105,6 @@ VOID LinkDown( macdata &= ~(0x09); //bit 0, 3 RTMP_IO_WRITE32(pAd, 0x1210, macdata); } -#endif // RT30xx // } /* diff --git a/drivers/staging/rt2860/sta/rtmp_data.c b/drivers/staging/rt2860/sta/rtmp_data.c index b41ce23..f751ab6 100644 --- a/drivers/staging/rt2860/sta/rtmp_data.c +++ b/drivers/staging/rt2860/sta/rtmp_data.c @@ -575,21 +575,16 @@ VOID STAHandleRxMgmtFrame( { // We should collect RSSI not only U2M data but also my beacon -#ifdef RT30xx - if ((pHeader->FC.SubType == SUBTYPE_BEACON) && (MAC_ADDR_EQUAL(&pAd->CommonCfg.Bssid, &pHeader->Addr2)) - && (pAd->RxAnt.EvaluatePeriod == 0)) -#endif -#ifndef RT30xx - if ((pHeader->FC.SubType == SUBTYPE_BEACON) && (MAC_ADDR_EQUAL(&pAd->CommonCfg.Bssid, &pHeader->Addr2))) -#endif - { + if (pAd->RxAnt.EvaluatePeriod == 0 && + pHeader->FC.SubType == SUBTYPE_BEACON && + MAC_ADDR_EQUAL(&pAd->CommonCfg.Bssid, &pHeader->Addr2)) { Update_Rssi_Sample(pAd, &pAd->StaCfg.RssiSample, pRxWI); pAd->StaCfg.LastSNR0 = (UCHAR)(pRxWI->SNR0); pAd->StaCfg.LastSNR1 = (UCHAR)(pRxWI->SNR1); } -#ifdef RT30xx +#ifdef RT2870 // collect rssi information for antenna diversity if (pAd->NicConfig2.field.AntDiversity) { @@ -599,7 +594,7 @@ VOID STAHandleRxMgmtFrame( pAd->StaCfg.NumOfAvgRssiSample ++; } } -#endif // RT30xx // +#endif // First check the size, it MUST not exceed the mlme queue size if (pRxWI->MPDUtotalByteCount > MGMT_DMA_BUFFER_SIZE) diff --git a/drivers/staging/rt2860/sta/sync.c b/drivers/staging/rt2860/sta/sync.c index 87b5e49..a6e4362 100644 --- a/drivers/staging/rt2860/sta/sync.c +++ b/drivers/staging/rt2860/sta/sync.c @@ -1116,10 +1116,8 @@ VOID PeerBeacon( // Add the safeguard against the mismatch of adhoc wep status if (pAd->StaCfg.WepStatus != pAd->ScanTab.BssEntry[Bssidx].WepStatus) { -#ifdef RT30xx DBGPRINT(RT_DEBUG_TRACE, ("SYNC - Not matched wep status %d %d\n", pAd->StaCfg.WepStatus, pAd->ScanTab.BssEntry[Bssidx].WepStatus)); DBGPRINT(RT_DEBUG_TRACE, ("bssid=%s\n", pAd->ScanTab.BssEntry[Bssidx].Bssid)); -#endif return; } diff --git a/drivers/staging/rt2860/sta/wpa.c b/drivers/staging/rt2860/sta/wpa.c index 5827436..8c34e39 100644 --- a/drivers/staging/rt2860/sta/wpa.c +++ b/drivers/staging/rt2860/sta/wpa.c @@ -1384,12 +1384,10 @@ VOID WpaGroupMsg1Action( pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].CipherAlg = CIPHER_TKIP; else if (pAd->StaCfg.GroupCipher == Ndis802_11Encryption3Enabled) pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].CipherAlg = CIPHER_AES; -#ifndef RT30xx else if (pAd->StaCfg.GroupCipher == Ndis802_11GroupWEP40Enabled) pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].CipherAlg = CIPHER_WEP64; else if (pAd->StaCfg.GroupCipher == Ndis802_11GroupWEP104Enabled) pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].CipherAlg = CIPHER_WEP128; -#endif //hex_dump("Group Key :", pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].Key, LEN_TKIP_EK); } @@ -1766,12 +1764,7 @@ BOOLEAN ParseKeyData( // Get GTK length - refer to IEEE 802.11i-2004 p.82 GTKLEN = pKDE->Len -6; -#ifdef RT30xx if (GTKLEN < LEN_AES_KEY) -#endif -#ifndef RT30xx - if (GTKLEN < MIN_LEN_OF_GTK) -#endif { DBGPRINT(RT_DEBUG_ERROR, ("ERROR: GTK Key length is too short (%d) \n", GTKLEN)); return FALSE; @@ -1797,12 +1790,10 @@ BOOLEAN ParseKeyData( pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].CipherAlg = CIPHER_TKIP; else if (pAd->StaCfg.GroupCipher == Ndis802_11Encryption3Enabled) pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].CipherAlg = CIPHER_AES; -#ifndef RT30xx else if (pAd->StaCfg.GroupCipher == Ndis802_11GroupWEP40Enabled) pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].CipherAlg = CIPHER_WEP64; else if (pAd->StaCfg.GroupCipher == Ndis802_11GroupWEP104Enabled) pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].CipherAlg = CIPHER_WEP128; -#endif return TRUE; |