Skip to content

Commit

Permalink
mt76: fix crash on tearing down ext phy
Browse files Browse the repository at this point in the history
Only clear dev->phy2 after the phy is gone, the driver may still need to access
it until shutdown is complete

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
Felix Fietkau committed Jan 27, 2021
1 parent 76027f4 commit 94b6df0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/mediatek/mt76/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ void mt76_unregister_phy(struct mt76_phy *phy)
{
struct mt76_dev *dev = phy->dev;

dev->phy2 = NULL;
mt76_tx_status_check(dev, NULL, true);
ieee80211_unregister_hw(phy->hw);
dev->phy2 = NULL;
}
EXPORT_SYMBOL_GPL(mt76_unregister_phy);

Expand Down

0 comments on commit 94b6df0

Please sign in to comment.