diff options
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 025d4cc7bbf8..8c7189c3f6ed 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -537,6 +537,21 @@ struct ieee80211_tx_info { | |||
537 | }; | 537 | }; |
538 | }; | 538 | }; |
539 | 539 | ||
540 | /** | ||
541 | * ieee80211_sched_scan_ies - scheduled scan IEs | ||
542 | * | ||
543 | * This structure is used to pass the appropriate IEs to be used in scheduled | ||
544 | * scans for all bands. It contains both the IEs passed from the userspace | ||
545 | * and the ones generated by mac80211. | ||
546 | * | ||
547 | * @ie: array with the IEs for each supported band | ||
548 | * @len: array with the total length of the IEs for each band | ||
549 | */ | ||
550 | struct ieee80211_sched_scan_ies { | ||
551 | u8 *ie[IEEE80211_NUM_BANDS]; | ||
552 | size_t len[IEEE80211_NUM_BANDS]; | ||
553 | }; | ||
554 | |||
540 | static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) | 555 | static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) |
541 | { | 556 | { |
542 | return (struct ieee80211_tx_info *)skb->cb; | 557 | return (struct ieee80211_tx_info *)skb->cb; |
@@ -1606,6 +1621,18 @@ enum ieee80211_ampdu_mlme_action { | |||
1606 | * you should ensure to cancel it on this callback. | 1621 | * you should ensure to cancel it on this callback. |
1607 | * Must be implemented and can sleep. | 1622 | * Must be implemented and can sleep. |
1608 | * | 1623 | * |
1624 | * @suspend: Suspend the device; mac80211 itself will quiesce before and | ||
1625 | * stop transmitting and doing any other configuration, and then | ||
1626 | * ask the device to suspend. This is only invoked when WoWLAN is | ||
1627 | * configured, otherwise the device is deconfigured completely and | ||
1628 | * reconfigured at resume time. | ||
1629 | * | ||
1630 | * @resume: If WoWLAN was configured, this indicates that mac80211 is | ||
1631 | * now resuming its operation, after this the device must be fully | ||
1632 | * functional again. If this returns an error, the only way out is | ||
1633 | * to also unregister the device. If it returns 1, then mac80211 | ||
1634 | * will also go through the regular complete restart on resume. | ||
1635 | * | ||
1609 | * @add_interface: Called when a netdevice attached to the hardware is | 1636 | * @add_interface: Called when a netdevice attached to the hardware is |
1610 | * enabled. Because it is not called for monitor mode devices, @start | 1637 | * enabled. Because it is not called for monitor mode devices, @start |
1611 | * and @stop must be implemented. | 1638 | * and @stop must be implemented. |
@@ -1681,6 +1708,13 @@ enum ieee80211_ampdu_mlme_action { | |||
1681 | * any error unless this callback returned a negative error code. | 1708 | * any error unless this callback returned a negative error code. |
1682 | * The callback can sleep. | 1709 | * The callback can sleep. |
1683 | * | 1710 | * |
1711 | * @sched_scan_start: Ask the hardware to start scanning repeatedly at | ||
1712 | * specific intervals. The driver must call the | ||
1713 | * ieee80211_sched_scan_results() function whenever it finds results. | ||
1714 | * This process will continue until sched_scan_stop is called. | ||
1715 | * | ||
1716 | * @sched_scan_stop: Tell the hardware to stop an ongoing scheduled scan. | ||
1717 | * | ||
1684 | * @sw_scan_start: Notifier function that is called just before a software scan | 1718 | * @sw_scan_start: Notifier function that is called just before a software scan |
1685 | * is started. Can be NULL, if the driver doesn't need this notification. | 1719 | * is started. Can be NULL, if the driver doesn't need this notification. |
1686 | * The callback can sleep. | 1720 | * The callback can sleep. |
@@ -1819,11 +1853,22 @@ enum ieee80211_ampdu_mlme_action { | |||
1819 | * @set_ringparam: Set tx and rx ring sizes. | 1853 | * @set_ringparam: Set tx and rx ring sizes. |
1820 | * | 1854 | * |
1821 | * @get_ringparam: Get tx and rx ring current and maximum sizes. | 1855 | * @get_ringparam: Get tx and rx ring current and maximum sizes. |
1856 | * | ||
1857 | * @tx_frames_pending: Check if there is any pending frame in the hardware | ||
1858 | * queues before entering power save. | ||
1859 | * | ||
1860 | * @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. | ||
1862 | * The callback can sleep. | ||
1822 | */ | 1863 | */ |
1823 | struct ieee80211_ops { | 1864 | struct ieee80211_ops { |
1824 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1865 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
1825 | int (*start)(struct ieee80211_hw *hw); | 1866 | int (*start)(struct ieee80211_hw *hw); |
1826 | void (*stop)(struct ieee80211_hw *hw); | 1867 | void (*stop)(struct ieee80211_hw *hw); |
1868 | #ifdef CONFIG_PM | ||
1869 | int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan); | ||
1870 | int (*resume)(struct ieee80211_hw *hw); | ||
1871 | #endif | ||
1827 | int (*add_interface)(struct ieee80211_hw *hw, | 1872 | int (*add_interface)(struct ieee80211_hw *hw, |
1828 | struct ieee80211_vif *vif); | 1873 | struct ieee80211_vif *vif); |
1829 | int (*change_interface)(struct ieee80211_hw *hw, | 1874 | int (*change_interface)(struct ieee80211_hw *hw, |
@@ -1854,6 +1899,12 @@ struct ieee80211_ops { | |||
1854 | u32 iv32, u16 *phase1key); | 1899 | u32 iv32, u16 *phase1key); |
1855 | int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 1900 | int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
1856 | struct cfg80211_scan_request *req); | 1901 | struct cfg80211_scan_request *req); |
1902 | int (*sched_scan_start)(struct ieee80211_hw *hw, | ||
1903 | struct ieee80211_vif *vif, | ||
1904 | struct cfg80211_sched_scan_request *req, | ||
1905 | struct ieee80211_sched_scan_ies *ies); | ||
1906 | void (*sched_scan_stop)(struct ieee80211_hw *hw, | ||
1907 | struct ieee80211_vif *vif); | ||
1857 | void (*sw_scan_start)(struct ieee80211_hw *hw); | 1908 | void (*sw_scan_start)(struct ieee80211_hw *hw); |
1858 | void (*sw_scan_complete)(struct ieee80211_hw *hw); | 1909 | void (*sw_scan_complete)(struct ieee80211_hw *hw); |
1859 | int (*get_stats)(struct ieee80211_hw *hw, | 1910 | int (*get_stats)(struct ieee80211_hw *hw, |
@@ -1906,6 +1957,9 @@ struct ieee80211_ops { | |||
1906 | int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx); | 1957 | int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx); |
1907 | void (*get_ringparam)(struct ieee80211_hw *hw, | 1958 | void (*get_ringparam)(struct ieee80211_hw *hw, |
1908 | u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); | 1959 | u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); |
1960 | bool (*tx_frames_pending)(struct ieee80211_hw *hw); | ||
1961 | int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | ||
1962 | const struct cfg80211_bitrate_mask *mask); | ||
1909 | }; | 1963 | }; |
1910 | 1964 | ||
1911 | /** | 1965 | /** |
@@ -2223,6 +2277,18 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta, | |||
2223 | #define IEEE80211_TX_STATUS_HEADROOM 13 | 2277 | #define IEEE80211_TX_STATUS_HEADROOM 13 |
2224 | 2278 | ||
2225 | /** | 2279 | /** |
2280 | * ieee80211_sta_set_tim - set the TIM bit for a sleeping station | ||
2281 | * | ||
2282 | * If a driver buffers frames for a powersave station instead of passing | ||
2283 | * them back to mac80211 for retransmission, the station needs to be told | ||
2284 | * to wake up using the TIM bitmap in the beacon. | ||
2285 | * | ||
2286 | * This function sets the station's TIM bit - it will be cleared when the | ||
2287 | * station wakes up. | ||
2288 | */ | ||
2289 | void ieee80211_sta_set_tim(struct ieee80211_sta *sta); | ||
2290 | |||
2291 | /** | ||
2226 | * ieee80211_tx_status - transmit status callback | 2292 | * ieee80211_tx_status - transmit status callback |
2227 | * | 2293 | * |
2228 | * Call this function for all transmitted frames after they have been | 2294 | * Call this function for all transmitted frames after they have been |
@@ -2276,6 +2342,17 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | |||
2276 | struct sk_buff *skb); | 2342 | struct sk_buff *skb); |
2277 | 2343 | ||
2278 | /** | 2344 | /** |
2345 | * ieee80211_report_low_ack - report non-responding station | ||
2346 | * | ||
2347 | * When operating in AP-mode, call this function to report a non-responding | ||
2348 | * connected STA. | ||
2349 | * | ||
2350 | * @sta: the non-responding connected sta | ||
2351 | * @num_packets: number of packets sent to @sta without a response | ||
2352 | */ | ||
2353 | void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets); | ||
2354 | |||
2355 | /** | ||
2279 | * ieee80211_beacon_get_tim - beacon generation function | 2356 | * ieee80211_beacon_get_tim - beacon generation function |
2280 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 2357 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
2281 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 2358 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
@@ -2545,6 +2622,28 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw); | |||
2545 | void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted); | 2622 | void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted); |
2546 | 2623 | ||
2547 | /** | 2624 | /** |
2625 | * ieee80211_sched_scan_results - got results from scheduled scan | ||
2626 | * | ||
2627 | * When a scheduled scan is running, this function needs to be called by the | ||
2628 | * driver whenever there are new scan results available. | ||
2629 | * | ||
2630 | * @hw: the hardware that is performing scheduled scans | ||
2631 | */ | ||
2632 | void ieee80211_sched_scan_results(struct ieee80211_hw *hw); | ||
2633 | |||
2634 | /** | ||
2635 | * ieee80211_sched_scan_stopped - inform that the scheduled scan has stopped | ||
2636 | * | ||
2637 | * When a scheduled scan is running, this function can be called by | ||
2638 | * the driver if it needs to stop the scan to perform another task. | ||
2639 | * Usual scenarios are drivers that cannot continue the scheduled scan | ||
2640 | * while associating, for instance. | ||
2641 | * | ||
2642 | * @hw: the hardware that is performing scheduled scans | ||
2643 | */ | ||
2644 | void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw); | ||
2645 | |||
2646 | /** | ||
2548 | * ieee80211_iterate_active_interfaces - iterate active interfaces | 2647 | * ieee80211_iterate_active_interfaces - iterate active interfaces |
2549 | * | 2648 | * |
2550 | * This function iterates over the interfaces associated with a given | 2649 | * This function iterates over the interfaces associated with a given |