summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2020-03-05 11:50:25 +0000
committerstsp <stsp@openbsd.org>2020-03-05 11:50:25 +0000
commit2dd933285fc06cf9d38ae41fdd02d614fa449eef (patch)
tree0f67f488ae55be42cbba4f7e0f7ca29222b17c00 /sys
parentCancel MiRA probing timeouts if a channel quality change triggers probing. (diff)
downloadwireguard-openbsd-2dd933285fc06cf9d38ae41fdd02d614fa449eef.tar.xz
wireguard-openbsd-2dd933285fc06cf9d38ae41fdd02d614fa449eef.zip
Fix a MiRa probing short-cut comparing current to previous measurements.
When checking if a previously probed MCS had a better measurement, do not allow the current MCS being probed to win right away. Otherwise we may end up sticking to our current Tx rate even if further probing would yield a better result. ok tb@
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211_mira.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_mira.c b/sys/net80211/ieee80211_mira.c
index 34bee05d88a..d86fb3356ca 100644
--- a/sys/net80211/ieee80211_mira.c
+++ b/sys/net80211/ieee80211_mira.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_mira.c,v 1.21 2020/03/05 11:49:26 stsp Exp $ */
+/* $OpenBSD: ieee80211_mira.c,v 1.22 2020/03/05 11:50:25 stsp Exp $ */
/*
* Copyright (c) 2016 Stefan Sperling <stsp@openbsd.org>
@@ -791,7 +791,7 @@ ieee80211_mira_intra_mode_ra_finished(struct ieee80211_mira_node *mn,
/* Check if we had a better measurement at a previously probed MCS. */
best_mcs = ieee80211_mira_best_mcs_in_rateset(mn, rs);
- if ((mn->probed_rates & (1 << best_mcs))) {
+ if (best_mcs != ni->ni_txmcs && (probed_rates & (1 << best_mcs))) {
if ((mn->probing & IEEE80211_MIRA_PROBING_UP) &&
best_mcs < ni->ni_txmcs) {
ieee80211_mira_trigger_next_rateset(mn, ni);