diff --git a/mac80211.c b/mac80211.c index dcd47ecd..7cca6857 100644 --- a/mac80211.c +++ b/mac80211.c @@ -218,8 +218,8 @@ void mt76_unregister_device(struct mt76_dev *dev) { struct ieee80211_hw *hw = dev->hw; - mt76_tx_free(dev); ieee80211_unregister_hw(hw); + mt76_tx_free(dev); } EXPORT_SYMBOL_GPL(mt76_unregister_device); diff --git a/mt7603_init.c b/mt7603_init.c index 9a44d7e4..985cf024 100644 --- a/mt7603_init.c +++ b/mt7603_init.c @@ -383,8 +383,8 @@ int mt7603_register_device(struct mt7603_dev *dev) void mt7603_unregister_device(struct mt7603_dev *dev) { - mt7603_mac_status_skb(dev, NULL, -1); mt76_unregister_device(&dev->mt76); + mt7603_mac_status_skb(dev, NULL, -1); mt7603_mcu_exit(dev); mt7603_dma_cleanup(dev); ieee80211_free_hw(mt76_hw(dev));