rtl8188eu: Remove configuration variables *ANDROID* and associated dead code

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-12 10:54:26 -05:00
parent acda213bd2
commit 4c57c6047a
8 changed files with 12 additions and 172 deletions

View file

@ -1914,11 +1914,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
}
#endif //CONFIG_P2P
wait_status = _FW_UNDER_SURVEY
#ifndef CONFIG_ANDROID
|_FW_UNDER_LINKING
#endif
;
wait_status = _FW_UNDER_SURVEY | _FW_UNDER_LINKING;
while (check_fwstate(pmlmepriv, wait_status) == true)
{
@ -2709,7 +2705,6 @@ static int rtw_wx_set_auth(struct net_device *dev,
}
case IW_AUTH_80211_AUTH_ALG:
#if defined(CONFIG_ANDROID) || 1
/*
* It's the starting point of a link layer connection using wpa_supplicant
*/
@ -2720,7 +2715,6 @@ static int rtw_wx_set_auth(struct net_device *dev,
rtw_indicate_disconnect(padapter);
rtw_free_assoc_resources(padapter, 1);
}
#endif
ret = wpa_set_auth_algs(dev, (u32)param->value);
break;
case IW_AUTH_WPA_ENABLED:
@ -7809,80 +7803,6 @@ static int rtw_wx_set_priv(struct net_device *dev,
goto FREE_EXT;
}
#ifdef CONFIG_ANDROID
//DBG_88E("rtw_wx_set_priv: %s req=%s\n", dev->name, ext);
i = rtw_android_cmdstr_to_num(ext);
switch (i) {
case ANDROID_WIFI_CMD_START :
indicate_wx_custom_event(padapter, "START");
break;
case ANDROID_WIFI_CMD_STOP :
indicate_wx_custom_event(padapter, "STOP");
break;
case ANDROID_WIFI_CMD_RSSI :
{
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct wlan_network *pcur_network = &pmlmepriv->cur_network;
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
sprintf(ext, "%s rssi %d", pcur_network->network.Ssid.Ssid, padapter->recvpriv.rssi);
} else {
sprintf(ext, "OK");
}
}
break;
case ANDROID_WIFI_CMD_LINKSPEED :
{
u16 mbps = rtw_get_cur_max_rate(padapter)/10;
sprintf(ext, "LINKSPEED %d", mbps);
}
break;
case ANDROID_WIFI_CMD_MACADDR :
sprintf(ext, "MACADDR = %pM", (dev->dev_addr));
break;
case ANDROID_WIFI_CMD_SCAN_ACTIVE :
{
//rtw_set_scan_mode(padapter, SCAN_ACTIVE);
sprintf(ext, "OK");
}
break;
case ANDROID_WIFI_CMD_SCAN_PASSIVE :
{
//rtw_set_scan_mode(padapter, SCAN_PASSIVE);
sprintf(ext, "OK");
}
break;
case ANDROID_WIFI_CMD_COUNTRY :
{
char country_code[10];
sscanf(ext, "%*s %s", country_code);
rtw_set_country(padapter, country_code);
sprintf(ext, "OK");
}
break;
default :
#ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV
DBG_88E("%s: %s unknowned req=%s\n", __func__,
dev->name, ext_dbg);
#endif
sprintf(ext, "OK");
}
if (copy_to_user(dwrq->pointer, ext, min(dwrq->length, (u16)(strlen(ext)+1))))
ret = -EFAULT;
#ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV
DBG_88E("%s: %s req=%s rep=%s dwrq->length=%d, strlen(ext)+1=%d\n", __func__,
dev->name, ext_dbg ,ext, dwrq->length, (u16)(strlen(ext)+1));
#endif
#endif //end of CONFIG_ANDROID
FREE_EXT:
rtw_vmfree(ext, len);
@ -7890,11 +7810,7 @@ FREE_EXT:
rtw_vmfree(ext_dbg, len);
#endif
//DBG_88E("rtw_wx_set_priv: (SIOCSIWPRIV) %s ret=%d\n",
// dev->name, ret);
return ret;
}
static int rtw_pm_set(struct net_device *dev,

View file

@ -1647,7 +1647,6 @@ static int netdev_close(struct net_device *pnetdev)
rtw_netif_stop_queue(pnetdev);
}
#ifndef CONFIG_ANDROID
//s2.
LeaveAllPowerSaveMode(padapter);
rtw_disassoc_cmd(padapter, 500, false);
@ -1657,7 +1656,6 @@ static int netdev_close(struct net_device *pnetdev)
rtw_free_assoc_resources(padapter, 1);
//s2-4.
rtw_free_network_queue(padapter,true);
#endif
// Close LED
rtw_led_control(padapter, LED_CTL_POWER_OFF);
}

View file

@ -331,18 +331,12 @@ void rtw_yield_os(void)
#ifdef CONFIG_WAKELOCK
static struct wake_lock rtw_suspend_lock;
#elif defined(CONFIG_ANDROID_POWER)
static android_suspend_lock_t rtw_suspend_lock ={
.name = RTW_SUSPEND_LOCK_NAME
};
#endif
inline void rtw_suspend_lock_init(void)
{
#ifdef CONFIG_WAKELOCK
wake_lock_init(&rtw_suspend_lock, WAKE_LOCK_SUSPEND, RTW_SUSPEND_LOCK_NAME);
#elif defined(CONFIG_ANDROID_POWER)
android_init_suspend_lock(&rtw_suspend_lock);
#endif
}
@ -350,8 +344,6 @@ inline void rtw_suspend_lock_uninit(void)
{
#ifdef CONFIG_WAKELOCK
wake_lock_destroy(&rtw_suspend_lock);
#elif defined(CONFIG_ANDROID_POWER)
android_uninit_suspend_lock(&rtw_suspend_lock);
#endif
}
@ -359,11 +351,9 @@ inline void rtw_lock_suspend(void)
{
#ifdef CONFIG_WAKELOCK
wake_lock(&rtw_suspend_lock);
#elif defined(CONFIG_ANDROID_POWER)
android_lock_suspend(&rtw_suspend_lock);
#endif
#if defined(CONFIG_WAKELOCK) || defined(CONFIG_ANDROID_POWER)
#if defined(CONFIG_WAKELOCK)
//DBG_88E("####%s: suspend_lock_count:%d####\n", __func__, rtw_suspend_lock.stat.count);
#endif
}
@ -372,8 +362,6 @@ inline void rtw_unlock_suspend(void)
{
#ifdef CONFIG_WAKELOCK
wake_unlock(&rtw_suspend_lock);
#elif defined(CONFIG_ANDROID_POWER)
android_unlock_suspend(&rtw_suspend_lock);
#endif
}
@ -382,8 +370,6 @@ inline void rtw_lock_suspend_timeout(long timeout)
{
#ifdef CONFIG_WAKELOCK
wake_lock_timeout(&rtw_suspend_lock, timeout);
#elif defined(CONFIG_ANDROID_POWER)
android_lock_suspend_auto_expire(&rtw_suspend_lock, timeout);
#endif
}
#endif //CONFIG_WOWLAN

View file

@ -760,7 +760,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
} else {
#ifdef CONFIG_RESUME_IN_WORKQUEUE
rtw_resume_in_workqueue(pwrpriv);
#elif defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
#elif defined(CONFIG_HAS_EARLYSUSPEND)
#ifdef CONFIG_WOWLAN
if (rtw_is_earlysuspend_registered(pwrpriv) &&
!padapter->pwrctrlpriv.wowlan_mode) {
@ -1457,7 +1457,7 @@ _func_enter_;
padapter->hw_init_completed = false;
}*/
#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
#if defined(CONFIG_HAS_EARLYSUSPEND)
rtw_unregister_early_suspend(&padapter->pwrctrlpriv);
#endif