summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-05-15 10:33:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-15 15:50:40 +0200
commit6598b12d6635e8e3060863b84c04e472546ee126 (patch)
tree957b43cd183c3e078f54d496149fbb95a420c5cc
parent201451cfe404ccd93b8bef627f5756cae095b668 (diff)
staging: wfx: fix value of scan timeout
Before to start the scan request, the firmware signals (with a null frame) to the AP it won't be able to receive data. This frame can be long to send: up to 512TU. The current calculus of the scan timeout does not take into account this delay. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200515083325.378539-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wfx/hif_tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
index 1cb71f0ad804..893b67f2f792 100644
--- a/drivers/staging/wfx/hif_tx.c
+++ b/drivers/staging/wfx/hif_tx.c
@@ -288,7 +288,7 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req,
tmo_chan_bg = le32_to_cpu(body->max_channel_time) * USEC_PER_TU;
tmo_chan_fg = 512 * USEC_PER_TU + body->probe_delay;
tmo_chan_fg *= body->num_of_probe_requests;
- tmo = chan_num * max(tmo_chan_bg, tmo_chan_fg);
+ tmo = chan_num * max(tmo_chan_bg, tmo_chan_fg) + 512 * USEC_PER_TU;
wfx_fill_header(hif, wvif->id, HIF_REQ_ID_START_SCAN, buf_len);
ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false);