Commit e56db718 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

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: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 38b33707
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#include "reg.h" #include "reg.h"
#include "phy.h" #include "phy.h"
static const int16_t NOISE_FLOOR[] = { -96, -93, -98, -96, -93, -96 };
/* We can tune this as we go by monitoring really low values */ /* We can tune this as we go by monitoring really low values */
#define ATH9K_NF_TOO_LOW -60 #define ATH9K_NF_TOO_LOW -60
...@@ -740,10 +738,9 @@ s16 ath9k_hw_getchan_noise(struct ath_hal *ah, struct ath9k_channel *chan) ...@@ -740,10 +738,9 @@ s16 ath9k_hw_getchan_noise(struct ath_hal *ah, struct ath9k_channel *chan)
chan->channel, chan->channelFlags); chan->channel, chan->channelFlags);
return ATH_DEFAULT_NOISE_FLOOR; return ATH_DEFAULT_NOISE_FLOOR;
} }
if (ichan->rawNoiseFloor == 0) { if (ichan->rawNoiseFloor == 0)
enum wireless_mode mode = ath9k_hw_chan2wmode(ah, chan); nf = -96;
nf = NOISE_FLOOR[mode]; else
} else
nf = ichan->rawNoiseFloor; nf = ichan->rawNoiseFloor;
if (!ath9k_hw_nf_in_range(ah, nf)) if (!ath9k_hw_nf_in_range(ah, nf))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment