diff options
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/mac.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 5d2a14cf5d40..2cc329019edc 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -1976,17 +1976,17 @@ out: void mt7615_mac_work(struct work_struct *work) { struct mt7615_phy *phy; - struct mt76_dev *mdev; + struct mt76_phy *mphy; - phy = (struct mt7615_phy *)container_of(work, struct mt7615_phy, - mac_work.work); - mdev = &phy->dev->mt76; + mphy = (struct mt76_phy *)container_of(work, struct mt76_phy, + mac_work.work); + phy = mphy->priv; mt7615_mutex_acquire(phy->dev); mt7615_update_survey(phy->dev); - if (++phy->mac_work_count == 5) { - phy->mac_work_count = 0; + if (++mphy->mac_work_count == 5) { + mphy->mac_work_count = 0; mt7615_mac_update_mib_stats(phy); mt7615_mac_scs_check(phy); @@ -1994,8 +1994,8 @@ void mt7615_mac_work(struct work_struct *work) mt7615_mutex_release(phy->dev); - mt76_tx_status_check(mdev, NULL, false); - ieee80211_queue_delayed_work(phy->mt76->hw, &phy->mac_work, + mt76_tx_status_check(mphy->dev, NULL, false); + ieee80211_queue_delayed_work(mphy->hw, &mphy->mac_work, MT7615_WATCHDOG_TIME); } @@ -2104,11 +2104,11 @@ void mt7615_mac_reset_work(struct work_struct *work) set_bit(MT76_RESET, &dev->mphy.state); set_bit(MT76_MCU_RESET, &dev->mphy.state); wake_up(&dev->mt76.mcu.wait); - cancel_delayed_work_sync(&dev->phy.mac_work); + cancel_delayed_work_sync(&dev->mphy.mac_work); del_timer_sync(&dev->phy.roc_timer); cancel_work_sync(&dev->phy.roc_work); if (phy2) { - cancel_delayed_work_sync(&phy2->mac_work); + cancel_delayed_work_sync(&phy2->mt76->mac_work); del_timer_sync(&phy2->roc_timer); cancel_work_sync(&phy2->roc_work); } @@ -2163,10 +2163,11 @@ void mt7615_mac_reset_work(struct work_struct *work) mt7615_mutex_release(dev); - ieee80211_queue_delayed_work(mt76_hw(dev), &dev->phy.mac_work, + ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mphy.mac_work, MT7615_WATCHDOG_TIME); if (phy2) - ieee80211_queue_delayed_work(ext_phy->hw, &phy2->mac_work, + ieee80211_queue_delayed_work(ext_phy->hw, + &phy2->mt76->mac_work, MT7615_WATCHDOG_TIME); } |