History

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.

Johannes Berg committed 13 years ago

Commit 3713b4e1 parent 191922c2 files · +599 −362Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+28−0
@@ -625,6 +625,10 @@ · 624 unmodified lines
625625 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
626626 * event.
627627 *
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+ *
628632 * @NL80211_CMD_MAX: highest used command number
629633 * @__NL80211_CMD_AFTER_LAST: internal use
630634 */
@@ -779,6 +783,8 @@ enum nl80211_commands { · 148 unmodified lines
779783
780784 NL80211_CMD_RADAR_DETECT,
781785
786+ NL80211_CMD_GET_PROTOCOL_FEATURES,
787+
782788 /* add new commands above here */
783789
784790 /* used to define NL80211_CMD_MAX below */
@@ -1383,6 +1389,13 @@ enum nl80211_commands { · 598 unmodified lines
13831389 * advertised to the driver, e.g., to enable TDLS off channel operations
13841390 * and PU-APSD.
13851391 *
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+ *
13861399 * @NL80211_ATTR_MAX: highest attribute number currently defined
13871400 * @__NL80211_ATTR_AFTER_LAST: internal use
13881401 */
@@ -1669,6 +1682,9 @@ enum nl80211_attrs { · 280 unmodified lines
16691682 NL80211_ATTR_STA_CAPABILITY,
16701683 NL80211_ATTR_STA_EXT_CAPABILITY,
16711684
1685+ NL80211_ATTR_PROTOCOL_FEATURES,
1686+ NL80211_ATTR_SPLIT_WIPHY_DUMP,
1687+
16721688 /* add attributes here, update the policy in nl80211.c */
16731689
16741690 __NL80211_ATTR_AFTER_LAST,
@@ -3619,4 +3635,16 @@ enum nl80211_dfs_state { · 1944 unmodified lines
36193635 NL80211_DFS_AVAILABLE,
36203636 };
36213637
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+ */
3646+enum nl80211_protocol_features {
3647+ NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP = 1 << 0,
3648+};
3649+
36223650 #endif /* __LINUX_NL80211_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t