diff options
author | Bruno Randolf <br1@einfach.org> | 2010-05-18 21:31:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-02 16:13:27 -0400 |
commit | 4f424867dd4752d457458fec29ca57ce5d7dc4ac (patch) | |
tree | e0a231d0fc9a07821dc36ffc18e4dbbbcb4d37b2 /drivers/net/wireless | |
parent | 9537a1623359fd24ec95ba1fe60528c70e84b2a2 (diff) |
ath5k: print error message if ANI levels are out of range
Since we have sysfs to manually set the ANI levels, we should print errors to
the kernel log if the values are out of bounds.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ani.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ani.c b/drivers/net/wireless/ath/ath5k/ani.c index 987e3d3fa5cb..26dbe65fedb0 100644 --- a/drivers/net/wireless/ath/ath5k/ani.c +++ b/drivers/net/wireless/ath/ath5k/ani.c | |||
@@ -74,8 +74,8 @@ ath5k_ani_set_noise_immunity_level(struct ath5k_hw *ah, int level) | |||
74 | const s8 fr[] = { -78, -80 }; | 74 | const s8 fr[] = { -78, -80 }; |
75 | #endif | 75 | #endif |
76 | if (level < 0 || level >= ARRAY_SIZE(sz)) { | 76 | if (level < 0 || level >= ARRAY_SIZE(sz)) { |
77 | ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, | 77 | ATH5K_ERR(ah->ah_sc, "noise immuniy level %d out of range", |
78 | "level out of range %d", level); | 78 | level); |
79 | return; | 79 | return; |
80 | } | 80 | } |
81 | 81 | ||
@@ -106,8 +106,8 @@ ath5k_ani_set_spur_immunity_level(struct ath5k_hw *ah, int level) | |||
106 | 106 | ||
107 | if (level < 0 || level >= ARRAY_SIZE(val) || | 107 | if (level < 0 || level >= ARRAY_SIZE(val) || |
108 | level > ah->ah_sc->ani_state.max_spur_level) { | 108 | level > ah->ah_sc->ani_state.max_spur_level) { |
109 | ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, | 109 | ATH5K_ERR(ah->ah_sc, "spur immunity level %d out of range", |
110 | "level out of range %d", level); | 110 | level); |
111 | return; | 111 | return; |
112 | } | 112 | } |
113 | 113 | ||
@@ -130,8 +130,7 @@ ath5k_ani_set_firstep_level(struct ath5k_hw *ah, int level) | |||
130 | const int val[] = { 0, 4, 8 }; | 130 | const int val[] = { 0, 4, 8 }; |
131 | 131 | ||
132 | if (level < 0 || level >= ARRAY_SIZE(val)) { | 132 | if (level < 0 || level >= ARRAY_SIZE(val)) { |
133 | ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, | 133 | ATH5K_ERR(ah->ah_sc, "firstep level %d out of range", level); |
134 | "level out of range %d", level); | ||
135 | return; | 134 | return; |
136 | } | 135 | } |
137 | 136 | ||