aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-03-19 07:39:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-27 20:13:02 -0400
commit636a5d3625993c5ca59abc81794b9ded93cdb740 (patch)
tree53ee8d522153c36c631f8cb733a6e808c20ef332 /include/linux
parent6039f6d23fe792d615da5449e9fa1c6b43caacf6 (diff)
nl80211: Add MLME primitives to support external SME
This patch adds new nl80211 commands to allow user space to request authentication and association (and also deauthentication and disassociation). The commands are structured to allow separate authentication and association steps, i.e., the interface between kernel and user space is similar to the MLME SAP interface in IEEE 802.11 standard and an user space application takes the role of the SME. The patch introduces MLME-AUTHENTICATE.request, MLME-{,RE}ASSOCIATE.request, MLME-DEAUTHENTICATE.request, and MLME-DISASSOCIATE.request primitives. The authentication and association commands request the actual operations in two steps (assuming the driver supports this; if not, separate authentication step is skipped; this could end up being a separate "connect" command). The initial implementation for mac80211 uses the current net/mac80211/mlme.c for actual sending and processing of management frames and the new nl80211 commands will just stop the current state machine from moving automatically from authentication to association. Future cleanup may move more of the MLME operations into cfg80211. The goal of this design is to provide more control of authentication and association process to user space without having to move the full MLME implementation. This should be enough to allow IEEE 802.11r FT protocol and 802.11s SAE authentication to be implemented. Obviously, this will also bring the extra benefit of not having to use WEXT for association requests with mac80211. An example implementation of a user space SME using the new nl80211 commands is available for wpa_supplicant. This patch is enough to get IEEE 802.11r FT protocol working with over-the-air mechanism (over-the-DS will need additional MLME primitives for handling the FT Action frames). Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ieee80211.h1
-rw-r--r--include/linux/nl80211.h58
2 files changed, 49 insertions, 10 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 382387e75b89..4b501b48ce86 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -867,6 +867,7 @@ struct ieee80211_ht_info {
867/* Authentication algorithms */ 867/* Authentication algorithms */
868#define WLAN_AUTH_OPEN 0 868#define WLAN_AUTH_OPEN 0
869#define WLAN_AUTH_SHARED_KEY 1 869#define WLAN_AUTH_SHARED_KEY 1
870#define WLAN_AUTH_FT 2
870#define WLAN_AUTH_LEAP 128 871#define WLAN_AUTH_LEAP 128
871 872
872#define WLAN_AUTH_CHALLENGE_LEN 128 873#define WLAN_AUTH_CHALLENGE_LEN 128
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 5ce68ae8314e..9685eaab40a9 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -161,24 +161,37 @@
161 * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on 161 * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on
162 * to (%NL80211_ATTR_REG_ALPHA2). 162 * to (%NL80211_ATTR_REG_ALPHA2).
163 * 163 *
164 * @NL80211_CMD_AUTHENTICATE: authentication notification (on the "mlme" 164 * @NL80211_CMD_AUTHENTICATE: authentication request and notification.
165 * multicast group). This event reports reception of an Authentication 165 * This command is used both as a command (request to authenticate) and
166 * as an event on the "mlme" multicast group indicating completion of the
167 * authentication process.
168 * When used as a command, %NL80211_ATTR_IFINDEX is used to identify the
169 * interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and
170 * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify
171 * the SSID (mainly for association, but is included in authentication
172 * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ is used
173 * to specify the frequence of the channel in MHz. %NL80211_ATTR_AUTH_TYPE
174 * is used to specify the authentication type. %NL80211_ATTR_IE is used to
175 * define IEs (VendorSpecificInfo, but also including RSN IE and FT IEs)
176 * to be added to the frame.
177 * When used as an event, this reports reception of an Authentication
166 * frame in station and IBSS modes when the local MLME processed the 178 * frame in station and IBSS modes when the local MLME processed the
167 * frame, i.e., it was for the local STA and was received in correct 179 * frame, i.e., it was for the local STA and was received in correct
168 * state. This is similar to MLME-AUTHENTICATE.confirm primitive in the 180 * state. This is similar to MLME-AUTHENTICATE.confirm primitive in the
169 * MLME SAP interface (kernel providing MLME, userspace SME). The 181 * MLME SAP interface (kernel providing MLME, userspace SME). The
170 * included NL80211_ATTR_FRAME attribute contains the management frame 182 * included NL80211_ATTR_FRAME attribute contains the management frame
171 * (including both the header and frame body, but not FCS). 183 * (including both the header and frame body, but not FCS).
172 * @NL80211_CMD_ASSOCIATE: association notification; like 184 * @NL80211_CMD_ASSOCIATE: association request and notification; like
173 * NL80211_CMD_AUTHENTICATE but for Association Response and Reassociation 185 * NL80211_CMD_AUTHENTICATE but for Association and Reassociation
174 * Response frames (similar to MLME-ASSOCIATE.confirm or 186 * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request,
175 * MLME-REASSOCIATE.confirm primitives). 187 * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives).
176 * @NL80211_CMD_DEAUTHENTICATE: deauthentication notification; like 188 * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like
177 * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to 189 * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to
178 * MLME-DEAUTHENTICATE.indication primitive). 190 * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication
179 * @NL80211_CMD_DISASSOCIATE: disassociation notification; like 191 * primitives).
192 * @NL80211_CMD_DISASSOCIATE: disassociation request and notification; like
180 * NL80211_CMD_AUTHENTICATE but for Disassociation frames (similar to 193 * NL80211_CMD_AUTHENTICATE but for Disassociation frames (similar to
181 * MLME-DISASSOCIATE.indication primitive). 194 * MLME-DISASSOCIATE.request and MLME-DISASSOCIATE.indication primitives).
182 * 195 *
183 * @NL80211_CMD_MAX: highest used command number 196 * @NL80211_CMD_MAX: highest used command number
184 * @__NL80211_CMD_AFTER_LAST: internal use 197 * @__NL80211_CMD_AFTER_LAST: internal use
@@ -383,6 +396,11 @@ enum nl80211_commands {
383 * @NL80211_ATTR_FRAME: frame data (binary attribute), including frame header 396 * @NL80211_ATTR_FRAME: frame data (binary attribute), including frame header
384 * and body, but not FCS; used, e.g., with NL80211_CMD_AUTHENTICATE and 397 * and body, but not FCS; used, e.g., with NL80211_CMD_AUTHENTICATE and
385 * NL80211_CMD_ASSOCIATE events 398 * NL80211_CMD_ASSOCIATE events
399 * @NL80211_ATTR_SSID: SSID (binary attribute, 0..32 octets)
400 * @NL80211_ATTR_AUTH_TYPE: AuthenticationType, see &enum nl80211_auth_type,
401 * represented as a u32
402 * @NL80211_ATTR_REASON_CODE: ReasonCode for %NL80211_CMD_DEAUTHENTICATE and
403 * %NL80211_CMD_DISASSOCIATE, u16
386 * 404 *
387 * @NL80211_ATTR_MAX: highest attribute number currently defined 405 * @NL80211_ATTR_MAX: highest attribute number currently defined
388 * @__NL80211_ATTR_AFTER_LAST: internal use 406 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -464,6 +482,9 @@ enum nl80211_attrs {
464 NL80211_ATTR_SUPPORTED_COMMANDS, 482 NL80211_ATTR_SUPPORTED_COMMANDS,
465 483
466 NL80211_ATTR_FRAME, 484 NL80211_ATTR_FRAME,
485 NL80211_ATTR_SSID,
486 NL80211_ATTR_AUTH_TYPE,
487 NL80211_ATTR_REASON_CODE,
467 488
468 /* add attributes here, update the policy in nl80211.c */ 489 /* add attributes here, update the policy in nl80211.c */
469 490
@@ -485,6 +506,9 @@ enum nl80211_attrs {
485#define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR 506#define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR
486#define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE 507#define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE
487#define NL80211_ATTR_FRAME NL80211_ATTR_FRAME 508#define NL80211_ATTR_FRAME NL80211_ATTR_FRAME
509#define NL80211_ATTR_SSID NL80211_ATTR_SSID
510#define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE
511#define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE
488 512
489#define NL80211_MAX_SUPP_RATES 32 513#define NL80211_MAX_SUPP_RATES 32
490#define NL80211_MAX_SUPP_REG_RULES 32 514#define NL80211_MAX_SUPP_REG_RULES 32
@@ -1018,4 +1042,18 @@ enum nl80211_bss {
1018 NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1 1042 NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1
1019}; 1043};
1020 1044
1045/**
1046 * enum nl80211_auth_type - AuthenticationType
1047 *
1048 * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication
1049 * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only)
1050 * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
1051 * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
1052 */
1053enum nl80211_auth_type {
1054 NL80211_AUTHTYPE_OPEN_SYSTEM,
1055 NL80211_AUTHTYPE_SHARED_KEY,
1056 NL80211_AUTHTYPE_FT,
1057 NL80211_AUTHTYPE_NETWORK_EAP,
1058};
1021#endif /* __LINUX_NL80211_H */ 1059#endif /* __LINUX_NL80211_H */