|
@@ -171,7 +171,7 @@ static u8 chk_sta_is_alive(struct sta_info *psta)
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-void expire_timeout_chk23a(struct rtw_adapter *padapter)
|
|
|
+void expire_timeout_chk23a(struct rtw_adapter *padapter)
|
|
|
{
|
|
|
struct list_head *phead;
|
|
|
u8 updated = 0;
|
|
@@ -182,12 +182,9 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
|
|
|
int i;
|
|
|
|
|
|
spin_lock_bh(&pstapriv->auth_list_lock);
|
|
|
-
|
|
|
phead = &pstapriv->auth_list;
|
|
|
-
|
|
|
/* check auth_queue */
|
|
|
list_for_each_entry_safe(psta, ptmp, phead, auth_list) {
|
|
|
-
|
|
|
if (psta->expire_to > 0) {
|
|
|
psta->expire_to--;
|
|
|
if (psta->expire_to == 0) {
|
|
@@ -205,18 +202,13 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
|
|
|
spin_lock_bh(&pstapriv->auth_list_lock);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
spin_unlock_bh(&pstapriv->auth_list_lock);
|
|
|
|
|
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
|
|
-
|
|
|
phead = &pstapriv->asoc_list;
|
|
|
-
|
|
|
/* check asoc_queue */
|
|
|
list_for_each_entry_safe(psta, ptmp, phead, asoc_list) {
|
|
|
-
|
|
|
if (chk_sta_is_alive(psta) || !psta->expire_to) {
|
|
|
psta->expire_to = pstapriv->expire_to;
|
|
|
psta->keep_alive_trycnt = 0;
|
|
@@ -281,7 +273,6 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
|
|
|
|
|
if (chk_alive_num) {
|
|
@@ -1071,11 +1062,8 @@ int rtw_acl_add_sta23a(struct rtw_adapter *padapter, u8 *addr)
|
|
|
return -1;
|
|
|
|
|
|
spin_lock_bh(&pacl_node_q->lock);
|
|
|
-
|
|
|
phead = get_list_head(pacl_node_q);
|
|
|
-
|
|
|
list_for_each_entry(paclnode, phead, list) {
|
|
|
-
|
|
|
if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
|
|
|
if (paclnode->valid == true) {
|
|
|
added = true;
|
|
@@ -1084,7 +1072,6 @@ int rtw_acl_add_sta23a(struct rtw_adapter *padapter, u8 *addr)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
spin_unlock_bh(&pacl_node_q->lock);
|
|
|
|
|
|
if (added)
|
|
@@ -1127,11 +1114,8 @@ int rtw_acl_remove_sta23a(struct rtw_adapter *padapter, u8 *addr)
|
|
|
DBG_8723A("%s(acl_num =%d) = %pM\n", __func__, pacl_list->num, addr);
|
|
|
|
|
|
spin_lock_bh(&pacl_node_q->lock);
|
|
|
-
|
|
|
phead = get_list_head(pacl_node_q);
|
|
|
-
|
|
|
list_for_each_entry_safe(paclnode, ptmp, phead, list) {
|
|
|
-
|
|
|
if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
|
|
|
if (paclnode->valid) {
|
|
|
paclnode->valid = false;
|
|
@@ -1142,7 +1126,6 @@ int rtw_acl_remove_sta23a(struct rtw_adapter *padapter, u8 *addr)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
spin_unlock_bh(&pacl_node_q->lock);
|
|
|
|
|
|
DBG_8723A("%s, acl_num =%d\n", __func__, pacl_list->num);
|
|
@@ -1355,12 +1338,9 @@ void associated_clients_update23a(struct rtw_adapter *padapter, u8 updated)
|
|
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
|
|
|
|
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
|
|
-
|
|
|
phead = &pstapriv->asoc_list;
|
|
|
-
|
|
|
list_for_each_entry_safe(psta, ptmp, phead, asoc_list)
|
|
|
VCS_update23a(padapter, psta);
|
|
|
-
|
|
|
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
|
|
}
|
|
|
}
|
|
@@ -1635,9 +1615,7 @@ int rtw_ap_inform_ch_switch23a(struct rtw_adapter *padapter, u8 new_ch, u8 ch_of
|
|
|
|
|
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
|
|
phead = &pstapriv->asoc_list;
|
|
|
-
|
|
|
list_for_each_entry(psta, phead, asoc_list) {
|
|
|
-
|
|
|
issue_action_spct_ch_switch23a(padapter, psta->hwaddr, new_ch, ch_offset);
|
|
|
psta->expire_to = ((pstapriv->expire_to * 2) > 5) ? 5 : (pstapriv->expire_to * 2);
|
|
|
}
|
|
@@ -1667,9 +1645,7 @@ int rtw_sta_flush23a(struct rtw_adapter *padapter)
|
|
|
|
|
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
|
|
phead = &pstapriv->asoc_list;
|
|
|
-
|
|
|
list_for_each_entry_safe(psta, ptmp, phead, asoc_list) {
|
|
|
-
|
|
|
/* Remove sta from asoc_list */
|
|
|
list_del_init(&psta->asoc_list);
|
|
|
pstapriv->asoc_list_cnt--;
|
|
@@ -1766,12 +1742,9 @@ void rtw_ap_restore_network(struct rtw_adapter *padapter)
|
|
|
}
|
|
|
|
|
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
|
|
-
|
|
|
phead = &pstapriv->asoc_list;
|
|
|
-
|
|
|
list_for_each_entry_safe(psta, ptmp, phead, asoc_list)
|
|
|
chk_alive_list[chk_alive_num++] = psta;
|
|
|
-
|
|
|
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
|
|
|
|
|
for (i = 0; i < chk_alive_num; i++) {
|
|
@@ -1852,14 +1825,10 @@ void stop_ap_mode23a(struct rtw_adapter *padapter)
|
|
|
/* for ACL */
|
|
|
spin_lock_bh(&pacl_node_q->lock);
|
|
|
phead = get_list_head(pacl_node_q);
|
|
|
-
|
|
|
list_for_each_entry_safe(paclnode, ptmp, phead, list) {
|
|
|
-
|
|
|
if (paclnode->valid == true) {
|
|
|
paclnode->valid = false;
|
|
|
-
|
|
|
list_del_init(&paclnode->list);
|
|
|
-
|
|
|
pacl_list->num--;
|
|
|
}
|
|
|
}
|