mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
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 <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
73556561ab
commit
70289adc6a
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user