mt76x2u: introduce mac workqueue support

Add mac workqueue support to mt76x2u driver in order
to compute device statistics and add mac stuck routine

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2018-10-16 12:51:14 +02:00
committed by Felix Fietkau
parent 6aae25b98e
commit b228a45394
4 changed files with 5 additions and 1 deletions
+2
View File
@@ -162,6 +162,8 @@ void mt76x2_init_device(struct mt76x02_dev *dev)
{
struct ieee80211_hw *hw = mt76_hw(dev);
INIT_DELAYED_WORK(&dev->mac_work, mt76x02_mac_work);
hw->queues = 4;
hw->max_rates = 1;
hw->max_report_rates = 7;
-1
View File
@@ -467,7 +467,6 @@ int mt76x2_register_device(struct mt76x02_dev *dev)
int i, ret;
INIT_DELAYED_WORK(&dev->cal_work, mt76x2_phy_calibrate);
INIT_DELAYED_WORK(&dev->mac_work, mt76x02_mac_work);
mt76x2_init_device(dev);
+1
View File
@@ -297,6 +297,7 @@ void mt76x2u_stop_hw(struct mt76x02_dev *dev)
{
mt76u_stop_stat_wk(&dev->mt76);
cancel_delayed_work_sync(&dev->cal_work);
cancel_delayed_work_sync(&dev->mac_work);
mt76x2u_mac_stop(dev);
}
+2
View File
@@ -27,6 +27,8 @@ static int mt76x2u_start(struct ieee80211_hw *hw)
if (ret)
goto out;
ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mac_work,
MT_CALIBRATE_INTERVAL);
set_bit(MT76_STATE_RUNNING, &dev->mt76.state);
out: