Set the RU puncturing bitmap to 0 if for any reason bandwidth
is downgraded to less than 80 Mhz.
Signed-off-by: Aloka Dixit <[email protected]>
---
net/mac80211/util.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 682a164f795a..0dd7e8dae5a9 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -4135,6 +4135,13 @@ u32 ieee80211_chandef_downgrade(struct cfg80211_chan_def *c)
break;
}
+ if (c->width != NL80211_CHAN_WIDTH_320 &&
+ c->width != NL80211_CHAN_WIDTH_160 &&
+ c->width != NL80211_CHAN_WIDTH_80) {
+ c->ru_punct_bitmap = 0;
+ c->ru_punct_bitmap_supp_he = 0;
+ }
+
WARN_ON_ONCE(!cfg80211_chandef_valid(c));
return ret;
--
2.31.1