From 48b4d6056bce058f6714d12a51b5537debffef95 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sun, 21 Jul 2013 10:53:26 -0500 Subject: [PATCH] rtl8188eu: Remove CONFIG_RF_GAIN_OFFSET - not defined Signed-off-by: Larry Finger --- Makefile | 9 --------- hal/rtl8188e_hal_init.c | 25 +------------------------ include/osdep_intf.h | 4 ---- include/rtl8188e_hal.h | 8 -------- include/rtl8188e_spec.h | 8 -------- include/rtw_eeprom.h | 6 +----- os_dep/os_intfs.c | 30 ------------------------------ 7 files changed, 2 insertions(+), 88 deletions(-) diff --git a/Makefile b/Makefile index 2491928..b4b04ca 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index 8a9d9df..f7f3c24 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -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, diff --git a/include/osdep_intf.h b/include/osdep_intf.h index 1c03fff..ffdd569 100644 --- a/include/osdep_intf.h +++ b/include/osdep_intf.h @@ -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 ); diff --git a/include/rtl8188e_hal.h b/include/rtl8188e_hal.h index b34a9de..701ffb9 100644 --- a/include/rtl8188e_hal.h +++ b/include/rtl8188e_hal.h @@ -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 diff --git a/include/rtl8188e_spec.h b/include/rtl8188e_spec.h index 9a6b185..5722948 100644 --- a/include/rtl8188e_spec.h +++ b/include/rtl8188e_spec.h @@ -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 diff --git a/include/rtw_eeprom.h b/include/rtw_eeprom.h index b8828ad..5a70efb 100644 --- a/include/rtw_eeprom.h +++ b/include/rtw_eeprom.h @@ -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); diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index c080bb0..aa3b761 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -33,11 +33,6 @@ #include #include -#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;