Commit 9f91e736 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: drop unused argument from hif_scan()

It is no more necessary to compute the expected duration of the scan
request.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-7-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8bce06b0
...@@ -227,14 +227,13 @@ int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, ...@@ -227,14 +227,13 @@ int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
} }
int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req,
int chan_start_idx, int chan_num, int *timeout) int chan_start_idx, int chan_num)
{ {
int ret, i; int ret, i;
struct hif_msg *hif; struct hif_msg *hif;
size_t buf_len = size_t buf_len =
sizeof(struct hif_req_start_scan_alt) + chan_num * sizeof(u8); sizeof(struct hif_req_start_scan_alt) + chan_num * sizeof(u8);
struct hif_req_start_scan_alt *body = wfx_alloc_hif(buf_len, &hif); struct hif_req_start_scan_alt *body = wfx_alloc_hif(buf_len, &hif);
int tmo_chan_fg, tmo_chan_bg, tmo;
WARN(chan_num > HIF_API_MAX_NB_CHANNELS, "invalid params"); WARN(chan_num > HIF_API_MAX_NB_CHANNELS, "invalid params");
WARN(req->n_ssids > HIF_API_MAX_NB_SSIDS, "invalid params"); WARN(req->n_ssids > HIF_API_MAX_NB_SSIDS, "invalid params");
...@@ -269,12 +268,6 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, ...@@ -269,12 +268,6 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req,
body->num_of_probe_requests = 2; body->num_of_probe_requests = 2;
body->probe_delay = 100; body->probe_delay = 100;
} }
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) + 512 * USEC_PER_TU;
if (timeout)
*timeout = usecs_to_jiffies(tmo);
wfx_fill_header(hif, wvif->id, HIF_REQ_ID_START_SCAN, buf_len); wfx_fill_header(hif, wvif->id, HIF_REQ_ID_START_SCAN, buf_len);
ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false);
......
...@@ -40,7 +40,7 @@ int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, ...@@ -40,7 +40,7 @@ int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
void *buf, size_t buf_size); void *buf, size_t buf_size);
int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211, int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211,
int chan_start, int chan_num, int *timeout); int chan_start, int chan_num);
int hif_stop_scan(struct wfx_vif *wvif); int hif_stop_scan(struct wfx_vif *wvif);
int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
struct ieee80211_channel *channel, const u8 *ssid, int ssidlen); struct ieee80211_channel *channel, const u8 *ssid, int ssidlen);
......
...@@ -56,7 +56,7 @@ static int send_scan_req(struct wfx_vif *wvif, ...@@ -56,7 +56,7 @@ static int send_scan_req(struct wfx_vif *wvif,
wfx_tx_lock_flush(wvif->wdev); wfx_tx_lock_flush(wvif->wdev);
wvif->scan_abort = false; wvif->scan_abort = false;
reinit_completion(&wvif->scan_complete); reinit_completion(&wvif->scan_complete);
ret = hif_scan(wvif, req, start_idx, i - start_idx, NULL); ret = hif_scan(wvif, req, start_idx, i - start_idx);
if (ret) { if (ret) {
wfx_tx_unlock(wvif->wdev); wfx_tx_unlock(wvif->wdev);
return -EIO; return -EIO;
......
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