aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-14 10:19:38 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-03-06 10:35:42 -0500
commit3713b4e364effef4b170c97d54528b1cdb16aa6b (patch)
tree1fb304fe4b02d44f0958e0931108bd1537ea1643 /include/uapi
parent191922cd4bfda551205c3a2dfe5b33287e8326ab (diff)
nl80211: allow splitting wiphy information in dumps
The per-wiphy information is getting large, to the point where with more than the typical number of channels it's too large and overflows, and userspace can't get any of the information at all. To address this (in a way that doesn't require making all messages bigger) allow userspace to specify that it can deal with wiphy information split across multiple parts of the dump, and if it can split up the data. This also splits up each channel separately so an arbitrary number of channels can be supported. Additionally, since GET_WIPHY has the same problem, add support for filtering the wiphy dump and get information for a single wiphy only, this allows userspace apps to use dump in this case to retrieve all data from a single device. As userspace needs to know if all this this is supported, add a global nl80211 feature set and include a bit for this behaviour in it. Cc: Dennis H Jensen <dennis.h.jensen@siemens.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/nl80211.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 523ed3d65b41..9844c10a2999 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -625,6 +625,10 @@
625 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the 625 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
626 * event. 626 * event.
627 * 627 *
628 * @NL80211_CMD_GET_PROTOCOL_FEATURES: Get global nl80211 protocol features,
629 * i.e. features for the nl80211 protocol rather than device features.
630 * Returns the features in the %NL80211_ATTR_PROTOCOL_FEATURES bitmap.
631 *
628 * @NL80211_CMD_MAX: highest used command number 632 * @NL80211_CMD_MAX: highest used command number
629 * @__NL80211_CMD_AFTER_LAST: internal use 633 * @__NL80211_CMD_AFTER_LAST: internal use
630 */ 634 */
@@ -779,6 +783,8 @@ enum nl80211_commands {
779 783
780 NL80211_CMD_RADAR_DETECT, 784 NL80211_CMD_RADAR_DETECT,
781 785
786 NL80211_CMD_GET_PROTOCOL_FEATURES,
787
782 /* add new commands above here */ 788 /* add new commands above here */
783 789
784 /* used to define NL80211_CMD_MAX below */ 790 /* used to define NL80211_CMD_MAX below */
@@ -1383,6 +1389,13 @@ enum nl80211_commands {
1383 * advertised to the driver, e.g., to enable TDLS off channel operations 1389 * advertised to the driver, e.g., to enable TDLS off channel operations
1384 * and PU-APSD. 1390 * and PU-APSD.
1385 * 1391 *
1392 * @NL80211_ATTR_PROTOCOL_FEATURES: global nl80211 feature flags, see
1393 * &enum nl80211_protocol_features, the attribute is a u32.
1394 *
1395 * @NL80211_ATTR_SPLIT_WIPHY_DUMP: flag attribute, userspace supports
1396 * receiving the data for a single wiphy split across multiple
1397 * messages, given with wiphy dump message
1398 *
1386 * @NL80211_ATTR_MAX: highest attribute number currently defined 1399 * @NL80211_ATTR_MAX: highest attribute number currently defined
1387 * @__NL80211_ATTR_AFTER_LAST: internal use 1400 * @__NL80211_ATTR_AFTER_LAST: internal use
1388 */ 1401 */
@@ -1669,6 +1682,9 @@ enum nl80211_attrs {
1669 NL80211_ATTR_STA_CAPABILITY, 1682 NL80211_ATTR_STA_CAPABILITY,
1670 NL80211_ATTR_STA_EXT_CAPABILITY, 1683 NL80211_ATTR_STA_EXT_CAPABILITY,
1671 1684
1685 NL80211_ATTR_PROTOCOL_FEATURES,
1686 NL80211_ATTR_SPLIT_WIPHY_DUMP,
1687
1672 /* add attributes here, update the policy in nl80211.c */ 1688 /* add attributes here, update the policy in nl80211.c */
1673 1689
1674 __NL80211_ATTR_AFTER_LAST, 1690 __NL80211_ATTR_AFTER_LAST,
@@ -3619,4 +3635,16 @@ enum nl80211_dfs_state {
3619 NL80211_DFS_AVAILABLE, 3635 NL80211_DFS_AVAILABLE,
3620}; 3636};
3621 3637
3638/**
3639 * enum enum nl80211_protocol_features - nl80211 protocol features
3640 * @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting
3641 * wiphy dumps (if requested by the application with the attribute
3642 * %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the
3643 * wiphy dump by %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFINDEX or
3644 * %NL80211_ATTR_WDEV.
3645 */
3646enum nl80211_protocol_features {
3647 NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP = 1 << 0,
3648};
3649
3622#endif /* __LINUX_NL80211_H */ 3650#endif /* __LINUX_NL80211_H */