FIX: [mac80211] show SRD channels correctly

BugzId: 75271
This commit is contained in:
Patrick Walther 2021-10-14 19:34:35 +02:00
parent f25f37d343
commit 5c9f467797
1 changed files with 10 additions and 9 deletions

View File

@ -893,16 +893,17 @@ diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 132df74..80b8caf 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1021,6 +1021,9 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
goto nla_put_failure;
if (nla_put_flag(msg, __NL80211_FREQUENCY_ATTR_NO_IBSS))
goto nla_put_failure;
@@ -1043,6 +1043,10 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
}
}
+ if ((chan->flags & IEEE80211_CHAN_SRD) &&
+ nla_put_flag(msg, NL80211_FREQUENCY_ATTR_SRD_CHANNEL))
+ goto nla_put_failure;
}
if (chan->flags & IEEE80211_CHAN_RADAR) {
if (nla_put_flag(msg, NL80211_FREQUENCY_ATTR_RADAR))
+
if (large) {
if ((chan->flags & IEEE80211_CHAN_NO_HT40MINUS) &&
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_MINUS))
@@ -3503,6 +3506,16 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
goto nla_put_failure;
}