staging: wfx: delayed_link_loss cannot happen
Original code allows to detect an BSS loss during a scan and delaying the handling of BSS loss. However, there it is no real problem to just make these two events mutually exclusive (there is just a performance penalty). Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-54-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9699c88a44
commit
3dc67854df
@ -95,10 +95,6 @@ void wfx_hw_scan_work(struct work_struct *work)
|
||||
mutex_unlock(&wvif->wdev->conf_mutex);
|
||||
mutex_unlock(&wvif->scan_lock);
|
||||
__ieee80211_scan_completed_compat(wvif->wdev->hw, ret < 0);
|
||||
if (wvif->delayed_link_loss) {
|
||||
wvif->delayed_link_loss = false;
|
||||
wfx_cqm_bssloss_sm(wvif, 1, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
|
@ -63,7 +63,6 @@ void wfx_cqm_bssloss_sm(struct wfx_vif *wvif, int init, int good, int bad)
|
||||
int tx = 0;
|
||||
|
||||
mutex_lock(&wvif->bss_loss_lock);
|
||||
wvif->delayed_link_loss = 0;
|
||||
cancel_work_sync(&wvif->bss_params_work);
|
||||
|
||||
if (init) {
|
||||
@ -429,18 +428,9 @@ static void wfx_event_handler_work(struct work_struct *work)
|
||||
switch (event->evt.event_id) {
|
||||
case HIF_EVENT_IND_BSSLOST:
|
||||
cancel_work_sync(&wvif->unjoin_work);
|
||||
if (mutex_trylock(&wvif->scan_lock)) {
|
||||
wfx_cqm_bssloss_sm(wvif, 1, 0, 0);
|
||||
mutex_unlock(&wvif->scan_lock);
|
||||
} else {
|
||||
/* Scan is in progress. Delay reporting.
|
||||
* Scan complete will trigger bss_loss_work
|
||||
*/
|
||||
wvif->delayed_link_loss = 1;
|
||||
/* Also start a watchdog. */
|
||||
schedule_delayed_work(&wvif->bss_loss_work,
|
||||
5 * HZ);
|
||||
}
|
||||
mutex_lock(&wvif->scan_lock);
|
||||
wfx_cqm_bssloss_sm(wvif, 1, 0, 0);
|
||||
mutex_unlock(&wvif->scan_lock);
|
||||
break;
|
||||
case HIF_EVENT_IND_BSSREGAINED:
|
||||
wfx_cqm_bssloss_sm(wvif, 0, 0, 0);
|
||||
@ -497,8 +487,6 @@ static void wfx_do_unjoin(struct wfx_vif *wvif)
|
||||
{
|
||||
mutex_lock(&wvif->wdev->conf_mutex);
|
||||
|
||||
wvif->delayed_link_loss = false;
|
||||
|
||||
if (!wvif->state)
|
||||
goto done;
|
||||
|
||||
|
@ -70,7 +70,6 @@ struct wfx_vif {
|
||||
int id;
|
||||
enum wfx_state state;
|
||||
|
||||
int delayed_link_loss;
|
||||
int bss_loss_state;
|
||||
u32 bss_loss_confirm_id;
|
||||
struct mutex bss_loss_lock;
|
||||
|
Loading…
Reference in New Issue
Block a user