aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
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 */