Commit 0f83ff69 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Kalle Valo

brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT

This new helper reads extra frequency limits specified in DT and
disables unavailable chanels. This is useful for devices (like home
routers) with chipsets limited e.g. by board design.

In order to respect info read from DT we simply need to check for
IEEE80211_CHAN_DISABLED bit when constructing channel info.
Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 50d55b6d
...@@ -5908,6 +5908,9 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, ...@@ -5908,6 +5908,9 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
continue; continue;
} }
if (channel->orig_flags & IEEE80211_CHAN_DISABLED)
continue;
/* assuming the chanspecs order is HT20, /* assuming the chanspecs order is HT20,
* HT40 upper, HT40 lower, and VHT80. * HT40 upper, HT40 lower, and VHT80.
*/ */
...@@ -6509,6 +6512,9 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp) ...@@ -6509,6 +6512,9 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp)
wiphy->bands[NL80211_BAND_5GHZ] = band; wiphy->bands[NL80211_BAND_5GHZ] = band;
} }
} }
wiphy_read_of_freq_limits(wiphy);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment