Remove dead code associated with CONFIG_PLATFORM_INTEL_BYT

This commit is contained in:
kimocoder 2023-05-02 01:28:48 +02:00
parent 0c3d4b326c
commit 8cb23d8f91
6 changed files with 0 additions and 144 deletions

View File

@ -869,7 +869,6 @@ endif
ifeq ($(CONFIG_PLATFORM_ANDROID_INTEL_X86), y) ifeq ($(CONFIG_PLATFORM_ANDROID_INTEL_X86), y)
EXTRA_CFLAGS += -DCONFIG_PLATFORM_ANDROID_INTEL_X86 EXTRA_CFLAGS += -DCONFIG_PLATFORM_ANDROID_INTEL_X86
EXTRA_CFLAGS += -DCONFIG_PLATFORM_INTEL_BYT
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID
EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT

View File

@ -14,9 +14,6 @@
*****************************************************************************/ *****************************************************************************/
#define _IEEE80211_C #define _IEEE80211_C
#ifdef CONFIG_PLATFORM_INTEL_BYT
#include <linux/fs.h>
#endif
#include <drv_types.h> #include <drv_types.h>
@ -1551,35 +1548,6 @@ u8 convert_ip_addr(u8 hch, u8 mch, u8 lch)
return (key_char2num(hch) * 100) + (key_char2num(mch) * 10) + key_char2num(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", __FUNCTION__);
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",
__FUNCTION__, MAC_ARG(buf));
return 0;
}
#endif /* CONFIG_PLATFORM_INTEL_BYT */
/* /*
* Description: * Description:
* rtw_check_invalid_mac_address: * rtw_check_invalid_mac_address:
@ -1653,12 +1621,6 @@ void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr)
goto err_chk; 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 */ /* Use the mac address stored in the Efuse */
if (hw_mac_addr) { if (hw_mac_addr) {
_rtw_memcpy(mac, hw_mac_addr, ETH_ALEN); _rtw_memcpy(mac, hw_mac_addr, ETH_ALEN);

View File

@ -103,11 +103,6 @@ static inline void rtw_android_wifictrl_func_del(void) {}
#endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */ #endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */
#ifdef CONFIG_GPIO_WAKEUP #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); void wifi_free_gpio(unsigned int gpio);
#endif /* CONFIG_GPIO_WAKEUP */ #endif /* CONFIG_GPIO_WAKEUP */
#endif /* __RTW_ANDROID_H__ */ #endif /* __RTW_ANDROID_H__ */

View File

@ -10374,7 +10374,6 @@ int rtw_wdev_alloc(_adapter *padapter, struct wiphy *wiphy)
pwdev_priv->rssi_monitor_min = 0; pwdev_priv->rssi_monitor_min = 0;
#endif #endif
exit: exit:
return ret; return ret;
} }

View File

@ -734,9 +734,6 @@ MODULE_PARM_DESC(rtw_dynamic_soml_delay, "SOML training delay");
int _netdev_open(struct net_device *pnetdev); int _netdev_open(struct net_device *pnetdev);
int netdev_open(struct net_device *pnetdev); int netdev_open(struct net_device *pnetdev);
static int netdev_close(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 #ifdef CONFIG_MCC_MODE
/* enable MCC mode or not */ /* enable MCC mode or not */
@ -2704,32 +2701,6 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
if (!primary_padapter) if (!primary_padapter)
goto _netdev_virtual_iface_open_error; 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));
_rtw_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);
_rtw_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));
dev_addr_set(pnetdev, adapter_mac_addr(padapter));
}
#endif /*CONFIG_PLATFORM_INTEL_BYT*/
if (primary_padapter->bup == _FALSE || !rtw_is_hw_init_completed(primary_padapter)) if (primary_padapter->bup == _FALSE || !rtw_is_hw_init_completed(primary_padapter))
_netdev_open(primary_padapter->pnetdev); _netdev_open(primary_padapter->pnetdev);
@ -3457,10 +3428,6 @@ int _netdev_open(struct net_device *pnetdev)
padapter->netif_up = _TRUE; padapter->netif_up = _TRUE;
#ifdef CONFIG_PLATFORM_INTEL_BYT
rtw_sdio_set_power(1);
#endif /* CONFIG_PLATFORM_INTEL_BYT */
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
if (pwrctrlpriv->ps_flag == _TRUE) { if (pwrctrlpriv->ps_flag == _TRUE) {
padapter->net_closed = _FALSE; padapter->net_closed = _FALSE;
@ -3469,15 +3436,6 @@ int _netdev_open(struct net_device *pnetdev)
#endif #endif
if (padapter->bup == _FALSE) { 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));
dev_addr_set(pnetdev, adapter_mac_addr(padapter));
#endif /* CONFIG_PLATFORM_INTEL_BYT */
rtw_clr_surprise_removed(padapter); rtw_clr_surprise_removed(padapter);
rtw_clr_drv_stopped(padapter); rtw_clr_drv_stopped(padapter);
@ -3520,11 +3478,6 @@ int _netdev_open(struct net_device *pnetdev)
padapter->bup = _TRUE; padapter->bup = _TRUE;
pwrctrlpriv->bips_processing = _FALSE; 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; padapter->net_closed = _FALSE;
@ -3863,7 +3816,6 @@ static int netdev_close(struct net_device *pnetdev)
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup); RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup);
#ifndef CONFIG_PLATFORM_INTEL_BYT
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
if (pwrctl->bInternalAutoSuspend == _TRUE) { if (pwrctl->bInternalAutoSuspend == _TRUE) {
/* rtw_pwr_wakeup(padapter); */ /* rtw_pwr_wakeup(padapter); */
@ -3936,26 +3888,6 @@ static int netdev_close(struct net_device *pnetdev)
else else
RTW_INFO("CONFIG_BT_COEXIST: VIRTUAL_ADAPTER\n"); RTW_INFO("CONFIG_BT_COEXIST: VIRTUAL_ADAPTER\n");
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #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); RTW_INFO("-871x_drv - drv_close, bup=%d\n", padapter->bup);

View File

@ -1113,13 +1113,9 @@ static int wifi_probe(struct platform_device *pdev)
(int)wifi_irqres->start, wifi_wake_gpio); (int)wifi_irqres->start, wifi_wake_gpio);
if (wifi_wake_gpio > 0) { 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_request(wifi_wake_gpio, "oob_irq");
gpio_direction_input(wifi_wake_gpio); gpio_direction_input(wifi_wake_gpio);
oob_irq = gpio_to_irq(wifi_wake_gpio); oob_irq = gpio_to_irq(wifi_wake_gpio);
#endif /* CONFIG_PLATFORM_INTEL_BYT */
RTW_INFO("%s oob_irq:%d\n", __func__, oob_irq); RTW_INFO("%s oob_irq:%d\n", __func__, oob_irq);
} else if (wifi_irqres) { } else if (wifi_irqres) {
oob_irq = wifi_irqres->start; oob_irq = wifi_irqres->start;
@ -1302,34 +1298,7 @@ static void wifi_del_dev(void)
#endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */ #endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */
#ifdef CONFIG_GPIO_WAKEUP #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", __FUNCTION__);
return -1;
}
gpio_export(oob_gpio, 0);
if (gpio_direction_input(oob_gpio)) {
RTW_INFO("## %s Cannot set GPIO direction input\n", __FUNCTION__);
return -1;
}
oob_irq = gpio_to_irq(oob_gpio);
if (oob_irq < 0) {
RTW_INFO("## %s Cannot convert GPIO to IRQ\n", __FUNCTION__);
return -1;
}
RTW_INFO("## %s OOB_IRQ=%d\n", __FUNCTION__, oob_irq);
return 0;
}
#endif /* CONFIG_PLATFORM_INTEL_BYT */
void wifi_free_gpio(unsigned int gpio) 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 */ #endif /* CONFIG_GPIO_WAKEUP */