Skip to content

Commit

Permalink
mt76x0: move stop related routines in mt76x0_mac_stop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lorenzo Bianconi authored and Felix Fietkau committed Sep 19, 2018
1 parent cb722ae commit b680d7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/mediatek/mt76/mt76x0/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 0 additions & 4 deletions drivers/net/wireless/mediatek/mt76/mt76x0/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b680d7f

Please sign in to comment.