aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-11 08:20:05 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 03:41:42 -0500
commita50df0c4c0d97170a6c43573612acacc43e62fe7 (patch)
treefa0ccef7439230a03ac11376ced0fb96f198caf9 /include
parentaf0ed69badc67a0b6e976543f52029fce9ac8f69 (diff)
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 'include')
-rw-r--r--include/net/cfg80211.h11
-rw-r--r--include/uapi/linux/nl80211.h9
2 files changed, 20 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 8a9200f2f4a4..a229046d86d4 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2480,6 +2480,14 @@ struct wiphy_wowlan_support {
2480 * 2480 *
2481 * @max_acl_mac_addrs: Maximum number of MAC addresses that the device 2481 * @max_acl_mac_addrs: Maximum number of MAC addresses that the device
2482 * supports for ACL. 2482 * supports for ACL.
2483 *
2484 * @extended_capabilities: extended capabilities supported by the driver,
2485 * additional capabilities might be supported by userspace; these are
2486 * the 802.11 extended capabilities ("Extended Capabilities element")
2487 * and are in the same format as in the information element. See
2488 * 802.11-2012 8.4.2.29 for the defined fields.
2489 * @extended_capabilities_mask: mask of the valid values
2490 * @extended_capabilities_len: length of the extended capabilities
2483 */ 2491 */
2484struct wiphy { 2492struct wiphy {
2485 /* assign these fields before you register the wiphy */ 2493 /* assign these fields before you register the wiphy */
@@ -2546,6 +2554,9 @@ struct wiphy {
2546 */ 2554 */
2547 u32 probe_resp_offload; 2555 u32 probe_resp_offload;
2548 2556
2557 const u8 *extended_capabilities, *extended_capabilities_mask;
2558 u8 extended_capabilities_len;
2559
2549 /* If multiple wiphys are registered and you're handed e.g. 2560 /* If multiple wiphys are registered and you're handed e.g.
2550 * a regular netdev with assigned ieee80211_ptr, you won't 2561 * a regular netdev with assigned ieee80211_ptr, you won't
2551 * know whether it points to a wiphy your driver has registered 2562 * know whether it points to a wiphy your driver has registered
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 3880f6ad7ed1..1fd6e5611896 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1355,6 +1355,12 @@ enum nl80211_commands {
1355 * @NL80211_ATTR_RADAR_EVENT: Type of radar event for notification to userspace, 1355 * @NL80211_ATTR_RADAR_EVENT: Type of radar event for notification to userspace,
1356 * contains a value of enum nl80211_radar_event (u32). 1356 * contains a value of enum nl80211_radar_event (u32).
1357 * 1357 *
1358 * @NL80211_ATTR_EXT_CAPA: 802.11 extended capabilities that the kernel driver
1359 * has and handles. The format is the same as the IE contents. See
1360 * 802.11-2012 8.4.2.29 for more information.
1361 * @NL80211_ATTR_EXT_CAPA_MASK: Extended capabilities that the kernel driver
1362 * has set in the %NL80211_ATTR_EXT_CAPA value, for multibit fields.
1363 *
1358 * @NL80211_ATTR_MAX: highest attribute number currently defined 1364 * @NL80211_ATTR_MAX: highest attribute number currently defined
1359 * @__NL80211_ATTR_AFTER_LAST: internal use 1365 * @__NL80211_ATTR_AFTER_LAST: internal use
1360 */ 1366 */
@@ -1635,6 +1641,9 @@ enum nl80211_attrs {
1635 1641
1636 NL80211_ATTR_RADAR_EVENT, 1642 NL80211_ATTR_RADAR_EVENT,
1637 1643
1644 NL80211_ATTR_EXT_CAPA,
1645 NL80211_ATTR_EXT_CAPA_MASK,
1646
1638 /* add attributes here, update the policy in nl80211.c */ 1647 /* add attributes here, update the policy in nl80211.c */
1639 1648
1640 __NL80211_ATTR_AFTER_LAST, 1649 __NL80211_ATTR_AFTER_LAST,