diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-05-11 14:57:56 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-13 15:44:35 -0400 |
commit | eccb8e8f0c3af47aeb6dbe4012eb8d4fc888767a (patch) | |
tree | 3705a833e4a5efb08beb2bfc4175775171e74295 /include/linux/nl80211.h | |
parent | 0e46724a48fcc3bac1fecea413d20af64a75844f (diff) |
nl80211: improve station flags handling
It is currently not possible to modify station flags, but that
capability would be very useful. This patch introduces a new
nl80211 attribute that contains a set/mask for station flags,
and updates the internal API (and mac80211) to mirror that.
The new attribute is parsed before falling back to the old so
that userspace can specify both (if it can) to work on all
kernels.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r-- | include/linux/nl80211.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 58c4ee1822d3..aeefccfac0e1 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | /** | 30 | /** |
29 | * DOC: Station handling | 31 | * DOC: Station handling |
30 | * | 32 | * |
@@ -380,7 +382,7 @@ enum nl80211_commands { | |||
380 | * | 382 | * |
381 | * @NL80211_ATTR_STA_AID: Association ID for the station (u16) | 383 | * @NL80211_ATTR_STA_AID: Association ID for the station (u16) |
382 | * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of | 384 | * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of |
383 | * &enum nl80211_sta_flags. | 385 | * &enum nl80211_sta_flags (deprecated, use %NL80211_ATTR_STA_FLAGS2) |
384 | * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by | 386 | * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by |
385 | * IEEE 802.11 7.3.1.6 (u16). | 387 | * IEEE 802.11 7.3.1.6 (u16). |
386 | * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported | 388 | * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported |
@@ -499,6 +501,9 @@ enum nl80211_commands { | |||
499 | * this attribute can be used | 501 | * this attribute can be used |
500 | * with %NL80211_CMD_ASSOCIATE request | 502 | * with %NL80211_CMD_ASSOCIATE request |
501 | * | 503 | * |
504 | * @NL80211_ATTR_STA_FLAGS2: Attribute containing a | ||
505 | * &struct nl80211_sta_flag_update. | ||
506 | * | ||
502 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 507 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
503 | * @__NL80211_ATTR_AFTER_LAST: internal use | 508 | * @__NL80211_ATTR_AFTER_LAST: internal use |
504 | */ | 509 | */ |
@@ -603,6 +608,8 @@ enum nl80211_attrs { | |||
603 | 608 | ||
604 | NL80211_ATTR_USE_MFP, | 609 | NL80211_ATTR_USE_MFP, |
605 | 610 | ||
611 | NL80211_ATTR_STA_FLAGS2, | ||
612 | |||
606 | /* add attributes here, update the policy in nl80211.c */ | 613 | /* add attributes here, update the policy in nl80211.c */ |
607 | 614 | ||
608 | __NL80211_ATTR_AFTER_LAST, | 615 | __NL80211_ATTR_AFTER_LAST, |
@@ -692,6 +699,18 @@ enum nl80211_sta_flags { | |||
692 | }; | 699 | }; |
693 | 700 | ||
694 | /** | 701 | /** |
702 | * struct nl80211_sta_flag_update - station flags mask/set | ||
703 | * @mask: mask of station flags to set | ||
704 | * @set: which values to set them to | ||
705 | * | ||
706 | * Both mask and set contain bits as per &enum nl80211_sta_flags. | ||
707 | */ | ||
708 | struct nl80211_sta_flag_update { | ||
709 | __u32 mask; | ||
710 | __u32 set; | ||
711 | } __attribute__((packed)); | ||
712 | |||
713 | /** | ||
695 | * enum nl80211_rate_info - bitrate information | 714 | * enum nl80211_rate_info - bitrate information |
696 | * | 715 | * |
697 | * These attribute types are used with %NL80211_STA_INFO_TXRATE | 716 | * These attribute types are used with %NL80211_STA_INFO_TXRATE |