mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()
ieee80211_register_hw() is called with rtnl_lock held, and this could be caused lockdep from a work item that's on a workqueue that is flushed with the rtnl held. Move mt7615_register_ext_phy() outside the init_work(). Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
2363b6a646
commit
8c55516de3
@ -28,8 +28,6 @@ static void mt7615_pci_init_work(struct work_struct *work)
|
||||
return;
|
||||
|
||||
mt7615_init_work(dev);
|
||||
if (dev->dbdc_support)
|
||||
mt7615_register_ext_phy(dev);
|
||||
}
|
||||
|
||||
static int mt7615_init_hardware(struct mt7615_dev *dev)
|
||||
@ -160,6 +158,12 @@ int mt7615_register_device(struct mt7615_dev *dev)
|
||||
mt7615_init_txpower(dev, &dev->mphy.sband_2g.sband);
|
||||
mt7615_init_txpower(dev, &dev->mphy.sband_5g.sband);
|
||||
|
||||
if (dev->dbdc_support) {
|
||||
ret = mt7615_register_ext_phy(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return mt7615_init_debugfs(dev);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user