diff options
author | Zhi Han <z.han@gmx.net> | 2020-12-17 17:16:57 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-01-14 19:30:39 +0200 |
commit | 1dac51269d0532bd0847f44f1c3ae7fd2851ac7d (patch) | |
tree | c85fe6f80043d91b451796f8c7ea47003a542b8a /drivers/net | |
parent | 0e40dbd56d67a5b01b13f4bfb62b470cd99125cd (diff) |
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
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mediatek/mt7601u/phy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt7601u/phy.c b/drivers/net/wireless/mediatek/mt7601u/phy.c index 28db24a2b5e5..8a00f6a75ca9 100644 --- a/drivers/net/wireless/mediatek/mt7601u/phy.c +++ b/drivers/net/wireless/mediatek/mt7601u/phy.c @@ -586,6 +586,9 @@ static void mt7601u_rxdc_cal(struct mt7601u_dev *dev) void mt7601u_phy_recalibrate_after_assoc(struct mt7601u_dev *dev) { + if (test_bit(MT7601U_STATE_REMOVED, &dev->state)) + return; + mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp); mt7601u_rxdc_cal(dev); |