History

cfg80211: fix reporting 5/10 MHz support to user space

nla_put_flag needs a real nl80211 attribute id, not a wiphy flag bit. While at it, split 5 and 10 MHz capability flags in case we ever need to support hardware that can only do one of the two. Also move the flag settings to the split-only information so we don't increase the space needed for old userspace.

Felix Fietkau committed 13 years ago

Commit 01e0daa1 parent f12140c2 files · +13 −4Browse files

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

Unified · Split

include/uapi/linux/nl80211.h+8−0
@@ -1515,6 +1515,11 @@ enum nl80211_commands { · 1514 unmodified lines
15151515 * to react to radar events, e.g. initiate a channel switch or leave the
15161516 * IBSS network.
15171517 *
1518+ * @NL80211_ATTR_SUPPORT_5_MHZ: A flag indicating that the device supports
1519+ * 5 MHz channel bandwidth.
1520+ * @NL80211_ATTR_SUPPORT_10_MHZ: A flag indicating that the device supports
1521+ * 10 MHz channel bandwidth.
1522+ *
15181523 * @NL80211_ATTR_MAX: highest attribute number currently defined
15191524 * @__NL80211_ATTR_AFTER_LAST: internal use
15201525 */
@@ -1831,6 +1836,9 @@ enum nl80211_attrs { · 310 unmodified lines
18311836
18321837 NL80211_ATTR_HANDLE_DFS,
18331838
1839+ NL80211_ATTR_SUPPORT_5_MHZ,
1840+ NL80211_ATTR_SUPPORT_10_MHZ,
1841+
18341842 /* add attributes here, update the policy in nl80211.c */
18351843
18361844 __NL80211_ATTR_AFTER_LAST,