mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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>
This commit is contained in:
parent
191922cd4b
commit
3713b4e364
2 changed files with 612 additions and 375 deletions
|
@ -625,6 +625,10 @@
|
|||
* %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
|
||||
* event.
|
||||
*
|
||||
* @NL80211_CMD_GET_PROTOCOL_FEATURES: Get global nl80211 protocol features,
|
||||
* i.e. features for the nl80211 protocol rather than device features.
|
||||
* Returns the features in the %NL80211_ATTR_PROTOCOL_FEATURES bitmap.
|
||||
*
|
||||
* @NL80211_CMD_MAX: highest used command number
|
||||
* @__NL80211_CMD_AFTER_LAST: internal use
|
||||
*/
|
||||
|
@ -779,6 +783,8 @@ enum nl80211_commands {
|
|||
|
||||
NL80211_CMD_RADAR_DETECT,
|
||||
|
||||
NL80211_CMD_GET_PROTOCOL_FEATURES,
|
||||
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL80211_CMD_MAX below */
|
||||
|
@ -1383,6 +1389,13 @@ enum nl80211_commands {
|
|||
* advertised to the driver, e.g., to enable TDLS off channel operations
|
||||
* and PU-APSD.
|
||||
*
|
||||
* @NL80211_ATTR_PROTOCOL_FEATURES: global nl80211 feature flags, see
|
||||
* &enum nl80211_protocol_features, the attribute is a u32.
|
||||
*
|
||||
* @NL80211_ATTR_SPLIT_WIPHY_DUMP: flag attribute, userspace supports
|
||||
* receiving the data for a single wiphy split across multiple
|
||||
* messages, given with wiphy dump message
|
||||
*
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
*/
|
||||
|
@ -1669,6 +1682,9 @@ enum nl80211_attrs {
|
|||
NL80211_ATTR_STA_CAPABILITY,
|
||||
NL80211_ATTR_STA_EXT_CAPABILITY,
|
||||
|
||||
NL80211_ATTR_PROTOCOL_FEATURES,
|
||||
NL80211_ATTR_SPLIT_WIPHY_DUMP,
|
||||
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
|
@ -3619,4 +3635,16 @@ enum nl80211_dfs_state {
|
|||
NL80211_DFS_AVAILABLE,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum enum nl80211_protocol_features - nl80211 protocol features
|
||||
* @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting
|
||||
* wiphy dumps (if requested by the application with the attribute
|
||||
* %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the
|
||||
* wiphy dump by %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFINDEX or
|
||||
* %NL80211_ATTR_WDEV.
|
||||
*/
|
||||
enum nl80211_protocol_features {
|
||||
NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP = 1 << 0,
|
||||
};
|
||||
|
||||
#endif /* __LINUX_NL80211_H */
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue