mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 15:39:38 +00:00
rtl8188eu: Remove CONFIG_EFUSE_CONFIG_FILE and CONFIG_RF_GAIN_OFFSET
These two interdependent parameters are not defined. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
4b61fd5bf7
commit
2a75f42bff
8 changed files with 1 additions and 237 deletions
9
Makefile
9
Makefile
|
@ -21,7 +21,6 @@ CONFIG_USB_HCI = y
|
||||||
CONFIG_POWER_SAVING = y
|
CONFIG_POWER_SAVING = y
|
||||||
CONFIG_USB_AUTOSUSPEND = n
|
CONFIG_USB_AUTOSUSPEND = n
|
||||||
CONFIG_BT_COEXIST = n
|
CONFIG_BT_COEXIST = n
|
||||||
CONFIG_EFUSE_CONFIG_FILE = n
|
|
||||||
CONFIG_EXT_CLK = n
|
CONFIG_EXT_CLK = n
|
||||||
CONFIG_WOWLAN = n
|
CONFIG_WOWLAN = n
|
||||||
CONFIG_GPIO_WAKEUP = n
|
CONFIG_GPIO_WAKEUP = n
|
||||||
|
@ -102,10 +101,6 @@ ifeq ($(CONFIG_BT_COEXIST), y)
|
||||||
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
|
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
|
|
||||||
EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXT_CLK), y)
|
ifeq ($(CONFIG_EXT_CLK), y)
|
||||||
EXTRA_CFLAGS += -DCONFIG_EXT_CLK
|
EXTRA_CFLAGS += -DCONFIG_EXT_CLK
|
||||||
endif
|
endif
|
||||||
|
@ -126,10 +121,6 @@ ifeq ($(CONFIG_GPIO_WAKEUP), y)
|
||||||
EXTRA_CFLAGS += -DCONFIG_GPIO_WAKEUP
|
EXTRA_CFLAGS += -DCONFIG_GPIO_WAKEUP
|
||||||
endif
|
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/armv.l/arm/)
|
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/ | sed -e s/armv.l/arm/)
|
||||||
ARCH ?= $(SUBARCH)
|
ARCH ?= $(SUBARCH)
|
||||||
CROSS_COMPILE ?=
|
CROSS_COMPILE ?=
|
||||||
|
|
|
@ -3570,32 +3570,6 @@ void Hal_DetectWoWMode(struct adapter *pAdapter)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RF_GAIN_OFFSET
|
|
||||||
void Hal_ReadRFGainOffset(
|
|
||||||
IN struct adapter * Adapter,
|
|
||||||
IN u8* PROMContent,
|
|
||||||
IN BOOLEAN 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 ){
|
|
||||||
Adapter->eeprompriv.EEPROMRFGainOffset = PROMContent[EEPROM_RF_GAIN_OFFSET_88E];
|
|
||||||
Adapter->eeprompriv.EEPROMRFGainVal=EFUSE_Read1Byte(Adapter, EEPROM_RF_GAIN_VAL_88E);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Adapter->eeprompriv.EEPROMRFGainOffset = EEPROM_Default_RFGainOffset;
|
|
||||||
Adapter->eeprompriv.EEPROMRFGainVal=0xff;
|
|
||||||
}
|
|
||||||
DBG_871X("EEPRORFGainOffset = 0x%02x\n", Adapter->eeprompriv.EEPROMRFGainOffset);
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_RF_GAIN_OFFSET */
|
|
||||||
|
|
||||||
/* */
|
|
||||||
/* */
|
|
||||||
/* 20100209 Joseph: */
|
/* 20100209 Joseph: */
|
||||||
/* This function is used only for 92C to set REG_BCN_CTRL(0x550) register. */
|
/* 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 */
|
/* We just reserve the value of the register in variable pHalData->RegBcnCtrlVal and then operate */
|
||||||
|
|
|
@ -31,11 +31,6 @@
|
||||||
#include <usb_hal.h>
|
#include <usb_hal.h>
|
||||||
#include <usb_osintf.h>
|
#include <usb_osintf.h>
|
||||||
|
|
||||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <asm/uaccess.h>
|
|
||||||
#endif /* CONFIG_EFUSE_CONFIG_FILE */
|
|
||||||
|
|
||||||
#if DISABLE_BB_RF
|
#if DISABLE_BB_RF
|
||||||
#define HAL_MAC_ENABLE 0
|
#define HAL_MAC_ENABLE 0
|
||||||
#define HAL_BB_ENABLE 0
|
#define HAL_BB_ENABLE 0
|
||||||
|
@ -2008,119 +2003,6 @@ static void _ReadPSSetting(IN struct adapter *Adapter,IN u8*PROMContent,IN u8 Au
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
|
||||||
static u32 Hal_readPGDataFromConfigFile(
|
|
||||||
struct adapter *padapter)
|
|
||||||
{
|
|
||||||
u32 i;
|
|
||||||
struct file *fp;
|
|
||||||
mm_segment_t fs;
|
|
||||||
u8 temp[3];
|
|
||||||
loff_t pos = 0;
|
|
||||||
EEPROM_EFUSE_PRIV *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
|
|
||||||
u8 *PROMContent = pEEPROM->efuse_eeprom_data;
|
|
||||||
|
|
||||||
|
|
||||||
temp[2] = 0; /* add end of string '\0' */
|
|
||||||
|
|
||||||
fp = filp_open("/system/etc/wifi/wifi_efuse.map", O_RDWR, 0644);
|
|
||||||
if (IS_ERR(fp)) {
|
|
||||||
pEEPROM->bloadfile_fail_flag = true;
|
|
||||||
DBG_871X("Error, Efuse configure file doesn't exist.\n");
|
|
||||||
return _FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
fs = get_fs();
|
|
||||||
set_fs(KERNEL_DS);
|
|
||||||
|
|
||||||
DBG_871X("Efuse configure file:\n");
|
|
||||||
for (i=0; i<HWSET_MAX_SIZE_88E; i++) {
|
|
||||||
vfs_read(fp, temp, 2, &pos);
|
|
||||||
PROMContent[i] = simple_strtoul(temp, NULL, 16 );
|
|
||||||
pos += 1; /* Filter the space character */
|
|
||||||
DBG_871X("%02X \n", PROMContent[i]);
|
|
||||||
}
|
|
||||||
DBG_871X("\n");
|
|
||||||
set_fs(fs);
|
|
||||||
|
|
||||||
filp_close(fp, NULL);
|
|
||||||
|
|
||||||
pEEPROM->bloadfile_fail_flag = false;
|
|
||||||
|
|
||||||
return _SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
Hal_ReadMACAddrFromFile_8188EU(
|
|
||||||
struct adapter * padapter
|
|
||||||
)
|
|
||||||
{
|
|
||||||
u32 i;
|
|
||||||
struct file *fp;
|
|
||||||
mm_segment_t fs;
|
|
||||||
u8 source_addr[18];
|
|
||||||
loff_t pos = 0;
|
|
||||||
u32 curtime = rtw_get_current_time();
|
|
||||||
EEPROM_EFUSE_PRIV *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
|
|
||||||
u8 *head, *end;
|
|
||||||
|
|
||||||
u8 null_mac_addr[ETH_ALEN] = {0, 0, 0,0, 0, 0};
|
|
||||||
u8 multi_mac_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
|
||||||
|
|
||||||
memset(source_addr, 0, 18);
|
|
||||||
memset(pEEPROM->mac_addr, 0, ETH_ALEN);
|
|
||||||
|
|
||||||
fp = filp_open("/data/wifimac.txt", O_RDWR, 0644);
|
|
||||||
if (IS_ERR(fp)) {
|
|
||||||
pEEPROM->bloadmac_fail_flag = true;
|
|
||||||
DBG_871X("Error, wifi mac address file doesn't exist.\n");
|
|
||||||
} else {
|
|
||||||
fs = get_fs();
|
|
||||||
set_fs(KERNEL_DS);
|
|
||||||
|
|
||||||
DBG_871X("wifi mac address:\n");
|
|
||||||
vfs_read(fp, source_addr, 18, &pos);
|
|
||||||
source_addr[17] = ':';
|
|
||||||
|
|
||||||
head = end = source_addr;
|
|
||||||
for (i=0; i<ETH_ALEN; i++) {
|
|
||||||
while (end && (*end != ':') )
|
|
||||||
end++;
|
|
||||||
|
|
||||||
if (end && (*end == ':') )
|
|
||||||
*end = '\0';
|
|
||||||
|
|
||||||
pEEPROM->mac_addr[i] = simple_strtoul(head, NULL, 16 );
|
|
||||||
|
|
||||||
if (end) {
|
|
||||||
end++;
|
|
||||||
head = end;
|
|
||||||
}
|
|
||||||
DBG_871X("%02x \n", pEEPROM->mac_addr[i]);
|
|
||||||
}
|
|
||||||
DBG_871X("\n");
|
|
||||||
set_fs(fs);
|
|
||||||
pEEPROM->bloadmac_fail_flag = false;
|
|
||||||
filp_close(fp, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( (_rtw_memcmp(pEEPROM->mac_addr, null_mac_addr, ETH_ALEN)) ||
|
|
||||||
(_rtw_memcmp(pEEPROM->mac_addr, multi_mac_addr, ETH_ALEN)) ) {
|
|
||||||
pEEPROM->mac_addr[0] = 0x00;
|
|
||||||
pEEPROM->mac_addr[1] = 0xe0;
|
|
||||||
pEEPROM->mac_addr[2] = 0x4c;
|
|
||||||
pEEPROM->mac_addr[3] = (u8)(curtime & 0xff) ;
|
|
||||||
pEEPROM->mac_addr[4] = (u8)((curtime>>8) & 0xff) ;
|
|
||||||
pEEPROM->mac_addr[5] = (u8)((curtime>>16) & 0xff) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
DBG_871X("Hal_ReadMACAddrFromFile_8188ES: Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n",
|
|
||||||
pEEPROM->mac_addr[0], pEEPROM->mac_addr[1],
|
|
||||||
pEEPROM->mac_addr[2], pEEPROM->mac_addr[3],
|
|
||||||
pEEPROM->mac_addr[4], pEEPROM->mac_addr[5]);
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_EFUSE_CONFIG_FILE */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
readAdapterInfo_8188EU(
|
readAdapterInfo_8188EU(
|
||||||
IN struct adapter *padapter
|
IN struct adapter *padapter
|
||||||
|
@ -2131,11 +2013,7 @@ readAdapterInfo_8188EU(
|
||||||
/* parse the eeprom/efuse content */
|
/* parse the eeprom/efuse content */
|
||||||
Hal_EfuseParseIDCode88E(padapter, pEEPROM->efuse_eeprom_data);
|
Hal_EfuseParseIDCode88E(padapter, pEEPROM->efuse_eeprom_data);
|
||||||
Hal_EfuseParsePIDVID_8188EU(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
Hal_EfuseParsePIDVID_8188EU(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
||||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
|
||||||
Hal_ReadMACAddrFromFile_8188EU(padapter);
|
|
||||||
#else /* CONFIG_EFUSE_CONFIG_FILE */
|
|
||||||
Hal_EfuseParseMACAddr_8188EU(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
Hal_EfuseParseMACAddr_8188EU(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
||||||
#endif /* CONFIG_EFUSE_CONFIG_FILE */
|
|
||||||
|
|
||||||
Hal_ReadPowerSavingMode88E(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
Hal_ReadPowerSavingMode88E(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
||||||
Hal_ReadTxPowerInfo88E(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
Hal_ReadTxPowerInfo88E(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
||||||
|
@ -2173,16 +2051,10 @@ static void _ReadPROMContent(
|
||||||
(pEEPROM->bautoload_fail_flag ? "Fail" : "OK") );
|
(pEEPROM->bautoload_fail_flag ? "Fail" : "OK") );
|
||||||
|
|
||||||
/* pHalData->EEType = IS_BOOT_FROM_EEPROM(Adapter) ? EEPROM_93C46 : EEPROM_BOOT_EFUSE; */
|
/* pHalData->EEType = IS_BOOT_FROM_EEPROM(Adapter) ? EEPROM_93C46 : EEPROM_BOOT_EFUSE; */
|
||||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
|
||||||
Hal_readPGDataFromConfigFile(Adapter);
|
|
||||||
#else /* CONFIG_EFUSE_CONFIG_FILE */
|
|
||||||
Hal_InitPGData88E(Adapter);
|
Hal_InitPGData88E(Adapter);
|
||||||
#endif /* CONFIG_EFUSE_CONFIG_FILE */
|
|
||||||
readAdapterInfo_8188EU(Adapter);
|
readAdapterInfo_8188EU(Adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ReadRFType(
|
_ReadRFType(
|
||||||
IN struct adapter *Adapter
|
IN struct adapter *Adapter
|
||||||
|
|
|
@ -101,10 +101,6 @@ static void rtw_proc_remove_one(struct net_device *dev){}
|
||||||
|
|
||||||
void rtw_ips_dev_unload(struct adapter *padapter);
|
void rtw_ips_dev_unload(struct adapter *padapter);
|
||||||
|
|
||||||
#ifdef CONFIG_RF_GAIN_OFFSET
|
|
||||||
void rtw_bb_rf_gain_offset(struct adapter *padapter);
|
|
||||||
#endif //CONFIG_RF_GAIN_OFFSET
|
|
||||||
|
|
||||||
int rtw_ips_pwr_up(struct adapter *padapter);
|
int rtw_ips_pwr_up(struct adapter *padapter);
|
||||||
void rtw_ips_pwr_down(struct adapter *padapter);
|
void rtw_ips_pwr_down(struct adapter *padapter);
|
||||||
|
|
||||||
|
|
|
@ -530,13 +530,6 @@ BOOLEAN HalDetectPwrDownMode88E(struct adapter *Adapter);
|
||||||
void Hal_DetectWoWMode(struct adapter *pAdapter);
|
void Hal_DetectWoWMode(struct adapter *pAdapter);
|
||||||
#endif //CONFIG_WOWLAN
|
#endif //CONFIG_WOWLAN
|
||||||
|
|
||||||
#ifdef CONFIG_RF_GAIN_OFFSET
|
|
||||||
void Hal_ReadRFGainOffset(struct adapter *pAdapter,u8* hwinfo,BOOLEAN AutoLoadFail);
|
|
||||||
#endif //CONFIG_RF_GAIN_OFFSET
|
|
||||||
|
|
||||||
//RT_CHANNEL_DOMAIN rtl8723a_HalMapChannelPlan(struct adapter *padapter, u8 HalChannelPlan);
|
|
||||||
//VERSION_8192C rtl8723a_ReadChipVersion(struct adapter *padapter);
|
|
||||||
//void rtl8723a_ReadBluetoothCoexistInfo(struct adapter *padapter, u8 *PROMContent, BOOLEAN AutoloadFail);
|
|
||||||
void Hal_InitChannelPlan(struct adapter *padapter);
|
void Hal_InitChannelPlan(struct adapter *padapter);
|
||||||
|
|
||||||
void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);
|
void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);
|
||||||
|
|
|
@ -1558,11 +1558,6 @@ Current IOREG MAP
|
||||||
#define EEPROM_CUSTOMERID_88E 0xC5
|
#define EEPROM_CUSTOMERID_88E 0xC5
|
||||||
#define EEPROM_RF_ANTENNA_OPT_88E 0xC9
|
#define EEPROM_RF_ANTENNA_OPT_88E 0xC9
|
||||||
|
|
||||||
#ifdef CONFIG_RF_GAIN_OFFSET
|
|
||||||
#define EEPROM_RF_GAIN_OFFSET_88E 0xC1
|
|
||||||
#define EEPROM_RF_GAIN_VAL_88E 0xF6 //Physical address which is the BB gain offset value
|
|
||||||
#endif //CONFIG_RF_GAIN_OFFSET
|
|
||||||
|
|
||||||
// RTL88EE
|
// RTL88EE
|
||||||
#define EEPROM_MAC_ADDR_88EE 0xD0
|
#define EEPROM_MAC_ADDR_88EE 0xD0
|
||||||
#define EEPROM_VID_88EE 0xD6
|
#define EEPROM_VID_88EE 0xD6
|
||||||
|
@ -1613,10 +1608,6 @@ Current IOREG MAP
|
||||||
#define EEPROM_Default_CrystalCap_88E 0x20
|
#define EEPROM_Default_CrystalCap_88E 0x20
|
||||||
#define EEPROM_Default_ThermalMeter_88E 0x18
|
#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
|
//New EFUSE deafult value
|
||||||
#define EEPROM_DEFAULT_24G_INDEX 0x2D
|
#define EEPROM_DEFAULT_24G_INDEX 0x2D
|
||||||
#define EEPROM_DEFAULT_24G_HT20_DIFF 0X02
|
#define EEPROM_DEFAULT_24G_HT20_DIFF 0X02
|
||||||
|
|
|
@ -130,11 +130,6 @@ struct eeprom_priv
|
||||||
u8 EepromOrEfuse;
|
u8 EepromOrEfuse;
|
||||||
|
|
||||||
u8 efuse_eeprom_data[HWSET_MAX_SIZE_512]; //92C:256bytes, 88E:512bytes, we use union set (512bytes)
|
u8 efuse_eeprom_data[HWSET_MAX_SIZE_512]; //92C:256bytes, 88E:512bytes, we use union set (512bytes)
|
||||||
|
|
||||||
#ifdef CONFIG_RF_GAIN_OFFSET
|
|
||||||
u8 EEPROMRFGainOffset;
|
|
||||||
u8 EEPROMRFGainVal;
|
|
||||||
#endif //CONFIG_RF_GAIN_OFFSET
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void eeprom_write16(struct adapter *padapter, u16 reg, u16 data);
|
extern void eeprom_write16(struct adapter *padapter, u16 reg, u16 data);
|
||||||
|
|
|
@ -37,12 +37,6 @@
|
||||||
#include <rtw_br_ext.h>
|
#include <rtw_br_ext.h>
|
||||||
#endif /* CONFIG_BR_EXT */
|
#endif /* CONFIG_BR_EXT */
|
||||||
|
|
||||||
#ifdef CONFIG_RF_GAIN_OFFSET
|
|
||||||
#define RF_GAIN_OFFSET_ON BIT4
|
|
||||||
#define REG_RF_BB_GAIN_OFFSET 0x55
|
|
||||||
#define RF_GAIN_OFFSET_MASK 0xfffff
|
|
||||||
#endif /* CONFIG_RF_GAIN_OFFSET */
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
|
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
|
||||||
MODULE_AUTHOR("Realtek Semiconductor Corp.");
|
MODULE_AUTHOR("Realtek Semiconductor Corp.");
|
||||||
|
@ -1233,10 +1227,6 @@ int _netdev_open(struct net_device *pnetdev)
|
||||||
|
|
||||||
DBG_871X("MAC Address = "MAC_FMT"\n", MAC_ARG(pnetdev->dev_addr));
|
DBG_871X("MAC Address = "MAC_FMT"\n", MAC_ARG(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);
|
status=rtw_start_drv_threads(padapter);
|
||||||
if(status ==_FAIL)
|
if(status ==_FAIL)
|
||||||
{
|
{
|
||||||
|
@ -1330,20 +1320,13 @@ static int ips_netdrv_open(struct adapter *padapter)
|
||||||
/* padapter->bup = true; */
|
/* padapter->bup = true; */
|
||||||
|
|
||||||
status = rtw_hal_init(padapter);
|
status = rtw_hal_init(padapter);
|
||||||
if (status ==_FAIL)
|
if (status ==_FAIL) {
|
||||||
{
|
|
||||||
RT_TRACE(_module_os_intfs_c_,_drv_err_,("ips_netdrv_open(): Can't init h/w!\n"));
|
RT_TRACE(_module_os_intfs_c_,_drv_err_,("ips_netdrv_open(): Can't init h/w!\n"));
|
||||||
goto netdev_open_error;
|
goto netdev_open_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_RF_GAIN_OFFSET
|
|
||||||
rtw_bb_rf_gain_offset(padapter);
|
|
||||||
#endif /* CONFIG_RF_GAIN_OFFSET */
|
|
||||||
|
|
||||||
if(padapter->intf_start)
|
if(padapter->intf_start)
|
||||||
{
|
|
||||||
padapter->intf_start(padapter);
|
padapter->intf_start(padapter);
|
||||||
}
|
|
||||||
|
|
||||||
rtw_set_pwr_state_check_timer(adapter_to_pwrctl(padapter));
|
rtw_set_pwr_state_check_timer(adapter_to_pwrctl(padapter));
|
||||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer,5000);
|
_set_timer(&padapter->mlmepriv.dynamic_chk_timer,5000);
|
||||||
|
@ -1410,37 +1393,6 @@ void rtw_ips_dev_unload(struct adapter *padapter)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_RF_GAIN_OFFSET
|
|
||||||
void rtw_bb_rf_gain_offset(struct adapter *padapter)
|
|
||||||
{
|
|
||||||
u8 value = padapter->eeprompriv.EEPROMRFGainOffset;
|
|
||||||
u8 tmp = 0x3e;
|
|
||||||
u32 res;
|
|
||||||
|
|
||||||
DBG_871X("+%s value: 0x%02x+\n", __func__, value);
|
|
||||||
|
|
||||||
if (value & RF_GAIN_OFFSET_ON) {
|
|
||||||
/* DBG_871X("Offset RF Gain.\n"); */
|
|
||||||
/* DBG_871X("Offset RF Gain. padapter->eeprompriv.EEPROMRFGainVal=0x%x\n",padapter->eeprompriv.EEPROMRFGainVal); */
|
|
||||||
if(padapter->eeprompriv.EEPROMRFGainVal != 0xff){
|
|
||||||
res = rtw_hal_read_rfreg(padapter, RF_PATH_A, REG_RF_BB_GAIN_OFFSET, 0xffffffff);
|
|
||||||
DBG_871X("REG_RF_BB_GAIN_OFFSET=%x \n",res);
|
|
||||||
res &= 0xfff87fff;
|
|
||||||
res |= (padapter->eeprompriv.EEPROMRFGainVal & 0x0f)<< 15;
|
|
||||||
DBG_871X("write REG_RF_BB_GAIN_OFFSET=%x \n",res);
|
|
||||||
rtw_hal_write_rfreg(padapter, RF_PATH_A, REG_RF_BB_GAIN_OFFSET, RF_GAIN_OFFSET_MASK, res);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* DBG_871X("Offset RF Gain. padapter->eeprompriv.EEPROMRFGainVal=0x%x != 0xff, didn't run Kfree\n",padapter->eeprompriv.EEPROMRFGainVal); */
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* DBG_871X("Using the default RF gain.\n"); */
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_RF_GAIN_OFFSET */
|
|
||||||
|
|
||||||
int pm_netdev_open(struct net_device *pnetdev,u8 bnormal)
|
int pm_netdev_open(struct net_device *pnetdev,u8 bnormal)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
Loading…
Reference in a new issue