aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-12-23 18:58:47 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:33 -0500
commite56db718468416ce5ff1ba05e7fa5026424befd5 (patch)
tree458258981386a4cd7d01a24ef68496163c8f38e1 /drivers/net
parent38b33707a1ec77f7b4c92ae41cfe93318014f5bf (diff)
ath9k: remove mode specific default noise floor values
The NOISE_FLOOR array we have is mode specific, and the only possible indexed values are A, B and G. The mode routine only can return G or A, so this is band specific. Then since the values for A and G (5ghz or 2ghz) are the same (-96) we simply remove the array and use a static value. If we later determine we want to use special values for HT configurations we can use the new mac80211 conf_is_ht*() helpers. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath9k/calib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath9k/calib.c b/drivers/net/wireless/ath9k/calib.c
index 707289685b41..8e073d6513d5 100644
--- a/drivers/net/wireless/ath9k/calib.c
+++ b/drivers/net/wireless/ath9k/calib.c
@@ -19,8 +19,6 @@
19#include "reg.h" 19#include "reg.h"
20#include "phy.h" 20#include "phy.h"
21 21
22static const int16_t NOISE_FLOOR[] = { -96, -93, -98, -96, -93, -96 };
23
24/* We can tune this as we go by monitoring really low values */ 22/* We can tune this as we go by monitoring really low values */
25#define ATH9K_NF_TOO_LOW -60 23#define ATH9K_NF_TOO_LOW -60
26 24
@@ -740,10 +738,9 @@ s16 ath9k_hw_getchan_noise(struct ath_hal *ah, struct ath9k_channel *chan)
740 chan->channel, chan->channelFlags); 738 chan->channel, chan->channelFlags);
741 return ATH_DEFAULT_NOISE_FLOOR; 739 return ATH_DEFAULT_NOISE_FLOOR;
742 } 740 }
743 if (ichan->rawNoiseFloor == 0) { 741 if (ichan->rawNoiseFloor == 0)
744 enum wireless_mode mode = ath9k_hw_chan2wmode(ah, chan); 742 nf = -96;
745 nf = NOISE_FLOOR[mode]; 743 else
746 } else
747 nf = ichan->rawNoiseFloor; 744 nf = ichan->rawNoiseFloor;
748 745
749 if (!ath9k_hw_nf_in_range(ah, nf)) 746 if (!ath9k_hw_nf_in_range(ah, nf))