Age | Commit message (Collapse) | Author |
|
current best rate, not worse than the rate currently being probed.
This seems to be a more accurate interpretation of the MiRA paper.
The paper says the interval for a rate needs to be updated if the rate's
goodput is worse than that of the "current transmission rate" (see the
"Adaptive probing interval" section). Our implementation interpreted
"current transmission rate" as "rate being probed right now" and adjusted
the interval of the previously probed rate. However, the context of this
section of the paper suggests that "current transmissions rate" intends to
refer to the currently selected best rate for our non-probing transmissions.
testing and ok tb@ jmatthew@
|
|
Media was displayed as e.g. "autoselect (OFDM6)" even though 11n was active
because the current media mode is changed to AUTO for background scanning
and was never switched back to 11N.
ok mpi@ pirofti@
|
|
equals the average measurement, i.e. if the standard deviation is zero.
Change comparisons of current measurement to the average measurement
from >= to > in the "channel becomes good" check, and from <= to < in
the "channel becomes bad" check.
The paper's equations are written with <= and >= and thus so was our
implementation. But checking for equality makes no sense in the context
of event-triggered probing: The intention is to react to changes in
channel quality, which occur for instance when a laptop moves around
or when RF noise comes and goes. When the current measurement and the
average measurement are equal, this means channel quality has not
changed at all and starting to probe for a new rate is not necessary.
We should probably even add a margin to avoid triggering probing
based on small fluctuations, but this can be done later.
ok tb@
|
|
current measurement, not before.
The MiRA paper mentions these calculations in the order we implemented them.
But the moving average and standard deviation depend on the value of the
goodput measurement, not the other way around.
ok tb@
|
|
ok stsp@
|
|
ok tb@ tobhe@ mpi@
|
|
theoretical throughput of another MCS.
Packet loss indicates that this MCS isn't necessarily going to be the best
choice, so do not allow lossy throughput measurements to win unchallenged.
ok tb@
|
|
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@
|
|
Avoids unnecessary re-probing in case a timeout had been scheduled already.
tweak + ok tb@
|
|
ok tb@
|
|
Resolves XXX comments regarding block-ack support.
with simplification tweak from + ok tb@
|
|
ok stsp
|
|
When describing the equation for computing a sub-frame error rate (SFER) the
MiRA paper uses "hardware retries" to refer to the number of times a frame,
which eventually failed entirely, was retransmitted (a situation our drivers
would call "txfail"), and "nBad" to refer to frames which were "received
with errors" (and this is what our drivers would call "retries").
Because of my misunderstanding of the wording used in the paper our
SFER equation ended up with the "retries" and "nBad" variables swapped.
Swapping them back produces more meaningful results with reasonable
frame loss percentages based on the counters passed in by drivers.
ok tb@
|
|
Actual QoS support could be added to net80211 in the future, but for now we
only use QoS frames for A-MPDU aggregation. Without QoS support, sending
non-aggregated QoS frames does not actually buy us anything and makes it
harder to look at packet captures and tell whether frames sent by an OpenBSD
machine were in fact aggregated or not.
Tested on iwn(4) by jmc@, paco@, bket@, paco@, and Lauri Tirkkonen
|
|
When sizing a memory allocation for a probe response frame, the AP used
the SSID length stored in the node structure which represents the client,
but used the actual length of the SSID when copying it into the frame.
If the actual length is sufficiently large this will result in corruption
of an adjacent mbuf on the free list since m->m_next will be overwritten
with data written to the tail of the probe response frame.
Bad things happen later on when the adjacent mbuf is used. Sometimes
the corruption is detected by mbufpl's use-after-free checking, at
other times we end up crashing somewhere in the network stack.
To prevent such a mistake from occuring again I am removing the 'ni'
argument from ieee80211_get_probe_resp() altogether. It is not needed.
A quick workaround is to configure a short SSID.
Debugged with help from claudio, kettenis, and dlg.
ok claudio
|
|
reconnect to the AP
OK stsp@
|
|
immediately instead of waiting to (randomly) switch away and switch
back.
Found by martijn@
OK stsp@
|
|
that will also trigger background scans, remain with the current AP.
Avoids ping-pong in environments where APs are tuned for low transmit
range, such as 36c3.
ok phessler benno
|
|
ok phessler benno
|
|
ok phessler
|
|
Some peers will eagerly try to negotiate block ack (asking us to reserve
buffer space) before they are done authenticating themselves. No thanks.
Just let them try again later.
ok mpi@
|
|
as well as pulling frames off the Rx block ack reordering queue, when
an incoming frame above the current seqnum window forces us to slide
the window forward, potentially losing frames within the old window.
Leaving the seqnum window out of sync with the queue would cause needlessly
long stalls in traffic until the window moved again for some other reason.
Problem observed on lossy wifi whenever netstat -W indicated an increasing
"input block ack window slides" counter. With this fix, stalled frames can
be observed only for a relatively short amount of time whenever one or more
frames in the current window are lost.
ok mpi@
|
|
Firmware-based Tx retries were disabled when it was found that MiRA
makes better choices while probing with a constant Tx retry rate.
Before that change, high Tx rates looked better than they actually
were. The change resulted in less retries and thus higher throughput
because a lower, but actually working, initial Tx rate eventually
became the preferred choice.
However, disallowing retries at lower rates also resulted in increased
amounts of observable packet loss, especially while the connection to
the AP was still fresh and bad Tx rates had not been discovered yet.
To get the best of both worlds, use a constant Tx rate for retries while
MiRA is probing and otherwise allow firmware fallback to lower rates.
tested by Tracey Emery, pamela, jasper, and myself, on 7265/8265/9260
|
|
|
|
by an ioctl if the driver had not yet initialized the channel map.
Crash reported by nayden@
ok sthen@
|
|
From now on, this behaviour must be explicitly enabled with ifconfig join "".
ok sthen jcs deraadt
|
|
the next selection of networks from the join list. Prevents endless
attempts to connect to an AP which is out of reach but still somehow
manages to get a beacon or two across to us during scan.
Tested with wifi networks at the University of Bucharest.
Makes switching wifi networks possible after walking to a different
room without having to down/up the interface or suspend/resume.
ok phessler@
|
|
This will update the list of cached APs for future invocations of the
'scan' command, and will force a search for a better AP to roam to.
ok sthen@ phessler@
|
|
ok mpi@
|
|
to APs that are relatively far away and suffer some packet loss.
The former threshold was 7 beacons (about 700 ms).
This raises the threshold to 30 beacons (about 3 seconds).
Should still be good enough for detecting APs that have disappeared, and
makes wifi networks provided by the University of Bucharest more reliable
in the p2k19 hackroom.
While here, make 'ifconfig iwm0/iwn0 debug' print an obvious message when
we believe that the AP has disappeared.
Problem reported and fix tested by landry@ / pirofti@
ok mpi@ sthen@
|
|
This helps a bit in situations where a single AP is used and background scans
are causing packet loss, as seen with Jesper Wellin's Broadcom-based AP and my
Android phone in hotspot mode. This is not a proper fix but our background scan
frequency against a single AP was much higher than needed anyway.
Tested by jan, job, benno, Tracey Emery, Jesper Wallin
|
|
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@
|
|
PS-poll and BA-req frames are in fact being processed.
Do not count such frames as discarded control frames.
OK phessler kn mpi
|
|
AP on a new channel. Not doing so leads to a disconnect because AP
messages on the new channel are ignored.
|
|
This reduces drops caused by the ifq pressure drop mechanism and hence
increases throughput. Such drops are visible with e.g. 'netstat -dnI iwm0'.
Not all affected drivers have been tested yet but these changes are largely
mechanical and should be safe. As usual, please report any regressions.
With help from dlg@ and mpi@
Problem found by robert@
Tested by robert, jmc, Tracey Emer, Matthias Schmidt, florian, Björn Ketelaars
ok mpi@
|
|
ifconfig display them in 'scan' output and on the ieee80211 status line if
the failure is applicable to an already selected AP (e.g. wrong WPA key).
This will hopefully reduce the amount of help requests for what often
turn out to be trivial misconfiguration issues that were previously
hard to diagnose without debug mode.
ifconfig must be recompiled with the new ieee80211_ioctl.h to stay in
sync with the kernel. A full 'make build' will do the right thing!
Very helpful input by mpi@ and deraadt@
|
|
are in media autoselect mode.
The interface might have been switched to a fixed PHY mode during association
and keeping it fixed will mislead AP selection after roaming failure.
Problem found and diagnosed at CCC camp 2019
Tested by myself, fkr@, chris@
|
|
Prevents WPA APs from appearing as non-WPA APs to the AP selection logic.
The decision whether or not to parse the IE was made as a side-effect
of a check for the highest mutually supported version of WPA.
We can safely assume that all our drivers support WPA versions <= 2
and parse the IE regardless of whether WPA is currently active or not.
ok mpi@
|
|
wiping the entire cache every time a scan is triggered.
This has benefits for userland programs trying to look at scan results,
and for drivers which don't get a full view from hardware on every scan.
Nodes will still be evicted from the cache in one of several ways:
Add a new way of timing out inactive nodes which don't send a beacon
within 10 scan iterations, for client mode only. This should get rid
of stale APs if we're scanning for some time in a changing environment.
If we fail to associate a few times, the corresponding node is removed.
If net80211 transitions back to INIT state (e.g. because of a
user-initiated configuration change) all nodes are removed.
When a background scan starts all nodes will be removed. This could be
revisited later but has been intentionally left as-is for now.
Tested by myself, jmc@, benno@, procter@ on iwm(4), athn(4) and ral(4).
|
|
This assignment to ic_curmode is redundant because it already occurs
inside ieee80211_setmode(), and channel information in selbs and ni
is equivalent after node_copy().
ok mpi@ kevlo@
|
|
offload, it needn't be. the stack must otherwise rely on every
offloading driver correctly handling all frames governed by a
given key.
ok stsp@
|
|
In particular, add Tx block ack session management to net80211, with
enough funcionality to support Tx aggregation on devices which perform
A-MPDU subframe scheduling in firmware.
Make use of the iwn(4) firmware Tx scheduler to build A-MPDUs.
net80211's QoS support code is now enabled and used by Tx aggregation.
A-MSDU frames inside A-MPDUs have been tested and work in principle.
For now, this feature is disabled because unfair TCP connection sharing
was observed during testing, where bursts of TCP Ack frames for a single
tcpbench(1) connection arriving in A-MSDUs made other TCP connections stall.
Switch off support for A-MSDUs inside A-MPDUs on the Rx side as well.
Tested on iwn chipsets 1000, 4965, 5100, 5300, 2200, 6200, 6205, 6300
(committed version of tested diff has all debug printfs removed)
tests/ok benno kmos mlarkin kevlo
|
|
by actually overwriting the relevant bits in ni_htop1.
ok tedu@ phessler@ kettenis@
|
|
Fixes stalling TCP connections on wifi in some situations.
testing jmatthew@, jmc@, Bruno Flueckiger, Micah Muer, Matthias Schmidt
|
|
The 'mode' command is supposed to force a wireless interface into 11a/b/g/n
media mode. This stopped working some time ago, probably during my work on
background scanning. Problem spotted by mlarkin@ who noticed that interfaces
were using 11g mode while forced to 11b mode.
ok phessler, jmatthew (earlier version)
relentless testing by krw@
|
|
The "recursion in end_scan()" problem is apparently still present in
the committed version of the diff (reported by krw@).
|
|
The 'mode' command is supposed to force a wireless interface into 11a/b/g/n
media mode. This stopped working some time ago, probably during my work on
background scanning. Problem spotted by mlarkin@ who noticed that interfaces
were using 11g mode while forced to 11b mode.
ok phessler, jmatthew
|
|
ok kettenis@
|
|
in ieee80211com's ic_flags because we haven't been paying attention to
them (they're not in the same place in the code and hence easy to miss).
Move them to a dedicated variable to avoid this problem in the future.
Add a new 'stayauth' nwflag which can be set to let net80211 ignore
deauth frames. This can be useful when deauth frames are being
persistently spoofed by an attacker. Idea from beck@
ok beck@ phessler@
|
|
ok mpi@
|