rtl8188eu: Remove wrappers around spin_lock_bh and spin_unlock_bh

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-03-06 11:54:48 -06:00
parent dc4dbd3a7c
commit c0ef452bab
19 changed files with 389 additions and 604 deletions

View file

@ -74,9 +74,9 @@ void free_mlme_ap_info(struct adapter *padapter)
/* free bc/mc sta_info */
psta = rtw_get_bcmc_stainfo(padapter);
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
spin_lock_bh(&(pstapriv->sta_hash_lock));
rtw_free_stainfo(padapter, psta);
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
spin_unlock_bh(&(pstapriv->sta_hash_lock));
_rtw_spinlock_free(&pmlmepriv->bcn_update_lock);
}
@ -352,7 +352,7 @@ void expire_timeout_chk(struct adapter *padapter)
char chk_alive_list[NUM_STA];
int i;
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
spin_lock_bh(&pstapriv->auth_list_lock);
phead = &pstapriv->auth_list;
plist = get_next(phead);
@ -380,24 +380,24 @@ void expire_timeout_chk(struct adapter *padapter)
DBG_871X("auth expire %02X%02X%02X%02X%02X%02X\n",
psta->hwaddr[0],psta->hwaddr[1],psta->hwaddr[2],psta->hwaddr[3],psta->hwaddr[4],psta->hwaddr[5]);
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL);
spin_unlock_bh(&pstapriv->auth_list_lock);
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
spin_lock_bh(&(pstapriv->sta_hash_lock));
rtw_free_stainfo(padapter, psta);
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
spin_unlock_bh(&(pstapriv->sta_hash_lock));
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
spin_lock_bh(&pstapriv->auth_list_lock);
}
}
}
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL);
spin_unlock_bh(&pstapriv->auth_list_lock);
psta = NULL;
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list;
plist = get_next(phead);
@ -478,7 +478,7 @@ void expire_timeout_chk(struct adapter *padapter)
}
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_unlock_bh(&pstapriv->asoc_list_lock);
if (chk_alive_num) {
u8 backup_oper_channel=0;
@ -520,13 +520,13 @@ void expire_timeout_chk(struct adapter *padapter)
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);
spin_lock_bh(&pstapriv->asoc_list_lock);
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);
spin_unlock_bh(&pstapriv->asoc_list_lock);
}
@ -728,9 +728,9 @@ void update_bmc_sta(struct adapter *padapter)
rtw_sta_media_status_rpt(padapter, psta, 1);
_enter_critical_bh(&psta->lock, &irqL);
spin_lock_bh(&psta->lock);
psta->state = _FW_LINKED;
_exit_critical_bh(&psta->lock, &irqL);
spin_unlock_bh(&psta->lock);
}
else
@ -820,9 +820,9 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
memset((void*)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
_enter_critical_bh(&psta->lock, &irqL);
spin_lock_bh(&psta->lock);
psta->state |= _FW_LINKED;
_exit_critical_bh(&psta->lock, &irqL);
spin_unlock_bh(&psta->lock);
}
static void update_hw_ht_param(struct adapter *padapter)
@ -1375,7 +1375,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
return (-1);
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
spin_lock_bh(&(pacl_node_q->lock));
phead = get_list_head(pacl_node_q);
plist = get_next(phead);
@ -1396,14 +1396,14 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
}
}
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
spin_unlock_bh(&(pacl_node_q->lock));
if(added == true)
return ret;
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
spin_lock_bh(&(pacl_node_q->lock));
for(i=0; i< NUM_ACL; i++)
{
@ -1427,7 +1427,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
DBG_871X("%s, acl_num=%d\n", __func__, pacl_list->num);
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
spin_unlock_bh(&(pacl_node_q->lock));
return ret;
}
@ -1444,7 +1444,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
DBG_871X("%s(acl_num=%d)=" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
spin_lock_bh(&(pacl_node_q->lock));
phead = get_list_head(pacl_node_q);
plist = get_next(phead);
@ -1467,7 +1467,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
}
}
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
spin_unlock_bh(&(pacl_node_q->lock));
DBG_871X("%s, acl_num=%d\n", __func__, pacl_list->num);
@ -1654,7 +1654,7 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
if(false == pmlmeext->bstart_bss)
return;
_enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
spin_lock_bh(&pmlmepriv->bcn_update_lock);
switch(ie_id)
{
@ -1706,7 +1706,7 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
pmlmepriv->update_bcn = true;
_exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
spin_unlock_bh(&pmlmepriv->bcn_update_lock);
if(tx)
set_tx_beacon_cmd(padapter);
@ -1805,7 +1805,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
struct sta_info *psta=NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list;
plist = get_next(phead);
@ -1820,7 +1820,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
VCS_update(padapter, psta);
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_unlock_bh(&pstapriv->asoc_list_lock);
}
@ -2081,9 +2081,9 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16
rtw_clearstakey_cmd(padapter, (u8*)psta, (u8)(psta->mac_id + 3), true);
_enter_critical_bh(&psta->lock, &irqL);
spin_lock_bh(&psta->lock);
psta->state &= ~_FW_LINKED;
_exit_critical_bh(&psta->lock, &irqL);
spin_unlock_bh(&psta->lock);
rtw_cfg80211_indicate_sta_disassoc(padapter, psta->hwaddr, reason);
@ -2091,9 +2091,9 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16
beacon_updated = bss_cap_update_on_sta_leave(padapter, psta);
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
spin_lock_bh(&(pstapriv->sta_hash_lock));
rtw_free_stainfo(padapter, psta);
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
spin_unlock_bh(&(pstapriv->sta_hash_lock));
return beacon_updated;
}
@ -2115,7 +2115,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
DBG_871X(FUNC_NDEV_FMT" with ch:%u, offset:%u\n",
FUNC_NDEV_ARG(padapter->pnetdev), new_ch, ch_offset);
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list;
plist = get_next(phead);
@ -2128,7 +2128,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
issue_action_spct_ch_switch(padapter, psta->hwaddr, new_ch, ch_offset);
psta->expire_to = ((pstapriv->expire_to * 2) > 5) ? 5 : (pstapriv->expire_to * 2);
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_unlock_bh(&pstapriv->asoc_list_lock);
issue_action_spct_ch_switch(padapter, bc_addr, new_ch, ch_offset);
@ -2154,7 +2154,7 @@ int rtw_sta_flush(struct adapter *padapter)
if((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
return ret;
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list;
plist = get_next(phead);
@ -2174,7 +2174,7 @@ int rtw_sta_flush(struct adapter *padapter)
chk_alive_list[chk_alive_num++] = stainfo_offset;
}
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_unlock_bh(&pstapriv->asoc_list_lock);
/* For each sta in chk_alive_list, call ap_free_sta */
@ -2261,7 +2261,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
rtw_set_key(padapter, psecuritypriv, psecuritypriv->dot118021XGrpKeyid, 0,false);
}
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list;
plist = get_next(phead);
@ -2278,7 +2278,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
}
}
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
spin_unlock_bh(&pstapriv->asoc_list_lock);
for (i = 0; i < chk_alive_num; i++) {
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
@ -2375,7 +2375,7 @@ void stop_ap_mode(struct adapter *padapter)
padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;
/* for ACL */
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
spin_lock_bh(&(pacl_node_q->lock));
phead = get_list_head(pacl_node_q);
plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == false)
@ -2392,7 +2392,7 @@ void stop_ap_mode(struct adapter *padapter)
pacl_list->num--;
}
}
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
spin_unlock_bh(&(pacl_node_q->lock));
DBG_871X("%s, free acl_node_queue, num=%d\n", __func__, pacl_list->num);
@ -2402,9 +2402,9 @@ void stop_ap_mode(struct adapter *padapter)
rtw_free_all_stainfo(padapter);
psta = rtw_get_bcmc_stainfo(padapter);
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
spin_lock_bh(&(pstapriv->sta_hash_lock));
rtw_free_stainfo(padapter, psta);
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
spin_unlock_bh(&(pstapriv->sta_hash_lock));
rtw_init_bcmc_stainfo(padapter);