Commit 1e71e6d0 authored by Larry Finger's avatar Larry Finger

staging: rtl8192e: Remove dead code associated with RTL8192SE

The vendor code will generate several different drivers. As the RTL8192SE
is covered by a mac80211 driver in mainline, eliminate that code heere.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent 175159c5
...@@ -18,13 +18,8 @@ ...@@ -18,13 +18,8 @@
******************************************************************************/ ******************************************************************************/
#include "rtl_core.h" #include "rtl_core.h"
#ifdef RTL8192SE
#include "rtl8192s/r8192S_phyreg.h"
#include "rtl8192s/r8192S_phy.h"
#else
#include "r8192E_phyreg.h" #include "r8192E_phyreg.h"
#include "r8192E_phy.h" #include "r8192E_phy.h"
#endif
#include "r8190P_rtl8256.h" #include "r8190P_rtl8256.h"
void PHY_SetRF8256Bandwidth(struct net_device* dev , HT_CHANNEL_WIDTH Bandwidth) void PHY_SetRF8256Bandwidth(struct net_device* dev , HT_CHANNEL_WIDTH Bandwidth)
...@@ -188,7 +183,6 @@ bool phy_RF8256_Config_ParaFile(struct net_device* dev) ...@@ -188,7 +183,6 @@ bool phy_RF8256_Config_ParaFile(struct net_device* dev)
return false; return false;
} }
#ifndef RTL8192SE
void PHY_SetRF8256CCKTxPower(struct net_device* dev, u8 powerlevel) void PHY_SetRF8256CCKTxPower(struct net_device* dev, u8 powerlevel)
{ {
u32 TxAGC=0; u32 TxAGC=0;
...@@ -260,7 +254,3 @@ void PHY_SetRF8256OFDMTxPower(struct net_device* dev, u8 powerlevel) ...@@ -260,7 +254,3 @@ void PHY_SetRF8256OFDMTxPower(struct net_device* dev, u8 powerlevel)
#endif #endif
return; return;
} }
#endif
...@@ -1436,61 +1436,6 @@ rtl8192_signal_scale_mapping(struct r8192_priv * priv, ...@@ -1436,61 +1436,6 @@ rtl8192_signal_scale_mapping(struct r8192_priv * priv,
{ {
long retsig; long retsig;
#if defined RTL8192SE || defined RTL8192CE
if (priv->CustomerID == RT_CID_819x_Lenovo)
{
return currsig;
}
else if (priv->CustomerID == RT_CID_819x_Netcore)
{
if (currsig >= 31 && currsig <= 100)
{
retsig = 100;
}
else if (currsig >= 21 && currsig <= 30)
{
retsig = 90 + ((currsig - 20) / 1);
}
else if (currsig >= 11 && currsig <= 20)
{
retsig = 80 + ((currsig - 10) / 1);
}
else if (currsig >= 7 && currsig <= 10)
{
retsig = 69 + (currsig - 7);
}
else if (currsig == 6)
{
retsig = 54;
}
else if (currsig == 5)
{
retsig = 45;
}
else if (currsig == 4)
{
retsig = 36;
}
else if (currsig == 3)
{
retsig = 27;
}
else if (currsig == 2)
{
retsig = 18;
}
else if (currsig == 1)
{
retsig = 9;
}
else
{
retsig = currsig;
}
return retsig;
}
#endif
if (currsig >= 61 && currsig <= 100) if (currsig >= 61 && currsig <= 100)
{ {
retsig = 90 + ((currsig - 60) / 4); retsig = 90 + ((currsig - 60) / 4);
...@@ -2257,10 +2202,6 @@ void rtl8192_EnableInterrupt(struct net_device *dev) ...@@ -2257,10 +2202,6 @@ void rtl8192_EnableInterrupt(struct net_device *dev)
write_nic_dword(dev,INTA_MASK, priv->irq_mask[0]); write_nic_dword(dev,INTA_MASK, priv->irq_mask[0]);
#endif #endif
#ifdef RTL8192SE
write_nic_dword(dev,INTA_MASK+4, priv->irq_mask[1]&0x3F);
#endif
} }
void rtl8192_DisableInterrupt(struct net_device *dev) void rtl8192_DisableInterrupt(struct net_device *dev)
...@@ -2273,9 +2214,6 @@ void rtl8192_DisableInterrupt(struct net_device *dev) ...@@ -2273,9 +2214,6 @@ void rtl8192_DisableInterrupt(struct net_device *dev)
write_nic_dword(dev,INTA_MASK,0); write_nic_dword(dev,INTA_MASK,0);
#endif #endif
#ifdef RTL8192SE
write_nic_dword(dev,INTA_MASK + 4,0);
#endif
priv->irq_enabled = 0; priv->irq_enabled = 0;
} }
...@@ -2290,10 +2228,6 @@ void rtl8192_ClearInterrupt(struct net_device *dev) ...@@ -2290,10 +2228,6 @@ void rtl8192_ClearInterrupt(struct net_device *dev)
write_nic_dword(dev, ISR, tmp); write_nic_dword(dev, ISR, tmp);
#endif #endif
#ifdef RTL8192SE
tmp = read_nic_dword(dev, ISR+4);
write_nic_dword(dev, ISR+4, tmp);
#endif
} }
...@@ -2334,17 +2268,8 @@ void rtl8192_beacon_disable(struct net_device *dev) ...@@ -2334,17 +2268,8 @@ void rtl8192_beacon_disable(struct net_device *dev)
void rtl8192_interrupt_recognized(struct net_device *dev, u32 *p_inta, u32 *p_intb) void rtl8192_interrupt_recognized(struct net_device *dev, u32 *p_inta, u32 *p_intb)
{ {
#ifdef RTL8192SE
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
*p_inta = read_nic_dword(dev, ISR) & priv->irq_mask[0];
#else
*p_inta = read_nic_dword(dev, ISR) ; *p_inta = read_nic_dword(dev, ISR) ;
#endif
write_nic_dword(dev,ISR,*p_inta); write_nic_dword(dev,ISR,*p_inta);
#ifdef RTL8192SE
*p_intb = read_nic_dword(dev, ISR+4);
write_nic_dword(dev, ISR+4, *p_intb);
#endif
} }
bool rtl8192_HalRxCheckStuck(struct net_device *dev) bool rtl8192_HalRxCheckStuck(struct net_device *dev)
...@@ -2438,9 +2363,6 @@ bool rtl8192_HalTxCheckStuck(struct net_device *dev) ...@@ -2438,9 +2363,6 @@ bool rtl8192_HalTxCheckStuck(struct net_device *dev)
bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev) bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev)
{ {
#ifdef RTL8192SE
return true;
#else
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_device *ieee = priv->rtllib; struct rtllib_device *ieee = priv->rtllib;
if (ieee->rtllib_ap_sec_type && if (ieee->rtllib_ap_sec_type &&
...@@ -2449,14 +2371,10 @@ bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev) ...@@ -2449,14 +2371,10 @@ bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev)
} else { } else {
return true; return true;
} }
#endif
} }
bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev) bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev)
{ {
#ifdef RTL8192SE
return false;
#else
bool Reval; bool Reval;
struct r8192_priv* priv = rtllib_priv(dev); struct r8192_priv* priv = rtllib_priv(dev);
struct rtllib_device* ieee = priv->rtllib; struct rtllib_device* ieee = priv->rtllib;
...@@ -2467,7 +2385,6 @@ bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev) ...@@ -2467,7 +2385,6 @@ bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev)
Reval = false; Reval = false;
return Reval; return Reval;
#endif
} }
u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc) u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc)
......
...@@ -1444,7 +1444,6 @@ PHY_SetRtl8192eRfOff(struct net_device* dev ) ...@@ -1444,7 +1444,6 @@ PHY_SetRtl8192eRfOff(struct net_device* dev )
} }
#endif #endif
#ifndef RTL8192SE
bool bool
SetRFPowerState8190( SetRFPowerState8190(
struct net_device* dev, struct net_device* dev,
...@@ -1695,7 +1694,6 @@ SetRFPowerState( ...@@ -1695,7 +1694,6 @@ SetRFPowerState(
return bResult; return bResult;
} }
#endif
extern void extern void
PHY_ScanOperationBackup8192( PHY_ScanOperationBackup8192(
......
...@@ -436,14 +436,6 @@ bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device* ieee) ...@@ -436,14 +436,6 @@ bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device* ieee)
(pHTInfo->IOTPeer != HT_IOT_PEER_RALINK) ) (pHTInfo->IOTPeer != HT_IOT_PEER_RALINK) )
retValue = true; retValue = true;
} }
#elif defined(RTL8192SE)
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
if (ieee->rtllib_ap_sec_type &&
(ieee->rtllib_ap_sec_type(ieee)&SEC_ALG_TKIP)) {
if (pHTInfo->IOTPeer == HT_IOT_PEER_RALINK){
retValue = true;
}
}
#endif #endif
return retValue; return retValue;
} }
...@@ -519,11 +511,7 @@ HTIOTActWAIOTBroadcom(struct rtllib_device* ieee) ...@@ -519,11 +511,7 @@ HTIOTActWAIOTBroadcom(struct rtllib_device* ieee)
u8 HTIOTActIsForcedCTS2Self(struct rtllib_device *ieee, struct rtllib_network *network) u8 HTIOTActIsForcedCTS2Self(struct rtllib_device *ieee, struct rtllib_network *network)
{ {
u8 retValue = 0; u8 retValue = 0;
#if (defined RTL8192SE || defined RTL8192SU || defined RTL8192CE)
if ((ieee->pHTInfo->IOTPeer == HT_IOT_PEER_MARVELL) ||(ieee->pHTInfo->IOTPeer == HT_IOT_PEER_ATHEROS) )
#else
if (ieee->pHTInfo->IOTPeer == HT_IOT_PEER_MARVELL) if (ieee->pHTInfo->IOTPeer == HT_IOT_PEER_MARVELL)
#endif
{ {
retValue = 1; retValue = 1;
} }
...@@ -534,17 +522,6 @@ u8 HTIOTActIsForcedCTS2Self(struct rtllib_device *ieee, struct rtllib_network *n ...@@ -534,17 +522,6 @@ u8 HTIOTActIsForcedCTS2Self(struct rtllib_device *ieee, struct rtllib_network *n
u8 HTIOTActIsForcedRTSCTS(struct rtllib_device *ieee, struct rtllib_network *network) u8 HTIOTActIsForcedRTSCTS(struct rtllib_device *ieee, struct rtllib_network *network)
{ {
u8 retValue = 0; u8 retValue = 0;
#if defined(RTL8192SE) || defined(RTL8192SU)
if (ieee->pHTInfo->bCurrentHTSupport)
{
if ((ieee->pHTInfo->IOTPeer != HT_IOT_PEER_REALTEK)&&
(ieee->pHTInfo->IOTPeer != HT_IOT_PEER_REALTEK_92SE))
{
if ((ieee->pHTInfo->IOTAction & HT_IOT_ACT_TX_NO_AGGREGATION) == 0)
retValue = 1;
}
}
#endif
return retValue; return retValue;
} }
...@@ -570,12 +547,6 @@ u8 ...@@ -570,12 +547,6 @@ u8
HTIOCActRejcectADDBARequest(struct rtllib_network *network) HTIOCActRejcectADDBARequest(struct rtllib_network *network)
{ {
u8 retValue = 0; u8 retValue = 0;
#if (defined RTL8192SE || defined RTL8192SU || defined RTL8192CE)
{
}
#endif
return retValue; return retValue;
...@@ -601,16 +572,6 @@ u8 ...@@ -601,16 +572,6 @@ u8
pHTInfo->IOTPeer==HT_IOT_PEER_RALINK) pHTInfo->IOTPeer==HT_IOT_PEER_RALINK)
return 1; return 1;
}
#elif defined RTL8192SE
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
{
if (ieee->rtllib_ap_sec_type != NULL)
if (ieee->rtllib_ap_sec_type(ieee) == SEC_ALG_CCMP)
if (pHTInfo->IOTPeer==HT_IOT_PEER_RALINK){
return 1;
}
} }
#endif #endif
return retValue; return retValue;
...@@ -634,9 +595,6 @@ u8 ...@@ -634,9 +595,6 @@ u8
HTIOTActDisableHighPower(struct rtllib_device* ieee,struct rtllib_network *network) HTIOTActDisableHighPower(struct rtllib_device* ieee,struct rtllib_network *network)
{ {
u8 retValue = 0; u8 retValue = 0;
#if (defined RTL8192SE || defined RTL8192SU || defined RTL8192CE)
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
#endif
#ifdef RTL8192SU #ifdef RTL8192SU
if (pHTInfo->IOTPeer==HT_IOT_PEER_RALINK || if (pHTInfo->IOTPeer==HT_IOT_PEER_RALINK ||
...@@ -645,12 +603,6 @@ HTIOTActDisableHighPower(struct rtllib_device* ieee,struct rtllib_network *netwo ...@@ -645,12 +603,6 @@ HTIOTActDisableHighPower(struct rtllib_device* ieee,struct rtllib_network *netwo
{ {
retValue = 1; retValue = 1;
} }
#elif defined RTL8192SE || defined RTL8192CE
if (pHTInfo->IOTPeer==HT_IOT_PEER_RALINK ||
pHTInfo->IOTPeer==HT_IOT_PEER_REALTEK )
{
retValue = 1;
}
#endif #endif
return retValue; return retValue;
} }
...@@ -675,19 +627,6 @@ HTIOTActIsDisableTx40MHz(struct rtllib_device* ieee,struct rtllib_network *netwo ...@@ -675,19 +627,6 @@ HTIOTActIsDisableTx40MHz(struct rtllib_device* ieee,struct rtllib_network *netwo
{ {
u8 retValue = 0; u8 retValue = 0;
#if (defined RTL8192SU || defined RTL8192SE || defined RTL8192CE)
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
if ( (KEY_TYPE_WEP104 == ieee->pairwise_key_type) ||
(KEY_TYPE_WEP40 == ieee->pairwise_key_type) ||
(KEY_TYPE_WEP104 == ieee->group_key_type) ||
(KEY_TYPE_WEP40 == ieee->group_key_type) ||
(KEY_TYPE_TKIP == ieee->pairwise_key_type) )
{
if ((pHTInfo->IOTPeer==HT_IOT_PEER_REALTEK) && (network->bssht.bdSupportHT))
retValue = 1;
}
#endif
return retValue; return retValue;
} }
...@@ -696,19 +635,6 @@ HTIOTActIsTxNoAggregation(struct rtllib_device* ieee,struct rtllib_network *netw ...@@ -696,19 +635,6 @@ HTIOTActIsTxNoAggregation(struct rtllib_device* ieee,struct rtllib_network *netw
{ {
u8 retValue = 0; u8 retValue = 0;
#if (defined RTL8192SU || defined RTL8192SE || defined RTL8192CE)
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
if ( (KEY_TYPE_WEP104 == ieee->pairwise_key_type) ||
(KEY_TYPE_WEP40 == ieee->pairwise_key_type) ||
(KEY_TYPE_WEP104 == ieee->group_key_type) ||
(KEY_TYPE_WEP40 == ieee->group_key_type) ||
(KEY_TYPE_TKIP == ieee->pairwise_key_type) )
{
if (pHTInfo->IOTPeer==HT_IOT_PEER_REALTEK)
retValue = 1;
}
#endif
return retValue; return retValue;
} }
...@@ -718,19 +644,6 @@ HTIOTActIsDisableTx2SS(struct rtllib_device* ieee,struct rtllib_network *network ...@@ -718,19 +644,6 @@ HTIOTActIsDisableTx2SS(struct rtllib_device* ieee,struct rtllib_network *network
{ {
u8 retValue = 0; u8 retValue = 0;
#if (defined RTL8192SU || defined RTL8192SE || defined RTL8192CE)
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
if ( (KEY_TYPE_WEP104 == ieee->pairwise_key_type) ||
(KEY_TYPE_WEP40 == ieee->pairwise_key_type) ||
(KEY_TYPE_WEP104 == ieee->group_key_type) ||
(KEY_TYPE_WEP40 == ieee->group_key_type) ||
(KEY_TYPE_TKIP == ieee->pairwise_key_type) )
{
if ((pHTInfo->IOTPeer==HT_IOT_PEER_REALTEK) && (network->bssht.bdSupportHT))
retValue = 1;
}
#endif
return retValue; return retValue;
} }
...@@ -753,15 +666,6 @@ bool HTIOCActIsDisableCckRate(struct rtllib_device* ieee,struct rtllib_network * ...@@ -753,15 +666,6 @@ bool HTIOCActIsDisableCckRate(struct rtllib_device* ieee,struct rtllib_network *
bool HTIOCActAllowPeerAggOnePacket(struct rtllib_device* ieee,struct rtllib_network *network) bool HTIOCActAllowPeerAggOnePacket(struct rtllib_device* ieee,struct rtllib_network *network)
{ {
bool retValue = false; bool retValue = false;
#if defined(RTL8192SE) || defined(RTL8192SU)
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
{
if (ieee->VersionID<2)
if (pHTInfo->IOTPeer == HT_IOT_PEER_MARVELL)
return true;
}
#endif
return retValue; return retValue;
} }
...@@ -769,14 +673,6 @@ bool ...@@ -769,14 +673,6 @@ bool
HTIOTActIsNullDataPowerSaving(struct rtllib_device* ieee,struct rtllib_network *network) HTIOTActIsNullDataPowerSaving(struct rtllib_device* ieee,struct rtllib_network *network)
{ {
bool retValue = false; bool retValue = false;
#if defined(RTL8192SE) || defined(RTL8192SU)
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
{
if (pHTInfo->IOTPeer == HT_IOT_PEER_BROADCOM)
return true;
}
#endif
return retValue; return retValue;
} }
...@@ -826,9 +722,6 @@ void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8* ...@@ -826,9 +722,6 @@ void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8*
pCapELE->ShortGI40Mhz = 1; pCapELE->ShortGI40Mhz = 1;
pCapELE->TxSTBC = 1; pCapELE->TxSTBC = 1;
#if defined RTL8192SE || defined RTL8192CE
pCapELE->TxSTBC = 0;
#endif
pCapELE->RxSTBC = 0; pCapELE->RxSTBC = 0;
pCapELE->DelayBA = 0; pCapELE->DelayBA = 0;
pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE>=7935)?1:0; pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE>=7935)?1:0;
...@@ -1131,18 +1024,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee) ...@@ -1131,18 +1024,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density; pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
else else
pHTInfo->CurrentMPDUDensity = pPeerHTCap->MPDUDensity; pHTInfo->CurrentMPDUDensity = pPeerHTCap->MPDUDensity;
#if (defined RTL8192SE || defined RTL8192SU || defined RTL8192CE)
if (ieee->SetHwRegHandler != NULL) {
ieee->SetHwRegHandler( ieee->dev, HW_VAR_SHORTGI_DENSITY, (u8*)(&ieee->MaxMssDensity));
ieee->SetHwRegHandler(ieee->dev, HW_VAR_AMPDU_FACTOR, &pHTInfo->CurrentAMPDUFactor);
ieee->SetHwRegHandler(ieee->dev, HW_VAR_AMPDU_MIN_SPACE, &pHTInfo->CurrentMPDUDensity);
}
#elif defined RTL8192CE
if (ieee->SetHwRegHandler != NULL) {
ieee->SetHwRegHandler(ieee->dev, HW_VAR_AMPDU_FACTOR, &pHTInfo->CurrentAMPDUFactor);
ieee->SetHwRegHandler(ieee->dev, HW_VAR_AMPDU_MIN_SPACE, &pHTInfo->CurrentMPDUDensity);
}
#endif
if (pHTInfo->IOTAction & HT_IOT_ACT_TX_USE_AMSDU_8K) if (pHTInfo->IOTAction & HT_IOT_ACT_TX_USE_AMSDU_8K)
{ {
pHTInfo->bCurrentAMPDUEnable = false; pHTInfo->bCurrentAMPDUEnable = false;
...@@ -1290,71 +1171,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device* ieee, struct rtllib_net ...@@ -1290,71 +1171,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device* ieee, struct rtllib_net
bIOTAction = HTIOTActIsCCDFsync(ieee); bIOTAction = HTIOTActIsCCDFsync(ieee);
if (bIOTAction) if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_CDD_FSYNC; pHTInfo->IOTAction |= HT_IOT_ACT_CDD_FSYNC;
#if defined(RTL8192SU) || defined(RTL8192SE) || defined RTL8192CE
bIOTAction = HTIOTActIsForcedCTS2Self(ieee,pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_CTS2SELF;
bIOTAction = HTIOTActIsEnableBETxOPLimit(ieee);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_ENABLE_BE_TXOP;
#if defined(RTL8192SU)
bIOTAction = HTIOCActRejcectADDBARequest(pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_REJECT_ADDBA_REQ;
#endif
bIOTAction = HTIOCActAllowPeerAggOnePacket(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT;
bIOTAction = HTIOTActIsEDCABiasRx(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_EDCA_BIAS_ON_RX;
#if defined(RTL8192SU)
bIOTAction = HTIOCActIsDisableCckRate(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_CCK_RATE;
#endif
bIOTAction = HTIOTActDisableShortGI(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_SHORT_GI;
bIOTAction = HTIOTActDisableHighPower(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_HIGH_POWER;
bIOTAction = HTIOTActIsForcedAMSDU8K(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_TX_USE_AMSDU_8K;
#if defined(RTL8192SU)
bIOTAction = HTIOTActIsTxNoAggregation(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_TX_NO_AGGREGATION;
bIOTAction = HTIOTActIsDisableTx40MHz(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_TX_40_MHZ;
bIOTAction = HTIOTActIsDisableTx2SS(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_TX_2SS;
#endif
bIOTAction = HTIOTActIsForcedRTSCTS(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_RTS;
bIOTAction = HTIOTActIsNullDataPowerSaving(ieee, pNetwork);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_NULL_DATA_POWER_SAVING;
#endif
} else { } else {
pHTInfo->bCurrentHTSupport = false; pHTInfo->bCurrentHTSupport = false;
pHTInfo->bCurrentRT2RTAggregation = false; pHTInfo->bCurrentRT2RTAggregation = false;
......
...@@ -329,9 +329,7 @@ void write_nic_byte(struct net_device *dev, int x,u8 y) ...@@ -329,9 +329,7 @@ void write_nic_byte(struct net_device *dev, int x,u8 y)
{ {
writeb(y,(u8*)dev->mem_start +x); writeb(y,(u8*)dev->mem_start +x);
#if !(defined RTL8192SE || defined RTL8192CE)
udelay(20); udelay(20);
#endif
#if defined RTL8192CE #if defined RTL8192CE
read_nic_byte(dev, x); read_nic_byte(dev, x);
...@@ -342,9 +340,7 @@ void write_nic_dword(struct net_device *dev, int x,u32 y) ...@@ -342,9 +340,7 @@ void write_nic_dword(struct net_device *dev, int x,u32 y)
{ {
writel(y,(u8*)dev->mem_start +x); writel(y,(u8*)dev->mem_start +x);
#if !(defined RTL8192SE || defined RTL8192CE)
udelay(20); udelay(20);
#endif
#if defined RTL8192CE #if defined RTL8192CE
read_nic_dword(dev, x); read_nic_dword(dev, x);
...@@ -355,9 +351,7 @@ void write_nic_word(struct net_device *dev, int x,u16 y) ...@@ -355,9 +351,7 @@ void write_nic_word(struct net_device *dev, int x,u16 y)
{ {
writew(y,(u8*)dev->mem_start +x); writew(y,(u8*)dev->mem_start +x);
#if !(defined RTL8192SE || defined RTL8192CE)
udelay(20); udelay(20);
#endif
#if defined RTL8192CE #if defined RTL8192CE
read_nic_word(dev, x); read_nic_word(dev, x);
...@@ -969,19 +963,6 @@ void rtl8192_refresh_supportrate(struct r8192_priv* priv) ...@@ -969,19 +963,6 @@ void rtl8192_refresh_supportrate(struct r8192_priv* priv)
} }
#endif #endif
#ifdef RTL8192SE
if (priv->rf_type == RF_1T1R) {
ieee->Regdot11HTOperationalRateSet[1] = 0;
}
if (priv->rf_type == RF_1T1R || priv->rf_type == RF_1T2R)
{
ieee->Regdot11TxHTOperationalRateSet[1] = 0;
}
if (priv->rtllib->b1SSSupport == true) {
ieee->Regdot11HTOperationalRateSet[1] = 0;
}
#endif
} else { } else {
memset(ieee->Regdot11HTOperationalRateSet, 0, 16); memset(ieee->Regdot11HTOperationalRateSet, 0, 16);
} }
...@@ -1077,10 +1058,6 @@ int _rtl8192_sta_up(struct net_device *dev,bool is_silent_reset) ...@@ -1077,10 +1058,6 @@ int _rtl8192_sta_up(struct net_device *dev,bool is_silent_reset)
RT_TRACE(COMP_INIT, "start adapter finished\n"); RT_TRACE(COMP_INIT, "start adapter finished\n");
RT_CLEAR_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC); RT_CLEAR_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC);
priv->bfirst_init = false; priv->bfirst_init = false;
#if defined RTL8192SE || defined RTL8192CE
if (priv->rtllib->eRFPowerState!=eRfOn)
MgntActSet_RF_State(dev, eRfOn, priv->rtllib->RfOffReason,true);
#endif
#ifdef ENABLE_GPIO_RADIO_CTL #ifdef ENABLE_GPIO_RADIO_CTL
if (priv->polling_timer_on == 0){ if (priv->polling_timer_on == 0){
...@@ -1226,14 +1203,10 @@ static void rtl8192_init_priv_handler(struct net_device* dev) ...@@ -1226,14 +1203,10 @@ static void rtl8192_init_priv_handler(struct net_device* dev)
static void rtl8192_init_priv_constant(struct net_device* dev) static void rtl8192_init_priv_constant(struct net_device* dev)
{ {
#if defined RTL8192SE || defined RTL8192CE || defined RTL8192E
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl));
#endif
#if defined RTL8192SE || defined RTL8192CE || defined RTL8192E
pPSC->RegMaxLPSAwakeIntvl = 5; pPSC->RegMaxLPSAwakeIntvl = 5;
#endif
#ifdef RTL8192CE #ifdef RTL8192CE
priv->bWEPinNmodeFromReg = 0; priv->bWEPinNmodeFromReg = 0;
...@@ -1251,17 +1224,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev) ...@@ -1251,17 +1224,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev)
priv->RegSupportPciASPM = 1; priv->RegSupportPciASPM = 1;
#elif defined RTL8192SE
priv->RegPciASPM = 2;
priv->RegDevicePciASPMSetting = 0x03;
priv->RegHostPciASPMSetting = 0x02;
priv->RegHwSwRfOffD3 = 2;
priv->RegSupportPciASPM = 2;
#elif defined RTL8192E #elif defined RTL8192E
priv->RegPciASPM = 2; priv->RegPciASPM = 2;
...@@ -1359,15 +1321,6 @@ static void rtl8192_init_priv_variable(struct net_device* dev) ...@@ -1359,15 +1321,6 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
priv->ccktxpower_adjustcnt_ch14 = 0; priv->ccktxpower_adjustcnt_ch14 = 0;
priv->ccktxpower_adjustcnt_not_ch14 = 0; priv->ccktxpower_adjustcnt_not_ch14 = 0;
#if defined RTL8192SE
for (i = 0; i<PEER_MAX_ASSOC; i++){
priv->rtllib->peer_assoc_list[i]=NULL;
priv->rtllib->AvailableAIDTable[i] = 99;
}
priv->RATRTableBitmap = 0;
priv->rtllib->amsdu_in_process = 0;
#endif
priv->rtllib->current_network.beacon_interval = DEFAULT_BEACONINTERVAL; priv->rtllib->current_network.beacon_interval = DEFAULT_BEACONINTERVAL;
priv->rtllib->iw_mode = IW_MODE_INFRA; priv->rtllib->iw_mode = IW_MODE_INFRA;
priv->rtllib->active_scan = 1; priv->rtllib->active_scan = 1;
...@@ -1524,9 +1477,6 @@ short rtl8192_init(struct net_device *dev) ...@@ -1524,9 +1477,6 @@ short rtl8192_init(struct net_device *dev)
init_hal_dm(dev); init_hal_dm(dev);
#if defined RTL8192SE || defined RTL8192CE
InitSwLeds(dev);
#endif
init_timer(&priv->watch_dog_timer); init_timer(&priv->watch_dog_timer);
setup_timer(&priv->watch_dog_timer, setup_timer(&priv->watch_dog_timer,
watch_dog_timer_callback, watch_dog_timer_callback,
...@@ -1729,15 +1679,6 @@ rtl819x_TxCheckStuck(struct net_device *dev) ...@@ -1729,15 +1679,6 @@ rtl819x_TxCheckStuck(struct net_device *dev)
bCheckFwTxCnt = true; bCheckFwTxCnt = true;
if (tcb_desc->nStuckCount > 1) if (tcb_desc->nStuckCount > 1)
printk("%s: QueueID=%d tcb_desc->nStuckCount=%d\n",__func__,QueueID,tcb_desc->nStuckCount); printk("%s: QueueID=%d tcb_desc->nStuckCount=%d\n",__func__,QueueID,tcb_desc->nStuckCount);
#if defined RTL8192SE || defined RTL8192CE
if (tcb_desc->nStuckCount > ResetThreshold)
{
RT_TRACE( COMP_RESET, "TxCheckStuck(): Need silent reset because nStuckCount > ResetThreshold.\n" );
spin_unlock_irqrestore(&priv->irq_th_lock,flags);
return RESET_TYPE_SILENT;
}
bCheckFwTxCnt = false;
#endif
} }
} }
spin_unlock_irqrestore(&priv->irq_th_lock,flags); spin_unlock_irqrestore(&priv->irq_th_lock,flags);
...@@ -1870,10 +1811,7 @@ void rtl819x_ifsilentreset(struct net_device *dev) ...@@ -1870,10 +1811,7 @@ void rtl819x_ifsilentreset(struct net_device *dev)
rtllib_softmac_stop_protocol(priv->rtllib, 0 ,true); rtllib_softmac_stop_protocol(priv->rtllib, 0 ,true);
} }
#if !(defined RTL8192SE || defined RTL8192CE)
dm_backup_dynamic_mechanism_state(dev); dm_backup_dynamic_mechanism_state(dev);
#endif
up(&priv->wx_sem); up(&priv->wx_sem);
RT_TRACE(COMP_RESET,"%s():<==========down process is finished\n",__func__); RT_TRACE(COMP_RESET,"%s():<==========down process is finished\n",__func__);
...@@ -1920,9 +1858,7 @@ void rtl819x_ifsilentreset(struct net_device *dev) ...@@ -1920,9 +1858,7 @@ void rtl819x_ifsilentreset(struct net_device *dev)
} }
CamRestoreAllEntry(dev); CamRestoreAllEntry(dev);
#if !(defined RTL8192SE || defined RTL8192CE)
dm_restore_dynamic_mechanism_state(dev); dm_restore_dynamic_mechanism_state(dev);
#endif
END: END:
priv->ResetProgress = RESET_TYPE_NORESET; priv->ResetProgress = RESET_TYPE_NORESET;
priv->reset_count++; priv->reset_count++;
...@@ -1930,9 +1866,7 @@ void rtl819x_ifsilentreset(struct net_device *dev) ...@@ -1930,9 +1866,7 @@ void rtl819x_ifsilentreset(struct net_device *dev)
priv->bForcedSilentReset =false; priv->bForcedSilentReset =false;
priv->bResetInProgress = false; priv->bResetInProgress = false;
#if !(defined RTL8192SE || defined RTL8192CE)
write_nic_byte(dev, UFWP, 1); write_nic_byte(dev, UFWP, 1);
#endif
RT_TRACE(COMP_RESET, "Reset finished!! ====>[%d]\n", priv->reset_count); RT_TRACE(COMP_RESET, "Reset finished!! ====>[%d]\n", priv->reset_count);
} }
} }
...@@ -2048,11 +1982,6 @@ void rtl819x_watchdog_wqcallback(void *data) ...@@ -2048,11 +1982,6 @@ void rtl819x_watchdog_wqcallback(void *data)
} }
{ {
#if defined RTL8192SE
if (priv->rtllib->iw_mode == IW_MODE_ADHOC)
IbssAgeFunction(ieee);
#endif
if (ieee->state == RTLLIB_LINKED && ieee->iw_mode == IW_MODE_INFRA) if (ieee->state == RTLLIB_LINKED && ieee->iw_mode == IW_MODE_INFRA)
{ {
u32 TotalRxBcnNum = 0; u32 TotalRxBcnNum = 0;
...@@ -2341,11 +2270,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb) ...@@ -2341,11 +2270,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)
priv->rtllib->bAwakePktSent = true; priv->rtllib->bAwakePktSent = true;
#if defined RTL8192SE || defined RTL8192CE
fwinfo_size = 0;
#else
fwinfo_size = sizeof(TX_FWINFO_8190PCI); fwinfo_size = sizeof(TX_FWINFO_8190PCI);
#endif
header = (struct rtllib_hdr_1addr *)(((u8*)skb->data) + fwinfo_size); header = (struct rtllib_hdr_1addr *)(((u8*)skb->data) + fwinfo_size);
fc = header->frame_ctl; fc = header->frame_ctl;
...@@ -2760,82 +2685,6 @@ void rtl8192_rx_normal(struct net_device *dev) ...@@ -2760,82 +2685,6 @@ void rtl8192_rx_normal(struct net_device *dev)
void rtl8192_rx_cmd(struct net_device *dev) void rtl8192_rx_cmd(struct net_device *dev)
{ {
#ifdef RTL8192SE
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
unsigned int count = priv->rxringcount;
int rx_queue_idx = RX_CMD_QUEUE;
struct rtllib_rx_stats stats = {
.signal = 0,
.noise = -98,
.rate = 0,
.freq = RTLLIB_24GHZ_BAND,
};
stats.nic_type = NIC_8192E;
while (count--) {
rx_desc *pdesc = &priv->rx_ring[rx_queue_idx][priv->rx_idx[rx_queue_idx]];
struct sk_buff *skb = priv->rx_buf[rx_queue_idx][priv->rx_idx[rx_queue_idx]];
if (pdesc->OWN){
return;
} else {
struct sk_buff *new_skb = NULL;
pci_unmap_single(priv->pdev,
*((dma_addr_t *)skb->cb),
priv->rxbuffersize,
PCI_DMA_FROMDEVICE);
skb_put(skb, pdesc->Length);
if (pdesc->MACID == 0x1e) {
pdesc->Length = pdesc->Length - 32;
pdesc->DrvInfoSize = 4;
printk(">>>>%s()CMD PKT RX, beacon_len:%d payload_len:%d\n",__func__, pdesc->Length,skb->len);
priv->ops->rx_query_status_descriptor(dev, &stats, pdesc, skb);
skb_reserve(skb, stats.RxDrvInfoSize + stats.RxBufShift);
}
skb_trim(skb, skb->len - 4/*sCrcLng*/);
if (pdesc->MACID == 0x1e){
if (!rtllib_rx(priv->rtllib, skb, &stats)){
dev_kfree_skb_any(skb);
}
}else{
if (priv->ops->rx_command_packet_handler != NULL)
priv->ops->rx_command_packet_handler(dev, skb, pdesc);
dev_kfree_skb_any(skb);
}
new_skb = dev_alloc_skb(priv->rxbuffersize);
if (unlikely(!new_skb))
{
printk("==========>can't alloc skb for rx\n");
goto done;
}
skb=new_skb;
skb->dev = dev;
priv->rx_buf[rx_queue_idx][priv->rx_idx[rx_queue_idx]] = skb;
*((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev, skb_tail_pointer_rsl(skb), priv->rxbuffersize, PCI_DMA_FROMDEVICE);
}
done:
pdesc->BufferAddress = cpu_to_le32(*((dma_addr_t *)skb->cb));
pdesc->OWN = 1;
pdesc->Length = priv->rxbuffersize;
if (priv->rx_idx[rx_queue_idx] == priv->rxringcount-1)
pdesc->EOR = 1;
priv->rx_idx[rx_queue_idx] = (priv->rx_idx[rx_queue_idx] + 1) % priv->rxringcount;
}
#endif
} }
...@@ -3220,22 +3069,6 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs) ...@@ -3220,22 +3069,6 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
goto done; goto done;
} }
#if defined RTL8192SE
if (intb & IMR_TBDOK){
RT_TRACE(COMP_INTR, "beacon ok interrupt!\n");
priv->stats.txbeaconokint++;
priv->bIbssCoordinator = true;
}
if (intb & IMR_TBDER){
RT_TRACE(COMP_INTR, "beacon error interrupt!\n");
priv->stats.txbeaconerr++;
priv->bIbssCoordinator = false;
}
if ((intb & IMR_TBDOK) ||(intb & IMR_TBDER))
FairBeacon(dev);
#else
if (inta & IMR_TBDOK){ if (inta & IMR_TBDOK){
RT_TRACE(COMP_INTR, "beacon ok interrupt!\n"); RT_TRACE(COMP_INTR, "beacon ok interrupt!\n");
priv->stats.txbeaconokint++; priv->stats.txbeaconokint++;
...@@ -3245,7 +3078,6 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs) ...@@ -3245,7 +3078,6 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
RT_TRACE(COMP_INTR, "beacon ok interrupt!\n"); RT_TRACE(COMP_INTR, "beacon ok interrupt!\n");
priv->stats.txbeaconerr++; priv->stats.txbeaconerr++;
} }
#endif
if (inta & IMR_BDOK) { if (inta & IMR_BDOK) {
RT_TRACE(COMP_INTR, "beacon interrupt!\n"); RT_TRACE(COMP_INTR, "beacon interrupt!\n");
...@@ -3279,11 +3111,7 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs) ...@@ -3279,11 +3111,7 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
rtl8192_tx_isr(dev,HIGH_QUEUE); rtl8192_tx_isr(dev,HIGH_QUEUE);
} }
#ifdef RTL8192SE
if ((inta & IMR_ROK) || (inta & IMR_RXCMDOK))
#else
if (inta & IMR_ROK) if (inta & IMR_ROK)
#endif
{ {
priv->stats.rxint++; priv->stats.rxint++;
priv->InterruptLog.nIMR_ROK++; priv->InterruptLog.nIMR_ROK++;
...@@ -3459,13 +3287,6 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev, ...@@ -3459,13 +3287,6 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
dev->mem_start = ioaddr; dev->mem_start = ioaddr;
dev->mem_end = ioaddr + pci_resource_len(pdev, 0); dev->mem_end = ioaddr + pci_resource_len(pdev, 0);
#if defined RTL8192SE || defined RTL8192CE
pci_write_config_byte(pdev, 0x81,0);
pci_write_config_byte(pdev,0x44,0);
pci_write_config_byte(pdev,0x04,0x06);
pci_write_config_byte(pdev,0x04,0x07);
#endif
pci_read_config_byte(pdev, 0x08, &revision_id); pci_read_config_byte(pdev, 0x08, &revision_id);
/* If the revisionid is 0x10, the device uses rtl8192se. */ /* If the revisionid is 0x10, the device uses rtl8192se. */
if (pdev->device == 0x8192 && revision_id == 0x10) if (pdev->device == 0x8192 && revision_id == 0x10)
...@@ -3625,10 +3446,6 @@ static void __devexit rtl8192_pci_disconnect(struct pci_dev *pdev) ...@@ -3625,10 +3446,6 @@ static void __devexit rtl8192_pci_disconnect(struct pci_dev *pdev)
} }
pci_disable_device(pdev); pci_disable_device(pdev);
#ifdef RTL8192SE
pci_write_config_byte(pdev, 0x81,1);
pci_write_config_byte(pdev,0x44,3);
#endif
RT_TRACE(COMP_DOWN, "wlan driver removed\n"); RT_TRACE(COMP_DOWN, "wlan driver removed\n");
} }
......
...@@ -183,21 +183,6 @@ static ssize_t rtl_dbgfs_register_read(struct file *file, ...@@ -183,21 +183,6 @@ static ssize_t rtl_dbgfs_register_read(struct file *file,
if (!priv->debug->hw_type) { if (!priv->debug->hw_type) {
page_no = (priv->debug->hw_offset > 0x0f)? 0x0f: priv->debug->hw_offset; page_no = (priv->debug->hw_offset > 0x0f)? 0x0f: priv->debug->hw_offset;
#ifdef RTL8192SE
if (page_no >= 0x08 ) {
len += snprintf(buf + len, count - len,
"\n#################### BB page- %x##################\n ", page_no);
for (n=0;n<=max;)
{
len += snprintf(buf + len, count - len, "\nD: %2x > ",n);
for (i=0;i<4 && n<=max;n+=4,i++)
len += snprintf(buf + len, count - len,
"%8.8x ",rtl8192_QueryBBReg(dev,(page_no << 8|n),
bMaskDWord));
}
} else
#endif
{ {
len += snprintf(buf + len,count - len, len += snprintf(buf + len,count - len,
"\n#################### MAC page- %x##################\n ", page_no); "\n#################### MAC page- %x##################\n ", page_no);
...@@ -347,21 +332,6 @@ static int proc_get_registers_0(char *page, char **start, ...@@ -347,21 +332,6 @@ static int proc_get_registers_0(char *page, char **start,
int max=0xff; int max=0xff;
page0 = 0x000; page0 = 0x000;
#ifdef RTL8192SE
/* This dump the current register page */
if (!IS_BB_REG_OFFSET_92S(page0)){
len += snprintf(page + len, count - len,
"\n####################page %x##################\n ", (page0>>8));
for (n=0;n<=max;)
{
len += snprintf(page + len, count - len,
"\nD: %2x > ",n);
for (i=0;i<16 && n<=max;i++,n++)
len += snprintf(page + len, count - len,
"%2.2x ",read_nic_byte(dev,(page0|n)));
}
}else
#endif
{ {
len += snprintf(page + len, count - len, len += snprintf(page + len, count - len,
"\n####################page %x##################\n ", (page0>>8)); "\n####################page %x##################\n ", (page0>>8));
......
...@@ -277,9 +277,6 @@ void print_buffer(u32 *buffer, int len); ...@@ -277,9 +277,6 @@ void print_buffer(u32 *buffer, int len);
void dump_eprom(struct net_device *dev); void dump_eprom(struct net_device *dev);
void rtl8192_dump_reg(struct net_device *dev); void rtl8192_dump_reg(struct net_device *dev);
#ifdef RTL8192SE
void rtl8192se_dump_tx_desc(struct _tx_desc_8192se *pDesc);
#endif
#ifdef RTL8192CE #ifdef RTL8192CE
void rtl8192ce_dump_tx_desc(struct _TX_DESC_8192CE *pDesc); void rtl8192ce_dump_tx_desc(struct _TX_DESC_8192CE *pDesc);
#endif #endif
......
This diff is collapsed.
...@@ -285,9 +285,7 @@ extern void hal_dm_watchdog(struct net_device *dev); ...@@ -285,9 +285,7 @@ extern void hal_dm_watchdog(struct net_device *dev);
extern void init_rate_adaptive(struct net_device *dev); extern void init_rate_adaptive(struct net_device *dev);
extern void dm_txpower_trackingcallback(void *data); extern void dm_txpower_trackingcallback(void *data);
#ifndef RTL8192SE
extern void dm_cck_txpower_adjust(struct net_device *dev,bool binch14); extern void dm_cck_txpower_adjust(struct net_device *dev,bool binch14);
#endif
extern void dm_restore_dynamic_mechanism_state(struct net_device *dev); extern void dm_restore_dynamic_mechanism_state(struct net_device *dev);
extern void dm_backup_dynamic_mechanism_state(struct net_device *dev); extern void dm_backup_dynamic_mechanism_state(struct net_device *dev);
...@@ -308,13 +306,7 @@ extern void dm_check_fsync(struct net_device *dev); ...@@ -308,13 +306,7 @@ extern void dm_check_fsync(struct net_device *dev);
extern void dm_shadow_init(struct net_device *dev); extern void dm_shadow_init(struct net_device *dev);
extern void dm_initialize_txpower_tracking(struct net_device *dev); extern void dm_initialize_txpower_tracking(struct net_device *dev);
#if (defined RTL8192E || defined RTL8192SE)
extern void dm_CheckRfCtrlGPIO(void *data); extern void dm_CheckRfCtrlGPIO(void *data);
#endif
#ifdef RTL8192SE
extern void Power_DomainInit92SE(struct net_device *dev);
#endif
extern void dm_InitRateAdaptiveMask(struct net_device * dev); extern void dm_InitRateAdaptiveMask(struct net_device * dev);
......
...@@ -47,13 +47,11 @@ void PlatformEnableASPM(struct net_device *dev); ...@@ -47,13 +47,11 @@ void PlatformEnableASPM(struct net_device *dev);
u32 PlatformResetPciSpace(struct net_device *dev,u8 Value); u32 PlatformResetPciSpace(struct net_device *dev,u8 Value);
#endif #endif
#if defined(RTL8192E) || defined(RTL8192SE) || defined RTL8192CE
void rtl8192_hw_wakeup(struct net_device *dev); void rtl8192_hw_wakeup(struct net_device *dev);
void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl); void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl);
void rtllib_ips_leave_wq(struct net_device *dev); void rtllib_ips_leave_wq(struct net_device *dev);
void rtllib_ips_leave(struct net_device *dev); void rtllib_ips_leave(struct net_device *dev);
void IPSLeave_wq (void *data); void IPSLeave_wq (void *data);
#endif
void IPSEnter(struct net_device *dev); void IPSEnter(struct net_device *dev);
void IPSLeave(struct net_device *dev); void IPSLeave(struct net_device *dev);
......
...@@ -203,51 +203,12 @@ typedef struct ...@@ -203,51 +203,12 @@ typedef struct
adhoc_peer_entry_t Entry[MAX_ADHOC_PEER_NUM]; adhoc_peer_entry_t Entry[MAX_ADHOC_PEER_NUM];
unsigned char num; unsigned char num;
} adhoc_peers_info_t, *p_adhoc_peers_info_t; } adhoc_peers_info_t, *p_adhoc_peers_info_t;
int r8192_wx_get_adhoc_peers(struct net_device *dev, int r8192_wx_get_adhoc_peers(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
#ifndef RTL8192SE
return 0;
#else
struct r8192_priv *priv = rtllib_priv(dev);
struct sta_info * psta = NULL;
adhoc_peers_info_t adhoc_peers_info;
p_adhoc_peers_info_t padhoc_peers_info = &adhoc_peers_info;
p_adhoc_peer_entry_t padhoc_peer_entry = NULL;
int k=0;
memset(extra, 0, 2047);
padhoc_peers_info->num = 0;
down(&priv->wx_sem);
for (k=0; k<PEER_MAX_ASSOC; k++)
{
psta = priv->rtllib->peer_assoc_list[k];
if (NULL != psta)
{
padhoc_peer_entry = &padhoc_peers_info->Entry[padhoc_peers_info->num];
memset(padhoc_peer_entry,0, sizeof(adhoc_peer_entry_t));
memcpy(padhoc_peer_entry->MacAddr, psta->macaddr, ETH_ALEN);
padhoc_peer_entry->WirelessMode = psta->wireless_mode;
padhoc_peer_entry->bCurTxBW40MHz = psta->htinfo.bCurTxBW40MHz;
padhoc_peers_info->num ++;
printk("[%d] MacAddr:"MAC_FMT" \tWirelessMode:%d \tBW40MHz:%d \n", \
k, MAC_ARG(padhoc_peer_entry->MacAddr), padhoc_peer_entry->WirelessMode, padhoc_peer_entry->bCurTxBW40MHz);
sprintf(extra, "[%d] MacAddr:"MAC_FMT" \tWirelessMode:%d \tBW40MHz:%d \n", \
k, MAC_ARG(padhoc_peer_entry->MacAddr), padhoc_peer_entry->WirelessMode, padhoc_peer_entry->bCurTxBW40MHz);
}
}
up(&priv->wx_sem);
wrqu->data.length = strlen(extra);
wrqu->data.flags = 0;
return 0; return 0;
#endif
} }
......
...@@ -3210,12 +3210,6 @@ extern int rtllib_parse_info_param(struct rtllib_device *ieee, ...@@ -3210,12 +3210,6 @@ extern int rtllib_parse_info_param(struct rtllib_device *ieee,
struct rtllib_rx_stats *stats); struct rtllib_rx_stats *stats);
void rtllib_indicate_packets(struct rtllib_device *ieee, struct rtllib_rxb** prxbIndicateArray,u8 index); void rtllib_indicate_packets(struct rtllib_device *ieee, struct rtllib_rxb** prxbIndicateArray,u8 index);
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
extern void IbssAgeFunction(struct rtllib_device *ieee);
extern struct sta_info *GetStaInfo(struct rtllib_device *ieee, u8 *addr);
extern void DelStaInfoList(struct rtllib_device *ieee);
extern void DelStaInfo(struct rtllib_device *ieee, u8 *addr);
#endif
extern u8 HTFilterMCSRate( struct rtllib_device* ieee, u8* pSupportMCS, u8* pOperateMCS); extern u8 HTFilterMCSRate( struct rtllib_device* ieee, u8* pSupportMCS, u8* pOperateMCS);
extern void HTUseDefaultSetting(struct rtllib_device* ieee); extern void HTUseDefaultSetting(struct rtllib_device* ieee);
#define RT_ASOC_RETRY_LIMIT 5 #define RT_ASOC_RETRY_LIMIT 5
......
This diff is collapsed.
...@@ -1066,14 +1066,6 @@ static struct sk_buff* rtllib_probe_resp(struct rtllib_device *ieee, u8 *dest) ...@@ -1066,14 +1066,6 @@ static struct sk_buff* rtllib_probe_resp(struct rtllib_device *ieee, u8 *dest)
*(tag++) = 1; *(tag++) = 1;
*(tag++) = erpinfo_content; *(tag++) = erpinfo_content;
} }
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
if (tmp_ht_cap_len){
*(tag++) = MFIE_TYPE_HT_CAP;
*(tag++) = tmp_ht_cap_len - 2;
memcpy(tag, tmp_ht_cap_buf, tmp_ht_cap_len - 2);
tag += tmp_ht_cap_len - 2;
}
#endif
if (rate_ex_len){ if (rate_ex_len){
*(tag++) = MFIE_TYPE_RATES_EX; *(tag++) = MFIE_TYPE_RATES_EX;
*(tag++) = rate_ex_len-2; *(tag++) = rate_ex_len-2;
...@@ -1081,15 +1073,6 @@ static struct sk_buff* rtllib_probe_resp(struct rtllib_device *ieee, u8 *dest) ...@@ -1081,15 +1073,6 @@ static struct sk_buff* rtllib_probe_resp(struct rtllib_device *ieee, u8 *dest)
tag+=rate_ex_len-2; tag+=rate_ex_len-2;
} }
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
if (tmp_ht_info_len){
*(tag++) = MFIE_TYPE_HT_INFO;
*(tag++) = tmp_ht_info_len - 2;
memcpy(tag, tmp_ht_info_buf, tmp_ht_info_len -2);
tag += tmp_ht_info_len - 2;
}
#endif
if (wpa_ie_len) if (wpa_ie_len)
{ {
if (ieee->iw_mode == IW_MODE_ADHOC) if (ieee->iw_mode == IW_MODE_ADHOC)
...@@ -1100,23 +1083,6 @@ static struct sk_buff* rtllib_probe_resp(struct rtllib_device *ieee, u8 *dest) ...@@ -1100,23 +1083,6 @@ static struct sk_buff* rtllib_probe_resp(struct rtllib_device *ieee, u8 *dest)
tag += ieee->wpa_ie_len; tag += ieee->wpa_ie_len;
} }
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
if (tmp_generic_ie_len)
{
(*tag++) = 0xdd;
(*tag++) = tmp_generic_ie_len - 2;
memcpy(tag,tmp_generic_ie_buf,tmp_generic_ie_len -2);
tag += tmp_generic_ie_len -2;
}
#endif
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
if (wmm_len) {
memcpy(tag,wmmie,wmm_len);
tag += wmm_len;
}
#endif
return skb; return skb;
} }
...@@ -2154,20 +2120,10 @@ static inline u16 assoc_parse(struct rtllib_device *ieee, struct sk_buff *skb, i ...@@ -2154,20 +2120,10 @@ static inline u16 assoc_parse(struct rtllib_device *ieee, struct sk_buff *skb, i
void rtllib_rx_probe_rq(struct rtllib_device *ieee, struct sk_buff *skb) void rtllib_rx_probe_rq(struct rtllib_device *ieee, struct sk_buff *skb)
{ {
u8 dest[ETH_ALEN]; u8 dest[ETH_ALEN];
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
struct sta_info *psta = NULL;
#endif
ieee->softmac_stats.rx_probe_rq++; ieee->softmac_stats.rx_probe_rq++;
if (probe_rq_parse(ieee, skb, dest) > 0){ if (probe_rq_parse(ieee, skb, dest) > 0){
ieee->softmac_stats.tx_probe_rs++; ieee->softmac_stats.tx_probe_rs++;
rtllib_resp_to_probe(ieee, dest); rtllib_resp_to_probe(ieee, dest);
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
if (ieee->iw_mode == IW_MODE_ADHOC){
psta = GetStaInfo(ieee, dest);
if (NULL != psta)
psta->LastActiveTime = jiffies;
}
#endif
} }
} }
...@@ -3040,17 +2996,8 @@ void rtllib_start_ibss_wq(void *data) ...@@ -3040,17 +2996,8 @@ void rtllib_start_ibss_wq(void *data)
ieee->rate = 22; ieee->rate = 22;
} }
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
#ifdef ADHOC_11N
ieee->current_network.qos_data.supported = 1;
#else
ieee->current_network.qos_data.supported = 0;
#endif
ieee->SetWirelessMode(ieee->dev, ieee->mode);
#else
ieee->current_network.qos_data.supported = 0; ieee->current_network.qos_data.supported = 0;
ieee->SetWirelessMode(ieee->dev, IEEE_G); ieee->SetWirelessMode(ieee->dev, IEEE_G);
#endif
ieee->current_network.mode = ieee->mode; ieee->current_network.mode = ieee->mode;
ieee->current_network.atim_window = 0; ieee->current_network.atim_window = 0;
ieee->current_network.capability = WLAN_CAPABILITY_IBSS; ieee->current_network.capability = WLAN_CAPABILITY_IBSS;
......
...@@ -239,22 +239,7 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee, ...@@ -239,22 +239,7 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
u32 tmp_rate = 0; u32 tmp_rate = 0;
#if defined RTL8192SU
if (ieee->mode & (IEEE_A | IEEE_B | IEEE_G))
tmp_rate = ieee->rate;
else if (ieee->mode & IEEE_N_5G)
tmp_rate = 580;
else if (ieee->mode & IEEE_N_24G) {
if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
tmp_rate = HTHalfMcsToDataRate(ieee, 15);
else
tmp_rate = HTMcsToDataRate(ieee, 15);
}
#elif defined RTL8192SE || defined RTL8192CE
tmp_rate = ieee->rtl_11n_user_show_rates(ieee->dev);
#else
tmp_rate = TxCountToDataRate(ieee, ieee->softmac_stats.CurrentShowTxate); tmp_rate = TxCountToDataRate(ieee, ieee->softmac_stats.CurrentShowTxate);
#endif
wrqu->bitrate.value = tmp_rate * 500000; wrqu->bitrate.value = tmp_rate * 500000;
return 0; return 0;
......
...@@ -449,53 +449,7 @@ void rtllib_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc) ...@@ -449,53 +449,7 @@ void rtllib_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc)
tcb_desc->bPacketBW = true; tcb_desc->bPacketBW = true;
return; return;
} }
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
extern void rtllib_ibss_query_HTCapShortGI(struct rtllib_device *ieee, cb_desc *tcb_desc,u8 is_peer_shortGI_40M,u8 is_peer_shortGI_20M)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
tcb_desc->bUseShortGI = false;
if (!pHTInfo->bCurrentHTSupport||!pHTInfo->bEnableHT || (ieee->iw_mode != IW_MODE_ADHOC))
{
return;
}
if (pHTInfo->bForcedShortGI)
{
tcb_desc->bUseShortGI = true;
return;
}
if ((pHTInfo->bCurBW40MHz==true) && is_peer_shortGI_40M)
tcb_desc->bUseShortGI = true;
else if ((pHTInfo->bCurBW40MHz==false) && is_peer_shortGI_20M)
tcb_desc->bUseShortGI = true;
}
void rtllib_ibss_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc, u8 is_peer_40M)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
tcb_desc->bPacketBW = false;
if (!pHTInfo->bCurrentHTSupport||!pHTInfo->bEnableHT || (ieee->iw_mode != IW_MODE_ADHOC))
{
return;
}
if (tcb_desc->bMulticast || tcb_desc->bBroadcast)
{
return;
}
if ((tcb_desc->data_rate & 0x80)==0)
{
return;
}
if (pHTInfo->bCurBW40MHz && is_peer_40M && !ieee->bandwidth_auto_switch.bforced_tx20Mhz)
tcb_desc->bPacketBW = true;
return;
}
#endif
void rtllib_query_protectionmode(struct rtllib_device* ieee, cb_desc* tcb_desc, struct sk_buff* skb) void rtllib_query_protectionmode(struct rtllib_device* ieee, cb_desc* tcb_desc, struct sk_buff* skb)
{ {
tcb_desc->bRTSSTBC = false; tcb_desc->bRTSSTBC = false;
...@@ -596,11 +550,7 @@ void rtllib_query_protectionmode(struct rtllib_device* ieee, cb_desc* tcb_desc, ...@@ -596,11 +550,7 @@ void rtllib_query_protectionmode(struct rtllib_device* ieee, cb_desc* tcb_desc,
} }
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
void rtllib_txrate_selectmode(struct rtllib_device* ieee, cb_desc* tcb_desc,struct sta_info *psta)
#else
void rtllib_txrate_selectmode(struct rtllib_device* ieee, cb_desc* tcb_desc) void rtllib_txrate_selectmode(struct rtllib_device* ieee, cb_desc* tcb_desc)
#endif
{ {
#ifdef TO_DO_LIST #ifdef TO_DO_LIST
if (!IsDataFrame(pFrame)) if (!IsDataFrame(pFrame))
...@@ -1000,62 +950,6 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -1000,62 +950,6 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
tcb_desc->bMulticast = 1; tcb_desc->bMulticast = 1;
if (is_broadcast_ether_addr(header.addr1)) if (is_broadcast_ether_addr(header.addr1))
tcb_desc->bBroadcast = 1; tcb_desc->bBroadcast = 1;
#if defined(RTL8192U) || defined(RTL8192SU) || defined(RTL8192SE)
if ( tcb_desc->bMulticast || tcb_desc->bBroadcast){
rtllib_txrate_selectmode(ieee, tcb_desc, p_sta);
tcb_desc->data_rate = ieee->basic_rate;
}
else
{
if (ieee->iw_mode == IW_MODE_ADHOC)
{
u8 is_peer_shortGI_40M = 0;
u8 is_peer_shortGI_20M = 0;
u8 is_peer_BW_40M = 0;
p_sta = GetStaInfo(ieee, header.addr1);
if (NULL == p_sta)
{
rtllib_txrate_selectmode(ieee, tcb_desc, p_sta);
tcb_desc->data_rate = ieee->rate;
}
else
{
rtllib_txrate_selectmode(ieee, tcb_desc, p_sta);
tcb_desc->data_rate = CURRENT_RATE(p_sta->wireless_mode, p_sta->CurDataRate, p_sta->htinfo.HTHighestOperaRate);
is_peer_shortGI_40M = p_sta->htinfo.bCurShortGI40MHz;
is_peer_shortGI_20M = p_sta->htinfo.bCurShortGI20MHz;
is_peer_BW_40M = p_sta->htinfo.bCurTxBW40MHz;
}
rtllib_qurey_ShortPreambleMode(ieee, tcb_desc);
rtllib_tx_query_agg_cap(ieee, txb->fragments[0], tcb_desc);
rtllib_ibss_query_HTCapShortGI(ieee, tcb_desc,is_peer_shortGI_40M,is_peer_shortGI_20M);
rtllib_ibss_query_BandwidthMode(ieee, tcb_desc,is_peer_BW_40M);
rtllib_query_protectionmode(ieee, tcb_desc, txb->fragments[0]);
}
else {
rtllib_txrate_selectmode(ieee, tcb_desc, p_sta);
tcb_desc->data_rate = CURRENT_RATE(ieee->mode, ieee->rate, ieee->HTCurrentOperaRate);
if (bdhcp == true){
if (ieee->pHTInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) {
tcb_desc->data_rate = MGN_1M;
tcb_desc->bTxDisableRateFallBack = false;
}else{
tcb_desc->data_rate = MGN_1M;
tcb_desc->bTxDisableRateFallBack = 1;
}
tcb_desc->RATRIndex = 7;
tcb_desc->bTxUseDriverAssingedRate = 1;
tcb_desc->bdhcp = 1;
}
rtllib_qurey_ShortPreambleMode(ieee, tcb_desc);
rtllib_tx_query_agg_cap(ieee, txb->fragments[0], tcb_desc);
rtllib_query_HTCapShortGI(ieee, tcb_desc);
rtllib_query_BandwidthMode(ieee, tcb_desc);
rtllib_query_protectionmode(ieee, tcb_desc, txb->fragments[0]);
}
}
#else
rtllib_txrate_selectmode(ieee, tcb_desc); rtllib_txrate_selectmode(ieee, tcb_desc);
if ( tcb_desc->bMulticast || tcb_desc->bBroadcast) if ( tcb_desc->bMulticast || tcb_desc->bBroadcast)
tcb_desc->data_rate = ieee->basic_rate; tcb_desc->data_rate = ieee->basic_rate;
...@@ -1083,7 +977,6 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -1083,7 +977,6 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
rtllib_query_HTCapShortGI(ieee, tcb_desc); rtllib_query_HTCapShortGI(ieee, tcb_desc);
rtllib_query_BandwidthMode(ieee, tcb_desc); rtllib_query_BandwidthMode(ieee, tcb_desc);
rtllib_query_protectionmode(ieee, tcb_desc, txb->fragments[0]); rtllib_query_protectionmode(ieee, tcb_desc, txb->fragments[0]);
#endif
} }
} }
spin_unlock_irqrestore(&ieee->lock, flags); spin_unlock_irqrestore(&ieee->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment