mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: Remove dead code associated with CONFIG_PLATFORM_INTEL_BYT
This variable is never defined. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
53ed527078
commit
a2c8a1deda
4 changed files with 0 additions and 141 deletions
69
os_intfs.c
69
os_intfs.c
|
@ -540,9 +540,6 @@ MODULE_PARM_DESC(rtw_trx_share_mode, "TRx FIFO Shared");
|
|||
int _netdev_open(struct net_device *pnetdev);
|
||||
int netdev_open(struct net_device *pnetdev);
|
||||
static int netdev_close(struct net_device *pnetdev);
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
extern int rtw_sdio_set_power(int on);
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
/* enable MCC mode or not */
|
||||
|
@ -2182,32 +2179,6 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
|
|||
if (!primary_padapter)
|
||||
goto _netdev_virtual_iface_open_error;
|
||||
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
if (padapter->bup == false) {
|
||||
u8 mac[ETH_ALEN];
|
||||
|
||||
/* get mac address from primary_padapter */
|
||||
if (primary_padapter->bup == false)
|
||||
rtw_macaddr_cfg(adapter_mac_addr(primary_padapter), get_hal_mac_addr(primary_padapter));
|
||||
|
||||
memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
|
||||
|
||||
/*
|
||||
* If the BIT1 is 0, the address is universally administered.
|
||||
* If it is 1, the address is locally administered
|
||||
*/
|
||||
mac[0] |= BIT(1);
|
||||
|
||||
memcpy(adapter_mac_addr(padapter), mac, ETH_ALEN);
|
||||
|
||||
#ifdef CONFIG_MI_WITH_MBSSID_CAM
|
||||
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
|
||||
#endif
|
||||
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
|
||||
memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
}
|
||||
#endif /*CONFIG_PLATFORM_INTEL_BYT*/
|
||||
|
||||
if (primary_padapter->bup == false || !rtw_is_hw_init_completed(primary_padapter))
|
||||
_netdev_open(primary_padapter->pnetdev);
|
||||
|
||||
|
@ -2687,25 +2658,12 @@ int _netdev_open(struct net_device *pnetdev)
|
|||
|
||||
padapter->netif_up = true;
|
||||
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
rtw_sdio_set_power(1);
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
|
||||
if (pwrctrlpriv->ps_flag == true) {
|
||||
padapter->net_closed = false;
|
||||
goto netdev_open_normal_process;
|
||||
}
|
||||
|
||||
if (padapter->bup == false) {
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter));
|
||||
#ifdef CONFIG_MI_WITH_MBSSID_CAM
|
||||
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
|
||||
#endif
|
||||
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
|
||||
memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
|
||||
rtw_clr_surprise_removed(padapter);
|
||||
rtw_clr_drv_stopped(padapter);
|
||||
|
||||
|
@ -2742,12 +2700,6 @@ int _netdev_open(struct net_device *pnetdev)
|
|||
|
||||
padapter->bup = true;
|
||||
pwrctrlpriv->bips_processing = false;
|
||||
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_IpsNotify(padapter, IPS_NONE);
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
}
|
||||
padapter->net_closed = false;
|
||||
|
||||
|
@ -2965,7 +2917,6 @@ static int netdev_close(struct net_device *pnetdev)
|
|||
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
|
||||
RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup);
|
||||
#ifndef CONFIG_PLATFORM_INTEL_BYT
|
||||
if (pwrctl->bInternalAutoSuspend == true) {
|
||||
/* rtw_pwr_wakeup(padapter); */
|
||||
if (pwrctl->rf_pwrstate == rf_off)
|
||||
|
@ -3034,26 +2985,6 @@ static int netdev_close(struct net_device *pnetdev)
|
|||
else
|
||||
RTW_INFO("CONFIG_BT_COEXIST: VIRTUAL_ADAPTER\n");
|
||||
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||
#else /* !CONFIG_PLATFORM_INTEL_BYT */
|
||||
|
||||
if (pwrctl->bInSuspend == true) {
|
||||
RTW_INFO("+871x_drv - drv_close, bInSuspend=%d\n", pwrctl->bInSuspend);
|
||||
return 0;
|
||||
}
|
||||
|
||||
rtw_scan_abort(padapter); /* stop scanning process before wifi is going to down */
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_cfg80211_wait_scan_req_empty(padapter, 200);
|
||||
#endif
|
||||
|
||||
RTW_INFO("netdev_close, bips_processing=%d\n", pwrctl->bips_processing);
|
||||
while (pwrctl->bips_processing == true) /* waiting for ips_processing done before call rtw_dev_unload() */
|
||||
rtw_msleep_os(1);
|
||||
|
||||
rtw_dev_unload(padapter);
|
||||
rtw_sdio_set_power(0);
|
||||
|
||||
#endif /* !CONFIG_PLATFORM_INTEL_BYT */
|
||||
|
||||
RTW_INFO("-871x_drv - drv_close, bup=%d\n", padapter->bup);
|
||||
|
||||
|
|
|
@ -1036,13 +1036,9 @@ static int wifi_probe(struct platform_device *pdev)
|
|||
wifi_irqres->start, wifi_wake_gpio);
|
||||
|
||||
if (wifi_wake_gpio > 0) {
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
wifi_configure_gpio();
|
||||
#else /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
gpio_request(wifi_wake_gpio, "oob_irq");
|
||||
gpio_direction_input(wifi_wake_gpio);
|
||||
oob_irq = gpio_to_irq(wifi_wake_gpio);
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
printk("%s oob_irq:%d\n", __func__, oob_irq);
|
||||
} else if (wifi_irqres) {
|
||||
oob_irq = wifi_irqres->start;
|
||||
|
@ -1217,34 +1213,7 @@ static void wifi_del_dev(void)
|
|||
#endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */
|
||||
|
||||
#ifdef CONFIG_GPIO_WAKEUP
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
int wifi_configure_gpio(void)
|
||||
{
|
||||
if (gpio_request(oob_gpio, "oob_irq")) {
|
||||
RTW_INFO("## %s Cannot request GPIO\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
gpio_export(oob_gpio, 0);
|
||||
if (gpio_direction_input(oob_gpio)) {
|
||||
RTW_INFO("## %s Cannot set GPIO direction input\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
oob_irq = gpio_to_irq(oob_gpio);
|
||||
if (oob_irq < 0) {
|
||||
RTW_INFO("## %s Cannot convert GPIO to IRQ\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
RTW_INFO("## %s OOB_IRQ=%d\n", __func__, oob_irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
void wifi_free_gpio(unsigned int gpio)
|
||||
{
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
if (gpio)
|
||||
gpio_free(gpio);
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
}
|
||||
#endif /* CONFIG_GPIO_WAKEUP */
|
||||
|
|
|
@ -89,9 +89,6 @@ static void rtw_android_wifictrl_func_del(void) {}
|
|||
#endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */
|
||||
|
||||
#ifdef CONFIG_GPIO_WAKEUP
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
int wifi_configure_gpio(void);
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
void wifi_free_gpio(unsigned int gpio);
|
||||
#endif /* CONFIG_GPIO_WAKEUP */
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
#define _IEEE80211_C
|
||||
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
#include <drv_types.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
|
@ -1267,35 +1264,6 @@ u8 convert_ip_addr(u8 hch, u8 mch, u8 lch)
|
|||
return (key_char2num(hch) * 100) + (key_char2num(mch) * 10) + key_char2num(lch);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
#define MAC_ADDRESS_LEN 12
|
||||
|
||||
int rtw_get_mac_addr_intel(unsigned char *buf)
|
||||
{
|
||||
int ret = 0;
|
||||
int i;
|
||||
struct file *fp = NULL;
|
||||
mm_segment_t oldfs;
|
||||
unsigned char c_mac[MAC_ADDRESS_LEN];
|
||||
char fname[] = "/config/wifi/mac.txt";
|
||||
int jj, kk;
|
||||
|
||||
RTW_INFO("%s Enter\n", __func__);
|
||||
|
||||
ret = rtw_retrieve_from_file(fname, c_mac, MAC_ADDRESS_LEN);
|
||||
if (ret < MAC_ADDRESS_LEN)
|
||||
return -1;
|
||||
|
||||
for (jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 2)
|
||||
buf[jj] = key_2char2num(c_mac[kk], c_mac[kk + 1]);
|
||||
|
||||
RTW_INFO("%s: read from file mac address: "MAC_FMT"\n",
|
||||
__func__, MAC_ARG(buf));
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||
|
||||
/*
|
||||
* Description:
|
||||
* rtw_check_invalid_mac_address:
|
||||
|
@ -1368,12 +1336,6 @@ void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr)
|
|||
goto err_chk;
|
||||
}
|
||||
|
||||
/* platform specified */
|
||||
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||
if (rtw_get_mac_addr_intel(mac) == 0)
|
||||
goto err_chk;
|
||||
#endif
|
||||
|
||||
/* Use the mac address stored in the Efuse */
|
||||
if (hw_mac_addr) {
|
||||
memcpy(mac, hw_mac_addr, ETH_ALEN);
|
||||
|
|
Loading…
Reference in a new issue