aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
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/net
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/net')
-rw-r--r--include/net/cfg80211.h113
1 files changed, 113 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ad44016021b1..0da9a55881a1 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -579,6 +579,105 @@ struct cfg80211_bss {
579}; 579};
580 580
581/** 581/**
582 * struct cfg80211_auth_request - Authentication request data
583 *
584 * This structure provides information needed to complete IEEE 802.11
585 * authentication.
586 * NOTE: This structure will likely change when more code from mac80211 is
587 * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too.
588 * Before using this in a driver that does not use mac80211, it would be better
589 * to check the status of that work and better yet, volunteer to work on it.
590 *
591 * @chan: The channel to use or %NULL if not specified (auto-select based on
592 * scan results)
593 * @peer_addr: The address of the peer STA (AP BSSID in infrastructure case);
594 * this field is required to be present; if the driver wants to help with
595 * BSS selection, it should use (yet to be added) MLME event to allow user
596 * space SME to be notified of roaming candidate, so that the SME can then
597 * use the authentication request with the recommended BSSID and whatever
598 * other data may be needed for authentication/association
599 * @ssid: SSID or %NULL if not yet available
600 * @ssid_len: Length of ssid in octets
601 * @auth_type: Authentication type (algorithm)
602 * @ie: Extra IEs to add to Authentication frame or %NULL
603 * @ie_len: Length of ie buffer in octets
604 */
605struct cfg80211_auth_request {
606 struct ieee80211_channel *chan;
607 u8 *peer_addr;
608 const u8 *ssid;
609 size_t ssid_len;
610 enum nl80211_auth_type auth_type;
611 const u8 *ie;
612 size_t ie_len;
613};
614
615/**
616 * struct cfg80211_assoc_request - (Re)Association request data
617 *
618 * This structure provides information needed to complete IEEE 802.11
619 * (re)association.
620 * NOTE: This structure will likely change when more code from mac80211 is
621 * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too.
622 * Before using this in a driver that does not use mac80211, it would be better
623 * to check the status of that work and better yet, volunteer to work on it.
624 *
625 * @chan: The channel to use or %NULL if not specified (auto-select based on
626 * scan results)
627 * @peer_addr: The address of the peer STA (AP BSSID); this field is required
628 * to be present and the STA must be in State 2 (authenticated) with the
629 * peer STA
630 * @ssid: SSID
631 * @ssid_len: Length of ssid in octets
632 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL
633 * @ie_len: Length of ie buffer in octets
634 */
635struct cfg80211_assoc_request {
636 struct ieee80211_channel *chan;
637 u8 *peer_addr;
638 const u8 *ssid;
639 size_t ssid_len;
640 const u8 *ie;
641 size_t ie_len;
642};
643
644/**
645 * struct cfg80211_deauth_request - Deauthentication request data
646 *
647 * This structure provides information needed to complete IEEE 802.11
648 * deauthentication.
649 *
650 * @peer_addr: The address of the peer STA (AP BSSID); this field is required
651 * to be present and the STA must be authenticated with the peer STA
652 * @ie: Extra IEs to add to Deauthentication frame or %NULL
653 * @ie_len: Length of ie buffer in octets
654 */
655struct cfg80211_deauth_request {
656 u8 *peer_addr;
657 u16 reason_code;
658 const u8 *ie;
659 size_t ie_len;
660};
661
662/**
663 * struct cfg80211_disassoc_request - Disassociation request data
664 *
665 * This structure provides information needed to complete IEEE 802.11
666 * disassocation.
667 *
668 * @peer_addr: The address of the peer STA (AP BSSID); this field is required
669 * to be present and the STA must be associated with the peer STA
670 * @ie: Extra IEs to add to Disassociation frame or %NULL
671 * @ie_len: Length of ie buffer in octets
672 */
673struct cfg80211_disassoc_request {
674 u8 *peer_addr;
675 u16 reason_code;
676 const u8 *ie;
677 size_t ie_len;
678};
679
680/**
582 * struct cfg80211_ops - backend description for wireless configuration 681 * struct cfg80211_ops - backend description for wireless configuration
583 * 682 *
584 * This struct is registered by fullmac card drivers and/or wireless stacks 683 * This struct is registered by fullmac card drivers and/or wireless stacks
@@ -650,6 +749,11 @@ struct cfg80211_bss {
650 * the driver, and will be valid until passed to cfg80211_scan_done(). 749 * the driver, and will be valid until passed to cfg80211_scan_done().
651 * For scan results, call cfg80211_inform_bss(); you can call this outside 750 * For scan results, call cfg80211_inform_bss(); you can call this outside
652 * the scan/scan_done bracket too. 751 * the scan/scan_done bracket too.
752 *
753 * @auth: Request to authenticate with the specified peer
754 * @assoc: Request to (re)associate with the specified peer
755 * @deauth: Request to deauthenticate from the specified peer
756 * @disassoc: Request to disassociate from the specified peer
653 */ 757 */
654struct cfg80211_ops { 758struct cfg80211_ops {
655 int (*suspend)(struct wiphy *wiphy); 759 int (*suspend)(struct wiphy *wiphy);
@@ -730,6 +834,15 @@ struct cfg80211_ops {
730 834
731 int (*scan)(struct wiphy *wiphy, struct net_device *dev, 835 int (*scan)(struct wiphy *wiphy, struct net_device *dev,
732 struct cfg80211_scan_request *request); 836 struct cfg80211_scan_request *request);
837
838 int (*auth)(struct wiphy *wiphy, struct net_device *dev,
839 struct cfg80211_auth_request *req);
840 int (*assoc)(struct wiphy *wiphy, struct net_device *dev,
841 struct cfg80211_assoc_request *req);
842 int (*deauth)(struct wiphy *wiphy, struct net_device *dev,
843 struct cfg80211_deauth_request *req);
844 int (*disassoc)(struct wiphy *wiphy, struct net_device *dev,
845 struct cfg80211_disassoc_request *req);
733}; 846};
734 847
735/* temporary wext handlers */ 848/* temporary wext handlers */