brcmfmac: Fix escan timer causing oops.
In some rare circumstances the escan protection timer can expire before the setup completed (due to long timeouts on IOCTL). This patch avoids this situation by setting the timer after the setup completed correctly. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
a7b134a767
commit
661fa95ddb
@ -1050,10 +1050,6 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct brcmf_cfg80211_vif *vif,
|
||||
if (vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif)
|
||||
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif;
|
||||
|
||||
/* Arm scan timeout timer */
|
||||
mod_timer(&cfg->escan_timeout, jiffies +
|
||||
WL_ESCAN_TIMER_INTERVAL_MS * HZ / 1000);
|
||||
|
||||
escan_req = false;
|
||||
if (request) {
|
||||
/* scan bss */
|
||||
@ -1112,12 +1108,14 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct brcmf_cfg80211_vif *vif,
|
||||
}
|
||||
}
|
||||
|
||||
/* Arm scan timeout timer */
|
||||
mod_timer(&cfg->escan_timeout, jiffies +
|
||||
WL_ESCAN_TIMER_INTERVAL_MS * HZ / 1000);
|
||||
|
||||
return 0;
|
||||
|
||||
scan_out:
|
||||
clear_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status);
|
||||
if (timer_pending(&cfg->escan_timeout))
|
||||
del_timer_sync(&cfg->escan_timeout);
|
||||
cfg->scan_request = NULL;
|
||||
return err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user