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

Commit 60083ee0 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman
Browse files

Staging: rtl8192su: remove RTL8192SE ifdefs

parent bd7b22c9
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -327,9 +327,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)

	ieee->state = IEEE80211_LINKED_SCANNING;
	ieee->link_change(ieee->dev);
#ifndef RTL8192SE
	ieee->InitialGainHandler(ieee->dev,IG_Backup);
#endif
	if (ieee->SetFwCmdHandler)
	{
		ieee->SetFwCmdHandler(ieee->dev, FW_CMD_DIG_HALT);
@@ -356,9 +354,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
		ieee->set_chan(ieee->dev, chan);
	}

#ifndef RTL8192SE
	ieee->InitialGainHandler(ieee->dev,IG_Restore);
#endif
	if (ieee->SetFwCmdHandler)
	{
		ieee->SetFwCmdHandler(ieee->dev, FW_CMD_DIG_RESUME);
+1 −1
Original line number Diff line number Diff line
@@ -495,7 +495,7 @@ void ieee80211_query_protectionmode(struct ieee80211_device* ieee, cb_desc* tcb_
			{
				tcb_desc->bCTSEnable	= true;
				tcb_desc->rts_rate  = 	MGN_24M;
#if defined(RTL8192SE) || defined(RTL8192SU)
#if defined(RTL8192SU)
				tcb_desc->bRTSEnable = false;
#else
				tcb_desc->bRTSEnable = true;
+7 −9
Original line number Diff line number Diff line
@@ -516,7 +516,7 @@ bool HTIOTActIsDisableMCSTwoSpatialStream(struct ieee80211_device* ieee)
//#endif
#endif
#if 1
#if (defined(RTL8192SE) || (defined(RTL8192SU)))
#if  defined(RTL8192SU)
       PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
	if(ieee->is_ap_in_wep_tkip && ieee->is_ap_in_wep_tkip(ieee->dev))
	{
@@ -595,7 +595,7 @@ u8 HTIOTActIsForcedRTSCTS(struct ieee80211_device *ieee, struct ieee80211_networ
	u8	retValue = 0;
	printk("============>%s(), %d\n", __FUNCTION__, network->realtek_cap_exit);
	// Force protection
#if defined(RTL8192SE) || defined(RTL8192SU)
#if defined(RTL8192SU)
	if(ieee->pHTInfo->bCurrentHTSupport)
	{
		//if(!network->realtek_cap_exit)
@@ -621,14 +621,12 @@ HTIOTActIsForcedAMSDU8K(struct ieee80211_device *ieee, struct ieee80211_network
u8 HTIOTActIsCCDFsync(u8* PeerMacAddr)
{
	u8	retValue = 0;
#ifndef RTL8192SE
	if(	(memcmp(PeerMacAddr, UNKNOWN_BORADCOM, 3)==0) ||
	    	(memcmp(PeerMacAddr, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3)==0) ||
	    	(memcmp(PeerMacAddr, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ==0))
	{
		retValue = 1;
	}
#endif
	return retValue;
}

@@ -642,7 +640,7 @@ HTIOCActRejcectADDBARequest(struct ieee80211_network *network)
	//if(IS_HARDWARE_TYPE_8192SE(Adapter) ||
	//	IS_HARDWARE_TYPE_8192SU(Adapter)
	//)
#if (defined RTL8192SE || defined RTL8192SU)
#if  defined RTL8192SU
	{
		// Do not reject ADDBA REQ because some of the AP may
		// keep on sending ADDBA REQ qhich cause DHCP fail or ping loss!
@@ -735,7 +733,7 @@ HTIOTActIsDisableTx40MHz(struct ieee80211_device* ieee,struct ieee80211_network
{
	u8	retValue = 0;

#if (defined RTL8192SU || defined RTL8192SE)
#if defined RTL8192SU
	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
	if(	(KEY_TYPE_WEP104 == ieee->pairwise_key_type) ||
		(KEY_TYPE_WEP40 == ieee->pairwise_key_type) ||
@@ -756,7 +754,7 @@ HTIOTActIsTxNoAggregation(struct ieee80211_device* ieee,struct ieee80211_network
{
	u8 retValue = 0;

#if (defined RTL8192SU || defined RTL8192SE)
#if defined RTL8192SU
	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
	if(	(KEY_TYPE_WEP104 == ieee->pairwise_key_type) ||
		(KEY_TYPE_WEP40 == ieee->pairwise_key_type) ||
@@ -779,7 +777,7 @@ HTIOTActIsDisableTx2SS(struct ieee80211_device* ieee,struct ieee80211_network *n
{
	u8	retValue = 0;

#if (defined RTL8192SU || defined RTL8192SE)
#if defined RTL8192SU
	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
	if(	(KEY_TYPE_WEP104 == ieee->pairwise_key_type) ||
		(KEY_TYPE_WEP40 == ieee->pairwise_key_type) ||
@@ -799,7 +797,7 @@ HTIOTActIsDisableTx2SS(struct ieee80211_device* ieee,struct ieee80211_network *n
bool HTIOCActAllowPeerAggOnePacket(struct ieee80211_device* ieee,struct ieee80211_network *network)
{
	bool 	retValue = false;
#if defined(RTL8192SE) || defined(RTL8192SU)
#if defined(RTL8192SU)
	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
	{
		if(pHTInfo->IOTPeer == HT_IOT_PEER_MARVELL)
+0 −27
Original line number Diff line number Diff line
@@ -708,12 +708,6 @@ EFUSE_ShadowUpdate(struct net_device* dev)
	for (offset = 0; offset < 16; offset++)
	{
		// Offset 0x18-1F are reserved now!!!
#ifdef RTL8192SE
		if(priv->card_8192 == NIC_8192SE){
			if (offset == 3)
				continue;
		}
#endif
		word_en = 0x0F;
		base = offset * 8;

@@ -729,12 +723,6 @@ EFUSE_ShadowUpdate(struct net_device* dev)
			}

			// 2008/12/11 MH HW autoload fail workaround for A/BCUT.
#ifdef RTL8192SE
			if (first_pg == TRUE && offset == 1 && (priv->card_8192 == NIC_8192SE))
			{
				continue;
			}
#endif

			if (first_pg == TRUE)
			{
@@ -774,21 +762,6 @@ EFUSE_ShadowUpdate(struct net_device* dev)
	// 2008/12/01 MH For Efuse HW load bug workarounf method!!!!
	// We will force write 0x10EC into address 10&11 after all Efuse content.
	//
#ifdef RTL8192SE
	if (first_pg == TRUE && (priv->card_8192 == NIC_8192SE))
	{
		// 2008/12/11 MH Use new method to prevent HW autoload fail.
		u8	tmpdata[8];

		memcpy(tmpdata, (&priv->EfuseMap[EFUSE_MODIFY_MAP][8]), 8);
		efuse_PgPacketWrite(dev, 1, 0x0, tmpdata);
#if 0
		u1Byte	tmpdata[8] = {0xFF, 0xFF, 0xEC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF};

		efuse_PgPacketWrite(pAdapter, 1, 0xD, tmpdata);
#endif
	}
#endif


	// For warm reboot, we must resume Efuse clock to 500K.
+1 −27
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
 *        NDIS_STATUS_FAILURE - the following initialization process should be terminated
 *        NDIS_STATUS_SUCCESS - if firmware initialization process success
**************************************************************************************************/
#if defined(RTL8192SE)||defined(RTL8192SU)
#if defined(RTL8192SU)
#include "r8192U.h"
#include "r8192S_firmware.h"
#include <linux/unistd.h>
@@ -50,9 +50,6 @@ bool FirmwareDownloadCode(struct net_device *dev, u8 * code_virtual_address,u32
	u8                  	    bLastIniPkt = 0;
	u16 			    ExtraDescOffset = 0;

#ifdef RTL8192SE
	fw_SetRQPN(dev);	// For 92SE only
#endif

	RT_TRACE(COMP_FIRMWARE, "--->FirmwareDownloadCode()\n" );

@@ -117,19 +114,6 @@ bool FirmwareDownloadCode(struct net_device *dev, u8 * code_virtual_address,u32

}

#ifdef RTL8192SE
static void fw_SetRQPN(struct net_device *dev)
{
	// Only for 92SE HW bug, we have to set RAPN before every FW download
	// We can remove the code later.
	write_nic_dword(dev,  RQPN, 0xffffffff);
	write_nic_dword(dev,  RQPN+4, 0xffffffff);
	write_nic_byte(dev,  RQPN+8, 0xff);
	write_nic_byte(dev,  RQPN+0xB, 0x80);
	//#if ((HAL_CODE_BASE ==  RTL8192_S) && (PLATFORM != PLATFORM_WINDOWS_USB))

}	/* fw_SetRQPN */
#endif

RT_STATUS
FirmwareEnableCPU(struct net_device *dev)
@@ -141,9 +125,6 @@ FirmwareEnableCPU(struct net_device *dev)
	u32		iCheckTime = 200;

	RT_TRACE(COMP_FIRMWARE, "-->FirmwareEnableCPU()\n" );
#ifdef RTL8192SE
	fw_SetRQPN(dev);	// For 92SE only
#endif
	// Enable CPU.
	tmpU1b = read_nic_byte(dev, SYS_CLKR);
	write_nic_byte(dev,  SYS_CLKR, (tmpU1b|SYS_CPU_CLKSEL)); //AFE source
@@ -302,10 +283,6 @@ FirmwareCheckReady(struct net_device *dev, u8 LoadFWStatus)
              // <Roger_Notes> USB interface will update reserved followings parameters later!!
              // 2008.08.28.
              //
#ifdef RTL8192SE
		//write_nic_dword(dev, RQPN, 0x10101010);
		//write_nic_byte(dev,  0xAB, 0x80);
#endif

	       //
              // <Roger_Notes> If right here, we can set TCR/RCR to desired value
@@ -601,9 +578,6 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff
	unsigned char	    *seg_ptr;
	cb_desc		    *tcb_desc;
	u8                  bLastIniPkt;
#ifdef RTL8192SE
	fw_SetRQPN(dev);	// For 92SE only
#endif

#ifndef RTL8192SU
	if(buffer_len >= 64000-USB_HWDESC_HEADER_LEN)
Loading