diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2019-10-11 15:20:37 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2019-10-11 15:20:37 +0000 |
commit | 80b3743d3c0e53464330a972c7872797f3dd8e92 (patch) | |
tree | 93e00d92221ef45be6d28acedeb9e696d1fcff50 | |
parent | 3766222f575812c2126c8b3a875094736dce810a (diff) |
Probe responses are generally only seen after probe requests,
which we only send if an SSID is already configured. Thus a
scan only creates beacons. Especially on bwfm(4) only beacons
frames are faked, there are no probe responses. When a node
first is created, ni_rssi is 0, which is always smaller than
rxi_rssi, and it wil never be set for nodes on 5 GHz. Thus we
should always set ni_rssi if it is 0.
Tested by jan@ tobhe@
ok stsp@ deraadt@
-rw-r--r-- | sys/net80211/ieee80211_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 389f7f775bb..19b17c38cc1 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_input.c,v 1.211 2019/10/06 16:11:17 stsp Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.212 2019/10/11 15:20:36 patrick Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe @@ -1750,7 +1750,7 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, struct mbuf *m, * measured RSSI. Some 5GHz APs send beacons with much * less Tx power than they use for probe responses. */ - if (isprobe) + if (isprobe || ni->ni_rssi == 0) ni->ni_rssi = rxi->rxi_rssi; else if (ni->ni_rssi < rxi->rxi_rssi) ni->ni_rssi = rxi->rxi_rssi; |