mt76: fix crash on tearing down ext phy
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>
This commit is contained in:
@@ -387,9 +387,9 @@ void mt76_unregister_phy(struct mt76_phy *phy)
|
|||||||
{
|
{
|
||||||
struct mt76_dev *dev = phy->dev;
|
struct mt76_dev *dev = phy->dev;
|
||||||
|
|
||||||
dev->phy2 = NULL;
|
|
||||||
mt76_tx_status_check(dev, NULL, true);
|
mt76_tx_status_check(dev, NULL, true);
|
||||||
ieee80211_unregister_hw(phy->hw);
|
ieee80211_unregister_hw(phy->hw);
|
||||||
|
dev->phy2 = NULL;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mt76_unregister_phy);
|
EXPORT_SYMBOL_GPL(mt76_unregister_phy);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user