Message ID | 20210119164943.99223-1-nbd@nbd.name |
---|---|
State | New |
Headers | show |
Series | [1/3] mt76: fix crash on tearing down ext phy | expand |
On 2021-01-19 17:49, Felix Fietkau wrote: > Since vif indexes are per-phy, we need to factor in the phy index to avoid > collisions on the WTBL index > > Signed-off-by: Felix Fietkau <nbd@nbd.name> This one is superseded by "mt76: mt7915: make vif index per adapter instead of per band" - Felix
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index f2714436883b..696d00d1976c 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -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);
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> --- drivers/net/wireless/mediatek/mt76/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)