nl80211: relax definition of restricted channels
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 31 Mar 2015 11:56:00 +0000 (13:56 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 31 Mar 2015 11:56:03 +0000 (13:56 +0200)
Only mark channels restricted that do not have a radar flag set.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
iwinfo_nl80211.c

index e0900525eb91004cfa815aaeddb58f622cff8223..256249234386f6bdf1f51643c5f0a977214ddaa9 100644 (file)
@@ -2274,9 +2274,8 @@ static int nl80211_get_freqlist_cb(struct nl_msg *msg, void *arg)
                        e->channel = nl80211_freq2channel(e->mhz);
 
                        e->restricted = (
-                               freqs[NL80211_FREQUENCY_ATTR_PASSIVE_SCAN] ||
-                               freqs[NL80211_FREQUENCY_ATTR_NO_IBSS]      ||
-                               freqs[NL80211_FREQUENCY_ATTR_RADAR]
+                               freqs[NL80211_FREQUENCY_ATTR_NO_IR] &&
+                               !freqs[NL80211_FREQUENCY_ATTR_RADAR]
                        ) ? 1 : 0;
 
                        e++;