17 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
75 static const s8 lo[] = { -52, -56, -60, -64, -70 };
76 static const s8 hi[] = { -18, -18, -16, -14, -12 };
77 static const s8 sz[] = { -34, -41, -48, -55, -62 };
78 static const s8 fr[] = { -70, -72, -75, -78, -80 };
80 static const s8 lo[] = { -64, -70 };
81 static const s8 hi[] = { -14, -12 };
82 static const s8 sz[] = { -55, -62 };
83 static const s8 fr[] = { -78, -80 };
86 ATH5K_ERR(ah,
"noise immunity level %d out of range",
113 static const int val[] = { 2, 4, 6, 8, 10, 12, 14, 16 };
117 ATH5K_ERR(ah,
"spur immunity level %d out of range",
137 static const int val[] = { 0, 4, 8 };
140 ATH5K_ERR(ah,
"firstep level %d out of range", level);
159 static const int m1l[] = { 127, 50 };
160 static const int m2l[] = { 127, 40 };
161 static const int m1[] = { 127, 0x4d };
162 static const int m2[] = { 127, 0x40 };
163 static const int m2cnt[] = { 31, 16 };
164 static const int m2lcnt[] = { 63, 48 };
199 static const int val[] = { 8, 6 };
229 ofdm_trigger ?
"ODFM" :
"CCK");
286 "beacon RSSI low, 2GHz");
379 spin_lock_bh(&common->
cc_lock);
387 spin_unlock_bh(&common->
cc_lock);
406 ath5k_ani_save_and_clear_phy_errors(
struct ath5k_hw *ah,
409 unsigned int ofdm_err, cck_err;
428 if (ofdm_err <= 0 && cck_err <= 0)
478 int listen, ofdm_high, ofdm_low, cck_high, cck_low;
483 listen = ath5k_hw_ani_get_listen_time(ah, as);
489 ath5k_ani_save_and_clear_phy_errors(ah, as);
499 "check high ofdm %d/%d cck %d/%d",
504 bool ofdm_flag = as->
ofdm_errors > ofdm_high ?
true :
false;
505 ath5k_ani_raise_immunity(ah, as, ofdm_flag);
506 ath5k_ani_period_restart(as);
512 "check low ofdm %d/%d cck %d/%d",
516 ath5k_ani_lower_immunity(ah, as);
518 ath5k_ani_period_restart(as);
558 if (ath5k_ani_save_and_clear_phy_errors(ah, as) == 0)
604 ath5k_enable_phy_err_counters(
struct ath5k_hw *ah)
625 ath5k_disable_phy_err_counters(
struct ath5k_hw *ah)
652 ATH5K_ERR(ah,
"ANI mode %d out of range", mode);
670 "ANI manual low -> high sensitivity\n");
678 "ANI manual high -> low sensitivity\n");
686 }
else if (mode == ATH5K_ANI_MODE_AUTO) {
699 if (mode == ATH5K_ANI_MODE_AUTO) {
701 ath5k_enable_phy_err_counters(ah);
707 ath5k_disable_phy_err_counters(ah);
721 #ifdef CONFIG_ATH5K_DEBUG