aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/ani.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-20 21:38:52 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-22 15:58:43 -0500
commit8b22523b045858042c6700f556f840853de163ea (patch)
tree1f86e9f9cd9f3943fa854c73e41fa885cb6b91a7 /drivers/net/wireless/ath/ath5k/ani.c
parent85be3d98dbc8d9cff9411c52c619c3752737b7b4 (diff)
ath5k: Use static const
Using static const generally increases object text and decreases data size. It also generally decreases overall object size. text data bss dec hex filename 11266 56 2464 13786 35da drivers/net/wireless/ath/ath5k/ani.o.old 11181 56 2464 13701 3585 drivers/net/wireless/ath/ath5k/ani.o.new Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/ani.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/ani.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ani.c b/drivers/net/wireless/ath/ath5k/ani.c
index db98a853ff35..6b75b22a929a 100644
--- a/drivers/net/wireless/ath/ath5k/ani.c
+++ b/drivers/net/wireless/ath/ath5k/ani.c
@@ -63,15 +63,15 @@ ath5k_ani_set_noise_immunity_level(struct ath5k_hw *ah, int level)
63 * so i stick with the HAL version for now... 63 * so i stick with the HAL version for now...
64 */ 64 */
65#if 0 65#if 0
66 const s8 hi[] = { -18, -18, -16, -14, -12 }; 66 static const s8 hi[] = { -18, -18, -16, -14, -12 };
67 const s8 lo[] = { -52, -56, -60, -64, -70 }; 67 static const s8 lo[] = { -52, -56, -60, -64, -70 };
68 const s8 sz[] = { -34, -41, -48, -55, -62 }; 68 static const s8 sz[] = { -34, -41, -48, -55, -62 };
69 const s8 fr[] = { -70, -72, -75, -78, -80 }; 69 static const s8 fr[] = { -70, -72, -75, -78, -80 };
70#else 70#else
71 const s8 sz[] = { -55, -62 }; 71 static const s8 sz[] = { -55, -62 };
72 const s8 lo[] = { -64, -70 }; 72 static const s8 lo[] = { -64, -70 };
73 const s8 hi[] = { -14, -12 }; 73 static const s8 hi[] = { -14, -12 };
74 const s8 fr[] = { -78, -80 }; 74 static 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_ERR(ah->ah_sc, "noise immuniy level %d out of range", 77 ATH5K_ERR(ah->ah_sc, "noise immuniy level %d out of range",
@@ -102,7 +102,7 @@ ath5k_ani_set_noise_immunity_level(struct ath5k_hw *ah, int level)
102void 102void
103ath5k_ani_set_spur_immunity_level(struct ath5k_hw *ah, int level) 103ath5k_ani_set_spur_immunity_level(struct ath5k_hw *ah, int level)
104{ 104{
105 const int val[] = { 2, 4, 6, 8, 10, 12, 14, 16 }; 105 static const int val[] = { 2, 4, 6, 8, 10, 12, 14, 16 };
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) {
@@ -127,7 +127,7 @@ ath5k_ani_set_spur_immunity_level(struct ath5k_hw *ah, int level)
127void 127void
128ath5k_ani_set_firstep_level(struct ath5k_hw *ah, int level) 128ath5k_ani_set_firstep_level(struct ath5k_hw *ah, int level)
129{ 129{
130 const int val[] = { 0, 4, 8 }; 130 static 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_ERR(ah->ah_sc, "firstep level %d out of range", level); 133 ATH5K_ERR(ah->ah_sc, "firstep level %d out of range", level);
@@ -151,12 +151,12 @@ ath5k_ani_set_firstep_level(struct ath5k_hw *ah, int level)
151void 151void
152ath5k_ani_set_ofdm_weak_signal_detection(struct ath5k_hw *ah, bool on) 152ath5k_ani_set_ofdm_weak_signal_detection(struct ath5k_hw *ah, bool on)
153{ 153{
154 const int m1l[] = { 127, 50 }; 154 static const int m1l[] = { 127, 50 };
155 const int m2l[] = { 127, 40 }; 155 static const int m2l[] = { 127, 40 };
156 const int m1[] = { 127, 0x4d }; 156 static const int m1[] = { 127, 0x4d };
157 const int m2[] = { 127, 0x40 }; 157 static const int m2[] = { 127, 0x40 };
158 const int m2cnt[] = { 31, 16 }; 158 static const int m2cnt[] = { 31, 16 };
159 const int m2lcnt[] = { 63, 48 }; 159 static const int m2lcnt[] = { 63, 48 };
160 160
161 AR5K_REG_WRITE_BITS(ah, AR5K_PHY_WEAK_OFDM_LOW_THR, 161 AR5K_REG_WRITE_BITS(ah, AR5K_PHY_WEAK_OFDM_LOW_THR,
162 AR5K_PHY_WEAK_OFDM_LOW_THR_M1, m1l[on]); 162 AR5K_PHY_WEAK_OFDM_LOW_THR_M1, m1l[on]);
@@ -192,7 +192,7 @@ ath5k_ani_set_ofdm_weak_signal_detection(struct ath5k_hw *ah, bool on)
192void 192void
193ath5k_ani_set_cck_weak_signal_detection(struct ath5k_hw *ah, bool on) 193ath5k_ani_set_cck_weak_signal_detection(struct ath5k_hw *ah, bool on)
194{ 194{
195 const int val[] = { 8, 6 }; 195 static const int val[] = { 8, 6 };
196 AR5K_REG_WRITE_BITS(ah, AR5K_PHY_CCK_CROSSCORR, 196 AR5K_REG_WRITE_BITS(ah, AR5K_PHY_CCK_CROSSCORR,
197 AR5K_PHY_CCK_CROSSCORR_WEAK_SIG_THR, val[on]); 197 AR5K_PHY_CCK_CROSSCORR_WEAK_SIG_THR, val[on]);
198 ah->ah_sc->ani_state.cck_weak_sig = on; 198 ah->ah_sc->ani_state.cck_weak_sig = on;