mac80211: ath10k: Limit available channels via DT ieee80211-freq-limit
[openwrt/staging/stintel.git] / package / kernel / mac80211 / patches / 976-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
1 From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001
2 From: Sven Eckelmann <sven.eckelmann@openmesh.com>
3 Date: Mon, 30 Jul 2018 17:31:41 +0200
4 Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit
5
6 Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in
7 the RX and TX path. These filtered channel can in theory still be used by
8 the hardware but the signal strength is reduced so much that it makes no
9 sense.
10
11 There is already a DT property to limit the available channels but ath10k
12 has to manually call this functionality to limit the currrently set wiphy
13 channels further.
14
15 Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
16
17 Forwarded: https://patchwork.kernel.org/patch/10549245/
18 ---
19 drivers/net/wireless/ath/ath10k/mac.c | 2 ++
20 1 file changed, 2 insertions(+)
21
22 diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
23 index 95243b48a179..8ed37ffd320f 100644
24 --- a/drivers/net/wireless/ath/ath10k/mac.c
25 +++ b/drivers/net/wireless/ath/ath10k/mac.c
26 @@ -18,6 +18,7 @@
27
28 #include "mac.h"
29
30 +#include <net/cfg80211.h>
31 #include <net/mac80211.h>
32 #include <linux/etherdevice.h>
33 #include <linux/acpi.h>
34 @@ -8306,6 +8307,7 @@ int ath10k_mac_register(struct ath10k *ar)
35 ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
36 }
37
38 + wiphy_read_of_freq_limits(ar->hw->wiphy);
39 ath10k_mac_setup_ht_vht_cap(ar);
40
41 ar->hw->wiphy->interface_modes =
42 --
43 2.11.0
44