rtl8188eu: Remove CONFIG_ACTIVE_KEEP_ALIVE_CHECK

This symbol is always defined. In addition, a number of defines that are commented
out in include/autoconf.h have been removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-02-20 20:07:27 -06:00
parent 49437ec417
commit 37a28f802f
7 changed files with 47 additions and 201 deletions

View file

@ -421,32 +421,8 @@ void expire_timeout_chk(struct adapter *padapter)
psta->expire_to--;
}
#ifndef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
#ifdef CONFIG_80211N_HT
if ( (psta->flags & WLAN_STA_HT) && (psta->htpriv.agg_enable_bitmap || psta->under_exist_checking) ) {
/* check sta by delba(addba) for 11n STA */
/* ToDo: use CCX report to check for all STAs */
/* DBG_871X("asoc check by DELBA/ADDBA! (pstapriv->expire_to=%d s)(psta->expire_to=%d s), [%02x, %d]\n", pstapriv->expire_to*2, psta->expire_to*2, psta->htpriv.agg_enable_bitmap, psta->under_exist_checking); */
if ( psta->expire_to <= (pstapriv->expire_to - 50 ) ) {
DBG_871X("asoc expire by DELBA/ADDBA! (%d s)\n", (pstapriv->expire_to-psta->expire_to)*2);
psta->under_exist_checking = 0;
psta->expire_to = 0;
} else if ( psta->expire_to <= (pstapriv->expire_to - 3) && (psta->under_exist_checking==0)) {
DBG_871X("asoc check by DELBA/ADDBA! (%d s)\n", (pstapriv->expire_to-psta->expire_to)*2);
psta->under_exist_checking = 1;
/* tear down TX AMPDU */
send_delba(padapter, 1, psta->hwaddr);/* originator */
psta->htpriv.agg_enable_bitmap = 0x0;/* reset */
psta->htpriv.candidate_tid_bitmap = 0x0;/* reset */
}
}
#endif /* CONFIG_80211N_HT */
#endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */
if (psta->expire_to <= 0)
{
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
if (padapter->registrypriv.wifi_spec == 1)
@ -482,8 +458,6 @@ void expire_timeout_chk(struct adapter *padapter)
continue;
}
#endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */
rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
@ -506,64 +480,59 @@ void expire_timeout_chk(struct adapter *padapter)
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
if (chk_alive_num) {
if (chk_alive_num) {
u8 backup_oper_channel=0;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
/* switch to correct channel of current network before issue keep-alive frames */
if (rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) {
backup_oper_channel = rtw_get_oper_ch(padapter);
SelectChannel(padapter, pmlmeext->cur_channel);
}
u8 backup_oper_channel=0;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
/* switch to correct channel of current network before issue keep-alive frames */
if (rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) {
backup_oper_channel = rtw_get_oper_ch(padapter);
SelectChannel(padapter, pmlmeext->cur_channel);
}
/* issue null data to check sta alive*/
for (i = 0; i < chk_alive_num; i++) {
int ret = _FAIL;
/* issue null data to check sta alive*/
for (i = 0; i < chk_alive_num; i++) {
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
if(!(psta->state &_FW_LINKED))
continue;
int ret = _FAIL;
if (psta->state & WIFI_SLEEP_STATE)
ret = issue_nulldata(padapter, psta->hwaddr, 0, 1, 50);
else
ret = issue_nulldata(padapter, psta->hwaddr, 0, 3, 50);
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
if(!(psta->state &_FW_LINKED))
continue;
psta->keep_alive_trycnt++;
if (ret == _SUCCESS)
{
DBG_871X("asoc check, sta(" MAC_FMT ") is alive\n", MAC_ARG(psta->hwaddr));
psta->expire_to = pstapriv->expire_to;
psta->keep_alive_trycnt = 0;
continue;
}
else if (psta->keep_alive_trycnt <= 3)
{
DBG_871X("ack check for asoc expire, keep_alive_trycnt=%d\n", psta->keep_alive_trycnt);
psta->expire_to = 1;
continue;
}
if (psta->state & WIFI_SLEEP_STATE)
ret = issue_nulldata(padapter, psta->hwaddr, 0, 1, 50);
else
ret = issue_nulldata(padapter, psta->hwaddr, 0, 3, 50);
psta->keep_alive_trycnt++;
if (ret == _SUCCESS)
{
DBG_871X("asoc check, sta(" MAC_FMT ") is alive\n", MAC_ARG(psta->hwaddr));
psta->expire_to = pstapriv->expire_to;
psta->keep_alive_trycnt = 0;
continue;
}
else if (psta->keep_alive_trycnt <= 3)
{
DBG_871X("ack check for asoc expire, keep_alive_trycnt=%d\n", psta->keep_alive_trycnt);
psta->expire_to = 1;
continue;
DBG_871X("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
if (rtw_is_list_empty(&psta->asoc_list)==false) {
rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
}
psta->keep_alive_trycnt = 0;
DBG_871X("asoc expire "MAC_FMT", state=0x%x\n", MAC_ARG(psta->hwaddr), psta->state);
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
if (rtw_is_list_empty(&psta->asoc_list)==false) {
rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
if (backup_oper_channel>0) /* back to the original operation channel */
SelectChannel(padapter, backup_oper_channel);
}
if (backup_oper_channel>0) /* back to the original operation channel */
SelectChannel(padapter, backup_oper_channel);
}
#endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */
associated_clients_update(padapter, updated);
}

View file

@ -2215,14 +2215,12 @@ void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz)
padapter = (struct adapter *)pbuf;
pmlmepriv = &(padapter->mlmepriv);
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
#ifdef CONFIG_AP_MODE
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
{
expire_timeout_chk(padapter);
}
#endif
#endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */
#ifdef DBG_CONFIG_ERROR_DETECT
rtw_hal_sreset_xmit_status_check(padapter);

View file

@ -2354,15 +2354,6 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
}
}
#ifndef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
#ifdef CONFIG_AP_MODE
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
{
expire_timeout_chk(adapter);
}
#endif
#endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */
#ifdef CONFIG_BR_EXT
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35))

View file

@ -514,17 +514,13 @@ int init_mlme_ext_priv(struct adapter* padapter)
pmlmeext->chan_scan_time = SURVEY_TO;
pmlmeext->mlmeext_init = true;
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
pmlmeext->active_keep_alive_check = true;
#endif
#ifdef DBG_FIXED_CHAN
pmlmeext->fixed_chan = 0xFF;
#endif
return res;
}
void free_mlme_ext_priv (struct mlme_ext_priv *pmlmeext)
@ -9826,20 +9822,13 @@ void linked_status_chk(struct adapter *padapter)
rtw_hal_sreset_linked_status_check(padapter);
#endif
if (is_client_associated_to_ap(padapter))
{
if (is_client_associated_to_ap(padapter)) {
/* linked infrastructure client mode */
int tx_chk = _SUCCESS, rx_chk = _SUCCESS;
int rx_chk_limit;
#if defined(DBG_ROAMING_TEST)
rx_chk_limit = 1;
#elif defined(CONFIG_ACTIVE_KEEP_ALIVE_CHECK)
rx_chk_limit = 4;
#else
rx_chk_limit = 8;
#endif
/* Marked by Kurt 20130715 */
/* For WiDi 3.5 and latered on, they don't ask WiDi sink to do roaming, so we could not check rx limit that strictly. */
@ -9862,7 +9851,6 @@ void linked_status_chk(struct adapter *padapter)
if (pxmitpriv->last_tx_pkts == pxmitpriv->tx_pkts)
tx_chk = _FAIL;
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
if (pmlmeext->active_keep_alive_check && (rx_chk == _FAIL || tx_chk == _FAIL)) {
u8 backup_oper_channel=0;
@ -9885,11 +9873,7 @@ void linked_status_chk(struct adapter *padapter)
/* back to the original operation channel */
if(backup_oper_channel>0)
SelectChannel(padapter, backup_oper_channel);
}
else
#endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */
{
} else {
if (rx_chk != _SUCCESS) {
if (pmlmeext->retry == 0) {
#ifdef DBG_EXPIRATION_CHK

View file

@ -147,11 +147,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
pstapriv->auth_to = 3; /* 3*2 = 6 sec */
pstapriv->assoc_to = 3;
#ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
pstapriv->expire_to = 3; /* 3*2 = 6 sec */
#else
pstapriv->expire_to = 60;/* 60*2 = 120 sec = 2 min, expire after no any traffic. */
#endif
pstapriv->max_num_sta = NUM_STA;
#endif