Commit ef55564e authored by Ryder Lee's avatar Ryder Lee Committed by Felix Fietkau

mt76: add DBDC rxq handlings into mac_reset_work

Enable/disable rx napi for DBDC.
Signed-off-by: default avatarBo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 3685727c
...@@ -268,6 +268,7 @@ void mt7615_mac_reset_work(struct work_struct *work) ...@@ -268,6 +268,7 @@ void mt7615_mac_reset_work(struct work_struct *work)
struct mt76_phy *ext_phy; struct mt76_phy *ext_phy;
struct mt7615_dev *dev; struct mt7615_dev *dev;
unsigned long timeout; unsigned long timeout;
int i;
dev = container_of(work, struct mt7615_dev, reset_work); dev = container_of(work, struct mt7615_dev, reset_work);
ext_phy = dev->mt76.phy2; ext_phy = dev->mt76.phy2;
...@@ -299,8 +300,8 @@ void mt7615_mac_reset_work(struct work_struct *work) ...@@ -299,8 +300,8 @@ void mt7615_mac_reset_work(struct work_struct *work)
mt76_txq_schedule_all(ext_phy); mt76_txq_schedule_all(ext_phy);
mt76_worker_disable(&dev->mt76.tx_worker); mt76_worker_disable(&dev->mt76.tx_worker);
napi_disable(&dev->mt76.napi[0]); mt76_for_each_q_rx(&dev->mt76, i)
napi_disable(&dev->mt76.napi[1]); napi_disable(&dev->mt76.napi[i]);
napi_disable(&dev->mt76.tx_napi); napi_disable(&dev->mt76.tx_napi);
mt7615_mutex_acquire(dev); mt7615_mutex_acquire(dev);
...@@ -330,11 +331,10 @@ void mt7615_mac_reset_work(struct work_struct *work) ...@@ -330,11 +331,10 @@ void mt7615_mac_reset_work(struct work_struct *work)
napi_enable(&dev->mt76.tx_napi); napi_enable(&dev->mt76.tx_napi);
napi_schedule(&dev->mt76.tx_napi); napi_schedule(&dev->mt76.tx_napi);
napi_enable(&dev->mt76.napi[0]); mt76_for_each_q_rx(&dev->mt76, i) {
napi_schedule(&dev->mt76.napi[0]); napi_enable(&dev->mt76.napi[i]);
napi_schedule(&dev->mt76.napi[i]);
napi_enable(&dev->mt76.napi[1]); }
napi_schedule(&dev->mt76.napi[1]);
local_bh_enable(); local_bh_enable();
ieee80211_wake_queues(mt76_hw(dev)); ieee80211_wake_queues(mt76_hw(dev));
......
...@@ -2124,6 +2124,7 @@ void mt7915_mac_reset_work(struct work_struct *work) ...@@ -2124,6 +2124,7 @@ void mt7915_mac_reset_work(struct work_struct *work)
struct mt7915_phy *phy2; struct mt7915_phy *phy2;
struct mt76_phy *ext_phy; struct mt76_phy *ext_phy;
struct mt7915_dev *dev; struct mt7915_dev *dev;
int i;
dev = container_of(work, struct mt7915_dev, reset_work); dev = container_of(work, struct mt7915_dev, reset_work);
ext_phy = dev->mt76.phy2; ext_phy = dev->mt76.phy2;
...@@ -2145,9 +2146,8 @@ void mt7915_mac_reset_work(struct work_struct *work) ...@@ -2145,9 +2146,8 @@ void mt7915_mac_reset_work(struct work_struct *work)
cancel_delayed_work_sync(&phy2->mt76->mac_work); cancel_delayed_work_sync(&phy2->mt76->mac_work);
} }
mt76_worker_disable(&dev->mt76.tx_worker); mt76_worker_disable(&dev->mt76.tx_worker);
napi_disable(&dev->mt76.napi[0]); mt76_for_each_q_rx(&dev->mt76, i)
napi_disable(&dev->mt76.napi[1]); napi_disable(&dev->mt76.napi[i]);
napi_disable(&dev->mt76.napi[2]);
napi_disable(&dev->mt76.tx_napi); napi_disable(&dev->mt76.tx_napi);
mutex_lock(&dev->mt76.mutex); mutex_lock(&dev->mt76.mutex);
...@@ -2170,14 +2170,10 @@ void mt7915_mac_reset_work(struct work_struct *work) ...@@ -2170,14 +2170,10 @@ void mt7915_mac_reset_work(struct work_struct *work)
clear_bit(MT76_RESET, &phy2->mt76->state); clear_bit(MT76_RESET, &phy2->mt76->state);
local_bh_disable(); local_bh_disable();
napi_enable(&dev->mt76.napi[0]); mt76_for_each_q_rx(&dev->mt76, i) {
napi_schedule(&dev->mt76.napi[0]); napi_enable(&dev->mt76.napi[i]);
napi_schedule(&dev->mt76.napi[i]);
napi_enable(&dev->mt76.napi[1]); }
napi_schedule(&dev->mt76.napi[1]);
napi_enable(&dev->mt76.napi[2]);
napi_schedule(&dev->mt76.napi[2]);
local_bh_enable(); local_bh_enable();
tasklet_schedule(&dev->irq_tasklet); tasklet_schedule(&dev->irq_tasklet);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment