Add mac workqueue support to mt76x2u driver in order
to compute device statistics and add mac stuck routine
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
{
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;
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);
{
mt76u_stop_stat_wk(&dev->mt76);
cancel_delayed_work_sync(&dev->cal_work);
+ cancel_delayed_work_sync(&dev->mac_work);
mt76x2u_mac_stop(dev);
}
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: