Skip to contentSkip to conversation

mt7601u: check the status of device in calibration

PATCH In review Zhi Han 3 participants 3 messages Dec 17, 2020 – Jan 14, 2021

Subsystems (2)
lore
Share & tools
lore

Zhi Han

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/mediatek/mt7601u/phy.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/mediatek/mt7601u/phy.c +3 -0
index 28db24a2b5e5..8a00f6a75ca9 100644
@@ -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);
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Thu, 17 Dec 2020 17:16:57 +0100 Zhi Han wrote:

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.

#2 lore raw
In reply to Zhi Han
Quoted 10 lines · Zhi Han

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.

Patch applied to wireless-drivers-next.git, thanks.

1dac51269d05 mt7601u: check the status of device in calibration

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/20201217161657.GB12562@E480/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches