89
89
/**
90
90
* DOC: mac80211 software tx queueing
91
91
*
92
- * mac80211 provides an optional intermediate queueing implementation designed
93
- * to allow the driver to keep hardware queues short and provide some fairness
94
- * between different stations/interfaces.
95
- * In this model, the driver pulls data frames from the mac80211 queue instead
96
- * of letting mac80211 push them via drv_tx().
97
- * Other frames (e.g. control or management) are still pushed using drv_tx().
92
+ * mac80211 uses an intermediate queueing implementation, designed to allow the
93
+ * driver to keep hardware queues short and to provide some fairness between
94
+ * different stations/interfaces.
98
95
*
99
- * Drivers indicate that they use this model by implementing the .wake_tx_queue
100
- * driver operation.
96
+ * Drivers must provide the .wake_tx_queue driver operation by either
97
+ * linking it to ieee80211_handle_wake_tx_queue() or implementing a custom
98
+ * handler.
101
99
*
102
100
* Intermediate queues (struct ieee80211_txq) are kept per-sta per-tid, with
103
101
* another per-sta for non-data/non-mgmt and bufferable management frames, and
106
104
* The driver is expected to initialize its private per-queue data for stations
107
105
* and interfaces in the .add_interface and .sta_add ops.
108
106
*
109
- * The driver can't access the queue directly. To dequeue a frame from a
110
- * txq, it calls ieee80211_tx_dequeue(). Whenever mac80211 adds a new frame to a
111
- * queue, it calls the .wake_tx_queue driver op.
107
+ * The driver can't access the internal TX queues (iTXQs) directly.
108
+ * Whenever mac80211 adds a new frame to a queue, it calls the .wake_tx_queue
109
+ * driver op.
110
+ * Drivers implementing a custom .wake_tx_queue op can get them by calling
111
+ * ieee80211_tx_dequeue(). Drivers using ieee80211_handle_wake_tx_queue() will
112
+ * simply get the individual frames pushed via the .tx driver operation.
112
113
*
113
114
* Drivers can optionally delegate responsibility for scheduling queues to
114
115
* mac80211, to take advantage of airtime fairness accounting. In this case, to
@@ -1826,7 +1827,7 @@ struct ieee80211_vif_cfg {
1826
1827
* for this interface.
1827
1828
* @drv_priv: data area for driver use, will always be aligned to
1828
1829
* sizeof(void \*).
1829
- * @txq: the multicast data TX queue (if driver uses the TXQ abstraction)
1830
+ * @txq: the multicast data TX queue
1830
1831
* @txqs_stopped: per AC flag to indicate that intermediate TXQs are stopped,
1831
1832
* protected by fq->lock.
1832
1833
* @offload_flags: 802.3 -> 802.11 enapsulation offload flags, see
@@ -2259,8 +2260,8 @@ struct ieee80211_link_sta {
2259
2260
* For non MLO STA it will point to the deflink data. For MLO STA
2260
2261
* ieee80211_sta_recalc_aggregates() must be called to update it.
2261
2262
* @support_p2p_ps: indicates whether the STA supports P2P PS mechanism or not.
2262
- * @txq: per-TID data TX queues (if driver uses the TXQ abstraction); note that
2263
- * the last entry (%IEEE80211_NUM_TIDS) is used for non-data frames
2263
+ * @txq: per-TID data TX queues; note that the last entry (%IEEE80211_NUM_TIDS)
2264
+ * is used for non-data frames
2264
2265
* @deflink: This holds the default link STA information, for non MLO STA all link
2265
2266
* specific STA information is accessed through @deflink or through
2266
2267
* link[0] which points to address of @deflink. For MLO Link STA
@@ -5713,7 +5714,7 @@ void ieee80211_key_replay(struct ieee80211_key_conf *keyconf);
5713
5714
* @hw: pointer as obtained from ieee80211_alloc_hw().
5714
5715
* @queue: queue number (counted from zero).
5715
5716
*
5716
- * Drivers should use this function instead of netif_wake_queue.
5717
+ * Drivers must use this function instead of netif_wake_queue.
5717
5718
*/
5718
5719
void ieee80211_wake_queue (struct ieee80211_hw * hw , int queue );
5719
5720
@@ -5722,7 +5723,7 @@ void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue);
5722
5723
* @hw: pointer as obtained from ieee80211_alloc_hw().
5723
5724
* @queue: queue number (counted from zero).
5724
5725
*
5725
- * Drivers should use this function instead of netif_stop_queue.
5726
+ * Drivers must use this function instead of netif_stop_queue.
5726
5727
*/
5727
5728
void ieee80211_stop_queue (struct ieee80211_hw * hw , int queue );
5728
5729
@@ -5731,7 +5732,7 @@ void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue);
5731
5732
* @hw: pointer as obtained from ieee80211_alloc_hw().
5732
5733
* @queue: queue number (counted from zero).
5733
5734
*
5734
- * Drivers should use this function instead of netif_stop_queue .
5735
+ * Drivers must use this function instead of netif_queue_stopped .
5735
5736
*
5736
5737
* Return: %true if the queue is stopped. %false otherwise.
5737
5738
*/
@@ -5742,15 +5743,15 @@ int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue);
5742
5743
* ieee80211_stop_queues - stop all queues
5743
5744
* @hw: pointer as obtained from ieee80211_alloc_hw().
5744
5745
*
5745
- * Drivers should use this function instead of netif_stop_queue .
5746
+ * Drivers must use this function instead of netif_tx_stop_all_queues .
5746
5747
*/
5747
5748
void ieee80211_stop_queues (struct ieee80211_hw * hw );
5748
5749
5749
5750
/**
5750
5751
* ieee80211_wake_queues - wake all queues
5751
5752
* @hw: pointer as obtained from ieee80211_alloc_hw().
5752
5753
*
5753
- * Drivers should use this function instead of netif_wake_queue .
5754
+ * Drivers must use this function instead of netif_tx_wake_all_queues .
5754
5755
*/
5755
5756
void ieee80211_wake_queues (struct ieee80211_hw * hw );
5756
5757
@@ -6971,6 +6972,18 @@ static inline struct sk_buff *ieee80211_tx_dequeue_ni(struct ieee80211_hw *hw,
6971
6972
return skb ;
6972
6973
}
6973
6974
6975
+ /**
6976
+ * ieee80211_handle_wake_tx_queue - mac80211 handler for wake_tx_queue callback
6977
+ *
6978
+ * @hw: pointer as obtained from wake_tx_queue() callback().
6979
+ * @txq: pointer as obtained from wake_tx_queue() callback().
6980
+ *
6981
+ * Drivers can use this function for the mandatory mac80211 wake_tx_queue
6982
+ * callback in struct ieee80211_ops. They should not call this function.
6983
+ */
6984
+ void ieee80211_handle_wake_tx_queue (struct ieee80211_hw * hw ,
6985
+ struct ieee80211_txq * txq );
6986
+
6974
6987
/**
6975
6988
* ieee80211_next_txq - get next tx queue to pull packets from
6976
6989
*
0 commit comments