ath5k: ignore the return value of ath5k_hw_noise_floor_calibration
PATCH 1/1 ath5k: ignore the return value of ath5k_hw_noise_floor_calibration
Noise floor calibration occasionally fails on Atheros hardware. This is not fatal and can happen if there's simply too much noise on the air. Ignoring the calibration error is the right thing to do here, because when the error is ignored, the hardware will still work, whereas if the error causes the driver to bail out of a bigger configuration function and does not configure the tx queues or the IMR (as is the case in reset.c), the hw no longer works properly until the next reset.
drivers/net/wireless/ath5k/phy.c +1 -3
@@ -2196,9 +2196,7 @@ static int ath5k_hw_rf5110_calibrate(struct ath5k_hw *ah,return ret; } - ret =ath5k_hw_noise_floor_calibration (ah, channel->center_freq); -if (ret) -return ret; +ath5k_hw_noise_floor_calibration (ah, channel->center_freq);/* * Re-enable RX/TX and beacons
drivers/net/wireless/ath5k/reset.c +1 -3
@@ -842,9 +842,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,* * XXX: Find an interval that's OK for all cards... */ - ret =ath5k_hw_noise_floor_calibration (ah, channel->center_freq); -if (ret) -return ret; +ath5k_hw_noise_floor_calibration (ah, channel->center_freq);/* * Reset queues and start beacon timers at the end of the reset routine
Quoted 40 lines · Felix Fietkau
Noise floor calibration occasionally fails on Atheros hardware. This is not fatal and can happen if there's simply too much noise on the air. Ignoring the calibration error is the right thing to do here, because when the error is ignored, the hardware will still work, whereas if the error causes the driver to bail out of a bigger configuration function and does not configure the tx queues or the IMR (as is the case in
reset.c), the hw no longer works properly until the next reset.Signed-off-by Felix Fietkau <[email protected]>drivers/net/wireless/ath5k/phy.c +1
-3@@ -2196,9 +2196,7 @@ static int ath5k_hw_rf5110_calibrate(struct ath5k_hw *ah,return ret; } - ret =ath5k_hw_noise_floor_calibration (ah, channel->center_freq); -if (ret) -return ret; +ath5k_hw_noise_floor_calibration (ah, channel->center_freq);/* * Re-enable RX/TX and beacons drivers/net/wireless/ath5k/reset.c +1
-4@@ -842,9 +842,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,* * XXX: Find an interval that's OK for all cards... */ - ret =ath5k_hw_noise_floor_calibration (ah, channel->center_freq); -if (ret) -return ret; +ath5k_hw_noise_floor_calibration (ah, channel->center_freq);/* * Reset queues and start beacon timers at the end of the reset routine --
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
ACK
While I'm not sure I agree with your theory on why noise floor calibration fails, this patch certainly cuts down on log noise without introducing any adverse side effects.
rtg
Signature · 2 lines
Tim Gardner [email protected] www.tpi.com OR 503-601-0234 x102 MT 406-443-5357