mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl_8188eu: Remove CONFIG_MMC_PM_KEEP_POWER, and CONFIG_WOWLAN
These parameters are not defined. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
2a75f42bff
commit
ed192682fe
20 changed files with 9 additions and 1146 deletions
|
@ -7809,97 +7809,6 @@ FREE_EXT:
|
|||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
static int rtw_wowlan_ctrl(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
struct wowlan_ioctl_param poidparam;
|
||||
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct sta_info *psta = NULL;
|
||||
int ret = 0;
|
||||
u32 start_time = rtw_get_current_time();
|
||||
poidparam.subcode = 0;
|
||||
|
||||
DBG_871X("+rtw_wowlan_ctrl: %s\n", extra);
|
||||
|
||||
if(pwrctrlpriv->bSupportRemoteWakeup==false){
|
||||
ret = -EPERM;
|
||||
DBG_871X("+rtw_wowlan_ctrl: Device didn't support the remote wakeup!!\n");
|
||||
goto _rtw_wowlan_ctrl_exit_free;
|
||||
}
|
||||
|
||||
if (!check_fwstate(pmlmepriv, _FW_LINKED) &&
|
||||
check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
||||
DBG_871X("[%s] WARNING: Please Connect With AP First!!\n", __func__);
|
||||
goto _rtw_wowlan_ctrl_exit_free;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp( extra, "enable", 6 )) {
|
||||
|
||||
while (pwrctrlpriv->bips_processing == true)
|
||||
rtw_msleep_os(1);
|
||||
|
||||
rtw_cancel_all_timer(padapter);
|
||||
|
||||
padapter->bDriverStopped = true; /* for stop thread */
|
||||
rtw_stop_drv_threads(padapter);
|
||||
padapter->bDriverStopped = false; /* for 32k command */
|
||||
|
||||
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0);
|
||||
rtw_hal_disable_interrupt(padapter); /* It need wait for leaving 32K. */
|
||||
|
||||
/* 2.1 clean interupt */
|
||||
if (padapter->HalFunc.clear_interrupt)
|
||||
padapter->HalFunc.clear_interrupt(padapter);
|
||||
|
||||
poidparam.subcode = WOWLAN_ENABLE;
|
||||
|
||||
rtw_hal_set_hwreg(padapter,HW_VAR_WOWLAN,(u8 *)&poidparam);
|
||||
} else if (_rtw_memcmp( extra, "disable", 6 )) {
|
||||
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0);
|
||||
pwrctrlpriv->bFwCurrentInPSMode = false;
|
||||
|
||||
rtw_hal_disable_interrupt(padapter);
|
||||
|
||||
if (padapter->HalFunc.clear_interrupt)
|
||||
padapter->HalFunc.clear_interrupt(padapter);
|
||||
|
||||
poidparam.subcode = WOWLAN_DISABLE;
|
||||
|
||||
rtw_hal_set_hwreg(padapter,HW_VAR_WOWLAN,(u8 *)&poidparam);
|
||||
|
||||
psta = rtw_get_stainfo(&padapter->stapriv, get_bssid(&padapter->mlmepriv));
|
||||
if (psta) {
|
||||
set_sta_rate(padapter, psta);
|
||||
}
|
||||
|
||||
padapter->bDriverStopped = false;
|
||||
DBG_871X("%s: wowmode resuming, DriverStopped:%d\n", __func__, padapter->bDriverStopped);
|
||||
rtw_start_drv_threads(padapter);
|
||||
|
||||
rtw_hal_enable_interrupt(padapter);
|
||||
|
||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||
pwrctrlpriv->bips_processing = false;
|
||||
rtw_set_pwr_state_check_timer(pwrctrlpriv);
|
||||
|
||||
} else {
|
||||
DBG_871X("[%s] Invalid Parameter.\n", __func__);
|
||||
goto _rtw_wowlan_ctrl_exit_free;
|
||||
}
|
||||
/* mutex_lock(&ioctl_mutex); */
|
||||
_rtw_wowlan_ctrl_exit_free:
|
||||
DBG_871X("-rtw_wowlan_ctrl( subcode = %d)\n", poidparam.subcode);
|
||||
DBG_871X_LEVEL(_drv_always_, "%s in %d ms\n", __func__,
|
||||
rtw_get_passing_time_ms(start_time));
|
||||
_rtw_wowlan_ctrl_exit:
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
|
||||
static int rtw_pm_set(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
|
@ -10277,10 +10186,6 @@ static const struct iw_priv_args rtw_private_args[] = {
|
|||
SIOCIWFIRSTPRIV + 0x1D,
|
||||
IW_PRIV_TYPE_CHAR | 40, IW_PRIV_TYPE_CHAR | 0x7FF, "test"
|
||||
},
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
{ MP_WOW_ENABLE , IW_PRIV_TYPE_CHAR | 1024, 0, "wow_enable" }, /* set */
|
||||
#endif
|
||||
};
|
||||
|
||||
static iw_handler rtw_private_handler[] =
|
||||
|
|
|
@ -942,23 +942,10 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
|
|||
#endif /* CONFIG_BR_EXT */
|
||||
|
||||
exit:
|
||||
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("-rtw_init_drv_sw\n"));
|
||||
|
||||
;
|
||||
|
||||
return ret8;
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
void rtw_cancel_dynamic_chk_timer(struct adapter *padapter)
|
||||
{
|
||||
_cancel_timer_ex(&padapter->mlmepriv.dynamic_chk_timer);
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel dynamic_chk_timer! \n"));
|
||||
}
|
||||
#endif
|
||||
|
||||
void rtw_cancel_all_timer(struct adapter *padapter)
|
||||
{
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_cancel_all_timer\n"));
|
||||
|
@ -966,9 +953,6 @@ void rtw_cancel_all_timer(struct adapter *padapter)
|
|||
_cancel_timer_ex(&padapter->mlmepriv.assoc_timer);
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel association timer complete! \n"));
|
||||
|
||||
/* _cancel_timer_ex(&padapter->securitypriv.tkip_timer); */
|
||||
/* RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel tkip_timer! \n")); */
|
||||
|
||||
_cancel_timer_ex(&padapter->mlmepriv.scan_to_timer);
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel scan_to_timer! \n"));
|
||||
|
||||
|
|
|
@ -469,26 +469,12 @@ void rtw_dev_unload(struct adapter *padapter)
|
|||
/* s5. */
|
||||
if(padapter->bSurpriseRemoved == false)
|
||||
{
|
||||
/* DBG_871X("r871x_dev_unload()->rtl871x_hal_deinit()\n"); */
|
||||
#ifdef CONFIG_WOWLAN
|
||||
if((adapter_to_pwrctl(padapter)->bSupportRemoteWakeup==true)&&(adapter_to_pwrctl(padapter)->wowlan_mode==true)){
|
||||
DBG_871X("%s bSupportWakeOnWlan==true do not run rtw_hal_deinit()\n",__FUNCTION__);
|
||||
}
|
||||
else
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
{
|
||||
rtw_hal_deinit(padapter);
|
||||
}
|
||||
rtw_hal_deinit(padapter);
|
||||
padapter->bSurpriseRemoved = true;
|
||||
}
|
||||
|
||||
padapter->bup = false;
|
||||
#ifdef CONFIG_WOWLAN
|
||||
padapter->hw_init_completed=false;
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("r871x_dev_unload():padapter->bup == false\n" ));
|
||||
}
|
||||
|
||||
|
@ -656,77 +642,6 @@ error_exit:
|
|||
return (-1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
static void rtw_suspend_wow(struct adapter *padapter)
|
||||
{
|
||||
struct net_device *pnetdev = padapter->pnetdev;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
struct wowlan_ioctl_param poidparam;
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
pwrpriv->wowlan_mode = true;
|
||||
else
|
||||
pwrpriv->wowlan_mode = false;
|
||||
|
||||
rtw_cancel_all_timer(padapter);
|
||||
LeaveAllPowerSaveMode(padapter);
|
||||
|
||||
rtw_stop_cmd_thread(padapter);
|
||||
|
||||
|
||||
/* padapter->net_closed = true; */
|
||||
/* s1. */
|
||||
if(pnetdev)
|
||||
{
|
||||
netif_carrier_off(pnetdev);
|
||||
rtw_netif_stop_queue(pnetdev);
|
||||
}
|
||||
|
||||
if(pwrpriv->bSupportRemoteWakeup==true && pwrpriv->wowlan_mode==true){
|
||||
/* set H2C command */
|
||||
poidparam.subcode=WOWLAN_ENABLE;
|
||||
padapter->HalFunc.SetHwRegHandler(padapter,HW_VAR_WOWLAN,(u8 *)&poidparam);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* s2. */
|
||||
rtw_disassoc_cmd(padapter, 0, false);
|
||||
}
|
||||
|
||||
|
||||
if(check_fwstate(pmlmepriv, WIFI_STATION_STATE) && check_fwstate(pmlmepriv, _FW_LINKED)&& rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
{
|
||||
/* DBG_871X("%s:%d assoc_ssid:%s\n", __FUNCTION__, __LINE__, pmlmepriv->assoc_ssid.Ssid); */
|
||||
DBG_871X("%s:%d %s(" MAC_FMT "), length:%d assoc_ssid.length:%d\n",__FUNCTION__, __LINE__,
|
||||
pmlmepriv->cur_network.network.Ssid.Ssid,
|
||||
MAC_ARG(pmlmepriv->cur_network.network.MacAddress),
|
||||
pmlmepriv->cur_network.network.Ssid.SsidLength,
|
||||
pmlmepriv->assoc_ssid.SsidLength);
|
||||
|
||||
rtw_set_roaming(padapter, 1);
|
||||
}
|
||||
/* s2-2. indicate disconnect to os */
|
||||
rtw_indicate_disconnect(padapter);
|
||||
/* s2-3. */
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if(!pwrpriv->bInternalAutoSuspend )
|
||||
#endif
|
||||
/* s2-4. */
|
||||
rtw_free_network_queue(padapter, true);
|
||||
|
||||
rtw_dev_unload(padapter);
|
||||
|
||||
if(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
|
||||
rtw_indicate_scan_done(padapter, 1);
|
||||
|
||||
/* if(check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) */
|
||||
/* rtw_indicate_disconnect(padapter); */
|
||||
|
||||
}
|
||||
#endif
|
||||
static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
||||
{
|
||||
struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf);
|
||||
|
@ -774,11 +689,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
|||
pwrpriv->bInSuspend = true;
|
||||
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
#ifdef CONFIG_WOWLAN
|
||||
rtw_suspend_wow(padapter);
|
||||
#else
|
||||
rtw_suspend_common(padapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
pwrpriv->rf_pwrstate = rf_off;
|
||||
|
@ -786,14 +697,13 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
|||
#endif
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
||||
|
||||
exit:
|
||||
DBG_871X("<=== %s return %d.............. in %dms\n", __FUNCTION__
|
||||
, ret, rtw_get_passing_time_ms(start_time));
|
||||
|
||||
;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rtw_resume(struct usb_interface *pusb_intf)
|
||||
{
|
||||
struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf);
|
||||
|
@ -808,11 +718,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
|
|||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
rtw_resume_in_workqueue(pwrpriv);
|
||||
#else
|
||||
if (rtw_is_earlysuspend_registered(pwrpriv)
|
||||
#ifdef CONFIG_WOWLAN
|
||||
&& !pwrpriv->wowlan_mode
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
) {
|
||||
if (rtw_is_earlysuspend_registered(pwrpriv)) {
|
||||
/* jeff: bypass resume here, do in late_resume */
|
||||
rtw_set_do_late_resume(pwrpriv, true);
|
||||
} else {
|
||||
|
@ -1234,10 +1140,6 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
|
|||
#endif
|
||||
rtw_cancel_all_timer(if1);
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
pwrctl->wowlan_mode=false;
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
|
||||
rtw_dev_unload(if1);
|
||||
|
||||
DBG_871X("+r871xu_dev_remove, hw_init_completed=%d\n", if1->hw_init_completed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue