mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
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:
parent
dc4dbd3a7c
commit
c0ef452bab
19 changed files with 389 additions and 604 deletions
147
core/rtw_mlme.c
147
core/rtw_mlme.c
|
@ -165,11 +165,11 @@ sint _rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork)
|
|||
if (pnetwork == NULL)
|
||||
goto exit;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
rtw_list_insert_tail(&pnetwork->list, &queue->queue);
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -186,7 +186,7 @@ struct wlan_network *_rtw_dequeue_network(_queue *queue)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(queue) == true)
|
||||
|
||||
|
@ -199,7 +199,7 @@ struct wlan_network *_rtw_dequeue_network(_queue *queue)
|
|||
rtw_list_delete(&(pnetwork->list));
|
||||
}
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -215,7 +215,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv )/* _queue *
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_lock_bh(&free_queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(free_queue) == true) {
|
||||
pnetwork=NULL;
|
||||
|
@ -237,7 +237,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv )/* _queue *
|
|||
pmlmepriv->num_of_scanned ++;
|
||||
|
||||
exit:
|
||||
_exit_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_unlock_bh(&free_queue->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -272,7 +272,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv ,struct wlan_network *pnetwor
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_lock_bh(&free_queue->lock);
|
||||
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
|
||||
|
@ -283,7 +283,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv ,struct wlan_network *pnetwor
|
|||
|
||||
/* DBG_871X("_rtw_free_network:SSID=%s\n", pnetwork->network.Ssid.Ssid); */
|
||||
|
||||
_exit_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_unlock_bh(&free_queue->lock);
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -304,7 +304,7 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
|
|||
if (pnetwork->fixed == true)
|
||||
goto exit;
|
||||
|
||||
/* _enter_critical(&free_queue->lock, &irqL); */
|
||||
/* _enter_critical(&free_queue->lock); */
|
||||
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
|
||||
|
@ -312,7 +312,7 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
|
|||
|
||||
pmlmepriv->num_of_scanned --;
|
||||
|
||||
/* _exit_critical(&free_queue->lock, &irqL); */
|
||||
/* _exit_critical(&free_queue->lock); */
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -341,7 +341,7 @@ struct wlan_network *_rtw_find_network(_queue *scanned_queue, u8 *addr)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
/* _enter_critical_bh(&scanned_queue->lock, &irqL); */
|
||||
/* spin_lock_bh(&scanned_queue->lock); */
|
||||
|
||||
phead = get_list_head(scanned_queue);
|
||||
plist = get_next(phead);
|
||||
|
@ -359,7 +359,7 @@ struct wlan_network *_rtw_find_network(_queue *scanned_queue, u8 *addr)
|
|||
if(plist == phead)
|
||||
pnetwork = NULL;
|
||||
|
||||
/* _exit_critical_bh(&scanned_queue->lock, &irqL); */
|
||||
/* spin_unlock_bh(&scanned_queue->lock); */
|
||||
|
||||
exit:
|
||||
|
||||
|
@ -381,7 +381,7 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
|||
;
|
||||
|
||||
|
||||
_enter_critical_bh(&scanned_queue->lock, &irqL);
|
||||
spin_lock_bh(&scanned_queue->lock);
|
||||
|
||||
phead = get_list_head(scanned_queue);
|
||||
plist = get_next(phead);
|
||||
|
@ -397,7 +397,7 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
|||
|
||||
}
|
||||
|
||||
_exit_critical_bh(&scanned_queue->lock, &irqL);
|
||||
spin_unlock_bh(&scanned_queue->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -757,7 +757,7 @@ void rtw_update_scanned_network(struct adapter *adapter, WLAN_BSSID_EX *target)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
@ -868,7 +868,7 @@ void rtw_update_scanned_network(struct adapter *adapter, WLAN_BSSID_EX *target)
|
|||
}
|
||||
|
||||
exit:
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
;
|
||||
}
|
||||
|
@ -882,7 +882,7 @@ void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork)
|
|||
|
||||
;
|
||||
|
||||
/* _enter_critical_bh(&queue->lock, &irqL); */
|
||||
/* spin_lock_bh(&queue->lock); */
|
||||
|
||||
#if defined(CONFIG_P2P) && defined(CONFIG_P2P)
|
||||
rtw_WLAN_BSSID_EX_remove_p2p_attr(pnetwork, P2P_ATTR_GROUP_INFO);
|
||||
|
@ -892,7 +892,7 @@ void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork)
|
|||
|
||||
rtw_update_scanned_network(adapter, pnetwork);
|
||||
|
||||
/* _exit_critical_bh(&queue->lock, &irqL); */
|
||||
/* spin_unlock_bh(&queue->lock); */
|
||||
|
||||
;
|
||||
}
|
||||
|
@ -996,7 +996,7 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
}
|
||||
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
/* update IBSS_network 's timestamp */
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == true)
|
||||
|
@ -1008,15 +1008,15 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
_irqL irqL;
|
||||
|
||||
memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8);
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
ibss_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress);
|
||||
if(ibss_wlan)
|
||||
{
|
||||
memcpy(ibss_wlan->network.IEs , pnetwork->IEs, 8);
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto exit;
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1032,7 +1032,7 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
exit:
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
if(pmlmepriv->wps_probe_req_ie)
|
||||
{
|
||||
u32 free_len = pmlmepriv->wps_probe_req_ie_len;
|
||||
|
@ -1079,13 +1079,13 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("nic status =%x, survey done event comes too late!\n", get_fwstate(pmlmepriv)));
|
||||
}
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
if(timer_cancelled)
|
||||
_cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled);
|
||||
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
indicate_wx_scan_complete_event(adapter);
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
|
@ -1202,16 +1202,13 @@ void rtw_fwdbg_event_callback(struct adapter *adapter , u8 *pbuf)
|
|||
|
||||
static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
_irqL irqL, irqL0;
|
||||
_queue *free_queue = &pmlmepriv->free_bss_pool;
|
||||
_queue *scan_queue = &pmlmepriv->scanned_queue;
|
||||
_list *plist, *phead, *ptemp;
|
||||
|
||||
;
|
||||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+free_scanqueue\n"));
|
||||
_enter_critical_bh(&scan_queue->lock, &irqL0);
|
||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||
spin_lock_bh(&scan_queue->lock);
|
||||
spin_lock_bh(&free_queue->lock);
|
||||
|
||||
phead = get_list_head(scan_queue);
|
||||
plist = get_next(phead);
|
||||
|
@ -1225,10 +1222,8 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
|||
pmlmepriv->num_of_scanned --;
|
||||
}
|
||||
|
||||
_exit_critical_bh(&free_queue->lock, &irqL);
|
||||
_exit_critical_bh(&scan_queue->lock, &irqL0);
|
||||
|
||||
;
|
||||
spin_unlock_bh(&free_queue->lock);
|
||||
spin_unlock_bh(&scan_queue->lock);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1251,10 +1246,10 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
|
|||
|
||||
psta = rtw_get_stainfo(&adapter->stapriv, tgt_network->network.MacAddress);
|
||||
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(adapter, psta);
|
||||
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
}
|
||||
|
||||
|
@ -1265,15 +1260,15 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
|
|||
rtw_free_all_stainfo(adapter);
|
||||
|
||||
psta = rtw_get_bcmc_stainfo(adapter);
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(adapter, psta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
rtw_init_bcmc_stainfo(adapter);
|
||||
}
|
||||
|
||||
if(lock_scanned_queue)
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||
if(pwlan) {
|
||||
|
@ -1314,7 +1309,7 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
|
|||
}
|
||||
|
||||
if(lock_scanned_queue)
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
adapter->securitypriv.key_mask = 0;
|
||||
}
|
||||
|
@ -1644,12 +1639,12 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
goto ignore_joinbss_callback;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n rtw_joinbss_event_callback !! _enter_critical \n"));
|
||||
|
||||
if(pnetwork->join_res > 0) {
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
retry = 0;
|
||||
if (check_fwstate(pmlmepriv,_FW_UNDER_LINKING) ) {
|
||||
/* s1. find ptarget_wlan */
|
||||
|
@ -1663,9 +1658,9 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
|
||||
if(pcur_sta){
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(adapter, pcur_sta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
}
|
||||
|
||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.MacAddress);
|
||||
|
@ -1687,7 +1682,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
rtw_joinbss_update_network(adapter, ptarget_wlan, pnetwork);
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("Can't find ptarget_wlan when joinbss_event callback\n"));
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto exit_unlock;
|
||||
}
|
||||
|
||||
|
@ -1697,7 +1692,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
|
||||
if(ptarget_sta==NULL) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("Can't update stainfo when joinbss_event callback\n"));
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto exit_unlock;
|
||||
}
|
||||
}
|
||||
|
@ -1717,10 +1712,10 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("Cancle assoc_timer \n"));
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("rtw_joinbss_event_callback err: fw_state:%x", get_fwstate(pmlmepriv)));
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto exit_unlock;
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
} else if(pnetwork->join_res == -4) {
|
||||
rtw_reset_securitypriv(adapter);
|
||||
_set_timer(&pmlmepriv->assoc_timer, 1);
|
||||
|
@ -1755,7 +1750,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
#endif
|
||||
}
|
||||
exit_unlock:
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
ignore_joinbss_callback:
|
||||
return;
|
||||
}
|
||||
|
@ -1859,7 +1854,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
/* report to upper layer */
|
||||
DBG_871X("indicate_sta_assoc_event to upper layer - hostapd\n");
|
||||
_enter_critical_bh(&psta->lock, &irqL);
|
||||
spin_lock_bh(&psta->lock);
|
||||
if(psta->passoc_req && psta->assoc_req_len>0)
|
||||
{
|
||||
passoc_req = rtw_zmalloc(psta->assoc_req_len);
|
||||
|
@ -1873,7 +1868,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
psta->assoc_req_len = 0;
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&psta->lock, &irqL);
|
||||
spin_unlock_bh(&psta->lock);
|
||||
|
||||
if(passoc_req && assoc_req_len>0)
|
||||
{
|
||||
|
@ -1920,24 +1915,24 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
psta->ieee8021x_blocked = false;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if ( (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==true ) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true ) )
|
||||
{
|
||||
if(adapter->stapriv.asoc_sta_count== 2)
|
||||
{
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.MacAddress);
|
||||
pmlmepriv->cur_network_scanned = ptarget_wlan;
|
||||
if(ptarget_wlan) ptarget_wlan->fixed = true;
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* a sta + bc/mc_stainfo (not Ibss_stainfo) */
|
||||
rtw_indicate_connect(adapter);
|
||||
}
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
mlmeext_sta_add_event_callback(adapter, psta);
|
||||
|
@ -1986,7 +1981,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
mlmeext_sta_del_event_callback(adapter);
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL2);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if(check_fwstate(pmlmepriv, WIFI_STATION_STATE) )
|
||||
{
|
||||
|
@ -2003,14 +1998,14 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
rtw_free_assoc_resources(adapter, 1);
|
||||
rtw_indicate_disconnect(adapter);
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* remove the network entry in scanned_queue */
|
||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||
if (pwlan) {
|
||||
pwlan->fixed = false;
|
||||
rtw_free_network_nolock(pmlmepriv, pwlan);
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
_rtw_roaming(adapter, tgt_network);
|
||||
}
|
||||
|
@ -2019,13 +2014,13 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
check_fwstate(pmlmepriv,WIFI_ADHOC_STATE))
|
||||
{
|
||||
|
||||
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(adapter, psta);
|
||||
_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
||||
if(adapter->stapriv.asoc_sta_count== 1) /* a sta + bc/mc_stainfo (not Ibss_stainfo) */
|
||||
{
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* free old ibss network */
|
||||
pwlan = rtw_find_network(&pmlmepriv->scanned_queue, tgt_network->network.MacAddress);
|
||||
if(pwlan)
|
||||
|
@ -2033,7 +2028,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
pwlan->fixed = false;
|
||||
rtw_free_network_nolock(pmlmepriv, pwlan);
|
||||
}
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* re-create ibss */
|
||||
pdev_network = &(adapter->registrypriv.dev_network);
|
||||
pibss = adapter->registrypriv.dev_network.MacAddress;
|
||||
|
@ -2065,13 +2060,9 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL2);
|
||||
|
||||
;
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
|
||||
void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("+rtw_cpwm_event_callback !!!\n"));
|
||||
|
@ -2094,7 +2085,7 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
|
|||
return;
|
||||
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if (rtw_to_roaming(adapter) > 0) { /* join timeout caused by roaming */
|
||||
while(1) {
|
||||
|
@ -2120,7 +2111,7 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
|
|||
rtw_cfg80211_indicate_disconnect(adapter);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
#ifdef CONFIG_DRVEXT_MODULE_WSC
|
||||
|
@ -2142,11 +2133,11 @@ void rtw_scan_timeout_handler (struct adapter *adapter)
|
|||
|
||||
DBG_871X(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
rtw_indicate_scan_done(adapter, true);
|
||||
|
||||
|
@ -2370,7 +2361,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
phead = get_list_head(queue);
|
||||
adapter = (struct adapter *)pmlmepriv->nic_hdl;
|
||||
|
||||
|
@ -2425,7 +2416,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
|||
ret = rtw_joinbss_cmd(adapter, candidate);
|
||||
|
||||
exit:
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
|
||||
;
|
||||
|
||||
|
@ -3133,13 +3124,13 @@ inline u8 rtw_to_roaming(struct adapter *adapter)
|
|||
|
||||
void rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
_rtw_roaming(padapter, tgt_network);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue