diff options
author | David S. Miller <davem@davemloft.net> | 2015-04-12 20:43:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-12 20:43:46 -0400 |
commit | 4e78eb0dbf867ccf206706ff2af34084f71a99bf (patch) | |
tree | f3193699ad846ec45abcf5bc95105cb5a460de8f /include/net | |
parent | 716723c2d2f0d5af9911966fb3cd8ccd33480d63 (diff) | |
parent | 6d00ec0514bd909e89ede59501342732dbef49fd (diff) |
Merge tag 'mac80211-next-for-davem-2015-04-10' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says:
====================
There isn't much left, but we have
* new mac80211 internal software queue to allow drivers to have
shorter hardware queues and pull on-demand
* use rhashtable for mac80211 station table
* minstrel rate control debug improvements and some refactoring
* fix noisy message about TX power reduction
* fix continuous message printing and activity if CRDA doesn't respond
* fix VHT-related capabilities with "iw connect" or "iwconfig ..."
* fix Kconfig for cfg80211 wireless extensions compatibility
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/cfg80211.h | 58 | ||||
-rw-r--r-- | include/net/mac80211.h | 101 |
2 files changed, 136 insertions, 23 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 441306436569..f8d6813cd5b2 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -5001,6 +5001,64 @@ int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, | |||
5001 | u8 *buf, unsigned int bufsize); | 5001 | u8 *buf, unsigned int bufsize); |
5002 | 5002 | ||
5003 | /** | 5003 | /** |
5004 | * ieee80211_ie_split_ric - split an IE buffer according to ordering (with RIC) | ||
5005 | * @ies: the IE buffer | ||
5006 | * @ielen: the length of the IE buffer | ||
5007 | * @ids: an array with element IDs that are allowed before | ||
5008 | * the split | ||
5009 | * @n_ids: the size of the element ID array | ||
5010 | * @after_ric: array IE types that come after the RIC element | ||
5011 | * @n_after_ric: size of the @after_ric array | ||
5012 | * @offset: offset where to start splitting in the buffer | ||
5013 | * | ||
5014 | * This function splits an IE buffer by updating the @offset | ||
5015 | * variable to point to the location where the buffer should be | ||
5016 | * split. | ||
5017 | * | ||
5018 | * It assumes that the given IE buffer is well-formed, this | ||
5019 | * has to be guaranteed by the caller! | ||
5020 | * | ||
5021 | * It also assumes that the IEs in the buffer are ordered | ||
5022 | * correctly, if not the result of using this function will not | ||
5023 | * be ordered correctly either, i.e. it does no reordering. | ||
5024 | * | ||
5025 | * The function returns the offset where the next part of the | ||
5026 | * buffer starts, which may be @ielen if the entire (remainder) | ||
5027 | * of the buffer should be used. | ||
5028 | */ | ||
5029 | size_t ieee80211_ie_split_ric(const u8 *ies, size_t ielen, | ||
5030 | const u8 *ids, int n_ids, | ||
5031 | const u8 *after_ric, int n_after_ric, | ||
5032 | size_t offset); | ||
5033 | |||
5034 | /** | ||
5035 | * ieee80211_ie_split - split an IE buffer according to ordering | ||
5036 | * @ies: the IE buffer | ||
5037 | * @ielen: the length of the IE buffer | ||
5038 | * @ids: an array with element IDs that are allowed before | ||
5039 | * the split | ||
5040 | * @n_ids: the size of the element ID array | ||
5041 | * @offset: offset where to start splitting in the buffer | ||
5042 | * | ||
5043 | * This function splits an IE buffer by updating the @offset | ||
5044 | * variable to point to the location where the buffer should be | ||
5045 | * split. | ||
5046 | * | ||
5047 | * It assumes that the given IE buffer is well-formed, this | ||
5048 | * has to be guaranteed by the caller! | ||
5049 | * | ||
5050 | * It also assumes that the IEs in the buffer are ordered | ||
5051 | * correctly, if not the result of using this function will not | ||
5052 | * be ordered correctly either, i.e. it does no reordering. | ||
5053 | * | ||
5054 | * The function returns the offset where the next part of the | ||
5055 | * buffer starts, which may be @ielen if the entire (remainder) | ||
5056 | * of the buffer should be used. | ||
5057 | */ | ||
5058 | size_t ieee80211_ie_split(const u8 *ies, size_t ielen, | ||
5059 | const u8 *ids, int n_ids, size_t offset); | ||
5060 | |||
5061 | /** | ||
5004 | * cfg80211_report_wowlan_wakeup - report wakeup from WoWLAN | 5062 | * cfg80211_report_wowlan_wakeup - report wakeup from WoWLAN |
5005 | * @wdev: the wireless device reporting the wakeup | 5063 | * @wdev: the wireless device reporting the wakeup |
5006 | * @wakeup: the wakeup report | 5064 | * @wakeup: the wakeup report |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 201bc68e0cff..b4bef1152c05 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -84,6 +84,39 @@ | |||
84 | * | 84 | * |
85 | */ | 85 | */ |
86 | 86 | ||
87 | /** | ||
88 | * DOC: mac80211 software tx queueing | ||
89 | * | ||
90 | * mac80211 provides an optional intermediate queueing implementation designed | ||
91 | * to allow the driver to keep hardware queues short and provide some fairness | ||
92 | * between different stations/interfaces. | ||
93 | * In this model, the driver pulls data frames from the mac80211 queue instead | ||
94 | * of letting mac80211 push them via drv_tx(). | ||
95 | * Other frames (e.g. control or management) are still pushed using drv_tx(). | ||
96 | * | ||
97 | * Drivers indicate that they use this model by implementing the .wake_tx_queue | ||
98 | * driver operation. | ||
99 | * | ||
100 | * Intermediate queues (struct ieee80211_txq) are kept per-sta per-tid, with a | ||
101 | * single per-vif queue for multicast data frames. | ||
102 | * | ||
103 | * The driver is expected to initialize its private per-queue data for stations | ||
104 | * and interfaces in the .add_interface and .sta_add ops. | ||
105 | * | ||
106 | * The driver can't access the queue directly. To dequeue a frame, it calls | ||
107 | * ieee80211_tx_dequeue(). Whenever mac80211 adds a new frame to a queue, it | ||
108 | * calls the .wake_tx_queue driver op. | ||
109 | * | ||
110 | * For AP powersave TIM handling, the driver only needs to indicate if it has | ||
111 | * buffered packets in the driver specific data structures by calling | ||
112 | * ieee80211_sta_set_buffered(). For frames buffered in the ieee80211_txq | ||
113 | * struct, mac80211 sets the appropriate TIM PVB bits and calls | ||
114 | * .release_buffered_frames(). | ||
115 | * In that callback the driver is therefore expected to release its own | ||
116 | * buffered frames and afterwards also frames from the ieee80211_txq (obtained | ||
117 | * via the usual ieee80211_tx_dequeue). | ||
118 | */ | ||
119 | |||
87 | struct device; | 120 | struct device; |
88 | 121 | ||
89 | /** | 122 | /** |
@@ -1306,6 +1339,7 @@ enum ieee80211_vif_flags { | |||
1306 | * monitor interface (if that is requested.) | 1339 | * monitor interface (if that is requested.) |
1307 | * @drv_priv: data area for driver use, will always be aligned to | 1340 | * @drv_priv: data area for driver use, will always be aligned to |
1308 | * sizeof(void *). | 1341 | * sizeof(void *). |
1342 | * @txq: the multicast data TX queue (if driver uses the TXQ abstraction) | ||
1309 | */ | 1343 | */ |
1310 | struct ieee80211_vif { | 1344 | struct ieee80211_vif { |
1311 | enum nl80211_iftype type; | 1345 | enum nl80211_iftype type; |
@@ -1317,6 +1351,8 @@ struct ieee80211_vif { | |||
1317 | u8 cab_queue; | 1351 | u8 cab_queue; |
1318 | u8 hw_queue[IEEE80211_NUM_ACS]; | 1352 | u8 hw_queue[IEEE80211_NUM_ACS]; |
1319 | 1353 | ||
1354 | struct ieee80211_txq *txq; | ||
1355 | |||
1320 | struct ieee80211_chanctx_conf __rcu *chanctx_conf; | 1356 | struct ieee80211_chanctx_conf __rcu *chanctx_conf; |
1321 | 1357 | ||
1322 | u32 driver_flags; | 1358 | u32 driver_flags; |
@@ -1575,6 +1611,7 @@ struct ieee80211_sta_rates { | |||
1575 | * @tdls_initiator: indicates the STA is an initiator of the TDLS link. Only | 1611 | * @tdls_initiator: indicates the STA is an initiator of the TDLS link. Only |
1576 | * valid if the STA is a TDLS peer in the first place. | 1612 | * valid if the STA is a TDLS peer in the first place. |
1577 | * @mfp: indicates whether the STA uses management frame protection or not. | 1613 | * @mfp: indicates whether the STA uses management frame protection or not. |
1614 | * @txq: per-TID data TX queues (if driver uses the TXQ abstraction) | ||
1578 | */ | 1615 | */ |
1579 | struct ieee80211_sta { | 1616 | struct ieee80211_sta { |
1580 | u32 supp_rates[IEEE80211_NUM_BANDS]; | 1617 | u32 supp_rates[IEEE80211_NUM_BANDS]; |
@@ -1593,6 +1630,8 @@ struct ieee80211_sta { | |||
1593 | bool tdls_initiator; | 1630 | bool tdls_initiator; |
1594 | bool mfp; | 1631 | bool mfp; |
1595 | 1632 | ||
1633 | struct ieee80211_txq *txq[IEEE80211_NUM_TIDS]; | ||
1634 | |||
1596 | /* must be last */ | 1635 | /* must be last */ |
1597 | u8 drv_priv[0] __aligned(sizeof(void *)); | 1636 | u8 drv_priv[0] __aligned(sizeof(void *)); |
1598 | }; | 1637 | }; |
@@ -1621,6 +1660,27 @@ struct ieee80211_tx_control { | |||
1621 | }; | 1660 | }; |
1622 | 1661 | ||
1623 | /** | 1662 | /** |
1663 | * struct ieee80211_txq - Software intermediate tx queue | ||
1664 | * | ||
1665 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
1666 | * @sta: station table entry, %NULL for per-vif queue | ||
1667 | * @tid: the TID for this queue (unused for per-vif queue) | ||
1668 | * @ac: the AC for this queue | ||
1669 | * | ||
1670 | * The driver can obtain packets from this queue by calling | ||
1671 | * ieee80211_tx_dequeue(). | ||
1672 | */ | ||
1673 | struct ieee80211_txq { | ||
1674 | struct ieee80211_vif *vif; | ||
1675 | struct ieee80211_sta *sta; | ||
1676 | u8 tid; | ||
1677 | u8 ac; | ||
1678 | |||
1679 | /* must be last */ | ||
1680 | u8 drv_priv[0] __aligned(sizeof(void *)); | ||
1681 | }; | ||
1682 | |||
1683 | /** | ||
1624 | * enum ieee80211_hw_flags - hardware flags | 1684 | * enum ieee80211_hw_flags - hardware flags |
1625 | * | 1685 | * |
1626 | * These flags are used to indicate hardware capabilities to | 1686 | * These flags are used to indicate hardware capabilities to |
@@ -1844,6 +1904,8 @@ enum ieee80211_hw_flags { | |||
1844 | * within &struct ieee80211_sta. | 1904 | * within &struct ieee80211_sta. |
1845 | * @chanctx_data_size: size (in bytes) of the drv_priv data area | 1905 | * @chanctx_data_size: size (in bytes) of the drv_priv data area |
1846 | * within &struct ieee80211_chanctx_conf. | 1906 | * within &struct ieee80211_chanctx_conf. |
1907 | * @txq_data_size: size (in bytes) of the drv_priv data area | ||
1908 | * within @struct ieee80211_txq. | ||
1847 | * | 1909 | * |
1848 | * @max_rates: maximum number of alternate rate retry stages the hw | 1910 | * @max_rates: maximum number of alternate rate retry stages the hw |
1849 | * can handle. | 1911 | * can handle. |
@@ -1892,6 +1954,9 @@ enum ieee80211_hw_flags { | |||
1892 | * @n_cipher_schemes: a size of an array of cipher schemes definitions. | 1954 | * @n_cipher_schemes: a size of an array of cipher schemes definitions. |
1893 | * @cipher_schemes: a pointer to an array of cipher scheme definitions | 1955 | * @cipher_schemes: a pointer to an array of cipher scheme definitions |
1894 | * supported by HW. | 1956 | * supported by HW. |
1957 | * | ||
1958 | * @txq_ac_max_pending: maximum number of frames per AC pending in all txq | ||
1959 | * entries for a vif. | ||
1895 | */ | 1960 | */ |
1896 | struct ieee80211_hw { | 1961 | struct ieee80211_hw { |
1897 | struct ieee80211_conf conf; | 1962 | struct ieee80211_conf conf; |
@@ -1904,6 +1969,7 @@ struct ieee80211_hw { | |||
1904 | int vif_data_size; | 1969 | int vif_data_size; |
1905 | int sta_data_size; | 1970 | int sta_data_size; |
1906 | int chanctx_data_size; | 1971 | int chanctx_data_size; |
1972 | int txq_data_size; | ||
1907 | u16 queues; | 1973 | u16 queues; |
1908 | u16 max_listen_interval; | 1974 | u16 max_listen_interval; |
1909 | s8 max_signal; | 1975 | s8 max_signal; |
@@ -1920,6 +1986,7 @@ struct ieee80211_hw { | |||
1920 | u8 uapsd_max_sp_len; | 1986 | u8 uapsd_max_sp_len; |
1921 | u8 n_cipher_schemes; | 1987 | u8 n_cipher_schemes; |
1922 | const struct ieee80211_cipher_scheme *cipher_schemes; | 1988 | const struct ieee80211_cipher_scheme *cipher_schemes; |
1989 | int txq_ac_max_pending; | ||
1923 | }; | 1990 | }; |
1924 | 1991 | ||
1925 | /** | 1992 | /** |
@@ -3082,6 +3149,8 @@ enum ieee80211_reconfig_type { | |||
3082 | * response template is provided, together with the location of the | 3149 | * response template is provided, together with the location of the |
3083 | * switch-timing IE within the template. The skb can only be used within | 3150 | * switch-timing IE within the template. The skb can only be used within |
3084 | * the function call. | 3151 | * the function call. |
3152 | * | ||
3153 | * @wake_tx_queue: Called when new packets have been added to the queue. | ||
3085 | */ | 3154 | */ |
3086 | struct ieee80211_ops { | 3155 | struct ieee80211_ops { |
3087 | void (*tx)(struct ieee80211_hw *hw, | 3156 | void (*tx)(struct ieee80211_hw *hw, |
@@ -3313,6 +3382,9 @@ struct ieee80211_ops { | |||
3313 | void (*tdls_recv_channel_switch)(struct ieee80211_hw *hw, | 3382 | void (*tdls_recv_channel_switch)(struct ieee80211_hw *hw, |
3314 | struct ieee80211_vif *vif, | 3383 | struct ieee80211_vif *vif, |
3315 | struct ieee80211_tdls_ch_sw_params *params); | 3384 | struct ieee80211_tdls_ch_sw_params *params); |
3385 | |||
3386 | void (*wake_tx_queue)(struct ieee80211_hw *hw, | ||
3387 | struct ieee80211_txq *txq); | ||
3316 | }; | 3388 | }; |
3317 | 3389 | ||
3318 | /** | 3390 | /** |
@@ -5308,30 +5380,13 @@ int ieee80211_reserve_tid(struct ieee80211_sta *sta, u8 tid); | |||
5308 | void ieee80211_unreserve_tid(struct ieee80211_sta *sta, u8 tid); | 5380 | void ieee80211_unreserve_tid(struct ieee80211_sta *sta, u8 tid); |
5309 | 5381 | ||
5310 | /** | 5382 | /** |
5311 | * ieee80211_ie_split - split an IE buffer according to ordering | 5383 | * ieee80211_tx_dequeue - dequeue a packet from a software tx queue |
5312 | * | ||
5313 | * @ies: the IE buffer | ||
5314 | * @ielen: the length of the IE buffer | ||
5315 | * @ids: an array with element IDs that are allowed before | ||
5316 | * the split | ||
5317 | * @n_ids: the size of the element ID array | ||
5318 | * @offset: offset where to start splitting in the buffer | ||
5319 | * | 5384 | * |
5320 | * This function splits an IE buffer by updating the @offset | 5385 | * @hw: pointer as obtained from ieee80211_alloc_hw() |
5321 | * variable to point to the location where the buffer should be | 5386 | * @txq: pointer obtained from station or virtual interface |
5322 | * split. | ||
5323 | * | ||
5324 | * It assumes that the given IE buffer is well-formed, this | ||
5325 | * has to be guaranteed by the caller! | ||
5326 | * | ||
5327 | * It also assumes that the IEs in the buffer are ordered | ||
5328 | * correctly, if not the result of using this function will not | ||
5329 | * be ordered correctly either, i.e. it does no reordering. | ||
5330 | * | 5387 | * |
5331 | * The function returns the offset where the next part of the | 5388 | * Returns the skb if successful, %NULL if no frame was available. |
5332 | * buffer starts, which may be @ielen if the entire (remainder) | ||
5333 | * of the buffer should be used. | ||
5334 | */ | 5389 | */ |
5335 | size_t ieee80211_ie_split(const u8 *ies, size_t ielen, | 5390 | struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, |
5336 | const u8 *ids, int n_ids, size_t offset); | 5391 | struct ieee80211_txq *txq); |
5337 | #endif /* MAC80211_H */ | 5392 | #endif /* MAC80211_H */ |