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
625 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the625 * %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 number632 * @NL80211_CMD_MAX: highest used command number
629 * @__NL80211_CMD_AFTER_LAST: internal use633 * @__NL80211_CMD_AFTER_LAST: internal use
630 */634 */
@@ -779,6 +783,8 @@ enum nl80211_commands { · 148 unmodified lines
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 { · 598 unmodified lines
1383 * advertised to the driver, e.g., to enable TDLS off channel operations1389 * 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 defined1399 * @NL80211_ATTR_MAX: highest attribute number currently defined
1387 * @__NL80211_ATTR_AFTER_LAST: internal use1400 * @__NL80211_ATTR_AFTER_LAST: internal use
1388 */1401 */
@@ -1669,6 +1682,9 @@ enum nl80211_attrs { · 280 unmodified lines
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 { · 1944 unmodified lines
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 */

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