Commit Graph

12 Commits

Author SHA1 Message Date
David Bauer
3c1dd5155d policy: export snr_to_signal to other source files
Export snr_to_signal to other source files. This will be necessary to
determine reported signal strengths from beacon-report throughout the
code base.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-01-09 02:09:26 +01:00
David Bauer
918b809d64 policy: only select candidates with better load
When kicking clients due to high channel load, explicitly only select
new candidates in case their channel load is an improvement over the
current node.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-01-09 02:01:05 +01:00
David Bauer
2ccb99e672 policy: remove redundant candidate evaluation
It is not necessary to check if the candidate is not considered
reverse-better, as this is already done inside is_better_candidate for
all relevant criteria.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-12-25 17:40:23 +01:00
David Bauer
bbf133ff46 policy: fix not selecting better candidate on request
A unset bitmask leads to the candidate selection always return no
candidate, even if there is one.

To select a better candidate regardless of it's classification, provide
a bitmask containing all selection criteria.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-12-25 17:40:04 +01:00
David Bauer
b4eb49e3fe policy: only select nodes with better signal when roaming
When determining a new node within the roam state machine, require the
destination node to have a better reported signal from the client.

Otherwise, the roam state machine might trigger a roam action for a
unsuitable destination node.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-11-25 23:18:29 +01:00
David Bauer
46e59767a4 policy: use correct reference signal
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-15 23:26:38 +02:00
David Bauer
1116fdb58a policy: avoid creating kick loop for client
When checking whether a client is allowed to associate to a node, the
lower ceiling for kicking clients was not taken into account when
assoc-steering is disabled.

The problem behind this is, that a configured lower barrier for
disassociating clients (kicking) would kick the client immediatly after
association. In the worst scenario the client immediatly associates
again to the station and ends up in a kick loop.

Don't allow associating when a min_snr is configured and the client
signal is below this value.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-10-15 15:50:42 +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
47794506ce policy: always accept assoc requests by default
Only steer using probe responses to avoid connection issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-12 12:15:28 +02:00
Felix Fietkau
d7a7f147fa policy: always accept auth requests
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-12 12:10:17 +02:00
Felix Fietkau
d10731f806 usteer: Initial import
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-11-12 15:37:10 +01:00