mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
2dcd955aea
This commit refreshes and updates the VHT160 ath10k support fix patches and adds a number of backports from ath-next: * 8ed05ed06fca ath10k: handle tdls peer events * 229329ff345f ath10k: wmi: modify svc bitmap parsing for wcn3990 * 14d65775687c ath10k: advertise TDLS wider bandwidth support for 5GHz * bc64d05220f3 ath10k: debugfs support to get final TPC stats for 10.4 variants * 8b2d93dd2261 ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk) * 4b190675ad06 ath10k: fix kernel panic while reading tpc_stats * be8cce96f14d ath10k: add support to configure channel dwell time * f40105e67478 ath: add support to get the detected radar specifications * 6f6eb1bcbeff ath10k: DFS Host Confirmation * 260e629bbf44 ath10k: fix memory leak of tpc_stats * 38441fb6fcbb ath10k: support use of channel 173 * 2e9bcd0d7324 ath10k: fix spectral scan for QCA9984 and QCA9888 chipsets Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [move backported patches in the 3xx number space, bring in upstream order, replace incomplete patch files with git format-patch ones, rewrite commit message, fix subject] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
93 lines
3.0 KiB
Diff
93 lines
3.0 KiB
Diff
From be8cce96f14dc925ecfb702be0392a52cf78adb5 Mon Sep 17 00:00:00 2001
|
|
From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
Date: Wed, 23 May 2018 11:09:09 +0300
|
|
Subject: [PATCH] ath10k: add support to configure channel dwell time
|
|
|
|
Configure channel dwell time from duration of the scan request
|
|
received from mac80211 when the duration is non-zero. When the
|
|
scan request does not have duration value, use the default ones,
|
|
the current implementation.
|
|
|
|
Corresponding flag NL80211_EXT_FEATURE_SET_SCAN_DWELL is
|
|
advertized.
|
|
|
|
Supported Chipsets:
|
|
-QCA988X/QCA9887 PCI
|
|
-QCA99X0/QCA9984/QCA9888/QCA4019 PCI
|
|
-QCA6174/QCA9377 PCI/USB/SDIO
|
|
-WCN3990 SNOC
|
|
|
|
Tested on QCA9984 with firmware ver 10.4-3.6-0010
|
|
|
|
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
|
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
---
|
|
drivers/net/wireless/ath/ath10k/core.h | 1 +
|
|
drivers/net/wireless/ath/ath10k/mac.c | 23 ++++++++++++++++++++---
|
|
2 files changed, 21 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath10k/core.h
|
|
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
|
@@ -43,6 +43,7 @@
|
|
#define WO(_f) ((_f##_OFFSET) >> 2)
|
|
|
|
#define ATH10K_SCAN_ID 0
|
|
+#define ATH10K_SCAN_CHANNEL_SWITCH_WMI_EVT_OVERHEAD 10 /* msec */
|
|
#define WMI_READY_TIMEOUT (5 * HZ)
|
|
#define ATH10K_FLUSH_TIMEOUT_HZ (5 * HZ)
|
|
#define ATH10K_CONNECTION_LOSS_HZ (3 * HZ)
|
|
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
|
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
|
@@ -5597,6 +5597,7 @@ static int ath10k_hw_scan(struct ieee802
|
|
struct wmi_start_scan_arg arg;
|
|
int ret = 0;
|
|
int i;
|
|
+ u32 scan_timeout;
|
|
|
|
mutex_lock(&ar->conf_mutex);
|
|
|
|
@@ -5647,6 +5648,22 @@ static int ath10k_hw_scan(struct ieee802
|
|
arg.channels[i] = req->channels[i]->center_freq;
|
|
}
|
|
|
|
+ /* if duration is set, default dwell times will be overwritten */
|
|
+ if (req->duration) {
|
|
+ arg.dwell_time_active = req->duration;
|
|
+ arg.dwell_time_passive = req->duration;
|
|
+ arg.burst_duration_ms = req->duration;
|
|
+
|
|
+ scan_timeout = min_t(u32, arg.max_rest_time *
|
|
+ (arg.n_channels - 1) + (req->duration +
|
|
+ ATH10K_SCAN_CHANNEL_SWITCH_WMI_EVT_OVERHEAD) *
|
|
+ arg.n_channels, arg.max_scan_time + 200);
|
|
+
|
|
+ } else {
|
|
+ /* Add a 200ms margin to account for event/command processing */
|
|
+ scan_timeout = arg.max_scan_time + 200;
|
|
+ }
|
|
+
|
|
ret = ath10k_start_scan(ar, &arg);
|
|
if (ret) {
|
|
ath10k_warn(ar, "failed to start hw scan: %d\n", ret);
|
|
@@ -5655,10 +5672,8 @@ static int ath10k_hw_scan(struct ieee802
|
|
spin_unlock_bh(&ar->data_lock);
|
|
}
|
|
|
|
- /* Add a 200ms margin to account for event/command processing */
|
|
ieee80211_queue_delayed_work(ar->hw, &ar->scan.timeout,
|
|
- msecs_to_jiffies(arg.max_scan_time +
|
|
- 200));
|
|
+ msecs_to_jiffies(scan_timeout));
|
|
|
|
exit:
|
|
mutex_unlock(&ar->conf_mutex);
|
|
@@ -8267,6 +8282,8 @@ int ath10k_mac_register(struct ath10k *a
|
|
}
|
|
|
|
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
|
|
+ wiphy_ext_feature_set(ar->hw->wiphy,
|
|
+ NL80211_EXT_FEATURE_SET_SCAN_DWELL);
|
|
|
|
/*
|
|
* on LL hardware queues are managed entirely by the FW
|