ani.c (92fd4d4d67b945c0766416284d4ab236b31542c4) | ani.c (eef39befaae2a1559efe197d795c376a317af2af) |
---|---|
1/* 2 * Copyright (C) 2010 Bruno Randolf <br1@einfach.org> 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 202 unchanged lines hidden (view full) --- 211 * 212 * Try to raise noise immunity (=decrease sensitivity) in several steps 213 * depending on the average RSSI of the beacons we received. 214 */ 215static void 216ath5k_ani_raise_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as, 217 bool ofdm_trigger) 218{ | 1/* 2 * Copyright (C) 2010 Bruno Randolf <br1@einfach.org> 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 202 unchanged lines hidden (view full) --- 211 * 212 * Try to raise noise immunity (=decrease sensitivity) in several steps 213 * depending on the average RSSI of the beacons we received. 214 */ 215static void 216ath5k_ani_raise_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as, 217 bool ofdm_trigger) 218{ |
219 int rssi = ah->ah_beacon_rssi_avg.avg; | 219 int rssi = ewma_read(&ah->ah_beacon_rssi_avg); |
220 221 ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, "raise immunity (%s)", 222 ofdm_trigger ? "ODFM" : "CCK"); 223 224 /* first: raise noise immunity */ 225 if (as->noise_imm_level < ATH5K_ANI_MAX_NOISE_IMM_LVL) { 226 ath5k_ani_set_noise_immunity_level(ah, as->noise_imm_level + 1); 227 return; --- 68 unchanged lines hidden (view full) --- 296 * ath5k_ani_lower_immunity() - Decrease noise immunity 297 * 298 * Try to lower noise immunity (=increase sensitivity) in several steps 299 * depending on the average RSSI of the beacons we received. 300 */ 301static void 302ath5k_ani_lower_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as) 303{ | 220 221 ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, "raise immunity (%s)", 222 ofdm_trigger ? "ODFM" : "CCK"); 223 224 /* first: raise noise immunity */ 225 if (as->noise_imm_level < ATH5K_ANI_MAX_NOISE_IMM_LVL) { 226 ath5k_ani_set_noise_immunity_level(ah, as->noise_imm_level + 1); 227 return; --- 68 unchanged lines hidden (view full) --- 296 * ath5k_ani_lower_immunity() - Decrease noise immunity 297 * 298 * Try to lower noise immunity (=increase sensitivity) in several steps 299 * depending on the average RSSI of the beacons we received. 300 */ 301static void 302ath5k_ani_lower_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as) 303{ |
304 int rssi = ah->ah_beacon_rssi_avg.avg; | 304 int rssi = ewma_read(&ah->ah_beacon_rssi_avg); |
305 306 ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, "lower immunity"); 307 308 if (ah->ah_sc->opmode == NL80211_IFTYPE_AP) { 309 /* AP mode */ 310 if (as->firstep_level > 0) { 311 ath5k_ani_set_firstep_level(ah, as->firstep_level - 1); 312 return; --- 419 unchanged lines hidden --- | 305 306 ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI, "lower immunity"); 307 308 if (ah->ah_sc->opmode == NL80211_IFTYPE_AP) { 309 /* AP mode */ 310 if (as->firstep_level > 0) { 311 ath5k_ani_set_firstep_level(ah, as->firstep_level - 1); 312 return; --- 419 unchanged lines hidden --- |