On 2018 Apr 30 (Mon) at 10:55:22 +0200 (+0200), Stefan Sperling wrote:
:Setting aside concerns about my lack of understanding of the underlying
:reason for this behaviour, the hack below is sufficient to make this AP
:show up as a strong contender in the candidate list and be preferred
:over 2GHz as it should be.
:
:Should I commit this hack? I don't see any downsides.
:
OK
:Index: ieee80211_input.c
:===================================================================
:RCS file: /cvs/src/sys/net80211/ieee80211_input.c,v
:retrieving revision 1.200
:diff -u -p -r1.200 ieee80211_input.c
:--- ieee80211_input.c 29 Apr 2018 12:11:48 -0000 1.200
:+++ ieee80211_input.c 30 Apr 2018 08:32:58 -0000
:@@ -1689,13 +1689,26 @@ ieee80211_recv_probe_resp(struct ieee802
: memcpy(ni->ni_essid, &ssid[2], ssid[1]);
: }
: IEEE80211_ADDR_COPY(ni->ni_bssid, wh->i_addr3);
:- ni->ni_rssi = rxi->rxi_rssi;
:+ /* XXX validate channel # */
:+ ni->ni_chan = &ic->ic_channels[chan];
:+ if (ic->ic_state == IEEE80211_S_SCAN &&
:+ IEEE80211_IS_CHAN_5GHZ(ni->ni_chan)) {
:+ /*
:+ * During a scan on 5Ghz, prefer RSSI measured for probe
:+ * response frames. i.e. don't allow beacons to lower the
:+ * measured RSSI. Some 5GHz APs send beacons with much
:+ * less Tx power than they use for probe responses.
:+ */
:+ if (isprobe)
:+ ni->ni_rssi = rxi->rxi_rssi;
:+ else if (ni->ni_rssi < rxi->rxi_rssi)
:+ ni->ni_rssi = rxi->rxi_rssi;
:+ } else
:+ ni->ni_rssi = rxi->rxi_rssi;
: ni->ni_rstamp = rxi->rxi_tstamp;
: memcpy(ni->ni_tstamp, tstamp, sizeof(ni->ni_tstamp));
: ni->ni_intval = bintval;
: ni->ni_capinfo = capinfo;
:- /* XXX validate channel # */
:- ni->ni_chan = &ic->ic_channels[chan];
: ni->ni_erp = erp;
: /* NB: must be after ni_chan is setup */
: ieee80211_setup_rates(ic, ni, rates, xrates, IEEE80211_F_DOSORT);
:
--
I doubt, therefore I might be.