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.h203
1 files changed, 160 insertions, 43 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 998c30fc8981..2aff4906b2ae 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -219,7 +219,7 @@ struct ieee80211_bss_conf {
219 * 219 *
220 * These flags are used with the @flags member of &ieee80211_tx_info. 220 * These flags are used with the @flags member of &ieee80211_tx_info.
221 * 221 *
222 * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame. 222 * @IEEE80211_TX_CTL_REQ_TX_STATUS: require TX status callback for this frame.
223 * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence 223 * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
224 * number to this frame, taking care of not overwriting the fragment 224 * number to this frame, taking care of not overwriting the fragment
225 * number and increasing the sequence number only when the 225 * number and increasing the sequence number only when the
@@ -390,10 +390,12 @@ struct ieee80211_tx_rate {
390 * @control: union for control data 390 * @control: union for control data
391 * @status: union for status data 391 * @status: union for status data
392 * @driver_data: array of driver_data pointers 392 * @driver_data: array of driver_data pointers
393 * @ampdu_ack_len: number of aggregated frames. 393 * @ampdu_ack_len: number of acked aggregated frames.
394 * relevant only if IEEE80211_TX_STATUS_AMPDU was set. 394 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
395 * @ampdu_ack_map: block ack bit map for the aggregation. 395 * @ampdu_ack_map: block ack bit map for the aggregation.
396 * relevant only if IEEE80211_TX_STATUS_AMPDU was set. 396 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
397 * @ampdu_len: number of aggregated frames.
398 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
397 * @ack_signal: signal strength of the ACK frame 399 * @ack_signal: signal strength of the ACK frame
398 */ 400 */
399struct ieee80211_tx_info { 401struct ieee80211_tx_info {
@@ -428,7 +430,8 @@ struct ieee80211_tx_info {
428 u8 ampdu_ack_len; 430 u8 ampdu_ack_len;
429 u64 ampdu_ack_map; 431 u64 ampdu_ack_map;
430 int ack_signal; 432 int ack_signal;
431 /* 8 bytes free */ 433 u8 ampdu_len;
434 /* 7 bytes free */
432 } status; 435 } status;
433 struct { 436 struct {
434 struct ieee80211_tx_rate driver_rates[ 437 struct ieee80211_tx_rate driver_rates[
@@ -494,7 +497,6 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
494 * @RX_FLAG_MMIC_ERROR: Michael MIC error was reported on this frame. 497 * @RX_FLAG_MMIC_ERROR: Michael MIC error was reported on this frame.
495 * Use together with %RX_FLAG_MMIC_STRIPPED. 498 * Use together with %RX_FLAG_MMIC_STRIPPED.
496 * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware. 499 * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware.
497 * @RX_FLAG_RADIOTAP: This frame starts with a radiotap header.
498 * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame, 500 * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame,
499 * verification has been done by the hardware. 501 * verification has been done by the hardware.
500 * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame. 502 * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame.
@@ -511,11 +513,13 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
511 * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index 513 * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index
512 * @RX_FLAG_40MHZ: HT40 (40 MHz) was used 514 * @RX_FLAG_40MHZ: HT40 (40 MHz) was used
513 * @RX_FLAG_SHORT_GI: Short guard interval was used 515 * @RX_FLAG_SHORT_GI: Short guard interval was used
516 * @RX_FLAG_INTERNAL_CMTR: set internally after frame was reported
517 * on cooked monitor to avoid double-reporting it for multiple
518 * virtual interfaces
514 */ 519 */
515enum mac80211_rx_flags { 520enum mac80211_rx_flags {
516 RX_FLAG_MMIC_ERROR = 1<<0, 521 RX_FLAG_MMIC_ERROR = 1<<0,
517 RX_FLAG_DECRYPTED = 1<<1, 522 RX_FLAG_DECRYPTED = 1<<1,
518 RX_FLAG_RADIOTAP = 1<<2,
519 RX_FLAG_MMIC_STRIPPED = 1<<3, 523 RX_FLAG_MMIC_STRIPPED = 1<<3,
520 RX_FLAG_IV_STRIPPED = 1<<4, 524 RX_FLAG_IV_STRIPPED = 1<<4,
521 RX_FLAG_FAILED_FCS_CRC = 1<<5, 525 RX_FLAG_FAILED_FCS_CRC = 1<<5,
@@ -525,6 +529,7 @@ enum mac80211_rx_flags {
525 RX_FLAG_HT = 1<<9, 529 RX_FLAG_HT = 1<<9,
526 RX_FLAG_40MHZ = 1<<10, 530 RX_FLAG_40MHZ = 1<<10,
527 RX_FLAG_SHORT_GI = 1<<11, 531 RX_FLAG_SHORT_GI = 1<<11,
532 RX_FLAG_INTERNAL_CMTR = 1<<12,
528}; 533};
529 534
530/** 535/**
@@ -554,7 +559,7 @@ struct ieee80211_rx_status {
554 int freq; 559 int freq;
555 int signal; 560 int signal;
556 int noise; 561 int noise;
557 int qual; 562 int __deprecated qual;
558 int antenna; 563 int antenna;
559 int rate_idx; 564 int rate_idx;
560 int flag; 565 int flag;
@@ -565,7 +570,9 @@ struct ieee80211_rx_status {
565 * 570 *
566 * Flags to define PHY configuration options 571 * Flags to define PHY configuration options
567 * 572 *
568 * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported) 573 * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this
574 * to determine for example whether to calculate timestamps for packets
575 * or not, do not use instead of filter flags!
569 * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only) 576 * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only)
570 * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set 577 * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set
571 * the driver should be prepared to handle configuration requests but 578 * the driver should be prepared to handle configuration requests but
@@ -574,7 +581,7 @@ struct ieee80211_rx_status {
574 * it can also be unset in that case when monitor interfaces are active. 581 * it can also be unset in that case when monitor interfaces are active.
575 */ 582 */
576enum ieee80211_conf_flags { 583enum ieee80211_conf_flags {
577 IEEE80211_CONF_RADIOTAP = (1<<0), 584 IEEE80211_CONF_MONITOR = (1<<0),
578 IEEE80211_CONF_PS = (1<<1), 585 IEEE80211_CONF_PS = (1<<1),
579 IEEE80211_CONF_IDLE = (1<<2), 586 IEEE80211_CONF_IDLE = (1<<2),
580}; 587};
@@ -584,7 +591,7 @@ enum ieee80211_conf_flags {
584 * enum ieee80211_conf_changed - denotes which configuration changed 591 * enum ieee80211_conf_changed - denotes which configuration changed
585 * 592 *
586 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed 593 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed
587 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed 594 * @IEEE80211_CONF_CHANGE_MONITOR: the monitor flag changed
588 * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed 595 * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed
589 * @IEEE80211_CONF_CHANGE_POWER: the TX power changed 596 * @IEEE80211_CONF_CHANGE_POWER: the TX power changed
590 * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed 597 * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed
@@ -593,7 +600,7 @@ enum ieee80211_conf_flags {
593 */ 600 */
594enum ieee80211_conf_changed { 601enum ieee80211_conf_changed {
595 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), 602 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2),
596 IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), 603 IEEE80211_CONF_CHANGE_MONITOR = BIT(3),
597 IEEE80211_CONF_CHANGE_PS = BIT(4), 604 IEEE80211_CONF_CHANGE_PS = BIT(4),
598 IEEE80211_CONF_CHANGE_POWER = BIT(5), 605 IEEE80211_CONF_CHANGE_POWER = BIT(5),
599 IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), 606 IEEE80211_CONF_CHANGE_CHANNEL = BIT(6),
@@ -852,6 +859,19 @@ enum ieee80211_tkip_key_type {
852 * any particular flags. There are some exceptions to this rule, 859 * any particular flags. There are some exceptions to this rule,
853 * however, so you are advised to review these flags carefully. 860 * however, so you are advised to review these flags carefully.
854 * 861 *
862 * @IEEE80211_HW_HAS_RATE_CONTROL:
863 * The hardware or firmware includes rate control, and cannot be
864 * controlled by the stack. As such, no rate control algorithm
865 * should be instantiated, and the TX rate reported to userspace
866 * will be taken from the TX status instead of the rate control
867 * algorithm.
868 * Note that this requires that the driver implement a number of
869 * callbacks so it has the correct information, it needs to have
870 * the @set_rts_threshold callback and must look at the BSS config
871 * @use_cts_prot for G/N protection, @use_short_slot for slot
872 * timing in 2.4 GHz and @use_short_preamble for preambles for
873 * CCK frames.
874 *
855 * @IEEE80211_HW_RX_INCLUDES_FCS: 875 * @IEEE80211_HW_RX_INCLUDES_FCS:
856 * Indicates that received frames passed to the stack include 876 * Indicates that received frames passed to the stack include
857 * the FCS at the end. 877 * the FCS at the end.
@@ -910,6 +930,7 @@ enum ieee80211_tkip_key_type {
910 * avoid waking up cpu. 930 * avoid waking up cpu.
911 */ 931 */
912enum ieee80211_hw_flags { 932enum ieee80211_hw_flags {
933 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
913 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, 934 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1,
914 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2, 935 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2,
915 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3, 936 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3,
@@ -1511,6 +1532,7 @@ struct ieee80211_ops {
1511 void (*reset_tsf)(struct ieee80211_hw *hw); 1532 void (*reset_tsf)(struct ieee80211_hw *hw);
1512 int (*tx_last_beacon)(struct ieee80211_hw *hw); 1533 int (*tx_last_beacon)(struct ieee80211_hw *hw);
1513 int (*ampdu_action)(struct ieee80211_hw *hw, 1534 int (*ampdu_action)(struct ieee80211_hw *hw,
1535 struct ieee80211_vif *vif,
1514 enum ieee80211_ampdu_mlme_action action, 1536 enum ieee80211_ampdu_mlme_action action,
1515 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 1537 struct ieee80211_sta *sta, u16 tid, u16 *ssn);
1516 1538
@@ -1667,15 +1689,14 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw);
1667 * ieee80211_rx - receive frame 1689 * ieee80211_rx - receive frame
1668 * 1690 *
1669 * Use this function to hand received frames to mac80211. The receive 1691 * Use this function to hand received frames to mac80211. The receive
1670 * buffer in @skb must start with an IEEE 802.11 header or a radiotap 1692 * buffer in @skb must start with an IEEE 802.11 header.
1671 * header if %RX_FLAG_RADIOTAP is set in the @status flags.
1672 * 1693 *
1673 * This function may not be called in IRQ context. Calls to this function 1694 * This function may not be called in IRQ context. Calls to this function
1674 * for a single hardware must be synchronized against each other. Calls 1695 * for a single hardware must be synchronized against each other. Calls to
1675 * to this function and ieee80211_rx_irqsafe() may not be mixed for a 1696 * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be
1676 * single hardware. 1697 * mixed for a single hardware.
1677 * 1698 *
1678 * Note that right now, this function must be called with softirqs disabled. 1699 * In process context use instead ieee80211_rx_ni().
1679 * 1700 *
1680 * @hw: the hardware this frame came in on 1701 * @hw: the hardware this frame came in on
1681 * @skb: the buffer to receive, owned by mac80211 after this call 1702 * @skb: the buffer to receive, owned by mac80211 after this call
@@ -1688,8 +1709,8 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
1688 * Like ieee80211_rx() but can be called in IRQ context 1709 * Like ieee80211_rx() but can be called in IRQ context
1689 * (internally defers to a tasklet.) 1710 * (internally defers to a tasklet.)
1690 * 1711 *
1691 * Calls to this function and ieee80211_rx() may not be mixed for a 1712 * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not
1692 * single hardware. 1713 * be mixed for a single hardware.
1693 * 1714 *
1694 * @hw: the hardware this frame came in on 1715 * @hw: the hardware this frame came in on
1695 * @skb: the buffer to receive, owned by mac80211 after this call 1716 * @skb: the buffer to receive, owned by mac80211 after this call
@@ -1697,6 +1718,26 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
1697void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb); 1718void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb);
1698 1719
1699/** 1720/**
1721 * ieee80211_rx_ni - receive frame (in process context)
1722 *
1723 * Like ieee80211_rx() but can be called in process context
1724 * (internally disables bottom halves).
1725 *
1726 * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may
1727 * not be mixed for a single hardware.
1728 *
1729 * @hw: the hardware this frame came in on
1730 * @skb: the buffer to receive, owned by mac80211 after this call
1731 */
1732static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
1733 struct sk_buff *skb)
1734{
1735 local_bh_disable();
1736 ieee80211_rx(hw, skb);
1737 local_bh_enable();
1738}
1739
1740/**
1700 * ieee80211_tx_status - transmit status callback 1741 * ieee80211_tx_status - transmit status callback
1701 * 1742 *
1702 * Call this function for all transmitted frames after they have been 1743 * Call this function for all transmitted frames after they have been
@@ -1730,19 +1771,45 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
1730 struct sk_buff *skb); 1771 struct sk_buff *skb);
1731 1772
1732/** 1773/**
1733 * ieee80211_beacon_get - beacon generation function 1774 * ieee80211_beacon_get_tim - beacon generation function
1734 * @hw: pointer obtained from ieee80211_alloc_hw(). 1775 * @hw: pointer obtained from ieee80211_alloc_hw().
1735 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 1776 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1777 * @tim_offset: pointer to variable that will receive the TIM IE offset.
1778 * Set to 0 if invalid (in non-AP modes).
1779 * @tim_length: pointer to variable that will receive the TIM IE length,
1780 * (including the ID and length bytes!).
1781 * Set to 0 if invalid (in non-AP modes).
1782 *
1783 * If the driver implements beaconing modes, it must use this function to
1784 * obtain the beacon frame/template.
1736 * 1785 *
1737 * If the beacon frames are generated by the host system (i.e., not in 1786 * If the beacon frames are generated by the host system (i.e., not in
1738 * hardware/firmware), the low-level driver uses this function to receive 1787 * hardware/firmware), the driver uses this function to get each beacon
1739 * the next beacon frame from the 802.11 code. The low-level is responsible 1788 * frame from mac80211 -- it is responsible for calling this function
1740 * for calling this function before beacon data is needed (e.g., based on 1789 * before the beacon is needed (e.g. based on hardware interrupt).
1741 * hardware interrupt). Returned skb is used only once and low-level driver 1790 *
1742 * is responsible for freeing it. 1791 * If the beacon frames are generated by the device, then the driver
1792 * must use the returned beacon as the template and change the TIM IE
1793 * according to the current DTIM parameters/TIM bitmap.
1794 *
1795 * The driver is responsible for freeing the returned skb.
1743 */ 1796 */
1744struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, 1797struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
1745 struct ieee80211_vif *vif); 1798 struct ieee80211_vif *vif,
1799 u16 *tim_offset, u16 *tim_length);
1800
1801/**
1802 * ieee80211_beacon_get - beacon generation function
1803 * @hw: pointer obtained from ieee80211_alloc_hw().
1804 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1805 *
1806 * See ieee80211_beacon_get_tim().
1807 */
1808static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
1809 struct ieee80211_vif *vif)
1810{
1811 return ieee80211_beacon_get_tim(hw, vif, NULL, NULL);
1812}
1746 1813
1747/** 1814/**
1748 * ieee80211_rts_get - RTS frame generation function 1815 * ieee80211_rts_get - RTS frame generation function
@@ -1987,8 +2054,7 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
1987 2054
1988/** 2055/**
1989 * ieee80211_start_tx_ba_session - Start a tx Block Ack session. 2056 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
1990 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2057 * @sta: the station for which to start a BA session
1991 * @ra: receiver address of the BA session recipient
1992 * @tid: the TID to BA on. 2058 * @tid: the TID to BA on.
1993 * 2059 *
1994 * Return: success if addBA request was sent, failure otherwise 2060 * Return: success if addBA request was sent, failure otherwise
@@ -1997,22 +2063,22 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
1997 * the need to start aggregation on a certain RA/TID, the session level 2063 * the need to start aggregation on a certain RA/TID, the session level
1998 * will be managed by the mac80211. 2064 * will be managed by the mac80211.
1999 */ 2065 */
2000int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid); 2066int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid);
2001 2067
2002/** 2068/**
2003 * ieee80211_start_tx_ba_cb - low level driver ready to aggregate. 2069 * ieee80211_start_tx_ba_cb - low level driver ready to aggregate.
2004 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2070 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2005 * @ra: receiver address of the BA session recipient. 2071 * @ra: receiver address of the BA session recipient.
2006 * @tid: the TID to BA on. 2072 * @tid: the TID to BA on.
2007 * 2073 *
2008 * This function must be called by low level driver once it has 2074 * This function must be called by low level driver once it has
2009 * finished with preparations for the BA session. 2075 * finished with preparations for the BA session.
2010 */ 2076 */
2011void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid); 2077void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid);
2012 2078
2013/** 2079/**
2014 * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. 2080 * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate.
2015 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2081 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2016 * @ra: receiver address of the BA session recipient. 2082 * @ra: receiver address of the BA session recipient.
2017 * @tid: the TID to BA on. 2083 * @tid: the TID to BA on.
2018 * 2084 *
@@ -2020,13 +2086,12 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid);
2020 * finished with preparations for the BA session. 2086 * finished with preparations for the BA session.
2021 * This version of the function is IRQ-safe. 2087 * This version of the function is IRQ-safe.
2022 */ 2088 */
2023void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, 2089void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
2024 u16 tid); 2090 u16 tid);
2025 2091
2026/** 2092/**
2027 * ieee80211_stop_tx_ba_session - Stop a Block Ack session. 2093 * ieee80211_stop_tx_ba_session - Stop a Block Ack session.
2028 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2094 * @sta: the station whose BA session to stop
2029 * @ra: receiver address of the BA session recipient
2030 * @tid: the TID to stop BA. 2095 * @tid: the TID to stop BA.
2031 * @initiator: if indicates initiator DELBA frame will be sent. 2096 * @initiator: if indicates initiator DELBA frame will be sent.
2032 * 2097 *
@@ -2036,24 +2101,23 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
2036 * the need to stop aggregation on a certain RA/TID, the session level 2101 * the need to stop aggregation on a certain RA/TID, the session level
2037 * will be managed by the mac80211. 2102 * will be managed by the mac80211.
2038 */ 2103 */
2039int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw, 2104int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid,
2040 u8 *ra, u16 tid,
2041 enum ieee80211_back_parties initiator); 2105 enum ieee80211_back_parties initiator);
2042 2106
2043/** 2107/**
2044 * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. 2108 * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate.
2045 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2109 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2046 * @ra: receiver address of the BA session recipient. 2110 * @ra: receiver address of the BA session recipient.
2047 * @tid: the desired TID to BA on. 2111 * @tid: the desired TID to BA on.
2048 * 2112 *
2049 * This function must be called by low level driver once it has 2113 * This function must be called by low level driver once it has
2050 * finished with preparations for the BA session tear down. 2114 * finished with preparations for the BA session tear down.
2051 */ 2115 */
2052void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid); 2116void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid);
2053 2117
2054/** 2118/**
2055 * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. 2119 * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate.
2056 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2120 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2057 * @ra: receiver address of the BA session recipient. 2121 * @ra: receiver address of the BA session recipient.
2058 * @tid: the desired TID to BA on. 2122 * @tid: the desired TID to BA on.
2059 * 2123 *
@@ -2061,22 +2125,75 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid);
2061 * finished with preparations for the BA session tear down. 2125 * finished with preparations for the BA session tear down.
2062 * This version of the function is IRQ-safe. 2126 * This version of the function is IRQ-safe.
2063 */ 2127 */
2064void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, 2128void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
2065 u16 tid); 2129 u16 tid);
2066 2130
2067/** 2131/**
2068 * ieee80211_find_sta - find a station 2132 * ieee80211_find_sta - find a station
2069 * 2133 *
2070 * @hw: pointer as obtained from ieee80211_alloc_hw() 2134 * @vif: virtual interface to look for station on
2071 * @addr: station's address 2135 * @addr: station's address
2072 * 2136 *
2073 * This function must be called under RCU lock and the 2137 * This function must be called under RCU lock and the
2074 * resulting pointer is only valid under RCU lock as well. 2138 * resulting pointer is only valid under RCU lock as well.
2075 */ 2139 */
2076struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, 2140struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
2077 const u8 *addr); 2141 const u8 *addr);
2078 2142
2079/** 2143/**
2144 * ieee80211_find_sta_by_hw - find a station on hardware
2145 *
2146 * @hw: pointer as obtained from ieee80211_alloc_hw()
2147 * @addr: station's address
2148 *
2149 * This function must be called under RCU lock and the
2150 * resulting pointer is only valid under RCU lock as well.
2151 *
2152 * NOTE: This function should not be used! When mac80211 is converted
2153 * internally to properly keep track of stations on multiple
2154 * virtual interfaces, it will not always know which station to
2155 * return here since a single address might be used by multiple
2156 * logical stations (e.g. consider a station connecting to another
2157 * BSSID on the same AP hardware without disconnecting first).
2158 *
2159 * DO NOT USE THIS FUNCTION.
2160 */
2161struct ieee80211_sta *ieee80211_find_sta_by_hw(struct ieee80211_hw *hw,
2162 const u8 *addr);
2163
2164/**
2165 * ieee80211_sta_block_awake - block station from waking up
2166 * @hw: the hardware
2167 * @pubsta: the station
2168 * @block: whether to block or unblock
2169 *
2170 * Some devices require that all frames that are on the queues
2171 * for a specific station that went to sleep are flushed before
2172 * a poll response or frames after the station woke up can be
2173 * delivered to that it. Note that such frames must be rejected
2174 * by the driver as filtered, with the appropriate status flag.
2175 *
2176 * This function allows implementing this mode in a race-free
2177 * manner.
2178 *
2179 * To do this, a driver must keep track of the number of frames
2180 * still enqueued for a specific station. If this number is not
2181 * zero when the station goes to sleep, the driver must call
2182 * this function to force mac80211 to consider the station to
2183 * be asleep regardless of the station's actual state. Once the
2184 * number of outstanding frames reaches zero, the driver must
2185 * call this function again to unblock the station. That will
2186 * cause mac80211 to be able to send ps-poll responses, and if
2187 * the station queried in the meantime then frames will also
2188 * be sent out as a result of this. Additionally, the driver
2189 * will be notified that the station woke up some time after
2190 * it is unblocked, regardless of whether the station actually
2191 * woke up while blocked or not.
2192 */
2193void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
2194 struct ieee80211_sta *pubsta, bool block);
2195
2196/**
2080 * ieee80211_beacon_loss - inform hardware does not receive beacons 2197 * ieee80211_beacon_loss - inform hardware does not receive beacons
2081 * 2198 *
2082 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 2199 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.