ath10k: increase bmi timeout to fix OTP on qca99xx boards and add bmi identification...
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 319-0003-brcmfmac-use-wiphy_read_of_freq_limits-to-respect-li.patch
1 From 0f83ff69735651cc7a3d150466a5257ff829b62b Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Tue, 17 Jan 2017 23:35:50 +0100
4 Subject: [PATCH] brcmfmac: use wiphy_read_of_freq_limits to respect limits
5 from DT
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 This new helper reads extra frequency limits specified in DT and
11 disables unavailable chanels. This is useful for devices (like home
12 routers) with chipsets limited e.g. by board design.
13
14 In order to respect info read from DT we simply need to check for
15 IEEE80211_CHAN_DISABLED bit when constructing channel info.
16
17 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
18 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
19 ---
20 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++
21 1 file changed, 6 insertions(+)
22
23 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
24 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
25 @@ -5908,6 +5908,9 @@ static int brcmf_construct_chaninfo(stru
26 continue;
27 }
28
29 + if (channel->orig_flags & IEEE80211_CHAN_DISABLED)
30 + continue;
31 +
32 /* assuming the chanspecs order is HT20,
33 * HT40 upper, HT40 lower, and VHT80.
34 */
35 @@ -6509,6 +6512,9 @@ static int brcmf_setup_wiphy(struct wiph
36 wiphy->bands[NL80211_BAND_5GHZ] = band;
37 }
38 }
39 +
40 + wiphy_read_of_freq_limits(wiphy);
41 +
42 return 0;
43 }
44