mac80211: advertise operating mode notification capability
authorJohannes Berg <johannes.berg@intel.com>
Mon, 11 Feb 2013 13:27:08 +0000 (14:27 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Feb 2013 08:41:42 +0000 (09:41 +0100)
Use the new extended capabilities advertising to advertise
the fact that operating mode notification is supported.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/linux/ieee80211.h
net/mac80211/main.c

index e085fcf52b26cc7bede80ca3c53d94988933044a..7e24fe0cfbcd773ba8361bf713bf59543b1f750f 100644 (file)
@@ -1776,6 +1776,8 @@ enum ieee80211_tdls_actioncode {
 #define WLAN_EXT_CAPA5_TDLS_ENABLED    BIT(5)
 #define WLAN_EXT_CAPA5_TDLS_PROHIBITED BIT(6)
 
+#define WLAN_EXT_CAPA8_OPMODE_NOTIF    BIT(6)
+
 /* TDLS specific payload type in the LLC/SNAP header */
 #define WLAN_TDLS_SNAP_RFTYPE  0x2
 
index 9cdbc774cfd7f310b2ab3056c0587de3db8fddac..035344bc6b9c7ade7ae93edce85aaa5b2bdf20e5 100644 (file)
@@ -501,6 +501,11 @@ static const struct ieee80211_ht_cap mac80211_ht_capa_mod_mask = {
        },
 };
 
+static const u8 extended_capabilities[] = {
+       0, 0, 0, 0, 0, 0, 0,
+       WLAN_EXT_CAPA8_OPMODE_NOTIF,
+};
+
 struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
                                        const struct ieee80211_ops *ops)
 {
@@ -557,6 +562,10 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
                        WIPHY_FLAG_REPORTS_OBSS |
                        WIPHY_FLAG_OFFCHAN_TX;
 
+       wiphy->extended_capabilities = extended_capabilities;
+       wiphy->extended_capabilities_mask = extended_capabilities;
+       wiphy->extended_capabilities_len = ARRAY_SIZE(extended_capabilities);
+
        if (ops->remain_on_channel)
                wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;