mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-25 14:03:40 +00:00
rtl8188eu: Remove CONFIG_EFUSE_CONFIG_FILE - not defined
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
b87f3301ed
commit
3656f3fcc9
1 changed files with 0 additions and 126 deletions
|
@ -30,11 +30,6 @@
|
|||
#include <usb_hal.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
|
||||
#define HAL_MAC_ENABLE 0
|
||||
#define HAL_BB_ENABLE 0
|
||||
|
@ -1799,119 +1794,6 @@ static void _ReadPSSetting(PADAPTER Adapter, u8 *PROMContent, u8 AutoloadFail)
|
|||
{
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
||||
static u32 Hal_readPGDataFromConfigFile(
|
||||
PADAPTER 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_88E("Error, Efuse configure file doesn't exist.\n");
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
DBG_88E("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_88E("%02X\n", PROMContent[i]);
|
||||
}
|
||||
DBG_88E("\n");
|
||||
set_fs(fs);
|
||||
|
||||
filp_close(fp, NULL);
|
||||
|
||||
pEEPROM->bloadfile_fail_flag = false;
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
Hal_ReadMACAddrFromFile_8188EU(
|
||||
PADAPTER 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};
|
||||
|
||||
_rtw_memset(source_addr, 0, 18);
|
||||
_rtw_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_88E("Error, wifi mac address file doesn't exist.\n");
|
||||
} else {
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
DBG_88E("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_88E("%02x\n", pEEPROM->mac_addr[i]);
|
||||
}
|
||||
DBG_88E("\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_88E("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
|
||||
readAdapterInfo_8188EU(
|
||||
PADAPTER padapter
|
||||
|
@ -1922,11 +1804,7 @@ readAdapterInfo_8188EU(
|
|||
/* parse the eeprom/efuse content */
|
||||
Hal_EfuseParseIDCode88E(padapter, pEEPROM->efuse_eeprom_data);
|
||||
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);
|
||||
#endif /* CONFIG_EFUSE_CONFIG_FILE */
|
||||
|
||||
Hal_ReadPowerSavingMode88E(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
||||
Hal_ReadTxPowerInfo88E(padapter, pEEPROM->efuse_eeprom_data, pEEPROM->bautoload_fail_flag);
|
||||
|
@ -1963,11 +1841,7 @@ static void _ReadPROMContent(
|
|||
DBG_88E("Boot from %s, Autoload %s !\n", (pEEPROM->EepromOrEfuse ? "EEPROM" : "EFUSE"),
|
||||
(pEEPROM->bautoload_fail_flag ? "Fail" : "OK") );
|
||||
|
||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
||||
Hal_readPGDataFromConfigFile(Adapter);
|
||||
#else /* CONFIG_EFUSE_CONFIG_FILE */
|
||||
Hal_InitPGData88E(Adapter);
|
||||
#endif /* CONFIG_EFUSE_CONFIG_FILE */
|
||||
readAdapterInfo_8188EU(Adapter);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue