aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h321
1 files changed, 295 insertions, 26 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e6d6a66a8f7..9259e97864d 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -20,6 +20,7 @@
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/ieee80211.h> 21#include <linux/ieee80211.h>
22#include <net/cfg80211.h> 22#include <net/cfg80211.h>
23#include <asm/unaligned.h>
23 24
24/** 25/**
25 * DOC: Introduction 26 * DOC: Introduction
@@ -193,6 +194,17 @@ enum ieee80211_bss_change {
193#define IEEE80211_BSS_ARP_ADDR_LIST_LEN 4 194#define IEEE80211_BSS_ARP_ADDR_LIST_LEN 4
194 195
195/** 196/**
197 * enum ieee80211_rssi_event - RSSI threshold event
198 * An indicator for when RSSI goes below/above a certain threshold.
199 * @RSSI_EVENT_HIGH: AP's rssi crossed the high threshold set by the driver.
200 * @RSSI_EVENT_LOW: AP's rssi crossed the low threshold set by the driver.
201 */
202enum ieee80211_rssi_event {
203 RSSI_EVENT_HIGH,
204 RSSI_EVENT_LOW,
205};
206
207/**
196 * struct ieee80211_bss_conf - holds the BSS's changing parameters 208 * struct ieee80211_bss_conf - holds the BSS's changing parameters
197 * 209 *
198 * This structure keeps information about a BSS (and an association 210 * This structure keeps information about a BSS (and an association
@@ -933,6 +945,7 @@ enum set_key_cmd {
933 * @aid: AID we assigned to the station if we're an AP 945 * @aid: AID we assigned to the station if we're an AP
934 * @supp_rates: Bitmap of supported rates (per band) 946 * @supp_rates: Bitmap of supported rates (per band)
935 * @ht_cap: HT capabilities of this STA; restricted to our own TX capabilities 947 * @ht_cap: HT capabilities of this STA; restricted to our own TX capabilities
948 * @wme: indicates whether the STA supports WME. Only valid during AP-mode.
936 * @drv_priv: data area for driver use, will always be aligned to 949 * @drv_priv: data area for driver use, will always be aligned to
937 * sizeof(void *), size is determined in hw information. 950 * sizeof(void *), size is determined in hw information.
938 */ 951 */
@@ -941,6 +954,7 @@ struct ieee80211_sta {
941 u8 addr[ETH_ALEN]; 954 u8 addr[ETH_ALEN];
942 u16 aid; 955 u16 aid;
943 struct ieee80211_sta_ht_cap ht_cap; 956 struct ieee80211_sta_ht_cap ht_cap;
957 bool wme;
944 958
945 /* must be last */ 959 /* must be last */
946 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); 960 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *))));
@@ -960,21 +974,6 @@ enum sta_notify_cmd {
960}; 974};
961 975
962/** 976/**
963 * enum ieee80211_tkip_key_type - get tkip key
964 *
965 * Used by drivers which need to get a tkip key for skb. Some drivers need a
966 * phase 1 key, others need a phase 2 key. A single function allows the driver
967 * to get the key, this enum indicates what type of key is required.
968 *
969 * @IEEE80211_TKIP_P1_KEY: the driver needs a phase 1 key
970 * @IEEE80211_TKIP_P2_KEY: the driver needs a phase 2 key
971 */
972enum ieee80211_tkip_key_type {
973 IEEE80211_TKIP_P1_KEY,
974 IEEE80211_TKIP_P2_KEY,
975};
976
977/**
978 * enum ieee80211_hw_flags - hardware flags 977 * enum ieee80211_hw_flags - hardware flags
979 * 978 *
980 * These flags are used to indicate hardware capabilities to 979 * These flags are used to indicate hardware capabilities to
@@ -1587,6 +1586,20 @@ enum ieee80211_ampdu_mlme_action {
1587}; 1586};
1588 1587
1589/** 1588/**
1589 * enum ieee80211_tx_sync_type - TX sync type
1590 * @IEEE80211_TX_SYNC_AUTH: sync TX for authentication
1591 * (and possibly also before direct probe)
1592 * @IEEE80211_TX_SYNC_ASSOC: sync TX for association
1593 * @IEEE80211_TX_SYNC_ACTION: sync TX for action frame
1594 * (not implemented yet)
1595 */
1596enum ieee80211_tx_sync_type {
1597 IEEE80211_TX_SYNC_AUTH,
1598 IEEE80211_TX_SYNC_ASSOC,
1599 IEEE80211_TX_SYNC_ACTION,
1600};
1601
1602/**
1590 * struct ieee80211_ops - callbacks from mac80211 to the driver 1603 * struct ieee80211_ops - callbacks from mac80211 to the driver
1591 * 1604 *
1592 * This structure contains various callbacks that the driver may 1605 * This structure contains various callbacks that the driver may
@@ -1626,6 +1639,10 @@ enum ieee80211_ampdu_mlme_action {
1626 * ask the device to suspend. This is only invoked when WoWLAN is 1639 * ask the device to suspend. This is only invoked when WoWLAN is
1627 * configured, otherwise the device is deconfigured completely and 1640 * configured, otherwise the device is deconfigured completely and
1628 * reconfigured at resume time. 1641 * reconfigured at resume time.
1642 * The driver may also impose special conditions under which it
1643 * wants to use the "normal" suspend (deconfigure), say if it only
1644 * supports WoWLAN when the device is associated. In this case, it
1645 * must return 1 from this function.
1629 * 1646 *
1630 * @resume: If WoWLAN was configured, this indicates that mac80211 is 1647 * @resume: If WoWLAN was configured, this indicates that mac80211 is
1631 * now resuming its operation, after this the device must be fully 1648 * now resuming its operation, after this the device must be fully
@@ -1671,6 +1688,26 @@ enum ieee80211_ampdu_mlme_action {
1671 * of the bss parameters has changed when a call is made. The callback 1688 * of the bss parameters has changed when a call is made. The callback
1672 * can sleep. 1689 * can sleep.
1673 * 1690 *
1691 * @tx_sync: Called before a frame is sent to an AP/GO. In the GO case, the
1692 * driver should sync with the GO's powersaving so the device doesn't
1693 * transmit the frame while the GO is asleep. In the regular AP case
1694 * it may be used by drivers for devices implementing other restrictions
1695 * on talking to APs, e.g. due to regulatory enforcement or just HW
1696 * restrictions.
1697 * This function is called for every authentication, association and
1698 * action frame separately since applications might attempt to auth
1699 * with multiple APs before chosing one to associate to. If it returns
1700 * an error, the corresponding authentication, association or frame
1701 * transmission is aborted and reported as having failed. It is always
1702 * called after tuning to the correct channel.
1703 * The callback might be called multiple times before @finish_tx_sync
1704 * (but @finish_tx_sync will be called once for each) but in practice
1705 * this is unlikely to happen. It can also refuse in that case if the
1706 * driver cannot handle that situation.
1707 * This callback can sleep.
1708 * @finish_tx_sync: Called as a counterpart to @tx_sync, unless that returned
1709 * an error. This callback can sleep.
1710 *
1674 * @prepare_multicast: Prepare for multicast filter configuration. 1711 * @prepare_multicast: Prepare for multicast filter configuration.
1675 * This callback is optional, and its return value is passed 1712 * This callback is optional, and its return value is passed
1676 * to configure_filter(). This callback must be atomic. 1713 * to configure_filter(). This callback must be atomic.
@@ -1694,6 +1731,12 @@ enum ieee80211_ampdu_mlme_action {
1694 * which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY. 1731 * which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY.
1695 * The callback must be atomic. 1732 * The callback must be atomic.
1696 * 1733 *
1734 * @set_rekey_data: If the device supports GTK rekeying, for example while the
1735 * host is suspended, it can assign this callback to retrieve the data
1736 * necessary to do GTK rekeying, this is the KEK, KCK and replay counter.
1737 * After rekeying was done it should (for example during resume) notify
1738 * userspace of the new replay counter using ieee80211_gtk_rekey_notify().
1739 *
1697 * @hw_scan: Ask the hardware to service the scan request, no need to start 1740 * @hw_scan: Ask the hardware to service the scan request, no need to start
1698 * the scan state machine in stack. The scan must honour the channel 1741 * the scan state machine in stack. The scan must honour the channel
1699 * configuration done by the regulatory agent in the wiphy's 1742 * configuration done by the regulatory agent in the wiphy's
@@ -1708,6 +1751,14 @@ enum ieee80211_ampdu_mlme_action {
1708 * any error unless this callback returned a negative error code. 1751 * any error unless this callback returned a negative error code.
1709 * The callback can sleep. 1752 * The callback can sleep.
1710 * 1753 *
1754 * @cancel_hw_scan: Ask the low-level tp cancel the active hw scan.
1755 * The driver should ask the hardware to cancel the scan (if possible),
1756 * but the scan will be completed only after the driver will call
1757 * ieee80211_scan_completed().
1758 * This callback is needed for wowlan, to prevent enqueueing a new
1759 * scan_work after the low-level driver was already suspended.
1760 * The callback can sleep.
1761 *
1711 * @sched_scan_start: Ask the hardware to start scanning repeatedly at 1762 * @sched_scan_start: Ask the hardware to start scanning repeatedly at
1712 * specific intervals. The driver must call the 1763 * specific intervals. The driver must call the
1713 * ieee80211_sched_scan_results() function whenever it finds results. 1764 * ieee80211_sched_scan_results() function whenever it finds results.
@@ -1816,6 +1867,7 @@ enum ieee80211_ampdu_mlme_action {
1816 * 1867 *
1817 * @testmode_cmd: Implement a cfg80211 test mode command. 1868 * @testmode_cmd: Implement a cfg80211 test mode command.
1818 * The callback can sleep. 1869 * The callback can sleep.
1870 * @testmode_dump: Implement a cfg80211 test mode dump. The callback can sleep.
1819 * 1871 *
1820 * @flush: Flush all pending frames from the hardware queue, making sure 1872 * @flush: Flush all pending frames from the hardware queue, making sure
1821 * that the hardware queues are empty. If the parameter @drop is set 1873 * that the hardware queues are empty. If the parameter @drop is set
@@ -1860,6 +1912,8 @@ enum ieee80211_ampdu_mlme_action {
1860 * @set_bitrate_mask: Set a mask of rates to be used for rate control selection 1912 * @set_bitrate_mask: Set a mask of rates to be used for rate control selection
1861 * when transmitting a frame. Currently only legacy rates are handled. 1913 * when transmitting a frame. Currently only legacy rates are handled.
1862 * The callback can sleep. 1914 * The callback can sleep.
1915 * @rssi_callback: Notify driver when the average RSSI goes above/below
1916 * thresholds that were registered previously. The callback can sleep.
1863 */ 1917 */
1864struct ieee80211_ops { 1918struct ieee80211_ops {
1865 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1919 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1881,6 +1935,14 @@ struct ieee80211_ops {
1881 struct ieee80211_vif *vif, 1935 struct ieee80211_vif *vif,
1882 struct ieee80211_bss_conf *info, 1936 struct ieee80211_bss_conf *info,
1883 u32 changed); 1937 u32 changed);
1938
1939 int (*tx_sync)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1940 const u8 *bssid, enum ieee80211_tx_sync_type type);
1941 void (*finish_tx_sync)(struct ieee80211_hw *hw,
1942 struct ieee80211_vif *vif,
1943 const u8 *bssid,
1944 enum ieee80211_tx_sync_type type);
1945
1884 u64 (*prepare_multicast)(struct ieee80211_hw *hw, 1946 u64 (*prepare_multicast)(struct ieee80211_hw *hw,
1885 struct netdev_hw_addr_list *mc_list); 1947 struct netdev_hw_addr_list *mc_list);
1886 void (*configure_filter)(struct ieee80211_hw *hw, 1948 void (*configure_filter)(struct ieee80211_hw *hw,
@@ -1897,8 +1959,13 @@ struct ieee80211_ops {
1897 struct ieee80211_key_conf *conf, 1959 struct ieee80211_key_conf *conf,
1898 struct ieee80211_sta *sta, 1960 struct ieee80211_sta *sta,
1899 u32 iv32, u16 *phase1key); 1961 u32 iv32, u16 *phase1key);
1962 void (*set_rekey_data)(struct ieee80211_hw *hw,
1963 struct ieee80211_vif *vif,
1964 struct cfg80211_gtk_rekey_data *data);
1900 int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1965 int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1901 struct cfg80211_scan_request *req); 1966 struct cfg80211_scan_request *req);
1967 void (*cancel_hw_scan)(struct ieee80211_hw *hw,
1968 struct ieee80211_vif *vif);
1902 int (*sched_scan_start)(struct ieee80211_hw *hw, 1969 int (*sched_scan_start)(struct ieee80211_hw *hw,
1903 struct ieee80211_vif *vif, 1970 struct ieee80211_vif *vif,
1904 struct cfg80211_sched_scan_request *req, 1971 struct cfg80211_sched_scan_request *req,
@@ -1936,6 +2003,9 @@ struct ieee80211_ops {
1936 void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class); 2003 void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class);
1937#ifdef CONFIG_NL80211_TESTMODE 2004#ifdef CONFIG_NL80211_TESTMODE
1938 int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len); 2005 int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len);
2006 int (*testmode_dump)(struct ieee80211_hw *hw, struct sk_buff *skb,
2007 struct netlink_callback *cb,
2008 void *data, int len);
1939#endif 2009#endif
1940 void (*flush)(struct ieee80211_hw *hw, bool drop); 2010 void (*flush)(struct ieee80211_hw *hw, bool drop);
1941 void (*channel_switch)(struct ieee80211_hw *hw, 2011 void (*channel_switch)(struct ieee80211_hw *hw,
@@ -1960,6 +2030,8 @@ struct ieee80211_ops {
1960 bool (*tx_frames_pending)(struct ieee80211_hw *hw); 2030 bool (*tx_frames_pending)(struct ieee80211_hw *hw);
1961 int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2031 int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1962 const struct cfg80211_bitrate_mask *mask); 2032 const struct cfg80211_bitrate_mask *mask);
2033 void (*rssi_callback)(struct ieee80211_hw *hw,
2034 enum ieee80211_rssi_event rssi_event);
1963}; 2035};
1964 2036
1965/** 2037/**
@@ -2550,21 +2622,136 @@ struct sk_buff *
2550ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif); 2622ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
2551 2623
2552/** 2624/**
2553 * ieee80211_get_tkip_key - get a TKIP rc4 for skb 2625 * ieee80211_get_tkip_p1k_iv - get a TKIP phase 1 key for IV32
2626 *
2627 * This function returns the TKIP phase 1 key for the given IV32.
2628 *
2629 * @keyconf: the parameter passed with the set key
2630 * @iv32: IV32 to get the P1K for
2631 * @p1k: a buffer to which the key will be written, as 5 u16 values
2632 */
2633void ieee80211_get_tkip_p1k_iv(struct ieee80211_key_conf *keyconf,
2634 u32 iv32, u16 *p1k);
2635
2636/**
2637 * ieee80211_get_tkip_p1k - get a TKIP phase 1 key
2638 *
2639 * This function returns the TKIP phase 1 key for the IV32 taken
2640 * from the given packet.
2641 *
2642 * @keyconf: the parameter passed with the set key
2643 * @skb: the packet to take the IV32 value from that will be encrypted
2644 * with this P1K
2645 * @p1k: a buffer to which the key will be written, as 5 u16 values
2646 */
2647static inline void ieee80211_get_tkip_p1k(struct ieee80211_key_conf *keyconf,
2648 struct sk_buff *skb, u16 *p1k)
2649{
2650 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
2651 const u8 *data = (u8 *)hdr + ieee80211_hdrlen(hdr->frame_control);
2652 u32 iv32 = get_unaligned_le32(&data[4]);
2653
2654 ieee80211_get_tkip_p1k_iv(keyconf, iv32, p1k);
2655}
2656
2657/**
2658 * ieee80211_get_tkip_rx_p1k - get a TKIP phase 1 key for RX
2659 *
2660 * This function returns the TKIP phase 1 key for the given IV32
2661 * and transmitter address.
2662 *
2663 * @keyconf: the parameter passed with the set key
2664 * @ta: TA that will be used with the key
2665 * @iv32: IV32 to get the P1K for
2666 * @p1k: a buffer to which the key will be written, as 5 u16 values
2667 */
2668void ieee80211_get_tkip_rx_p1k(struct ieee80211_key_conf *keyconf,
2669 const u8 *ta, u32 iv32, u16 *p1k);
2670
2671/**
2672 * ieee80211_get_tkip_p2k - get a TKIP phase 2 key
2673 *
2674 * This function computes the TKIP RC4 key for the IV values
2675 * in the packet.
2676 *
2677 * @keyconf: the parameter passed with the set key
2678 * @skb: the packet to take the IV32/IV16 values from that will be
2679 * encrypted with this key
2680 * @p2k: a buffer to which the key will be written, 16 bytes
2681 */
2682void ieee80211_get_tkip_p2k(struct ieee80211_key_conf *keyconf,
2683 struct sk_buff *skb, u8 *p2k);
2684
2685/**
2686 * struct ieee80211_key_seq - key sequence counter
2554 * 2687 *
2555 * This function computes a TKIP rc4 key for an skb. It computes 2688 * @tkip: TKIP data, containing IV32 and IV16 in host byte order
2556 * a phase 1 key if needed (iv16 wraps around). This function is to 2689 * @ccmp: PN data, most significant byte first (big endian,
2557 * be used by drivers which can do HW encryption but need to compute 2690 * reverse order than in packet)
2558 * to phase 1/2 key in SW. 2691 * @aes_cmac: PN data, most significant byte first (big endian,
2692 * reverse order than in packet)
2693 */
2694struct ieee80211_key_seq {
2695 union {
2696 struct {
2697 u32 iv32;
2698 u16 iv16;
2699 } tkip;
2700 struct {
2701 u8 pn[6];
2702 } ccmp;
2703 struct {
2704 u8 pn[6];
2705 } aes_cmac;
2706 };
2707};
2708
2709/**
2710 * ieee80211_get_key_tx_seq - get key TX sequence counter
2711 *
2712 * @keyconf: the parameter passed with the set key
2713 * @seq: buffer to receive the sequence data
2714 *
2715 * This function allows a driver to retrieve the current TX IV/PN
2716 * for the given key. It must not be called if IV generation is
2717 * offloaded to the device.
2718 *
2719 * Note that this function may only be called when no TX processing
2720 * can be done concurrently, for example when queues are stopped
2721 * and the stop has been synchronized.
2722 */
2723void ieee80211_get_key_tx_seq(struct ieee80211_key_conf *keyconf,
2724 struct ieee80211_key_seq *seq);
2725
2726/**
2727 * ieee80211_get_key_rx_seq - get key RX sequence counter
2559 * 2728 *
2560 * @keyconf: the parameter passed with the set key 2729 * @keyconf: the parameter passed with the set key
2561 * @skb: the skb for which the key is needed 2730 * @tid: The TID, or -1 for the management frame value (CCMP only);
2562 * @type: TBD 2731 * the value on TID 0 is also used for non-QoS frames. For
2563 * @key: a buffer to which the key will be written 2732 * CMAC, only TID 0 is valid.
2733 * @seq: buffer to receive the sequence data
2734 *
2735 * This function allows a driver to retrieve the current RX IV/PNs
2736 * for the given key. It must not be called if IV checking is done
2737 * by the device and not by mac80211.
2738 *
2739 * Note that this function may only be called when no RX processing
2740 * can be done concurrently.
2564 */ 2741 */
2565void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf, 2742void ieee80211_get_key_rx_seq(struct ieee80211_key_conf *keyconf,
2566 struct sk_buff *skb, 2743 int tid, struct ieee80211_key_seq *seq);
2567 enum ieee80211_tkip_key_type type, u8 *key); 2744
2745/**
2746 * ieee80211_gtk_rekey_notify - notify userspace supplicant of rekeying
2747 * @vif: virtual interface the rekeying was done on
2748 * @bssid: The BSSID of the AP, for checking association
2749 * @replay_ctr: the new replay counter after GTK rekeying
2750 * @gfp: allocation flags
2751 */
2752void ieee80211_gtk_rekey_notify(struct ieee80211_vif *vif, const u8 *bssid,
2753 const u8 *replay_ctr, gfp_t gfp);
2754
2568/** 2755/**
2569 * ieee80211_wake_queue - wake specific queue 2756 * ieee80211_wake_queue - wake specific queue
2570 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2757 * @hw: pointer as obtained from ieee80211_alloc_hw().
@@ -2830,6 +3017,33 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
2830 struct ieee80211_sta *pubsta, bool block); 3017 struct ieee80211_sta *pubsta, bool block);
2831 3018
2832/** 3019/**
3020 * ieee80211_iter_keys - iterate keys programmed into the device
3021 * @hw: pointer obtained from ieee80211_alloc_hw()
3022 * @vif: virtual interface to iterate, may be %NULL for all
3023 * @iter: iterator function that will be called for each key
3024 * @iter_data: custom data to pass to the iterator function
3025 *
3026 * This function can be used to iterate all the keys known to
3027 * mac80211, even those that weren't previously programmed into
3028 * the device. This is intended for use in WoWLAN if the device
3029 * needs reprogramming of the keys during suspend. Note that due
3030 * to locking reasons, it is also only safe to call this at few
3031 * spots since it must hold the RTNL and be able to sleep.
3032 *
3033 * The order in which the keys are iterated matches the order
3034 * in which they were originally installed and handed to the
3035 * set_key callback.
3036 */
3037void ieee80211_iter_keys(struct ieee80211_hw *hw,
3038 struct ieee80211_vif *vif,
3039 void (*iter)(struct ieee80211_hw *hw,
3040 struct ieee80211_vif *vif,
3041 struct ieee80211_sta *sta,
3042 struct ieee80211_key_conf *key,
3043 void *data),
3044 void *iter_data);
3045
3046/**
2833 * ieee80211_ap_probereq_get - retrieve a Probe Request template 3047 * ieee80211_ap_probereq_get - retrieve a Probe Request template
2834 * @hw: pointer obtained from ieee80211_alloc_hw(). 3048 * @hw: pointer obtained from ieee80211_alloc_hw().
2835 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3049 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
@@ -2870,6 +3084,29 @@ void ieee80211_beacon_loss(struct ieee80211_vif *vif);
2870void ieee80211_connection_loss(struct ieee80211_vif *vif); 3084void ieee80211_connection_loss(struct ieee80211_vif *vif);
2871 3085
2872/** 3086/**
3087 * ieee80211_resume_disconnect - disconnect from AP after resume
3088 *
3089 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3090 *
3091 * Instructs mac80211 to disconnect from the AP after resume.
3092 * Drivers can use this after WoWLAN if they know that the
3093 * connection cannot be kept up, for example because keys were
3094 * used while the device was asleep but the replay counters or
3095 * similar cannot be retrieved from the device during resume.
3096 *
3097 * Note that due to implementation issues, if the driver uses
3098 * the reconfiguration functionality during resume the interface
3099 * will still be added as associated first during resume and then
3100 * disconnect normally later.
3101 *
3102 * This function can only be called from the resume callback and
3103 * the driver must not be holding any of its own locks while it
3104 * calls this function, or at least not any locks it needs in the
3105 * key configuration paths (if it supports HW crypto).
3106 */
3107void ieee80211_resume_disconnect(struct ieee80211_vif *vif);
3108
3109/**
2873 * ieee80211_disable_dyn_ps - force mac80211 to temporarily disable dynamic psm 3110 * ieee80211_disable_dyn_ps - force mac80211 to temporarily disable dynamic psm
2874 * 3111 *
2875 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3112 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
@@ -2916,6 +3153,16 @@ void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
2916 gfp_t gfp); 3153 gfp_t gfp);
2917 3154
2918/** 3155/**
3156 * ieee80211_get_operstate - get the operstate of the vif
3157 *
3158 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3159 *
3160 * The driver might need to know the operstate of the net_device
3161 * (specifically, whether the link is IF_OPER_UP after resume)
3162 */
3163unsigned char ieee80211_get_operstate(struct ieee80211_vif *vif);
3164
3165/**
2919 * ieee80211_chswitch_done - Complete channel switch process 3166 * ieee80211_chswitch_done - Complete channel switch process
2920 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3167 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
2921 * @success: make the channel switch successful or not 3168 * @success: make the channel switch successful or not
@@ -2965,6 +3212,23 @@ void ieee80211_ready_on_channel(struct ieee80211_hw *hw);
2965 */ 3212 */
2966void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw); 3213void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw);
2967 3214
3215/**
3216 * ieee80211_stop_rx_ba_session - callback to stop existing BA sessions
3217 *
3218 * in order not to harm the system performance and user experience, the device
3219 * may request not to allow any rx ba session and tear down existing rx ba
3220 * sessions based on system constraints such as periodic BT activity that needs
3221 * to limit wlan activity (eg.sco or a2dp)."
3222 * in such cases, the intention is to limit the duration of the rx ppdu and
3223 * therefore prevent the peer device to use a-mpdu aggregation.
3224 *
3225 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3226 * @ba_rx_bitmap: Bit map of open rx ba per tid
3227 * @addr: & to bssid mac address
3228 */
3229void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap,
3230 const u8 *addr);
3231
2968/* Rate control API */ 3232/* Rate control API */
2969 3233
2970/** 3234/**
@@ -3150,4 +3414,9 @@ ieee80211_vif_type_p2p(struct ieee80211_vif *vif)
3150 return ieee80211_iftype_p2p(vif->type, vif->p2p); 3414 return ieee80211_iftype_p2p(vif->type, vif->p2p);
3151} 3415}
3152 3416
3417void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif,
3418 int rssi_min_thold,
3419 int rssi_max_thold);
3420
3421void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif);
3153#endif /* MAC80211_H */ 3422#endif /* MAC80211_H */