On 2018-08-29 02:44, Toke Høiland-Jørgensen wrote:
Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxx> writes:
+bool ieee80211_txq_can_transmit(struct ieee80211_hw *hw,
+ struct ieee80211_txq *txq)
+{
+ struct ieee80211_local *local = hw_to_local(hw);
+ struct txq_info *txqi, *f_txqi;
+ bool can_tx;
+
+ txqi = to_txq_info(txq);
+ /* Check whether txq is paused or not */
+ if (test_bit(IEEE80211_TXQ_PAUSE, &txqi->flags))
+ return false;
+
+ can_tx = false;
+ spin_lock_bh(&local->active_txq_lock);
+ f_txqi = find_txqi(local, txq->ac);
+ if (!f_txqi)
+ goto out;
+
+ /* Allow only head node to ensure fairness */
+ if (f_txqi != txqi)
+ goto out;
+
+ /* Check if txq is in negative deficit */
+ if (!ieee80211_txq_requeued(local, txqi))
+ can_tx = true;
+
My bad... The above check should be as below
- if (!ieee80211_txq_requeued(local, txqi))
- can_tx = true;
+ if (ieee80211_txq_requeued(local, txqi))
+ goto out;
+ can_tx = true;
+ list_del_init(&txqi->schedule_order);
Why are you removing the txq from the list here, and how do you expect
it to get added back?
Otherwise driver has to call next_txq() to dequeue the node before
processing it. If head node is not removed from list, driver can not
process
remaining txqs from same pull request (fetch_ind()).
The node is added back in tail when txq is paused in
ieee80211_sta_register_airtime()
-Rajkumar