|
@@ -54,6 +54,12 @@
|
|
*/
|
|
*/
|
|
#define IEEE80211_SIGNAL_AVE_WEIGHT 3
|
|
#define IEEE80211_SIGNAL_AVE_WEIGHT 3
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * How many Beacon frames need to have been used in average signal strength
|
|
|
|
+ * before starting to indicate signal change events.
|
|
|
|
+ */
|
|
|
|
+#define IEEE80211_SIGNAL_AVE_MIN_COUNT 4
|
|
|
|
+
|
|
#define TMR_RUNNING_TIMER 0
|
|
#define TMR_RUNNING_TIMER 0
|
|
#define TMR_RUNNING_CHANSW 1
|
|
#define TMR_RUNNING_CHANSW 1
|
|
|
|
|
|
@@ -1555,13 +1561,16 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
|
|
ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE;
|
|
ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE;
|
|
ifmgd->ave_beacon_signal = rx_status->signal * 16;
|
|
ifmgd->ave_beacon_signal = rx_status->signal * 16;
|
|
ifmgd->last_cqm_event_signal = 0;
|
|
ifmgd->last_cqm_event_signal = 0;
|
|
|
|
+ ifmgd->count_beacon_signal = 1;
|
|
} else {
|
|
} else {
|
|
ifmgd->ave_beacon_signal =
|
|
ifmgd->ave_beacon_signal =
|
|
(IEEE80211_SIGNAL_AVE_WEIGHT * rx_status->signal * 16 +
|
|
(IEEE80211_SIGNAL_AVE_WEIGHT * rx_status->signal * 16 +
|
|
(16 - IEEE80211_SIGNAL_AVE_WEIGHT) *
|
|
(16 - IEEE80211_SIGNAL_AVE_WEIGHT) *
|
|
ifmgd->ave_beacon_signal) / 16;
|
|
ifmgd->ave_beacon_signal) / 16;
|
|
|
|
+ ifmgd->count_beacon_signal++;
|
|
}
|
|
}
|
|
if (bss_conf->cqm_rssi_thold &&
|
|
if (bss_conf->cqm_rssi_thold &&
|
|
|
|
+ ifmgd->count_beacon_signal >= IEEE80211_SIGNAL_AVE_MIN_COUNT &&
|
|
!(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) {
|
|
!(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) {
|
|
int sig = ifmgd->ave_beacon_signal / 16;
|
|
int sig = ifmgd->ave_beacon_signal / 16;
|
|
int last_event = ifmgd->last_cqm_event_signal;
|
|
int last_event = ifmgd->last_cqm_event_signal;
|