From 5290cd688e07fb492f3a049960f3b76ff776d218 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Fri, 9 May 2014 15:03:45 +0200 Subject: [PATCH] staging: rtl8723au: rtw_createbss_cmd23a_callback(): Relax holding of pmlmepriv->lock We only really need to hold pmlmepriv->lock while calling rtw_indicate_connect23a(). rtw_get_stainfo23a() and rtw_alloc_stainfo23a() rely on pstapriv->sta_hash_lock and the non WIFI_AP_STATE path relies on pmlmepvi->scanned_queue.lock, except we need to used clr_fwstate() instead of _clr_fwstate_(). Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_cmd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 1ff945c..dc61a81 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -1505,8 +1505,6 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter, del_timer_sync(&pmlmepriv->assoc_timer); - spin_lock_bh(&pmlmepriv->lock); - if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { psta = rtw_get_stainfo23a(&padapter->stapriv, pnetwork->MacAddress); @@ -1521,7 +1519,9 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter, } } + spin_lock_bh(&pmlmepriv->lock); rtw_indicate_connect23a(padapter); + spin_unlock_bh(&pmlmepriv->lock); } else { pwlan = rtw_alloc_network(pmlmepriv); spin_lock_bh(&pmlmepriv->scanned_queue.lock); @@ -1554,7 +1554,7 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter, /* reset DSConfig */ - _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); + clr_fwstate(pmlmepriv, _FW_UNDER_LINKING); spin_unlock_bh(&pmlmepriv->scanned_queue.lock); /* we will set _FW_LINKED when there is one more sat to @@ -1563,8 +1563,6 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter, createbss_cmd_fail: - spin_unlock_bh(&pmlmepriv->lock); - rtw_free_cmd_obj23a(pcmd); } -- 2.7.4