diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-09-06 11:18:48 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-09-19 12:31:05 +0200 |
commit | b680d7fbfbff01ead47a54d7bb50567a7ceeedde (patch) | |
tree | 3ea0e7455c25063163a88bfa7db9f792023d753b | |
parent | cb722aeddcfdab852a06a0477ac197174ea44051 (diff) | |
download | linux-b680d7fbfbff01ead47a54d7bb50567a7ceeedde.tar.bz2 |
mt76x0: move stop related routines in mt76x0_mac_stop
Move tear-down routines in mt76x0_mac_stop function.
mt76x0_mac_stop routines will be reused in mt76x0_suspend
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c index d186f509b5a8..b1d5f647eac5 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c @@ -361,6 +361,9 @@ static void mt76x0_mac_stop_hw(struct mt76x0_dev *dev) void mt76x0_mac_stop(struct mt76x0_dev *dev) { + cancel_delayed_work_sync(&dev->cal_work); + cancel_delayed_work_sync(&dev->mac_work); + mt76u_stop_stat_wk(&dev->mt76); mt76x0_mac_stop_hw(dev); } diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c index 8c8a0f676228..0d3c7accb4f8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c @@ -48,10 +48,6 @@ static void mt76x0_stop(struct ieee80211_hw *hw) mutex_lock(&dev->mt76.mutex); clear_bit(MT76_STATE_RUNNING, &dev->mt76.state); - - cancel_delayed_work_sync(&dev->cal_work); - cancel_delayed_work_sync(&dev->mac_work); - mt76u_stop_stat_wk(&dev->mt76); mt76x0_mac_stop(dev); mutex_unlock(&dev->mt76.mutex); |