summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-11 14:20:05 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 09:41:42 +0100
commita50df0c4c0d97170a6c43573612acacc43e62fe7 (patch)
treefa0ccef7439230a03ac11376ced0fb96f198caf9 /net
parentaf0ed69badc67a0b6e976543f52029fce9ac8f69 (diff)
downloadop-kernel-dev-a50df0c4c0d97170a6c43573612acacc43e62fe7.zip
op-kernel-dev-a50df0c4c0d97170a6c43573612acacc43e62fe7.tar.gz
cfg80211: advertise extended capabilities to userspace
In many cases, userspace may need to know which of the 802.11 extended capabilities ("Extended Capabilities element") are implemented in the driver or device, to include them e.g. in beacons, assoc request/response or other frames. Add a new nl80211 attribute to hold the extended capabilities bitmap for this. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7e40b9e..1237431 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1363,6 +1363,15 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 portid, u32 seq, int flag
dev->wiphy.max_acl_mac_addrs))
goto nla_put_failure;
+ if (dev->wiphy.extended_capabilities &&
+ (nla_put(msg, NL80211_ATTR_EXT_CAPA,
+ dev->wiphy.extended_capabilities_len,
+ dev->wiphy.extended_capabilities) ||
+ nla_put(msg, NL80211_ATTR_EXT_CAPA_MASK,
+ dev->wiphy.extended_capabilities_len,
+ dev->wiphy.extended_capabilities_mask)))
+ goto nla_put_failure;
+
return genlmsg_end(msg, hdr);
nla_put_failure:
OpenPOWER on IntegriCloud