aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h203
1 files changed, 177 insertions, 26 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 50f3fd9ff524..5389afdc1297 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -471,26 +471,6 @@ struct ieee80211_txq_params {
471 u8 aifs; 471 u8 aifs;
472}; 472};
473 473
474/**
475 * struct mgmt_extra_ie_params - Extra management frame IE parameters
476 *
477 * Used to add extra IE(s) into management frames. If the driver cannot add the
478 * requested data into all management frames of the specified subtype that are
479 * generated in kernel or firmware/hardware, it must reject the configuration
480 * call. The IE data buffer is added to the end of the specified management
481 * frame body after all other IEs. This addition is not applied to frames that
482 * are injected through a monitor interface.
483 *
484 * @subtype: Management frame subtype
485 * @ies: IE data buffer or %NULL to remove previous data
486 * @ies_len: Length of @ies in octets
487 */
488struct mgmt_extra_ie_params {
489 u8 subtype;
490 u8 *ies;
491 int ies_len;
492};
493
494/* from net/wireless.h */ 474/* from net/wireless.h */
495struct wiphy; 475struct wiphy;
496 476
@@ -559,6 +539,7 @@ enum cfg80211_signal_type {
559 * is no guarantee that these are well-formed!) 539 * is no guarantee that these are well-formed!)
560 * @len_information_elements: total length of the information elements 540 * @len_information_elements: total length of the information elements
561 * @signal: signal strength value (type depends on the wiphy's signal_type) 541 * @signal: signal strength value (type depends on the wiphy's signal_type)
542 * @hold: BSS should not expire
562 * @free_priv: function pointer to free private data 543 * @free_priv: function pointer to free private data
563 * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes 544 * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes
564 */ 545 */
@@ -579,6 +560,105 @@ struct cfg80211_bss {
579}; 560};
580 561
581/** 562/**
563 * struct cfg80211_auth_request - Authentication request data
564 *
565 * This structure provides information needed to complete IEEE 802.11
566 * authentication.
567 * NOTE: This structure will likely change when more code from mac80211 is
568 * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too.
569 * Before using this in a driver that does not use mac80211, it would be better
570 * to check the status of that work and better yet, volunteer to work on it.
571 *
572 * @chan: The channel to use or %NULL if not specified (auto-select based on
573 * scan results)
574 * @peer_addr: The address of the peer STA (AP BSSID in infrastructure case);
575 * this field is required to be present; if the driver wants to help with
576 * BSS selection, it should use (yet to be added) MLME event to allow user
577 * space SME to be notified of roaming candidate, so that the SME can then
578 * use the authentication request with the recommended BSSID and whatever
579 * other data may be needed for authentication/association
580 * @ssid: SSID or %NULL if not yet available
581 * @ssid_len: Length of ssid in octets
582 * @auth_type: Authentication type (algorithm)
583 * @ie: Extra IEs to add to Authentication frame or %NULL
584 * @ie_len: Length of ie buffer in octets
585 */
586struct cfg80211_auth_request {
587 struct ieee80211_channel *chan;
588 u8 *peer_addr;
589 const u8 *ssid;
590 size_t ssid_len;
591 enum nl80211_auth_type auth_type;
592 const u8 *ie;
593 size_t ie_len;
594};
595
596/**
597 * struct cfg80211_assoc_request - (Re)Association request data
598 *
599 * This structure provides information needed to complete IEEE 802.11
600 * (re)association.
601 * NOTE: This structure will likely change when more code from mac80211 is
602 * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too.
603 * Before using this in a driver that does not use mac80211, it would be better
604 * to check the status of that work and better yet, volunteer to work on it.
605 *
606 * @chan: The channel to use or %NULL if not specified (auto-select based on
607 * scan results)
608 * @peer_addr: The address of the peer STA (AP BSSID); this field is required
609 * to be present and the STA must be in State 2 (authenticated) with the
610 * peer STA
611 * @ssid: SSID
612 * @ssid_len: Length of ssid in octets
613 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL
614 * @ie_len: Length of ie buffer in octets
615 */
616struct cfg80211_assoc_request {
617 struct ieee80211_channel *chan;
618 u8 *peer_addr;
619 const u8 *ssid;
620 size_t ssid_len;
621 const u8 *ie;
622 size_t ie_len;
623};
624
625/**
626 * struct cfg80211_deauth_request - Deauthentication request data
627 *
628 * This structure provides information needed to complete IEEE 802.11
629 * deauthentication.
630 *
631 * @peer_addr: The address of the peer STA (AP BSSID); this field is required
632 * to be present and the STA must be authenticated with the peer STA
633 * @ie: Extra IEs to add to Deauthentication frame or %NULL
634 * @ie_len: Length of ie buffer in octets
635 */
636struct cfg80211_deauth_request {
637 u8 *peer_addr;
638 u16 reason_code;
639 const u8 *ie;
640 size_t ie_len;
641};
642
643/**
644 * struct cfg80211_disassoc_request - Disassociation request data
645 *
646 * This structure provides information needed to complete IEEE 802.11
647 * disassocation.
648 *
649 * @peer_addr: The address of the peer STA (AP BSSID); this field is required
650 * to be present and the STA must be associated with the peer STA
651 * @ie: Extra IEs to add to Disassociation frame or %NULL
652 * @ie_len: Length of ie buffer in octets
653 */
654struct cfg80211_disassoc_request {
655 u8 *peer_addr;
656 u16 reason_code;
657 const u8 *ie;
658 size_t ie_len;
659};
660
661/**
582 * struct cfg80211_ops - backend description for wireless configuration 662 * struct cfg80211_ops - backend description for wireless configuration
583 * 663 *
584 * This struct is registered by fullmac card drivers and/or wireless stacks 664 * This struct is registered by fullmac card drivers and/or wireless stacks
@@ -644,12 +724,15 @@ struct cfg80211_bss {
644 * 724 *
645 * @set_channel: Set channel 725 * @set_channel: Set channel
646 * 726 *
647 * @set_mgmt_extra_ie: Set extra IE data for management frames
648 *
649 * @scan: Request to do a scan. If returning zero, the scan request is given 727 * @scan: Request to do a scan. If returning zero, the scan request is given
650 * the driver, and will be valid until passed to cfg80211_scan_done(). 728 * 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 729 * For scan results, call cfg80211_inform_bss(); you can call this outside
652 * the scan/scan_done bracket too. 730 * the scan/scan_done bracket too.
731 *
732 * @auth: Request to authenticate with the specified peer
733 * @assoc: Request to (re)associate with the specified peer
734 * @deauth: Request to deauthenticate from the specified peer
735 * @disassoc: Request to disassociate from the specified peer
653 */ 736 */
654struct cfg80211_ops { 737struct cfg80211_ops {
655 int (*suspend)(struct wiphy *wiphy); 738 int (*suspend)(struct wiphy *wiphy);
@@ -724,12 +807,17 @@ struct cfg80211_ops {
724 struct ieee80211_channel *chan, 807 struct ieee80211_channel *chan,
725 enum nl80211_channel_type channel_type); 808 enum nl80211_channel_type channel_type);
726 809
727 int (*set_mgmt_extra_ie)(struct wiphy *wiphy,
728 struct net_device *dev,
729 struct mgmt_extra_ie_params *params);
730
731 int (*scan)(struct wiphy *wiphy, struct net_device *dev, 810 int (*scan)(struct wiphy *wiphy, struct net_device *dev,
732 struct cfg80211_scan_request *request); 811 struct cfg80211_scan_request *request);
812
813 int (*auth)(struct wiphy *wiphy, struct net_device *dev,
814 struct cfg80211_auth_request *req);
815 int (*assoc)(struct wiphy *wiphy, struct net_device *dev,
816 struct cfg80211_assoc_request *req);
817 int (*deauth)(struct wiphy *wiphy, struct net_device *dev,
818 struct cfg80211_deauth_request *req);
819 int (*disassoc)(struct wiphy *wiphy, struct net_device *dev,
820 struct cfg80211_disassoc_request *req);
733}; 821};
734 822
735/* temporary wext handlers */ 823/* temporary wext handlers */
@@ -807,4 +895,67 @@ void cfg80211_put_bss(struct cfg80211_bss *bss);
807 */ 895 */
808void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); 896void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
809 897
898/**
899 * cfg80211_send_rx_auth - notification of processed authentication
900 * @dev: network device
901 * @buf: authentication frame (header + body)
902 * @len: length of the frame data
903 *
904 * This function is called whenever an authentication has been processed in
905 * station mode.
906 */
907void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
908
909/**
910 * cfg80211_send_rx_assoc - notification of processed association
911 * @dev: network device
912 * @buf: (re)association response frame (header + body)
913 * @len: length of the frame data
914 *
915 * This function is called whenever a (re)association response has been
916 * processed in station mode.
917 */
918void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len);
919
920/**
921 * cfg80211_send_rx_deauth - notification of processed deauthentication
922 * @dev: network device
923 * @buf: deauthentication frame (header + body)
924 * @len: length of the frame data
925 *
926 * This function is called whenever deauthentication has been processed in
927 * station mode.
928 */
929void cfg80211_send_rx_deauth(struct net_device *dev, const u8 *buf,
930 size_t len);
931
932/**
933 * cfg80211_send_rx_disassoc - notification of processed disassociation
934 * @dev: network device
935 * @buf: disassociation response frame (header + body)
936 * @len: length of the frame data
937 *
938 * This function is called whenever disassociation has been processed in
939 * station mode.
940 */
941void cfg80211_send_rx_disassoc(struct net_device *dev, const u8 *buf,
942 size_t len);
943
944/**
945 * cfg80211_hold_bss - exclude bss from expiration
946 * @bss: bss which should not expire
947 *
948 * In a case when the BSS is not updated but it shouldn't expire this
949 * function can be used to mark the BSS to be excluded from expiration.
950 */
951void cfg80211_hold_bss(struct cfg80211_bss *bss);
952
953/**
954 * cfg80211_unhold_bss - remove expiration exception from the BSS
955 * @bss: bss which can expire again
956 *
957 * This function marks the BSS to be expirable again.
958 */
959void cfg80211_unhold_bss(struct cfg80211_bss *bss);
960
810#endif /* __NET_CFG80211_H */ 961#endif /* __NET_CFG80211_H */