nl80211: store info about freq being not available for some bandwidths
authorRafał Miłecki <rafal@milecki.pl>
Tue, 15 Aug 2017 08:36:19 +0000 (10:36 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Wed, 16 Aug 2017 15:15:19 +0000 (17:15 +0200)
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Jo-Philipp Wich <jo@mein.io>
iwinfo_nl80211.c

index 0f9800bfc7ca87da37d368b6a36f34fabb580520..6bc131819adf89211a1fb08f18f0049a7df5f515 100644 (file)
@@ -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++;
                                }