ath5k: initialize default noise floor
authorBruno Randolf <br1@einfach.org>
Thu, 25 Mar 2010 05:49:31 +0000 (14:49 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 31 Mar 2010 18:39:09 +0000 (14:39 -0400)
Initialize noise floor variable with a default of -95. This was used
uninitialized in the signal strength (RSSI -> dBm) conversion until the first
noise floor calibration was completed.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/attach.c

index dd4099a..f80d3d5 100644 (file)
@@ -123,6 +123,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc)
        ah->ah_limit_tx_retries = AR5K_INIT_TX_RETRY;
        ah->ah_software_retry = false;
        ah->ah_ant_mode = AR5K_ANTMODE_DEFAULT;
+       ah->ah_noise_floor = -95;       /* until first NF calibration is run */
 
        /*
         * Find the mac version