diff options
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 139 |
1 files changed, 136 insertions, 3 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 365359b24177..62c0ce2d1dc8 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -97,6 +97,20 @@ enum ieee80211_max_queues { | |||
97 | }; | 97 | }; |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * enum ieee80211_ac_numbers - AC numbers as used in mac80211 | ||
101 | * @IEEE80211_AC_VO: voice | ||
102 | * @IEEE80211_AC_VI: video | ||
103 | * @IEEE80211_AC_BE: best effort | ||
104 | * @IEEE80211_AC_BK: background | ||
105 | */ | ||
106 | enum ieee80211_ac_numbers { | ||
107 | IEEE80211_AC_VO = 0, | ||
108 | IEEE80211_AC_VI = 1, | ||
109 | IEEE80211_AC_BE = 2, | ||
110 | IEEE80211_AC_BK = 3, | ||
111 | }; | ||
112 | |||
113 | /** | ||
100 | * struct ieee80211_tx_queue_params - transmit queue configuration | 114 | * struct ieee80211_tx_queue_params - transmit queue configuration |
101 | * | 115 | * |
102 | * The information provided in this structure is required for QoS | 116 | * The information provided in this structure is required for QoS |
@@ -205,6 +219,7 @@ enum ieee80211_bss_change { | |||
205 | * @basic_rates: bitmap of basic rates, each bit stands for an | 219 | * @basic_rates: bitmap of basic rates, each bit stands for an |
206 | * index into the rate table configured by the driver in | 220 | * index into the rate table configured by the driver in |
207 | * the current band. | 221 | * the current band. |
222 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) | ||
208 | * @bssid: The BSSID for this BSS | 223 | * @bssid: The BSSID for this BSS |
209 | * @enable_beacon: whether beaconing should be enabled or not | 224 | * @enable_beacon: whether beaconing should be enabled or not |
210 | * @channel_type: Channel type for this BSS -- the hardware might be | 225 | * @channel_type: Channel type for this BSS -- the hardware might be |
@@ -244,6 +259,7 @@ struct ieee80211_bss_conf { | |||
244 | u16 assoc_capability; | 259 | u16 assoc_capability; |
245 | u64 timestamp; | 260 | u64 timestamp; |
246 | u32 basic_rates; | 261 | u32 basic_rates; |
262 | int mcast_rate[IEEE80211_NUM_BANDS]; | ||
247 | u16 ht_operation_mode; | 263 | u16 ht_operation_mode; |
248 | s32 cqm_rssi_thold; | 264 | s32 cqm_rssi_thold; |
249 | u32 cqm_rssi_hyst; | 265 | u32 cqm_rssi_hyst; |
@@ -321,6 +337,10 @@ struct ieee80211_bss_conf { | |||
321 | * @IEEE80211_TX_CTL_LDPC: tells the driver to use LDPC for this frame | 337 | * @IEEE80211_TX_CTL_LDPC: tells the driver to use LDPC for this frame |
322 | * @IEEE80211_TX_CTL_STBC: Enables Space-Time Block Coding (STBC) for this | 338 | * @IEEE80211_TX_CTL_STBC: Enables Space-Time Block Coding (STBC) for this |
323 | * frame and selects the maximum number of streams that it can use. | 339 | * frame and selects the maximum number of streams that it can use. |
340 | * @IEEE80211_TX_CTL_TX_OFFCHAN: Marks this packet to be transmitted on | ||
341 | * the off-channel channel when a remain-on-channel offload is done | ||
342 | * in hardware -- normal packets still flow and are expected to be | ||
343 | * handled properly by the device. | ||
324 | * | 344 | * |
325 | * Note: If you have to add new flags to the enumeration, then don't | 345 | * Note: If you have to add new flags to the enumeration, then don't |
326 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. | 346 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. |
@@ -349,6 +369,7 @@ enum mac80211_tx_control_flags { | |||
349 | IEEE80211_TX_INTFL_NL80211_FRAME_TX = BIT(21), | 369 | IEEE80211_TX_INTFL_NL80211_FRAME_TX = BIT(21), |
350 | IEEE80211_TX_CTL_LDPC = BIT(22), | 370 | IEEE80211_TX_CTL_LDPC = BIT(22), |
351 | IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24), | 371 | IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24), |
372 | IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25), | ||
352 | }; | 373 | }; |
353 | 374 | ||
354 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 | 375 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 |
@@ -1652,6 +1673,11 @@ enum ieee80211_ampdu_mlme_action { | |||
1652 | * and IV16) for the given key from hardware. | 1673 | * and IV16) for the given key from hardware. |
1653 | * The callback must be atomic. | 1674 | * The callback must be atomic. |
1654 | * | 1675 | * |
1676 | * @set_frag_threshold: Configuration of fragmentation threshold. Assign this | ||
1677 | * if the device does fragmentation by itself; if this callback is | ||
1678 | * implemented then the stack will not do fragmentation. | ||
1679 | * The callback can sleep. | ||
1680 | * | ||
1655 | * @set_rts_threshold: Configuration of RTS threshold (if device needs it) | 1681 | * @set_rts_threshold: Configuration of RTS threshold (if device needs it) |
1656 | * The callback can sleep. | 1682 | * The callback can sleep. |
1657 | * | 1683 | * |
@@ -1724,6 +1750,23 @@ enum ieee80211_ampdu_mlme_action { | |||
1724 | * completion of the channel switch. | 1750 | * completion of the channel switch. |
1725 | * | 1751 | * |
1726 | * @napi_poll: Poll Rx queue for incoming data frames. | 1752 | * @napi_poll: Poll Rx queue for incoming data frames. |
1753 | * | ||
1754 | * @set_antenna: Set antenna configuration (tx_ant, rx_ant) on the device. | ||
1755 | * Parameters are bitmaps of allowed antennas to use for TX/RX. Drivers may | ||
1756 | * reject TX/RX mask combinations they cannot support by returning -EINVAL | ||
1757 | * (also see nl80211.h @NL80211_ATTR_WIPHY_ANTENNA_TX). | ||
1758 | * | ||
1759 | * @get_antenna: Get current antenna configuration from device (tx_ant, rx_ant). | ||
1760 | * | ||
1761 | * @remain_on_channel: Starts an off-channel period on the given channel, must | ||
1762 | * call back to ieee80211_ready_on_channel() when on that channel. Note | ||
1763 | * that normal channel traffic is not stopped as this is intended for hw | ||
1764 | * offload. Frames to transmit on the off-channel channel are transmitted | ||
1765 | * normally except for the %IEEE80211_TX_CTL_TX_OFFCHAN flag. When the | ||
1766 | * duration (which will always be non-zero) expires, the driver must call | ||
1767 | * ieee80211_remain_on_channel_expired(). This callback may sleep. | ||
1768 | * @cancel_remain_on_channel: Requests that an ongoing off-channel period is | ||
1769 | * aborted before it expires. This callback may sleep. | ||
1727 | */ | 1770 | */ |
1728 | struct ieee80211_ops { | 1771 | struct ieee80211_ops { |
1729 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1772 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
@@ -1765,6 +1808,7 @@ struct ieee80211_ops { | |||
1765 | struct ieee80211_low_level_stats *stats); | 1808 | struct ieee80211_low_level_stats *stats); |
1766 | void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx, | 1809 | void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx, |
1767 | u32 *iv32, u16 *iv16); | 1810 | u32 *iv32, u16 *iv16); |
1811 | int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value); | ||
1768 | int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value); | 1812 | int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value); |
1769 | int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 1813 | int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
1770 | struct ieee80211_sta *sta); | 1814 | struct ieee80211_sta *sta); |
@@ -1793,6 +1837,14 @@ struct ieee80211_ops { | |||
1793 | void (*channel_switch)(struct ieee80211_hw *hw, | 1837 | void (*channel_switch)(struct ieee80211_hw *hw, |
1794 | struct ieee80211_channel_switch *ch_switch); | 1838 | struct ieee80211_channel_switch *ch_switch); |
1795 | int (*napi_poll)(struct ieee80211_hw *hw, int budget); | 1839 | int (*napi_poll)(struct ieee80211_hw *hw, int budget); |
1840 | int (*set_antenna)(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant); | ||
1841 | int (*get_antenna)(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); | ||
1842 | |||
1843 | int (*remain_on_channel)(struct ieee80211_hw *hw, | ||
1844 | struct ieee80211_channel *chan, | ||
1845 | enum nl80211_channel_type channel_type, | ||
1846 | int duration); | ||
1847 | int (*cancel_remain_on_channel)(struct ieee80211_hw *hw); | ||
1796 | }; | 1848 | }; |
1797 | 1849 | ||
1798 | /** | 1850 | /** |
@@ -1821,11 +1873,39 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
1821 | */ | 1873 | */ |
1822 | int ieee80211_register_hw(struct ieee80211_hw *hw); | 1874 | int ieee80211_register_hw(struct ieee80211_hw *hw); |
1823 | 1875 | ||
1876 | /** | ||
1877 | * struct ieee80211_tpt_blink - throughput blink description | ||
1878 | * @throughput: throughput in Kbit/sec | ||
1879 | * @blink_time: blink time in milliseconds | ||
1880 | * (full cycle, ie. one off + one on period) | ||
1881 | */ | ||
1882 | struct ieee80211_tpt_blink { | ||
1883 | int throughput; | ||
1884 | int blink_time; | ||
1885 | }; | ||
1886 | |||
1887 | /** | ||
1888 | * enum ieee80211_tpt_led_trigger_flags - throughput trigger flags | ||
1889 | * @IEEE80211_TPT_LEDTRIG_FL_RADIO: enable blinking with radio | ||
1890 | * @IEEE80211_TPT_LEDTRIG_FL_WORK: enable blinking when working | ||
1891 | * @IEEE80211_TPT_LEDTRIG_FL_CONNECTED: enable blinking when at least one | ||
1892 | * interface is connected in some way, including being an AP | ||
1893 | */ | ||
1894 | enum ieee80211_tpt_led_trigger_flags { | ||
1895 | IEEE80211_TPT_LEDTRIG_FL_RADIO = BIT(0), | ||
1896 | IEEE80211_TPT_LEDTRIG_FL_WORK = BIT(1), | ||
1897 | IEEE80211_TPT_LEDTRIG_FL_CONNECTED = BIT(2), | ||
1898 | }; | ||
1899 | |||
1824 | #ifdef CONFIG_MAC80211_LEDS | 1900 | #ifdef CONFIG_MAC80211_LEDS |
1825 | extern char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw); | 1901 | extern char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw); |
1826 | extern char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw); | 1902 | extern char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw); |
1827 | extern char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw); | 1903 | extern char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw); |
1828 | extern char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw); | 1904 | extern char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw); |
1905 | extern char *__ieee80211_create_tpt_led_trigger( | ||
1906 | struct ieee80211_hw *hw, unsigned int flags, | ||
1907 | const struct ieee80211_tpt_blink *blink_table, | ||
1908 | unsigned int blink_table_len); | ||
1829 | #endif | 1909 | #endif |
1830 | /** | 1910 | /** |
1831 | * ieee80211_get_tx_led_name - get name of TX LED | 1911 | * ieee80211_get_tx_led_name - get name of TX LED |
@@ -1904,6 +1984,30 @@ static inline char *ieee80211_get_radio_led_name(struct ieee80211_hw *hw) | |||
1904 | } | 1984 | } |
1905 | 1985 | ||
1906 | /** | 1986 | /** |
1987 | * ieee80211_create_tpt_led_trigger - create throughput LED trigger | ||
1988 | * @hw: the hardware to create the trigger for | ||
1989 | * @flags: trigger flags, see &enum ieee80211_tpt_led_trigger_flags | ||
1990 | * @blink_table: the blink table -- needs to be ordered by throughput | ||
1991 | * @blink_table_len: size of the blink table | ||
1992 | * | ||
1993 | * This function returns %NULL (in case of error, or if no LED | ||
1994 | * triggers are configured) or the name of the new trigger. | ||
1995 | * This function must be called before ieee80211_register_hw(). | ||
1996 | */ | ||
1997 | static inline char * | ||
1998 | ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, unsigned int flags, | ||
1999 | const struct ieee80211_tpt_blink *blink_table, | ||
2000 | unsigned int blink_table_len) | ||
2001 | { | ||
2002 | #ifdef CONFIG_MAC80211_LEDS | ||
2003 | return __ieee80211_create_tpt_led_trigger(hw, flags, blink_table, | ||
2004 | blink_table_len); | ||
2005 | #else | ||
2006 | return NULL; | ||
2007 | #endif | ||
2008 | } | ||
2009 | |||
2010 | /** | ||
1907 | * ieee80211_unregister_hw - Unregister a hardware device | 2011 | * ieee80211_unregister_hw - Unregister a hardware device |
1908 | * | 2012 | * |
1909 | * This function instructs mac80211 to free allocated resources | 2013 | * This function instructs mac80211 to free allocated resources |
@@ -2404,6 +2508,7 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw, | |||
2404 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. | 2508 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. |
2405 | * @sta: the station for which to start a BA session | 2509 | * @sta: the station for which to start a BA session |
2406 | * @tid: the TID to BA on. | 2510 | * @tid: the TID to BA on. |
2511 | * @timeout: session timeout value (in TUs) | ||
2407 | * | 2512 | * |
2408 | * Return: success if addBA request was sent, failure otherwise | 2513 | * Return: success if addBA request was sent, failure otherwise |
2409 | * | 2514 | * |
@@ -2411,7 +2516,8 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw, | |||
2411 | * the need to start aggregation on a certain RA/TID, the session level | 2516 | * the need to start aggregation on a certain RA/TID, the session level |
2412 | * will be managed by the mac80211. | 2517 | * will be managed by the mac80211. |
2413 | */ | 2518 | */ |
2414 | int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid); | 2519 | int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid, |
2520 | u16 timeout); | ||
2415 | 2521 | ||
2416 | /** | 2522 | /** |
2417 | * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. | 2523 | * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. |
@@ -2521,6 +2627,21 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw, | |||
2521 | struct ieee80211_sta *pubsta, bool block); | 2627 | struct ieee80211_sta *pubsta, bool block); |
2522 | 2628 | ||
2523 | /** | 2629 | /** |
2630 | * ieee80211_ap_probereq_get - retrieve a Probe Request template | ||
2631 | * @hw: pointer obtained from ieee80211_alloc_hw(). | ||
2632 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
2633 | * | ||
2634 | * Creates a Probe Request template which can, for example, be uploaded to | ||
2635 | * hardware. The template is filled with bssid, ssid and supported rate | ||
2636 | * information. This function must only be called from within the | ||
2637 | * .bss_info_changed callback function and only in managed mode. The function | ||
2638 | * is only useful when the interface is associated, otherwise it will return | ||
2639 | * NULL. | ||
2640 | */ | ||
2641 | struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw, | ||
2642 | struct ieee80211_vif *vif); | ||
2643 | |||
2644 | /** | ||
2524 | * ieee80211_beacon_loss - inform hardware does not receive beacons | 2645 | * ieee80211_beacon_loss - inform hardware does not receive beacons |
2525 | * | 2646 | * |
2526 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 2647 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
@@ -2629,6 +2750,18 @@ void ieee80211_request_smps(struct ieee80211_vif *vif, | |||
2629 | */ | 2750 | */ |
2630 | void ieee80211_key_removed(struct ieee80211_key_conf *key_conf); | 2751 | void ieee80211_key_removed(struct ieee80211_key_conf *key_conf); |
2631 | 2752 | ||
2753 | /** | ||
2754 | * ieee80211_ready_on_channel - notification of remain-on-channel start | ||
2755 | * @hw: pointer as obtained from ieee80211_alloc_hw() | ||
2756 | */ | ||
2757 | void ieee80211_ready_on_channel(struct ieee80211_hw *hw); | ||
2758 | |||
2759 | /** | ||
2760 | * ieee80211_remain_on_channel_expired - remain_on_channel duration expired | ||
2761 | * @hw: pointer as obtained from ieee80211_alloc_hw() | ||
2762 | */ | ||
2763 | void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw); | ||
2764 | |||
2632 | /* Rate control API */ | 2765 | /* Rate control API */ |
2633 | 2766 | ||
2634 | /** | 2767 | /** |
@@ -2660,7 +2793,7 @@ enum rate_control_changed { | |||
2660 | * @rate_idx_mask: user-requested rate mask (not MCS for now) | 2793 | * @rate_idx_mask: user-requested rate mask (not MCS for now) |
2661 | * @skb: the skb that will be transmitted, the control information in it needs | 2794 | * @skb: the skb that will be transmitted, the control information in it needs |
2662 | * to be filled in | 2795 | * to be filled in |
2663 | * @ap: whether this frame is sent out in AP mode | 2796 | * @bss: whether this frame is sent out in AP or IBSS mode |
2664 | */ | 2797 | */ |
2665 | struct ieee80211_tx_rate_control { | 2798 | struct ieee80211_tx_rate_control { |
2666 | struct ieee80211_hw *hw; | 2799 | struct ieee80211_hw *hw; |
@@ -2671,7 +2804,7 @@ struct ieee80211_tx_rate_control { | |||
2671 | bool rts, short_preamble; | 2804 | bool rts, short_preamble; |
2672 | u8 max_rate_idx; | 2805 | u8 max_rate_idx; |
2673 | u32 rate_idx_mask; | 2806 | u32 rate_idx_mask; |
2674 | bool ap; | 2807 | bool bss; |
2675 | }; | 2808 | }; |
2676 | 2809 | ||
2677 | struct rate_control_ops { | 2810 | struct rate_control_ops { |