Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -18,13 +18,8 @@
******************************************************************************/

#include "rtl_core.h"
#ifdef RTL8192SE
#include "rtl8192s/r8192S_phyreg.h"
#include "rtl8192s/r8192S_phy.h"
#else
#include "r8192E_phyreg.h"
#include "r8192E_phy.h"
#endif
#include "r8190P_rtl8256.h"

void PHY_SetRF8256Bandwidth(struct net_device* dev , HT_CHANNEL_WIDTH Bandwidth)
@@ -188,7 +183,6 @@ bool phy_RF8256_Config_ParaFile(struct net_device* dev)
	return false;
}

#ifndef RTL8192SE
void PHY_SetRF8256CCKTxPower(struct net_device*	dev, u8	powerlevel)
{
	u32	TxAGC=0;
@@ -260,7 +254,3 @@ void PHY_SetRF8256OFDMTxPower(struct net_device* dev, u8 powerlevel)
#endif
	return;
}



#endif
+0 −83
Original line number Diff line number Diff line
@@ -1436,61 +1436,6 @@ rtl8192_signal_scale_mapping(struct r8192_priv * priv,
{
	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)
	{
		retsig = 90 + ((currsig - 60) / 4);
@@ -2257,10 +2202,6 @@ void rtl8192_EnableInterrupt(struct net_device *dev)
	write_nic_dword(dev,INTA_MASK, priv->irq_mask[0]);
#endif

#ifdef RTL8192SE
	write_nic_dword(dev,INTA_MASK+4, priv->irq_mask[1]&0x3F);
#endif

}

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);
#endif

#ifdef RTL8192SE
	write_nic_dword(dev,INTA_MASK + 4,0);
#endif
	priv->irq_enabled = 0;
}

@@ -2290,10 +2228,6 @@ void rtl8192_ClearInterrupt(struct net_device *dev)
	write_nic_dword(dev, ISR, tmp);
#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)

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) ;
#endif
	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)
@@ -2438,9 +2363,6 @@ bool rtl8192_HalTxCheckStuck(struct net_device *dev)

bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev)
{
#ifdef RTL8192SE
	return true;
#else
	struct r8192_priv *priv = rtllib_priv(dev);
	struct rtllib_device *ieee = priv->rtllib;
	if (ieee->rtllib_ap_sec_type &&
@@ -2449,14 +2371,10 @@ bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev)
	} else {
		return true;
	}
#endif
}

bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev)
{
#ifdef RTL8192SE
	return false;
#else
	bool			Reval;
	struct r8192_priv* priv = rtllib_priv(dev);
	struct rtllib_device* ieee = priv->rtllib;
@@ -2467,7 +2385,6 @@ bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev)
		Reval =  false;

	return Reval;
#endif
}

u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc)
+0 −2
Original line number Diff line number Diff line
@@ -1444,7 +1444,6 @@ PHY_SetRtl8192eRfOff(struct net_device* dev )
}
#endif

#ifndef RTL8192SE
bool
SetRFPowerState8190(
	struct net_device* dev,
@@ -1695,7 +1694,6 @@ SetRFPowerState(

	return bResult;
}
#endif

extern void
PHY_ScanOperationBackup8192(
+0 −184
Original line number Diff line number Diff line
@@ -436,14 +436,6 @@ bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device* ieee)
			(pHTInfo->IOTPeer != HT_IOT_PEER_RALINK) )
			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
	return retValue;
}
@@ -519,11 +511,7 @@ HTIOTActWAIOTBroadcom(struct rtllib_device* ieee)
u8 HTIOTActIsForcedCTS2Self(struct rtllib_device *ieee, struct rtllib_network *network)
{
	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)
#endif
	{
		retValue = 1;
	}
@@ -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	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;
}

@@ -570,12 +547,6 @@ u8
HTIOCActRejcectADDBARequest(struct rtllib_network *network)
{
	u8	retValue = 0;
#if (defined RTL8192SE || defined RTL8192SU || defined RTL8192CE)
	{


	}
#endif

	return retValue;

@@ -601,16 +572,6 @@ u8
		   pHTInfo->IOTPeer==HT_IOT_PEER_RALINK)
			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
	return retValue;
@@ -634,9 +595,6 @@ u8
HTIOTActDisableHighPower(struct rtllib_device* ieee,struct rtllib_network *network)
{
	u8	retValue = 0;
#if (defined RTL8192SE || defined RTL8192SU || defined RTL8192CE)
	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
#endif

#ifdef RTL8192SU
	if (pHTInfo->IOTPeer==HT_IOT_PEER_RALINK ||
@@ -645,12 +603,6 @@ HTIOTActDisableHighPower(struct rtllib_device* ieee,struct rtllib_network *netwo
	{
			retValue = 1;
	}
#elif defined RTL8192SE || defined RTL8192CE
	if (pHTInfo->IOTPeer==HT_IOT_PEER_RALINK ||
		pHTInfo->IOTPeer==HT_IOT_PEER_REALTEK )
	{
			retValue = 1;
	}
#endif
	return retValue;
}
@@ -675,19 +627,6 @@ HTIOTActIsDisableTx40MHz(struct rtllib_device* ieee,struct rtllib_network *netwo
{
	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;
}

@@ -696,19 +635,6 @@ HTIOTActIsTxNoAggregation(struct rtllib_device* ieee,struct rtllib_network *netw
{
	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;
}

@@ -718,19 +644,6 @@ HTIOTActIsDisableTx2SS(struct rtllib_device* ieee,struct rtllib_network *network
{
	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;
}

@@ -753,15 +666,6 @@ bool HTIOCActIsDisableCckRate(struct rtllib_device* ieee,struct rtllib_network *
bool HTIOCActAllowPeerAggOnePacket(struct rtllib_device* ieee,struct rtllib_network *network)
{
	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;
}

@@ -769,14 +673,6 @@ bool
HTIOTActIsNullDataPowerSaving(struct rtllib_device* ieee,struct rtllib_network *network)
{
	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;
}

@@ -826,9 +722,6 @@ void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8*
	pCapELE->ShortGI40Mhz		= 1;

	pCapELE->TxSTBC			= 1;
#if defined RTL8192SE || defined RTL8192CE
	pCapELE->TxSTBC			= 0;
#endif
	pCapELE->RxSTBC			= 0;
	pCapELE->DelayBA		= 0;
	pCapELE->MaxAMSDUSize	= (MAX_RECEIVE_BUFFER_SIZE>=7935)?1:0;
@@ -1131,18 +1024,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
		pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
	else
		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)
	{
		pHTInfo->bCurrentAMPDUEnable = false;
@@ -1290,71 +1171,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device* ieee, struct rtllib_net
		bIOTAction = HTIOTActIsCCDFsync(ieee);
		if (bIOTAction)
			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 {
		pHTInfo->bCurrentHTSupport = false;
		pHTInfo->bCurrentRT2RTAggregation = false;
+0 −183
Original line number Diff line number Diff line
@@ -329,9 +329,7 @@ void write_nic_byte(struct net_device *dev, int x,u8 y)
{
        writeb(y,(u8*)dev->mem_start +x);

#if !(defined RTL8192SE || defined RTL8192CE)
	udelay(20);
#endif

#if defined RTL8192CE
		read_nic_byte(dev, x);
@@ -342,9 +340,7 @@ void write_nic_dword(struct net_device *dev, int x,u32 y)
{
        writel(y,(u8*)dev->mem_start +x);

#if !(defined RTL8192SE || defined RTL8192CE)
	udelay(20);
#endif

#if defined RTL8192CE
		read_nic_dword(dev, x);
@@ -355,9 +351,7 @@ void write_nic_word(struct net_device *dev, int x,u16 y)
{
        writew(y,(u8*)dev->mem_start +x);

#if !(defined RTL8192SE || defined RTL8192CE)
	udelay(20);
#endif

#if defined RTL8192CE
		read_nic_word(dev, x);
@@ -969,19 +963,6 @@ void rtl8192_refresh_supportrate(struct r8192_priv* priv)
		}
#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 {
		memset(ieee->Regdot11HTOperationalRateSet, 0, 16);
	}
@@ -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_CLEAR_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC);
	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
	if (priv->polling_timer_on == 0){
@@ -1226,14 +1203,10 @@ static void rtl8192_init_priv_handler(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);
	PRT_POWER_SAVE_CONTROL	pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl));
#endif

#if defined RTL8192SE || defined RTL8192CE || defined RTL8192E
	pPSC->RegMaxLPSAwakeIntvl = 5;
#endif

#ifdef RTL8192CE
	priv->bWEPinNmodeFromReg = 0;
@@ -1251,17 +1224,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev)

	priv->RegSupportPciASPM = 1;

#elif defined RTL8192SE
	priv->RegPciASPM = 2;

	priv->RegDevicePciASPMSetting = 0x03;

	priv->RegHostPciASPMSetting = 0x02;

	priv->RegHwSwRfOffD3 = 2;

	priv->RegSupportPciASPM = 2;

#elif defined RTL8192E
	priv->RegPciASPM = 2;

@@ -1359,15 +1321,6 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
	priv->ccktxpower_adjustcnt_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->iw_mode = IW_MODE_INFRA;
	priv->rtllib->active_scan = 1;
@@ -1524,9 +1477,6 @@ short rtl8192_init(struct net_device *dev)

	init_hal_dm(dev);

#if defined RTL8192SE || defined RTL8192CE
	InitSwLeds(dev);
#endif
	init_timer(&priv->watch_dog_timer);
	setup_timer(&priv->watch_dog_timer,
		    watch_dog_timer_callback,
@@ -1729,15 +1679,6 @@ rtl819x_TxCheckStuck(struct net_device *dev)
			bCheckFwTxCnt = true;
			if (tcb_desc->nStuckCount > 1)
				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);
@@ -1870,10 +1811,7 @@ void rtl819x_ifsilentreset(struct net_device *dev)
			rtllib_softmac_stop_protocol(priv->rtllib, 0 ,true);
		}

#if !(defined RTL8192SE || defined RTL8192CE)
		dm_backup_dynamic_mechanism_state(dev);
#endif


		up(&priv->wx_sem);
		RT_TRACE(COMP_RESET,"%s():<==========down process is finished\n",__func__);
@@ -1920,9 +1858,7 @@ void rtl819x_ifsilentreset(struct net_device *dev)
		}

		CamRestoreAllEntry(dev);
#if !(defined RTL8192SE || defined RTL8192CE)
		dm_restore_dynamic_mechanism_state(dev);
#endif
END:
		priv->ResetProgress = RESET_TYPE_NORESET;
		priv->reset_count++;
@@ -1930,9 +1866,7 @@ void rtl819x_ifsilentreset(struct net_device *dev)
		priv->bForcedSilentReset =false;
		priv->bResetInProgress = false;

#if !(defined RTL8192SE || defined RTL8192CE)
		write_nic_byte(dev, UFWP, 1);
#endif
		RT_TRACE(COMP_RESET, "Reset finished!! ====>[%d]\n", priv->reset_count);
	}
}
@@ -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)
		{
			u32	TotalRxBcnNum = 0;
@@ -2341,11 +2270,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)

	priv->rtllib->bAwakePktSent = true;

#if defined RTL8192SE || defined RTL8192CE
	fwinfo_size = 0;
#else
	fwinfo_size = sizeof(TX_FWINFO_8190PCI);
#endif

	header = (struct rtllib_hdr_1addr *)(((u8*)skb->data) + fwinfo_size);
	fc = header->frame_ctl;
@@ -2760,82 +2685,6 @@ void rtl8192_rx_normal(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)
		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){
		RT_TRACE(COMP_INTR, "beacon ok interrupt!\n");
		priv->stats.txbeaconokint++;
@@ -3245,7 +3078,6 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
		RT_TRACE(COMP_INTR, "beacon ok interrupt!\n");
		priv->stats.txbeaconerr++;
	}
#endif

	if (inta & IMR_BDOK) {
		RT_TRACE(COMP_INTR, "beacon interrupt!\n");
@@ -3279,11 +3111,7 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
		rtl8192_tx_isr(dev,HIGH_QUEUE);
	}

#ifdef RTL8192SE
	if ((inta & IMR_ROK) || (inta & IMR_RXCMDOK))
#else
	if (inta & IMR_ROK)
#endif
	{
		priv->stats.rxint++;
		priv->InterruptLog.nIMR_ROK++;
@@ -3459,13 +3287,6 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
	dev->mem_start = ioaddr;
	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);
	/* If the revisionid is 0x10, the device uses rtl8192se. */
	if (pdev->device == 0x8192 && revision_id == 0x10)
@@ -3625,10 +3446,6 @@ static void __devexit rtl8192_pci_disconnect(struct pci_dev *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");
}

Loading