staging: wfx: reduce hold duration of cfg80211_bss
Pointer to cfg80211_bss is held during all duration of wfx_do_join. But, it is not necessary, We can release it far earlier. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200410133239.438347-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0f66c31eb6
commit
b4d74f7ad1
@ -509,6 +509,7 @@ static void wfx_do_join(struct wfx_vif *wvif)
|
|||||||
hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
|
hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
|
||||||
|
|
||||||
wfx_set_mfp(wvif, bss);
|
wfx_set_mfp(wvif, bss);
|
||||||
|
cfg80211_put_bss(wvif->wdev->hw->wiphy, bss);
|
||||||
|
|
||||||
ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen);
|
ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
@ -538,8 +539,6 @@ static void wfx_do_join(struct wfx_vif *wvif)
|
|||||||
wfx_update_filtering(wvif);
|
wfx_update_filtering(wvif);
|
||||||
|
|
||||||
mutex_unlock(&wvif->wdev->conf_mutex);
|
mutex_unlock(&wvif->wdev->conf_mutex);
|
||||||
if (bss)
|
|
||||||
cfg80211_put_bss(wvif->wdev->hw->wiphy, bss);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wfx_unjoin_work(struct work_struct *work)
|
static void wfx_unjoin_work(struct work_struct *work)
|
||||||
|
Loading…
Reference in New Issue
Block a user