mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
suspend txq scheduling during scanning
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -266,6 +266,7 @@ void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq);
|
||||
void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
|
||||
void mt76_stop_tx_queues(struct mt76_dev *dev, struct ieee80211_sta *sta);
|
||||
void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_queue *hwq);
|
||||
void mt76_txq_schedule_all(struct mt76_dev *dev);
|
||||
void mt76_release_buffered_frames(struct ieee80211_hw *hw,
|
||||
struct ieee80211_sta *sta,
|
||||
u16 tids, int nframes,
|
||||
|
||||
@@ -264,11 +264,18 @@ mt7603_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue,
|
||||
static void
|
||||
mt7603_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, const u8 *mac)
|
||||
{
|
||||
struct mt7603_dev *dev = hw->priv;
|
||||
|
||||
set_bit(MT76_SCANNING, &dev->mt76.state);
|
||||
}
|
||||
|
||||
static void
|
||||
mt7603_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mt7603_dev *dev = hw->priv;
|
||||
|
||||
clear_bit(MT76_SCANNING, &dev->mt76.state);
|
||||
mt76_txq_schedule_all(&dev->mt76);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -369,6 +369,7 @@ mt76x2_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
|
||||
clear_bit(MT76_SCANNING, &dev->mt76.state);
|
||||
tasklet_enable(&dev->pre_tbtt_tasklet);
|
||||
mt76_txq_schedule_all(&dev->mt76);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -372,6 +372,9 @@ void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_queue *hwq)
|
||||
{
|
||||
int len;
|
||||
|
||||
if (test_bit(MT76_SCANNING, &dev->state))
|
||||
return;
|
||||
|
||||
do {
|
||||
if (hwq->swq_queued >= 4 || list_empty(&hwq->swq))
|
||||
break;
|
||||
@@ -381,6 +384,15 @@ void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_queue *hwq)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_txq_schedule);
|
||||
|
||||
void mt76_txq_schedule_all(struct mt76_dev *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i <= MT_TXQ_BK; i++)
|
||||
mt76_txq_schedule(dev, &dev->q_tx[i]);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_txq_schedule_all);
|
||||
|
||||
void mt76_stop_tx_queues(struct mt76_dev *dev, struct ieee80211_sta *sta)
|
||||
{
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user