Commit Graph

13 Commits

Author SHA1 Message Date
David Bauer
4458b6f1bf usteer: expose STA link measurement capability
Indicate STA capability for handling link-measurement requests in
connected_clients output.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-03-31 23:57:55 +02:00
David Bauer
f4e120c9a3 band-steering: add band-steering component
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>
2022-03-18 21:46:29 +01:00
David Bauer
648c6f3bc3 policy: make roam-steers client-rejectable
While usteer tries it's best to determine the availability of a better
node for a certain client, it might still attempt to direct the client
to a unsuitable AP.

Transition away from using BSS-Transition-Requests with the
disassoc-imminent bit set and instead unset this bit.

This way, the client can inform the AP it will not transition to a
different BSS but instead wishes to remain connected to the current AP.

usteer will still kick clients in case they either accepted the
BSS-transition-request and do not roam or ignore the request completely.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-03-18 21:42:33 +01:00
David Bauer
98247d1eda usteer: track RRM and BSS-TM support per connection
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>
2022-02-19 16:10:49 +01:00
David Bauer
b0dab90887 measurement: add handling of measurements
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>
2022-02-03 22:50:13 +01:00
David Bauer
022635c9bd policy: don't track roam_scan_done
Don't determine a finished client scan based on whether the current node
has seen a beacon or not.

This works surprisingly bad on 5 GHz nodes, as clients may refuse to
perform active scanning on this frequency band. In case the clients does
refuse to scan the 5 GHz band but scans the 2.4 GHz band actively, we
might have a good indication about a better node on this band at least.

However, as the roam state-machine requires to have seen a probe request
from the client to direct him to a better node, thi process will not
continue, which either ends the node in being kicked due to exceeding
the number of max tries or the scan cooldown to kick in.

The solution to this is fairly simple: Don't track the roam_scan_done
state but instead just determine a better candidate after the scan
interval finished.

To ensure the indicated signal levels are as recent as 2 *
scan-interval, add a max_age parameter to find_better_candidate.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-01-23 20:55:41 +01:00
David Bauer
55e98d852c sta: uniform disconnect state handling
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>
2022-01-09 01:59:53 +01:00
David Bauer
806e647cbc sta: remove duplicate code
Move the sta frequency-seen logic to usteer_sta_info_update.

This method is called on every occurence the seen frequency
is set now, thus removing the duplicate code.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-01-09 01:57:32 +01:00
David Bauer
5d5a0be202 ubus: don't request measurement from unsupported STAs
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>
2021-11-25 23:04:56 +01:00
David Bauer
bee2caf184 sta: schedule sta_info timeout on creation
The codes looks to have a race-condition, where disconnected sta_infos
are created without scheduling a timeout.

As sta_infos are not connected by default, schedule the timeout upon
sta_info creation.

Fixes spurious spamming of "Refuse to add an already expired station
entry" on remote nodes.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-29 19:37:48 +02:00
David Bauer
d3ff0d59da sta: add sta_connection_state enum
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>
2021-10-15 15:50:25 +02:00
Felix Fietkau
2b1c740ce3 rework log handling
- 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>
2021-04-16 14:55:57 +02:00
Felix Fietkau
d10731f806 usteer: Initial import
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-11-12 15:37:10 +01:00