linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Pouiller <Jerome.Pouiller@silabs.com>
To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Jérôme Pouiller" <jerome.pouiller@silabs.com>
Subject: [PATCH 06/31] staging: wfx: drop unused argument from hif_scan()
Date: Fri, 10 Sep 2021 18:04:39 +0200	[thread overview]
Message-ID: <20210910160504.1794332-7-Jerome.Pouiller@silabs.com> (raw)
In-Reply-To: <20210910160504.1794332-1-Jerome.Pouiller@silabs.com>

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

It is no more necessary to compute the expected duration of the scan
request.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 drivers/staging/wfx/hif_tx.c | 9 +--------
 drivers/staging/wfx/hif_tx.h | 2 +-
 drivers/staging/wfx/scan.c   | 2 +-
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
index 63b437261eb7..14b7e047916e 100644
--- a/drivers/staging/wfx/hif_tx.c
+++ b/drivers/staging/wfx/hif_tx.c
@@ -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 chan_start_idx, int chan_num, int *timeout)
+	     int chan_start_idx, int chan_num)
 {
 	int ret, i;
 	struct hif_msg *hif;
 	size_t buf_len =
 		sizeof(struct hif_req_start_scan_alt) + chan_num * sizeof(u8);
 	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(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,
 		body->num_of_probe_requests = 2;
 		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);
 	ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false);
diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h
index 3521c545ae6b..46eed6cfa247 100644
--- a/drivers/staging/wfx/hif_tx.h
+++ b/drivers/staging/wfx/hif_tx.h
@@ -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,
 		  void *buf, size_t buf_size);
 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_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
 	     struct ieee80211_channel *channel, const u8 *ssid, int ssidlen);
diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c
index 695b06974194..9e2d08317c9e 100644
--- a/drivers/staging/wfx/scan.c
+++ b/drivers/staging/wfx/scan.c
@@ -56,7 +56,7 @@ static int send_scan_req(struct wfx_vif *wvif,
 	wfx_tx_lock_flush(wvif->wdev);
 	wvif->scan_abort = false;
 	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) {
 		wfx_tx_unlock(wvif->wdev);
 		return -EIO;
-- 
2.33.0


  parent reply	other threads:[~2021-09-10 16:06 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 16:04 [PATCH 00/31] [PATCH 00/31] staging/wfx: usual maintenance Jerome Pouiller
2021-09-10 16:04 ` [PATCH 01/31] staging: wfx: use abbreviated message for "incorrect sequence" Jerome Pouiller
2021-09-10 16:04 ` [PATCH 02/31] staging: wfx: do not send CAB while scanning Jerome Pouiller
2021-09-10 16:31   ` Kari Argillander
2021-09-10 16:54     ` Jérôme Pouiller
2021-09-10 17:01       ` Kari Argillander
2021-09-10 17:12         ` Jérôme Pouiller
2021-09-10 16:04 ` [PATCH 03/31] staging: wfx: ignore PS when STA/AP share same channel Jerome Pouiller
2021-09-10 16:04 ` [PATCH 04/31] staging: wfx: wait for SCAN_CMPL after a SCAN_STOP Jerome Pouiller
2021-09-10 16:04 ` [PATCH 05/31] staging: wfx: avoid possible lock-up during scan Jerome Pouiller
2021-09-10 16:04 ` Jerome Pouiller [this message]
2021-09-10 16:04 ` [PATCH 07/31] staging: wfx: fix atomic accesses in wfx_tx_queue_empty() Jerome Pouiller
2021-09-10 16:04 ` [PATCH 08/31] staging: wfx: take advantage of wfx_tx_queue_empty() Jerome Pouiller
2021-09-10 16:04 ` [PATCH 09/31] staging: wfx: declare support for TDLS Jerome Pouiller
2021-09-10 16:04 ` [PATCH 10/31] staging: wfx: fix support for CSA Jerome Pouiller
2021-09-10 16:04 ` [PATCH 11/31] staging: wfx: relax the PDS existence constraint Jerome Pouiller
2021-09-10 16:04 ` [PATCH 12/31] staging: wfx: simplify API coherency check Jerome Pouiller
2021-09-10 16:04 ` [PATCH 13/31] staging: wfx: update with API 3.8 Jerome Pouiller
2021-09-10 16:43   ` Kari Argillander
2021-09-10 17:03     ` Jérôme Pouiller
2021-09-10 16:04 ` [PATCH 14/31] staging: wfx: uniformize counter names Jerome Pouiller
2021-09-10 16:04 ` [PATCH 15/31] staging: wfx: fix misleading 'rate_id' usage Jerome Pouiller
2021-09-10 16:04 ` [PATCH 16/31] staging: wfx: declare variables at beginning of functions Jerome Pouiller
2021-09-10 16:04 ` [PATCH 17/31] staging: wfx: simplify hif_join() Jerome Pouiller
2021-09-10 16:38   ` Kari Argillander
2021-09-10 16:04 ` [PATCH 18/31] staging: wfx: reorder function for slightly better eye candy Jerome Pouiller
2021-09-10 16:04 ` [PATCH 19/31] staging: wfx: fix error names Jerome Pouiller
2021-09-10 16:04 ` [PATCH 20/31] staging: wfx: apply naming rules in hif_tx_mib.c Jerome Pouiller
2021-09-10 16:04 ` [PATCH 21/31] staging: wfx: remove unused definition Jerome Pouiller
2021-09-10 16:04 ` [PATCH 22/31] staging: wfx: remove useless debug statement Jerome Pouiller
2021-09-10 16:04 ` [PATCH 23/31] staging: wfx: fix space after cast operator Jerome Pouiller
2021-09-10 16:04 ` [PATCH 24/31] staging: wfx: remove references to WFxxx in comments Jerome Pouiller
2021-09-10 16:04 ` [PATCH 25/31] staging: wfx: update files descriptions Jerome Pouiller
2021-09-10 16:04 ` [PATCH 26/31] staging: wfx: reformat comment Jerome Pouiller
2021-09-10 16:05 ` [PATCH 27/31] staging: wfx: avoid c99 comments Jerome Pouiller
2021-09-10 16:05 ` [PATCH 28/31] staging: wfx: fix comments styles Jerome Pouiller
2021-09-10 16:05 ` [PATCH 29/31] staging: wfx: remove useless comments after #endif Jerome Pouiller
2021-09-10 16:27   ` Kari Argillander
2021-09-10 16:49     ` Jérôme Pouiller
2021-09-10 17:05       ` Kari Argillander
2021-09-10 16:05 ` [PATCH 30/31] staging: wfx: explain the purpose of wfx_send_pds() Jerome Pouiller
2021-09-10 16:05 ` [PATCH 31/31] staging: wfx: indent functions arguments Jerome Pouiller
2021-09-10 16:57   ` Kari Argillander
2021-09-10 17:12     ` Jérôme Pouiller
2021-09-10 17:28       ` Kari Argillander
2021-09-10 17:07 ` [PATCH 00/31] [PATCH 00/31] staging/wfx: usual maintenance Kari Argillander
2021-09-10 17:15   ` Jérôme Pouiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210910160504.1794332-7-Jerome.Pouiller@silabs.com \
    --to=jerome.pouiller@silabs.com \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).