mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 19:03:39 +00:00
42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
From 81d34af3b2198f7c7e94e3d843035efd7294de20 Mon Sep 17 00:00:00 2001
|
|
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
|
|
Date: Thu, 18 Jan 2024 17:35:05 +0800
|
|
Subject: [PATCH] mac80211: mtk: add support for scan dwell time customization
|
|
|
|
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
|
|
---
|
|
net/mac80211/scan.c | 10 ++++++++--
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
|
|
index e692a24..9d53f1a 100644
|
|
--- a/net/mac80211/scan.c
|
|
+++ b/net/mac80211/scan.c
|
|
@@ -683,7 +683,10 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
|
|
* After sending probe requests, wait for probe responses
|
|
* on the channel.
|
|
*/
|
|
- *next_delay = IEEE80211_CHANNEL_TIME;
|
|
+ *next_delay = msecs_to_jiffies(scan_req->duration) >
|
|
+ IEEE80211_PROBE_DELAY + IEEE80211_CHANNEL_TIME ?
|
|
+ msecs_to_jiffies(scan_req->duration) - IEEE80211_PROBE_DELAY :
|
|
+ IEEE80211_CHANNEL_TIME;
|
|
local->next_scan_state = SCAN_DECISION;
|
|
}
|
|
|
|
@@ -1011,7 +1014,10 @@ set_channel:
|
|
*/
|
|
if ((chan->flags & (IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_RADAR)) ||
|
|
!scan_req->n_ssids) {
|
|
- *next_delay = IEEE80211_PASSIVE_CHANNEL_TIME;
|
|
+ *next_delay = msecs_to_jiffies(scan_req->duration) >
|
|
+ IEEE80211_PASSIVE_CHANNEL_TIME ?
|
|
+ msecs_to_jiffies(scan_req->duration) :
|
|
+ IEEE80211_PASSIVE_CHANNEL_TIME;
|
|
local->next_scan_state = SCAN_DECISION;
|
|
if (scan_req->n_ssids)
|
|
set_bit(SCAN_BEACON_WAIT, &local->scanning);
|
|
--
|
|
2.25.1
|
|
|