[LEDE-DEV] [PATCH iwinfo 3/3] nl80211: store info about freq being not available for some bandwidths

Rafał Miłecki zajec5 at gmail.com
Tue Aug 15 01:36:19 PDT 2017


From: Rafał Miłecki <rafal at milecki.pl>

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 iwinfo_nl80211.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index f9b13dd..718e111 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -2401,6 +2401,19 @@ static int nl80211_get_freqlist_cb(struct nl_msg *msg, void *arg)
 						!freqs[NL80211_FREQUENCY_ATTR_RADAR]
 					) ? 1 : 0;
 
+					if (freqs[NL80211_FREQUENCY_ATTR_NO_HT40_MINUS])
+						e->flags |= IWINFO_FREQ_NO_HT40MINUS;
+					if (freqs[NL80211_FREQUENCY_ATTR_NO_HT40_PLUS])
+						e->flags |= IWINFO_FREQ_NO_HT40PLUS;
+					if (freqs[NL80211_FREQUENCY_ATTR_NO_80MHZ])
+						e->flags |= IWINFO_FREQ_NO_80MHZ;
+					if (freqs[NL80211_FREQUENCY_ATTR_NO_160MHZ])
+						e->flags |= IWINFO_FREQ_NO_160MHZ;
+					if (freqs[NL80211_FREQUENCY_ATTR_NO_20MHZ])
+						e->flags |= IWINFO_FREQ_NO_20MHZ;
+					if (freqs[NL80211_FREQUENCY_ATTR_NO_10MHZ])
+						e->flags |= IWINFO_FREQ_NO_10MHZ;
+
 					e++;
 					arr->count++;
 				}
-- 
2.11.0




More information about the Lede-dev mailing list