diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 116 |
1 files changed, 96 insertions, 20 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index ac9836e0aab3..ef7a089ac546 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -229,16 +229,29 @@ struct ieee80211_rx_data { | |||
229 | u16 tkip_iv16; | 229 | u16 tkip_iv16; |
230 | }; | 230 | }; |
231 | 231 | ||
232 | struct ieee80211_csa_settings { | ||
233 | const u16 *counter_offsets_beacon; | ||
234 | const u16 *counter_offsets_presp; | ||
235 | |||
236 | int n_counter_offsets_beacon; | ||
237 | int n_counter_offsets_presp; | ||
238 | |||
239 | u8 count; | ||
240 | }; | ||
241 | |||
232 | struct beacon_data { | 242 | struct beacon_data { |
233 | u8 *head, *tail; | 243 | u8 *head, *tail; |
234 | int head_len, tail_len; | 244 | int head_len, tail_len; |
235 | struct ieee80211_meshconf_ie *meshconf; | 245 | struct ieee80211_meshconf_ie *meshconf; |
246 | u16 csa_counter_offsets[IEEE80211_MAX_CSA_COUNTERS_NUM]; | ||
247 | u8 csa_current_counter; | ||
236 | struct rcu_head rcu_head; | 248 | struct rcu_head rcu_head; |
237 | }; | 249 | }; |
238 | 250 | ||
239 | struct probe_resp { | 251 | struct probe_resp { |
240 | struct rcu_head rcu_head; | 252 | struct rcu_head rcu_head; |
241 | int len; | 253 | int len; |
254 | u16 csa_counter_offsets[IEEE80211_MAX_CSA_COUNTERS_NUM]; | ||
242 | u8 data[0]; | 255 | u8 data[0]; |
243 | }; | 256 | }; |
244 | 257 | ||
@@ -332,7 +345,6 @@ enum ieee80211_sta_flags { | |||
332 | IEEE80211_STA_CONNECTION_POLL = BIT(1), | 345 | IEEE80211_STA_CONNECTION_POLL = BIT(1), |
333 | IEEE80211_STA_CONTROL_PORT = BIT(2), | 346 | IEEE80211_STA_CONTROL_PORT = BIT(2), |
334 | IEEE80211_STA_DISABLE_HT = BIT(4), | 347 | IEEE80211_STA_DISABLE_HT = BIT(4), |
335 | IEEE80211_STA_CSA_RECEIVED = BIT(5), | ||
336 | IEEE80211_STA_MFP_ENABLED = BIT(6), | 348 | IEEE80211_STA_MFP_ENABLED = BIT(6), |
337 | IEEE80211_STA_UAPSD_ENABLED = BIT(7), | 349 | IEEE80211_STA_UAPSD_ENABLED = BIT(7), |
338 | IEEE80211_STA_NULLFUNC_ACKED = BIT(8), | 350 | IEEE80211_STA_NULLFUNC_ACKED = BIT(8), |
@@ -490,6 +502,9 @@ struct ieee80211_if_managed { | |||
490 | struct ieee80211_ht_cap ht_capa_mask; /* Valid parts of ht_capa */ | 502 | struct ieee80211_ht_cap ht_capa_mask; /* Valid parts of ht_capa */ |
491 | struct ieee80211_vht_cap vht_capa; /* configured VHT overrides */ | 503 | struct ieee80211_vht_cap vht_capa; /* configured VHT overrides */ |
492 | struct ieee80211_vht_cap vht_capa_mask; /* Valid parts of vht_capa */ | 504 | struct ieee80211_vht_cap vht_capa_mask; /* Valid parts of vht_capa */ |
505 | |||
506 | u8 tdls_peer[ETH_ALEN] __aligned(2); | ||
507 | struct delayed_work tdls_peer_del_work; | ||
493 | }; | 508 | }; |
494 | 509 | ||
495 | struct ieee80211_if_ibss { | 510 | struct ieee80211_if_ibss { |
@@ -688,6 +703,24 @@ enum ieee80211_chanctx_mode { | |||
688 | IEEE80211_CHANCTX_EXCLUSIVE | 703 | IEEE80211_CHANCTX_EXCLUSIVE |
689 | }; | 704 | }; |
690 | 705 | ||
706 | /** | ||
707 | * enum ieee80211_chanctx_replace_state - channel context replacement state | ||
708 | * | ||
709 | * This is used for channel context in-place reservations that require channel | ||
710 | * context switch/swap. | ||
711 | * | ||
712 | * @IEEE80211_CHANCTX_REPLACE_NONE: no replacement is taking place | ||
713 | * @IEEE80211_CHANCTX_WILL_BE_REPLACED: this channel context will be replaced | ||
714 | * by a (not yet registered) channel context pointed by %replace_ctx. | ||
715 | * @IEEE80211_CHANCTX_REPLACES_OTHER: this (not yet registered) channel context | ||
716 | * replaces an existing channel context pointed to by %replace_ctx. | ||
717 | */ | ||
718 | enum ieee80211_chanctx_replace_state { | ||
719 | IEEE80211_CHANCTX_REPLACE_NONE, | ||
720 | IEEE80211_CHANCTX_WILL_BE_REPLACED, | ||
721 | IEEE80211_CHANCTX_REPLACES_OTHER, | ||
722 | }; | ||
723 | |||
691 | struct ieee80211_chanctx { | 724 | struct ieee80211_chanctx { |
692 | struct list_head list; | 725 | struct list_head list; |
693 | struct rcu_head rcu_head; | 726 | struct rcu_head rcu_head; |
@@ -695,6 +728,9 @@ struct ieee80211_chanctx { | |||
695 | struct list_head assigned_vifs; | 728 | struct list_head assigned_vifs; |
696 | struct list_head reserved_vifs; | 729 | struct list_head reserved_vifs; |
697 | 730 | ||
731 | enum ieee80211_chanctx_replace_state replace_state; | ||
732 | struct ieee80211_chanctx *replace_ctx; | ||
733 | |||
698 | enum ieee80211_chanctx_mode mode; | 734 | enum ieee80211_chanctx_mode mode; |
699 | bool driver_present; | 735 | bool driver_present; |
700 | 736 | ||
@@ -754,9 +790,6 @@ struct ieee80211_sub_if_data { | |||
754 | struct mac80211_qos_map __rcu *qos_map; | 790 | struct mac80211_qos_map __rcu *qos_map; |
755 | 791 | ||
756 | struct work_struct csa_finalize_work; | 792 | struct work_struct csa_finalize_work; |
757 | u16 csa_counter_offset_beacon[IEEE80211_MAX_CSA_COUNTERS_NUM]; | ||
758 | u16 csa_counter_offset_presp[IEEE80211_MAX_CSA_COUNTERS_NUM]; | ||
759 | bool csa_radar_required; | ||
760 | bool csa_block_tx; /* write-protected by sdata_lock and local->mtx */ | 793 | bool csa_block_tx; /* write-protected by sdata_lock and local->mtx */ |
761 | struct cfg80211_chan_def csa_chandef; | 794 | struct cfg80211_chan_def csa_chandef; |
762 | 795 | ||
@@ -767,7 +800,7 @@ struct ieee80211_sub_if_data { | |||
767 | struct ieee80211_chanctx *reserved_chanctx; | 800 | struct ieee80211_chanctx *reserved_chanctx; |
768 | struct cfg80211_chan_def reserved_chandef; | 801 | struct cfg80211_chan_def reserved_chandef; |
769 | bool reserved_radar_required; | 802 | bool reserved_radar_required; |
770 | u8 csa_current_counter; | 803 | bool reserved_ready; |
771 | 804 | ||
772 | /* used to reconfigure hardware SM PS */ | 805 | /* used to reconfigure hardware SM PS */ |
773 | struct work_struct recalc_smps; | 806 | struct work_struct recalc_smps; |
@@ -892,10 +925,17 @@ ieee80211_vif_get_shift(struct ieee80211_vif *vif) | |||
892 | return shift; | 925 | return shift; |
893 | } | 926 | } |
894 | 927 | ||
928 | struct ieee80211_rx_agg { | ||
929 | u8 addr[ETH_ALEN]; | ||
930 | u16 tid; | ||
931 | }; | ||
932 | |||
895 | enum sdata_queue_type { | 933 | enum sdata_queue_type { |
896 | IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0, | 934 | IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0, |
897 | IEEE80211_SDATA_QUEUE_AGG_START = 1, | 935 | IEEE80211_SDATA_QUEUE_AGG_START = 1, |
898 | IEEE80211_SDATA_QUEUE_AGG_STOP = 2, | 936 | IEEE80211_SDATA_QUEUE_AGG_STOP = 2, |
937 | IEEE80211_SDATA_QUEUE_RX_AGG_START = 3, | ||
938 | IEEE80211_SDATA_QUEUE_RX_AGG_STOP = 4, | ||
899 | }; | 939 | }; |
900 | 940 | ||
901 | enum { | 941 | enum { |
@@ -912,6 +952,9 @@ enum queue_stop_reason { | |||
912 | IEEE80211_QUEUE_STOP_REASON_SKB_ADD, | 952 | IEEE80211_QUEUE_STOP_REASON_SKB_ADD, |
913 | IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL, | 953 | IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL, |
914 | IEEE80211_QUEUE_STOP_REASON_FLUSH, | 954 | IEEE80211_QUEUE_STOP_REASON_FLUSH, |
955 | IEEE80211_QUEUE_STOP_REASON_TDLS_TEARDOWN, | ||
956 | |||
957 | IEEE80211_QUEUE_STOP_REASONS, | ||
915 | }; | 958 | }; |
916 | 959 | ||
917 | #ifdef CONFIG_MAC80211_LEDS | 960 | #ifdef CONFIG_MAC80211_LEDS |
@@ -1008,6 +1051,7 @@ struct ieee80211_local { | |||
1008 | struct workqueue_struct *workqueue; | 1051 | struct workqueue_struct *workqueue; |
1009 | 1052 | ||
1010 | unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES]; | 1053 | unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES]; |
1054 | int q_stop_reasons[IEEE80211_MAX_QUEUES][IEEE80211_QUEUE_STOP_REASONS]; | ||
1011 | /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */ | 1055 | /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */ |
1012 | spinlock_t queue_stop_reason_lock; | 1056 | spinlock_t queue_stop_reason_lock; |
1013 | 1057 | ||
@@ -1135,7 +1179,8 @@ struct ieee80211_local { | |||
1135 | unsigned long scanning; | 1179 | unsigned long scanning; |
1136 | struct cfg80211_ssid scan_ssid; | 1180 | struct cfg80211_ssid scan_ssid; |
1137 | struct cfg80211_scan_request *int_scan_req; | 1181 | struct cfg80211_scan_request *int_scan_req; |
1138 | struct cfg80211_scan_request *scan_req, *hw_scan_req; | 1182 | struct cfg80211_scan_request *scan_req; |
1183 | struct ieee80211_scan_request *hw_scan_req; | ||
1139 | struct cfg80211_chan_def scan_chandef; | 1184 | struct cfg80211_chan_def scan_chandef; |
1140 | enum ieee80211_band hw_scan_band; | 1185 | enum ieee80211_band hw_scan_band; |
1141 | int scan_channel_idx; | 1186 | int scan_channel_idx; |
@@ -1476,7 +1521,6 @@ void ieee80211_sw_roc_work(struct work_struct *work); | |||
1476 | void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc); | 1521 | void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc); |
1477 | 1522 | ||
1478 | /* channel switch handling */ | 1523 | /* channel switch handling */ |
1479 | bool ieee80211_csa_needs_block_tx(struct ieee80211_local *local); | ||
1480 | void ieee80211_csa_finalize_work(struct work_struct *work); | 1524 | void ieee80211_csa_finalize_work(struct work_struct *work); |
1481 | int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, | 1525 | int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, |
1482 | struct cfg80211_csa_settings *params); | 1526 | struct cfg80211_csa_settings *params); |
@@ -1540,6 +1584,10 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | |||
1540 | u16 initiator, u16 reason, bool stop); | 1584 | u16 initiator, u16 reason, bool stop); |
1541 | void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | 1585 | void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, |
1542 | u16 initiator, u16 reason, bool stop); | 1586 | u16 initiator, u16 reason, bool stop); |
1587 | void __ieee80211_start_rx_ba_session(struct sta_info *sta, | ||
1588 | u8 dialog_token, u16 timeout, | ||
1589 | u16 start_seq_num, u16 ba_policy, u16 tid, | ||
1590 | u16 buf_size, bool tx); | ||
1543 | void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, | 1591 | void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, |
1544 | enum ieee80211_agg_stop_reason reason); | 1592 | enum ieee80211_agg_stop_reason reason); |
1545 | void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, | 1593 | void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, |
@@ -1692,6 +1740,21 @@ static inline void ieee802_11_parse_elems(const u8 *start, size_t len, | |||
1692 | ieee802_11_parse_elems_crc(start, len, action, elems, 0, 0); | 1740 | ieee802_11_parse_elems_crc(start, len, action, elems, 0, 0); |
1693 | } | 1741 | } |
1694 | 1742 | ||
1743 | static inline bool ieee80211_rx_reorder_ready(struct sk_buff_head *frames) | ||
1744 | { | ||
1745 | struct sk_buff *tail = skb_peek_tail(frames); | ||
1746 | struct ieee80211_rx_status *status; | ||
1747 | |||
1748 | if (!tail) | ||
1749 | return false; | ||
1750 | |||
1751 | status = IEEE80211_SKB_RXCB(tail); | ||
1752 | if (status->flag & RX_FLAG_AMSDU_MORE) | ||
1753 | return false; | ||
1754 | |||
1755 | return true; | ||
1756 | } | ||
1757 | |||
1695 | void ieee80211_dynamic_ps_enable_work(struct work_struct *work); | 1758 | void ieee80211_dynamic_ps_enable_work(struct work_struct *work); |
1696 | void ieee80211_dynamic_ps_disable_work(struct work_struct *work); | 1759 | void ieee80211_dynamic_ps_disable_work(struct work_struct *work); |
1697 | void ieee80211_dynamic_ps_timer(unsigned long data); | 1760 | void ieee80211_dynamic_ps_timer(unsigned long data); |
@@ -1705,14 +1768,24 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata, | |||
1705 | 1768 | ||
1706 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, | 1769 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, |
1707 | unsigned long queues, | 1770 | unsigned long queues, |
1708 | enum queue_stop_reason reason); | 1771 | enum queue_stop_reason reason, |
1772 | bool refcounted); | ||
1773 | void ieee80211_stop_vif_queues(struct ieee80211_local *local, | ||
1774 | struct ieee80211_sub_if_data *sdata, | ||
1775 | enum queue_stop_reason reason); | ||
1776 | void ieee80211_wake_vif_queues(struct ieee80211_local *local, | ||
1777 | struct ieee80211_sub_if_data *sdata, | ||
1778 | enum queue_stop_reason reason); | ||
1709 | void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw, | 1779 | void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw, |
1710 | unsigned long queues, | 1780 | unsigned long queues, |
1711 | enum queue_stop_reason reason); | 1781 | enum queue_stop_reason reason, |
1782 | bool refcounted); | ||
1712 | void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue, | 1783 | void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue, |
1713 | enum queue_stop_reason reason); | 1784 | enum queue_stop_reason reason, |
1785 | bool refcounted); | ||
1714 | void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue, | 1786 | void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue, |
1715 | enum queue_stop_reason reason); | 1787 | enum queue_stop_reason reason, |
1788 | bool refcounted); | ||
1716 | void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue); | 1789 | void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue); |
1717 | void ieee80211_add_pending_skb(struct ieee80211_local *local, | 1790 | void ieee80211_add_pending_skb(struct ieee80211_local *local, |
1718 | struct sk_buff *skb); | 1791 | struct sk_buff *skb); |
@@ -1730,8 +1803,10 @@ void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1730 | const u8 *bssid, u16 stype, u16 reason, | 1803 | const u8 *bssid, u16 stype, u16 reason, |
1731 | bool send_frame, u8 *frame_buf); | 1804 | bool send_frame, u8 *frame_buf); |
1732 | int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, | 1805 | int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, |
1733 | size_t buffer_len, const u8 *ie, size_t ie_len, | 1806 | size_t buffer_len, |
1734 | enum ieee80211_band band, u32 rate_mask, | 1807 | struct ieee80211_scan_ies *ie_desc, |
1808 | const u8 *ie, size_t ie_len, | ||
1809 | u8 bands_used, u32 *rate_masks, | ||
1735 | struct cfg80211_chan_def *chandef); | 1810 | struct cfg80211_chan_def *chandef); |
1736 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, | 1811 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, |
1737 | u8 *dst, u32 ratemask, | 1812 | u8 *dst, u32 ratemask, |
@@ -1774,6 +1849,7 @@ int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, | |||
1774 | int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, | 1849 | int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, |
1775 | struct sk_buff *skb, bool need_basic, | 1850 | struct sk_buff *skb, bool need_basic, |
1776 | enum ieee80211_band band); | 1851 | enum ieee80211_band band); |
1852 | u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo); | ||
1777 | 1853 | ||
1778 | /* channel management */ | 1854 | /* channel management */ |
1779 | void ieee80211_ht_oper_to_chandef(struct ieee80211_channel *control_chan, | 1855 | void ieee80211_ht_oper_to_chandef(struct ieee80211_channel *control_chan, |
@@ -1791,18 +1867,14 @@ ieee80211_vif_reserve_chanctx(struct ieee80211_sub_if_data *sdata, | |||
1791 | enum ieee80211_chanctx_mode mode, | 1867 | enum ieee80211_chanctx_mode mode, |
1792 | bool radar_required); | 1868 | bool radar_required); |
1793 | int __must_check | 1869 | int __must_check |
1794 | ieee80211_vif_use_reserved_context(struct ieee80211_sub_if_data *sdata, | 1870 | ieee80211_vif_use_reserved_context(struct ieee80211_sub_if_data *sdata); |
1795 | u32 *changed); | ||
1796 | int ieee80211_vif_unreserve_chanctx(struct ieee80211_sub_if_data *sdata); | 1871 | int ieee80211_vif_unreserve_chanctx(struct ieee80211_sub_if_data *sdata); |
1872 | int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local); | ||
1797 | 1873 | ||
1798 | int __must_check | 1874 | int __must_check |
1799 | ieee80211_vif_change_bandwidth(struct ieee80211_sub_if_data *sdata, | 1875 | ieee80211_vif_change_bandwidth(struct ieee80211_sub_if_data *sdata, |
1800 | const struct cfg80211_chan_def *chandef, | 1876 | const struct cfg80211_chan_def *chandef, |
1801 | u32 *changed); | 1877 | u32 *changed); |
1802 | /* NOTE: only use ieee80211_vif_change_channel() for channel switch */ | ||
1803 | int __must_check | ||
1804 | ieee80211_vif_change_channel(struct ieee80211_sub_if_data *sdata, | ||
1805 | u32 *changed); | ||
1806 | void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata); | 1878 | void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata); |
1807 | void ieee80211_vif_vlan_copy_chanctx(struct ieee80211_sub_if_data *sdata); | 1879 | void ieee80211_vif_vlan_copy_chanctx(struct ieee80211_sub_if_data *sdata); |
1808 | void ieee80211_vif_copy_chanctx_to_vlans(struct ieee80211_sub_if_data *sdata, | 1880 | void ieee80211_vif_copy_chanctx_to_vlans(struct ieee80211_sub_if_data *sdata, |
@@ -1842,11 +1914,14 @@ int ieee80211_max_num_channels(struct ieee80211_local *local); | |||
1842 | int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, | 1914 | int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, |
1843 | const u8 *peer, u8 action_code, u8 dialog_token, | 1915 | const u8 *peer, u8 action_code, u8 dialog_token, |
1844 | u16 status_code, u32 peer_capability, | 1916 | u16 status_code, u32 peer_capability, |
1845 | const u8 *extra_ies, size_t extra_ies_len); | 1917 | bool initiator, const u8 *extra_ies, |
1918 | size_t extra_ies_len); | ||
1846 | int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, | 1919 | int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, |
1847 | const u8 *peer, enum nl80211_tdls_operation oper); | 1920 | const u8 *peer, enum nl80211_tdls_operation oper); |
1848 | 1921 | ||
1849 | 1922 | ||
1923 | extern const struct ethtool_ops ieee80211_ethtool_ops; | ||
1924 | |||
1850 | #ifdef CONFIG_MAC80211_NOINLINE | 1925 | #ifdef CONFIG_MAC80211_NOINLINE |
1851 | #define debug_noinline noinline | 1926 | #define debug_noinline noinline |
1852 | #else | 1927 | #else |
@@ -1854,3 +1929,4 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, | |||
1854 | #endif | 1929 | #endif |
1855 | 1930 | ||
1856 | #endif /* IEEE80211_I_H */ | 1931 | #endif /* IEEE80211_I_H */ |
1932 | void ieee80211_tdls_peer_del_work(struct work_struct *wk); | ||