summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7603/main.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2019-03-18 13:21:44 +0300
committerFelix Fietkau <nbd@nbd.name>2019-05-01 14:03:58 +0300
commit37426fb67a017f0140e529fe4b09e490989cdbf0 (patch)
treeb7d006e5426b901ff351a4babf6a1fd0dbd2ba51 /drivers/net/wireless/mediatek/mt76/mt7603/main.c
parent41634aa8d6db9346121f58eed5d94511cdcb0976 (diff)
downloadlinux-37426fb67a017f0140e529fe4b09e490989cdbf0.tar.xz
mt76: move mac_work in mt76_dev
Move mac_work delayed work in mt76_dev data structure since it is used by all drivers and it will be reused adding mac work to mt7615 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7603/main.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7603/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/main.c b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
index 44745db0f4a9..18db78a9d63a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
@@ -16,7 +16,7 @@ mt7603_start(struct ieee80211_hw *hw)
mt7603_mac_start(dev);
dev->survey_time = ktime_get_boottime();
set_bit(MT76_STATE_RUNNING, &dev->mt76.state);
- mt7603_mac_work(&dev->mac_work.work);
+ mt7603_mac_work(&dev->mt76.mac_work.work);
return 0;
}
@@ -27,7 +27,7 @@ mt7603_stop(struct ieee80211_hw *hw)
struct mt7603_dev *dev = hw->priv;
clear_bit(MT76_STATE_RUNNING, &dev->mt76.state);
- cancel_delayed_work_sync(&dev->mac_work);
+ cancel_delayed_work_sync(&dev->mt76.mac_work);
mt7603_mac_stop(dev);
}
@@ -132,7 +132,7 @@ mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def)
u8 bw = MT_BW_20;
bool failed = false;
- cancel_delayed_work_sync(&dev->mac_work);
+ cancel_delayed_work_sync(&dev->mt76.mac_work);
mutex_lock(&dev->mt76.mutex);
set_bit(MT76_RESET, &dev->mt76.state);
@@ -171,7 +171,7 @@ mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def)
mt76_txq_schedule_all(&dev->mt76);
- ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mac_work,
+ ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mt76.mac_work,
MT7603_WATCHDOG_TIME);
/* reset channel stats */
@@ -189,7 +189,7 @@ out:
mutex_unlock(&dev->mt76.mutex);
if (failed)
- mt7603_mac_work(&dev->mac_work.work);
+ mt7603_mac_work(&dev->mt76.mac_work.work);
return ret;
}