mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()
authorPeter Chiu <chui-hao.chiu@mediatek.com>
Mon, 1 Nov 2021 02:01:13 +0000 (10:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:45 +0000 (11:04 +0100)
commit3a1ef2b1233879e6ceb42b5ad33403c173a68d20
tree7cdc54d9dc02ab2bcd709d1ccbc859a4ac0feff4
parenta09dc6c4638f92ad8046bbbd9df8dbde23ec426a
mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()

[ Upstream commit 8c55516de3f9b76b9d9444e7890682ec2efc809f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7615/pci_init.c