mt7601u: check the status of device in calibration
authorZhi Han <z.han@gmx.net>
Thu, 17 Dec 2020 16:16:57 +0000 (17:16 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 14 Jan 2021 17:30:39 +0000 (19:30 +0200)
commit1dac51269d0532bd0847f44f1c3ae7fd2851ac7d
treec85fe6f80043d91b451796f8c7ea47003a542b8a
parent0e40dbd56d67a5b01b13f4bfb62b470cd99125cd
mt7601u: check the status of device in calibration

When the usb device being plugged out, before ieee80211 gets to know the
hw being removed, it gets to know that the association status changed,
and thus ask for the device to do the calibration. This causes error as
the hw is absent.

This can be avoid by checking the status of the device before sending
the calibration request to the device.

Signed-off-by: Zhi Han <z.han@gmx.net>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201217161657.GB12562@E480
drivers/net/wireless/mediatek/mt7601u/phy.c