rtl8188eu: Remove CONFIG_RF_GAIN_OFFSET - not defined

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-21 10:53:26 -05:00
parent dbfcfb9122
commit 48b4d6056b
7 changed files with 2 additions and 88 deletions

View file

@ -24,7 +24,6 @@ CONFIG_POWER_SAVING = y
CONFIG_USB_AUTOSUSPEND = n
CONFIG_HW_PWRP_DETECTION = n
CONFIG_BT_COEXIST = n
CONFIG_EFUSE_CONFIG_FILE = n
CONFIG_EXT_CLK = n
CONFIG_WOWLAN = n
@ -113,10 +112,6 @@ ifeq ($(CONFIG_BT_COEXIST), y)
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
endif
ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE
endif
ifeq ($(CONFIG_EXT_CLK), y)
EXTRA_CFLAGS += -DCONFIG_EXT_CLK
endif
@ -125,10 +120,6 @@ ifeq ($(CONFIG_WOWLAN), y)
EXTRA_CFLAGS += -DCONFIG_WOWLAN
endif
ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
EXTRA_CFLAGS += -DCONFIG_RF_GAIN_OFFSET
endif
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/ | sed -e s/armv6l/arm/)
ARCH ?= $(SUBARCH)

View file

@ -3268,35 +3268,12 @@ void Hal_DetectWoWMode(PADAPTER pAdapter)
}
#endif
#ifdef CONFIG_RF_GAIN_OFFSET
void Hal_ReadRFGainOffset(
PADAPTER Adapter,
u8* PROMContent,
bool AutoloadFail)
{
u8 buff[EFUSE_MAX_SIZE];
u32 res;
/* */
/* BB_RF Gain Offset from EEPROM */
/* */
res = rtw_efuse_access(Adapter, false, 0, EFUSE_MAX_SIZE, buff);
if (!AutoloadFail && res != _FAIL)
Adapter->eeprompriv.EEPROMRFGainOffset = buff[EEPROM_RF_GAIN_OFFSET_88E];
else
Adapter->eeprompriv.EEPROMRFGainOffset = EEPROM_Default_RFGainOffset;
DBG_88E("EEPRORFGainOffset = 0x%02x\n", Adapter->eeprompriv.EEPROMRFGainOffset);
}
#endif /* CONFIG_RF_GAIN_OFFSET */
/* */
/* */
/* 20100209 Joseph: */
/* This function is used only for 92C to set REG_BCN_CTRL(0x550) register. */
/* We just reserve the value of the register in variable pHalData->RegBcnCtrlVal and then operate */
/* the value of the register via atomic operation. */
/* This prevents from race condition when setting this register. */
/* The value of pHalData->RegBcnCtrlVal is initialized in HwConfigureRTL8192CE() function. */
/* */
void SetBcnCtrlReg(
PADAPTER padapter,
u8 SetBits,

View file

@ -90,10 +90,6 @@ void rtw_proc_remove_one(struct net_device *dev);
void rtw_ips_dev_unload(_adapter *padapter);
#ifdef CONFIG_RF_GAIN_OFFSET
void rtw_bb_rf_gain_offset(_adapter *padapter);
#endif //CONFIG_RF_GAIN_OFFSET
int rtw_ips_pwr_up(_adapter *padapter);
void rtw_ips_pwr_down(_adapter *padapter);
int rtw_hw_suspend(_adapter *padapter );

View file

@ -522,15 +522,7 @@ bool HalDetectPwrDownMode88E(PADAPTER Adapter);
void Hal_DetectWoWMode(PADAPTER pAdapter);
#endif //CONFIG_WOWLAN
#ifdef CONFIG_RF_GAIN_OFFSET
void Hal_ReadRFGainOffset(PADAPTER pAdapter,u8* hwinfo,bool AutoLoadFail);
#endif //CONFIG_RF_GAIN_OFFSET
//RT_CHANNEL_DOMAIN rtl8723a_HalMapChannelPlan(PADAPTER padapter, u8 HalChannelPlan);
//VERSION_8192C rtl8723a_ReadChipVersion(PADAPTER padapter);
//void rtl8723a_ReadBluetoothCoexistInfo(PADAPTER padapter, u8 *PROMContent, bool AutoloadFail);
void Hal_InitChannelPlan(PADAPTER padapter);
void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);
// register

View file

@ -1519,10 +1519,6 @@ Current IOREG MAP
#define EEPROM_CUSTOMERID_88E 0xC5
#define EEPROM_RF_ANTENNA_OPT_88E 0xC9
#ifdef CONFIG_RF_GAIN_OFFSET
#define EEPROM_RF_GAIN_OFFSET_88E 0xFD
#endif //CONFIG_RF_GAIN_OFFSET
// RTL88EE
#define EEPROM_MAC_ADDR_88EE 0xD0
#define EEPROM_VID_88EE 0xD6
@ -1577,10 +1573,6 @@ Current IOREG MAP
#define EEPROM_Default_CrystalCap_88E 0x20
#define EEPROM_Default_ThermalMeter_88E 0x18
#ifdef CONFIG_RF_GAIN_OFFSET
#define EEPROM_Default_RFGainOffset 0xff
#endif //CONFIG_RF_GAIN_OFFSET
//New EFUSE deafult value
#define EEPROM_DEFAULT_24G_INDEX 0x2D
#define EEPROM_DEFAULT_24G_HT20_DIFF 0X02

View file

@ -119,11 +119,7 @@ struct eeprom_priv {
u8 mac_addr[6]; //PermanentAddress
u16 channel_plan;
u8 EepromOrEfuse;
u8 efuse_eeprom_data[HWSET_MAX_SIZE_512]; //92C:256bytes, 88E:512bytes, we use union set (512bytes)
#ifdef CONFIG_RF_GAIN_OFFSET
u8 EEPROMRFGainOffset;
#endif //CONFIG_RF_GAIN_OFFSET
u8 efuse_eeprom_data[HWSET_MAX_SIZE_512];
};
extern void eeprom_write16(_adapter *padapter, u16 reg, u16 data);

View file

@ -33,11 +33,6 @@
#include <usb_hal.h>
#include <rtw_br_ext.h>
#ifdef CONFIG_RF_GAIN_OFFSET
#define REG_RF_BB_GAIN_OFFSET 0x55
#define RF_GAIN_OFFSET_MASK 0xfffff
#endif //CONFIG_RF_GAIN_OFFSET
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
MODULE_AUTHOR("Realtek Semiconductor Corp.");
@ -1297,10 +1292,6 @@ int _netdev_open(struct net_device *pnetdev)
pr_info("MAC Address = %pM\n", pnetdev->dev_addr);
#ifdef CONFIG_RF_GAIN_OFFSET
rtw_bb_rf_gain_offset(padapter);
#endif //CONFIG_RF_GAIN_OFFSET
status=rtw_start_drv_threads(padapter);
if (status ==_FAIL) {
pr_info("Initialize driver software resource Failed!\n");
@ -1447,27 +1438,6 @@ void rtw_ips_dev_unload(_adapter *padapter)
rtw_hal_deinit(padapter);
}
#ifdef CONFIG_RF_GAIN_OFFSET
void rtw_bb_rf_gain_offset(_adapter *padapter)
{
u8 value = padapter->eeprompriv.EEPROMRFGainOffset;
u8 tmp = 0x3e;
u32 res;
DBG_88E("+%s value: 0x%02x+\n", __func__, value);
if (!(value & 0x01)) {
DBG_88E("Offset RF Gain.\n");
res = rtw_hal_read_rfreg(padapter, RF_PATH_A, REG_RF_BB_GAIN_OFFSET, 0xffffffff);
value &= tmp;
res = value << 14;
rtw_hal_write_rfreg(padapter, RF_PATH_A, REG_RF_BB_GAIN_OFFSET, RF_GAIN_OFFSET_MASK, res);
} else {
DBG_88E("Using the default RF gain.\n");
}
}
#endif //CONFIG_RF_GAIN_OFFSET
int pm_netdev_open(struct net_device *pnetdev,u8 bnormal)
{
int status;