mac80211: brcmfmac: backport 4.19 patches preparing monitor mode support
[openwrt/staging/wigyori.git] / package / kernel / mac80211 / patches / 380-0010-ath10k-support-use-of-channel-173.patch
1 From 38441fb6fcbb97817dff5c012609860a2b39c3e9 Mon Sep 17 00:00:00 2001
2 From: Ben Greear <greearb@candelatech.com>
3 Date: Tue, 2 Jan 2018 16:51:01 -0800
4 Subject: [PATCH] ath10k: support use of channel 173
5
6 The India regulatory domain allows CH 173, so add that to the
7 available channel list. I verified basic connectivity between
8 a 9880 and 9984 NIC.
9
10 Signed-off-by: Ben Greear <greearb@candelatech.com>
11 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
12 ---
13 drivers/net/wireless/ath/ath10k/core.h | 3 ++-
14 drivers/net/wireless/ath/ath10k/mac.c | 3 +++
15 drivers/net/wireless/ath/ath10k/wmi.c | 2 +-
16 3 files changed, 6 insertions(+), 2 deletions(-)
17
18 --- a/drivers/net/wireless/ath/ath10k/core.h
19 +++ b/drivers/net/wireless/ath/ath10k/core.h
20 @@ -47,7 +47,8 @@
21 #define WMI_READY_TIMEOUT (5 * HZ)
22 #define ATH10K_FLUSH_TIMEOUT_HZ (5 * HZ)
23 #define ATH10K_CONNECTION_LOSS_HZ (3 * HZ)
24 -#define ATH10K_NUM_CHANS 40
25 +#define ATH10K_NUM_CHANS 41
26 +#define ATH10K_MAX_5G_CHAN 173
27
28 /* Antenna noise floor */
29 #define ATH10K_DEFAULT_NOISE_FLOOR -95
30 --- a/drivers/net/wireless/ath/ath10k/mac.c
31 +++ b/drivers/net/wireless/ath/ath10k/mac.c
32 @@ -7766,6 +7766,9 @@ static const struct ieee80211_channel at
33 CHAN5G(161, 5805, 0),
34 CHAN5G(165, 5825, 0),
35 CHAN5G(169, 5845, 0),
36 + CHAN5G(173, 5865, 0),
37 + /* If you add more, you may need to change ATH10K_MAX_5G_CHAN */
38 + /* And you will definitely need to change ATH10K_NUM_CHANS in core.h */
39 };
40
41 struct ath10k *ath10k_mac_create(size_t priv_size)
42 --- a/drivers/net/wireless/ath/ath10k/wmi.c
43 +++ b/drivers/net/wireless/ath/ath10k/wmi.c
44 @@ -2363,7 +2363,7 @@ int ath10k_wmi_event_mgmt_rx(struct ath1
45 */
46 if (channel >= 1 && channel <= 14) {
47 status->band = NL80211_BAND_2GHZ;
48 - } else if (channel >= 36 && channel <= 169) {
49 + } else if (channel >= 36 && channel <= ATH10K_MAX_5G_CHAN) {
50 status->band = NL80211_BAND_5GHZ;
51 } else {
52 /* Shouldn't happen unless list of advertised channels to