]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ath9k: incorrect noise floor threshold values.
authorSenthil Balasubramanian <senthilkumar@atheros.com>
Thu, 13 Nov 2008 12:29:36 +0000 (17:59 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Nov 2008 21:41:29 +0000 (16:41 -0500)
This patch fixes incorrect noise floor threshold values.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/calib.c
drivers/net/wireless/ath9k/eeprom.c

index 1690759fe7b82dedff1b168d8d667ce688dd3c49..0e214f746a96ae8cde18057f664027c746c9fe11 100644 (file)
@@ -176,14 +176,14 @@ static bool getNoiseFloorThresh(struct ath_hal *ah,
        case CHANNEL_A_HT20:
        case CHANNEL_A_HT40PLUS:
        case CHANNEL_A_HT40MINUS:
-               *nft = (int16_t)ath9k_hw_get_eeprom(ah, EEP_NFTHRESH_5);
+               *nft = (int8_t)ath9k_hw_get_eeprom(ah, EEP_NFTHRESH_5);
                break;
        case CHANNEL_B:
        case CHANNEL_G:
        case CHANNEL_G_HT20:
        case CHANNEL_G_HT40PLUS:
        case CHANNEL_G_HT40MINUS:
-               *nft = (int16_t)ath9k_hw_get_eeprom(ah, EEP_NFTHRESH_2);
+               *nft = (int8_t)ath9k_hw_get_eeprom(ah, EEP_NFTHRESH_2);
                break;
        default:
                DPRINTF(ah->ah_sc, ATH_DBG_CHANNEL,
index 9b2fdc538a8d89a82a12f9d33500076e7556e268..180e541146593356ecd3f1e4306aa18f4284e0a7 100644 (file)
@@ -1551,9 +1551,9 @@ u32 ath9k_hw_get_eeprom(struct ath_hal *ah,
 
        switch (param) {
        case EEP_NFTHRESH_5:
-               return -pModal[0].noiseFloorThreshCh[0];
+               return pModal[0].noiseFloorThreshCh[0];
        case EEP_NFTHRESH_2:
-               return -pModal[1].noiseFloorThreshCh[0];
+               return pModal[1].noiseFloorThreshCh[0];
        case AR_EEPROM_MAC(0):
                return pBase->macAddr[0] << 8 | pBase->macAddr[1];
        case AR_EEPROM_MAC(1):