- Drop seen / last-connected as the list only contains currently
connected clients
- Convert past timestamps to relative age
- Include current roam-sm state
Signed-off-by: David Bauer <mail@david-bauer.net>
Always increase the kick-counter when usteer de-associates a STA. This
was previously exclusively done when kicking clients due to insufficient
SNR.
Signed-off-by: David Bauer <mail@david-bauer.net>
Fetch the age of the association for STAs in order to implement minimum
intervals after which a STA is considered kickable.
Signed-off-by: David Bauer <mail@david-bauer.net>
Query client MBO support from hostapd and display it in the output of
the connected_clients ubus method as "multi-band-operation".
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Only send the preferred candidate with a BSS transition request.
Otherwise, unsuitable candidates might be included in the neighbor-list
of a transition request.
Signed-off-by: David Bauer <mail@david-bauer.net>
Send link-measurement requests to every supporting local-sta in order to
acquire information to assess the link-quality bi-directional.
The link-measurement request is sent each configurable interval. It can
be disabled by configuring the interval to 0.
Signed-off-by: David Bauer <mail@david-bauer.net>
Generalize measurement handling in a way that RCPi and RSNI are stored
regardless of the specific measurement type. This allows us to handle
link-measurement reports the same way as we already handle
beacon-reports.
Signed-off-by: David Bauer <mail@david-bauer.net>
This adds a new band-steering component to usteer.
With band-steering enabled, usteer will attempt to move clients with a
consistently good SNR / signal from 2.4 GHz to the 5 GHz band.
In contrast to existing policies usteer tracks, band-steering is
non-invasive and will not lead to forceful connection termination.
Signed-off-by: David Bauer <mail@david-bauer.net>
Add a timeout in case a STA rejected a transition request. For this
configurable timeframe, usteer will refrain from steering the client
another time.
Signed-off-by: David Bauer <mail@david-bauer.net>
This prevents communication with other usteer nodes and allows it to be
used for purely local band steering / load balancing
Signed-off-by: Felix Fietkau <nbd@nbd.name>
BSS transition management as well as RRM capabilities have to be
considered not for the STA but per STA connection.
Most prominently, a STA might not support BSS-TM when connected without
PMF.
Signed-off-by: David Bauer <mail@david-bauer.net>
Add a method to obtain local-host specific state data about usteers
internal logic for each connected STA.
Signed-off-by: David Bauer <mail@david-bauer.net>
Add logic for saving measurement-reports from STAs.
This commit does not yet save the measurement-reports received from
clients but adds the necessary code to do so. Currently the codes can
only handle beacon-reports, but link measurements can be added to it in
the future.
It also adds the new config-key measurement_report_timeout which
controls how long measurements are saved upon they are received by a
STA.
Signed-off-by: David Bauer <mail@david-bauer.net>
Currently the min_snr option will result in kicking clients the first
time their SNR dips below.
This might not be desirable, as drivers (notably ath10k) sometimes
report a much lower RSSI for a short timeframe after returning to
sensible values. Also, a device might be in the process of roaming just
to be kicked before.
Add the min_snr_kick_delay option. A client will be kicked after this
timeframe when it's SNR is below the min_snr threshold value over the
complete timeframe.
Signed-off-by: David Bauer <mail@david-bauer.net>
Make usteer handle incoming BSS-transition requests. Update with the
most active roaming neighbors like we already do for imminent
disassociations.
Create a new ubus method which calls hostapds bss_transition_request
method. This does not set the disassoc imminent bit, thus will not
automatically disassoc the requesting STA.
Signed-off-by: David Bauer <mail@david-bauer.net>
Add an optional timeout when a better roaming candidate is not found
after the scan-retry limit. The roam state-machine will not retry
scanning before this timeout has expired.
If the timeout is set to 0, the client is kicked instead, which
resembles the behavior prior this commit.
This is added, as without this patch, if a forced disconnect
is not desired before roam_scan_trigger is exceeded the client will
repeatedly be asked to return active beacon-reports. For battery powered
clients this can result in a noticeable battery drain.
Signed-off-by: David Bauer <mail@david-bauer.net>
This reduces the return traffic from clients by only responding with
beacon reports for the current SSID.
Signed-off-by: David Bauer <mail@david-bauer.net>
The logic for customizing the remote_node_timeout config option was
missing. The default value of 10 could not be altered by a user.
Add the required logic and a short explanation of the config-option to
the default configuration.
Signed-off-by: David Bauer <mail@david-bauer.net>
Logic for handling STA transition to disconnected state is
present multiple times. Create a new method to remove
duplicate code.
Signed-off-by: David Bauer <mail@david-bauer.net>
Move the roam event counters to a dedicated struct.
Update the ubus output to represent this new organization.
Signed-off-by: David Bauer <mail@david-bauer.net>
Some clients seem to ignore scan requests with unreasonably high
measurement durations. This was observed with a Google Pixel 4A as well
as a Xiaomi Mi 10T.
Advertise a scan duration which closely matches the roam scan-interval.
This triggers scans more reliably with the aformentioned devices.
Signed-off-by: David Bauer <mail@david-bauer.net>
Don't request measurements from STAs which do not support the specific
measurement mode. Otherwise, hostapd complains in the syslog about
unsupported measurement modes.
Signed-off-by: David Bauer <mail@david-bauer.net>
Apply the same logic for selecting the most relevant neighbors also when
sending transition requests to STAs.
Signed-off-by: David Bauer <mail@david-bauer.net>
Prioritize neighbor candidates installed to hostapd. Add a new config
option to set a limit for neighbor reports installed to hostapd. This is
due to the fact, most devices will only evaluate a certain amount of
neighbor reports. Furthermore, the number of neighbor reports possible
is limited by the maximum frame size.
Signed-off-by: David Bauer <mail@david-bauer.net>
Keep track of STA journeys between multiple nodes. When a new STA is
reported from a foreign node, check whether this STA was previously
associated with a local node.
Vice versa, check upon association whether or not the STA was previously
associated with a foreign node.
Keep track of these roaming transactions using two new (local) fields of
the node struct.
Signed-off-by: David Bauer <mail@david-bauer.net>
The IEEE802.11-2016 specification says:
[...] a Channel Number field value of 255 indicates a request
to make iterative measurements for all supported channels in the
current operating class listed in the latest AP Channel Report
received from the serving AP.
The problem with this is, no AP Channel report is sent to the STA with
the measurement request.
To scan the whole Operating class, a channel number of 0 is desired:
[...] Channel Number field value of 0 indicates a request to make
iterative measurements for all supported channels in the operating
class [...]
Signed-off-by: David Bauer <mail@david-bauer.net>
Make the connection state of a sta-info more readable by introducing an
enum for the STA connection state.
Also switch come comparison cases to use the explicit enum values to
make the code more readable.
Signed-off-by: David Bauer <mail@david-bauer.net>
Add the node BSSID to the usteer_node struct. This will be helpful in
the future when evaluating beacon reports from STAs.
Signed-off-by: David Bauer <mail@david-bauer.net>
This adds optional support for message exchange using IPv6 multicast
messaging. This has the ability for routers and switches between nodes
to route traffic between usteer nodes multicast-aware.
By default, IPv4 is used. IPv6 can be enabled by configuring the ipv6
option to 1.
Signed-off-by: Jan Braun <keksgesicht23@gmail.com>
[squash commits - adapt usock usage]
Signed-off-by: David Bauer <mail@david-bauer.net>
- make logging events more structured
- add fine grained control over log events
- make it possible to receive more detailed events via ubus
Signed-off-by: Felix Fietkau <nbd@nbd.name>