nl80211: advertise HT/VHT channel limitations
[deliverable/linux.git] / net / wireless / nl80211.c
index c1e18ccf404961cef0a38be40b2da24c0a0db3f5..7e40b9e82b45b0b2470a3398b29e1c10b9b8881f 100644 (file)
@@ -562,6 +562,18 @@ static int nl80211_msg_put_channel(struct sk_buff *msg,
                if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_DFS_TIME, time))
                        goto nla_put_failure;
        }
+       if ((chan->flags & IEEE80211_CHAN_NO_HT40MINUS) &&
+           nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_MINUS))
+               goto nla_put_failure;
+       if ((chan->flags & IEEE80211_CHAN_NO_HT40PLUS) &&
+           nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_PLUS))
+               goto nla_put_failure;
+       if ((chan->flags & IEEE80211_CHAN_NO_80MHZ) &&
+           nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_80MHZ))
+               goto nla_put_failure;
+       if ((chan->flags & IEEE80211_CHAN_NO_160MHZ) &&
+           nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_160MHZ))
+               goto nla_put_failure;
 
        if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
                        DBM_TO_MBM(chan->max_power)))
This page took 0.025401 seconds and 5 git commands to generate.