aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-04-04 02:37:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-07 14:37:56 -0400
commitd5cdfacb35ed886271d1ccfffbded98d3447da17 (patch)
tree8233a713949c4c8da8c98e75868efc74d5613c3d /include
parent7590a550b88b8c3cb025f0a8ed58e279ad62e4c1 (diff)
cfg80211: Add local-state-change-only auth/deauth/disassoc
cfg80211 is quite strict on allowing authentication and association commands only in certain states. In order to meet these requirements, user space applications may need to clear authentication or association state in some cases. Currently, this can be done with deauth/disassoc command, but that ends up sending out Deauthentication or Disassociation frame unnecessarily. Add a new nl80211 attribute to allow this sending of the frame be skipped, but with all other deauth/disassoc operations being completed. Similar state change is also needed for IEEE 802.11r FT protocol in the FT-over-DS case which does not use Authentication frame exchange in a transition to another BSS. For this to work with cfg80211, an authentication entry needs to be created for the target BSS without sending out an Authentication frame. The nl80211 authentication command can be used for this purpose, too, with the new attribute to indicate that the command is only for changing local state. This enables wpa_supplicant to complete FT-over-DS transition successfully. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h8
-rw-r--r--include/net/cfg80211.h11
2 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index daf6a3432b92..2ea3edeee7aa 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -703,6 +703,12 @@ enum nl80211_commands {
703 * @NL80211_ATTR_CQM: connection quality monitor configuration in a 703 * @NL80211_ATTR_CQM: connection quality monitor configuration in a
704 * nested attribute with %NL80211_ATTR_CQM_* sub-attributes. 704 * nested attribute with %NL80211_ATTR_CQM_* sub-attributes.
705 * 705 *
706 * @NL80211_ATTR_LOCAL_STATE_CHANGE: Flag attribute to indicate that a command
707 * is requesting a local authentication/association state change without
708 * invoking actual management frame exchange. This can be used with
709 * NL80211_CMD_AUTHENTICATE, NL80211_CMD_DEAUTHENTICATE,
710 * NL80211_CMD_DISASSOCIATE.
711 *
706 * @NL80211_ATTR_MAX: highest attribute number currently defined 712 * @NL80211_ATTR_MAX: highest attribute number currently defined
707 * @__NL80211_ATTR_AFTER_LAST: internal use 713 * @__NL80211_ATTR_AFTER_LAST: internal use
708 */ 714 */
@@ -856,6 +862,8 @@ enum nl80211_attrs {
856 862
857 NL80211_ATTR_CQM, 863 NL80211_ATTR_CQM,
858 864
865 NL80211_ATTR_LOCAL_STATE_CHANGE,
866
859 /* add attributes here, update the policy in nl80211.c */ 867 /* add attributes here, update the policy in nl80211.c */
860 868
861 __NL80211_ATTR_AFTER_LAST, 869 __NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 868cfd3b9724..37cebd3aa0f7 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -704,6 +704,10 @@ struct cfg80211_crypto_settings {
704 * @key_len: length of WEP key for shared key authentication 704 * @key_len: length of WEP key for shared key authentication
705 * @key_idx: index of WEP key for shared key authentication 705 * @key_idx: index of WEP key for shared key authentication
706 * @key: WEP key for shared key authentication 706 * @key: WEP key for shared key authentication
707 * @local_state_change: This is a request for a local state only, i.e., no
708 * Authentication frame is to be transmitted and authentication state is
709 * to be changed without having to wait for a response from the peer STA
710 * (AP).
707 */ 711 */
708struct cfg80211_auth_request { 712struct cfg80211_auth_request {
709 struct cfg80211_bss *bss; 713 struct cfg80211_bss *bss;
@@ -712,6 +716,7 @@ struct cfg80211_auth_request {
712 enum nl80211_auth_type auth_type; 716 enum nl80211_auth_type auth_type;
713 const u8 *key; 717 const u8 *key;
714 u8 key_len, key_idx; 718 u8 key_len, key_idx;
719 bool local_state_change;
715}; 720};
716 721
717/** 722/**
@@ -744,12 +749,15 @@ struct cfg80211_assoc_request {
744 * @ie: Extra IEs to add to Deauthentication frame or %NULL 749 * @ie: Extra IEs to add to Deauthentication frame or %NULL
745 * @ie_len: Length of ie buffer in octets 750 * @ie_len: Length of ie buffer in octets
746 * @reason_code: The reason code for the deauthentication 751 * @reason_code: The reason code for the deauthentication
752 * @local_state_change: This is a request for a local state only, i.e., no
753 * Deauthentication frame is to be transmitted.
747 */ 754 */
748struct cfg80211_deauth_request { 755struct cfg80211_deauth_request {
749 struct cfg80211_bss *bss; 756 struct cfg80211_bss *bss;
750 const u8 *ie; 757 const u8 *ie;
751 size_t ie_len; 758 size_t ie_len;
752 u16 reason_code; 759 u16 reason_code;
760 bool local_state_change;
753}; 761};
754 762
755/** 763/**
@@ -762,12 +770,15 @@ struct cfg80211_deauth_request {
762 * @ie: Extra IEs to add to Disassociation frame or %NULL 770 * @ie: Extra IEs to add to Disassociation frame or %NULL
763 * @ie_len: Length of ie buffer in octets 771 * @ie_len: Length of ie buffer in octets
764 * @reason_code: The reason code for the disassociation 772 * @reason_code: The reason code for the disassociation
773 * @local_state_change: This is a request for a local state only, i.e., no
774 * Disassociation frame is to be transmitted.
765 */ 775 */
766struct cfg80211_disassoc_request { 776struct cfg80211_disassoc_request {
767 struct cfg80211_bss *bss; 777 struct cfg80211_bss *bss;
768 const u8 *ie; 778 const u8 *ie;
769 size_t ie_len; 779 size_t ie_len;
770 u16 reason_code; 780 u16 reason_code;
781 bool local_state_change;
771}; 782};
772 783
773/** 784/**