linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mwifiex: send fewer channels to scan while connected
@ 2017-03-16 10:46 Amitkumar Karwar
  2017-03-20 17:09 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Amitkumar Karwar @ 2017-03-16 10:46 UTC (permalink / raw)
  To: linux-wireless; +Cc: Amitkumar Karwar

Application triggers periodic background scans when device is connected.
We will scan less number of channels per scan command so that data
traffic won't get affected.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/marvell/mwifiex/scan.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
index 1816916..8295a05 100644
--- a/drivers/net/wireless/marvell/mwifiex/scan.c
+++ b/drivers/net/wireless/marvell/mwifiex/scan.c
@@ -989,10 +989,15 @@ enum cipher_suite {
 	 *  If a specific BSSID or SSID is used, the number of channels in the
 	 *  scan command will be increased to the absolute maximum.
 	 */
-	if (*filtered_scan)
+	if (*filtered_scan) {
 		*max_chan_per_scan = MWIFIEX_MAX_CHANNELS_PER_SPECIFIC_SCAN;
-	else
-		*max_chan_per_scan = MWIFIEX_DEF_CHANNELS_PER_SCAN_CMD;
+	} else {
+		if (!priv->media_connected)
+			*max_chan_per_scan = MWIFIEX_DEF_CHANNELS_PER_SCAN_CMD;
+		else
+			*max_chan_per_scan =
+					MWIFIEX_DEF_CHANNELS_PER_SCAN_CMD / 2;
+	}
 
 	if (adapter->ext_scan) {
 		bss_mode = (struct mwifiex_ie_types_bss_mode *)tlv_pos;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: mwifiex: send fewer channels to scan while connected
  2017-03-16 10:46 [PATCH] mwifiex: send fewer channels to scan while connected Amitkumar Karwar
@ 2017-03-20 17:09 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-03-20 17:09 UTC (permalink / raw)
  To: Amitkumar Karwar; +Cc: linux-wireless, Amitkumar Karwar

Amitkumar Karwar <akarwar@marvell.com> wrote:
> Application triggers periodic background scans when device is connected.
> We will scan less number of channels per scan command so that data
> traffic won't get affected.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>

Patch applied to wireless-drivers-next.git, thanks.

0a5cc49750b8 mwifiex: send fewer channels to scan while connected

-- 
https://patchwork.kernel.org/patch/9627821/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-20 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16 10:46 [PATCH] mwifiex: send fewer channels to scan while connected Amitkumar Karwar
2017-03-20 17:09 ` Kalle Valo

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).