Commit 164e265b authored by Alison Schofield's avatar Alison Schofield Committed by Greg Kroah-Hartman

staging: r8723au: add & use local variable to simplify references

Add local variable scanned_queue to rtw_createbss_cmd23a_callback()
and use it (5x) to simplify references.

Addresses checkpatch.pl WARNING: line over 80 characters
Signed-off-by: default avatarAlison Schofield <amsfield22@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c12e8dba
...@@ -1343,6 +1343,7 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter, ...@@ -1343,6 +1343,7 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf; struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf;
struct wlan_network *tgt_network = &pmlmepriv->cur_network; struct wlan_network *tgt_network = &pmlmepriv->cur_network;
struct rtw_queue *scanned_queue = &pmlmepriv->scanned_queue;
if (pcmd->res != H2C_SUCCESS) { if (pcmd->res != H2C_SUCCESS) {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_,
...@@ -1372,19 +1373,19 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter, ...@@ -1372,19 +1373,19 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter,
spin_unlock_bh(&pmlmepriv->lock); spin_unlock_bh(&pmlmepriv->lock);
} else { } else {
pwlan = rtw_alloc_network(pmlmepriv, GFP_KERNEL); pwlan = rtw_alloc_network(pmlmepriv, GFP_KERNEL);
spin_lock_bh(&pmlmepriv->scanned_queue.lock); spin_lock_bh(&scanned_queue->lock);
if (!pwlan) { if (!pwlan) {
pwlan = rtw_get_oldest_wlan_network23a(&pmlmepriv->scanned_queue); pwlan = rtw_get_oldest_wlan_network23a(scanned_queue);
if (!pwlan) { if (!pwlan) {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_,
"Error: can't get pwlan in rtw23a_joinbss_event_cb\n"); "Error: can't get pwlan in rtw23a_joinbss_event_cb\n");
spin_unlock_bh(&pmlmepriv->scanned_queue.lock); spin_unlock_bh(&scanned_queue->lock);
goto createbss_cmd_fail; goto createbss_cmd_fail;
} }
pwlan->last_scanned = jiffies; pwlan->last_scanned = jiffies;
} else { } else {
list_add_tail(&pwlan->list, list_add_tail(&pwlan->list,
&pmlmepriv->scanned_queue.queue); &scanned_queue->queue);
} }
pnetwork->Length = get_wlan_bssid_ex_sz(pnetwork); pnetwork->Length = get_wlan_bssid_ex_sz(pnetwork);
...@@ -1403,9 +1404,9 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter, ...@@ -1403,9 +1404,9 @@ void rtw_createbss_cmd23a_callback(struct rtw_adapter *padapter,
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 /* we will set _FW_LINKED when there is one more sat to
join us (rtw_stassoc_event_callback23a) */ join us (rtw_stassoc_event_callback23a) */
spin_unlock_bh(&scanned_queue->lock);
} }
createbss_cmd_fail: createbss_cmd_fail:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment