policy: add min_snr_kick_delay
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>
This commit is contained in:
10
policy.c
10
policy.c
@@ -422,6 +422,7 @@ usteer_local_node_roam_check(struct usteer_local_node *ln, struct uevent *ev)
|
||||
static void
|
||||
usteer_local_node_snr_kick(struct usteer_local_node *ln)
|
||||
{
|
||||
unsigned int min_count = DIV_ROUND_UP(config.min_snr_kick_delay, config.local_sta_update);
|
||||
struct uevent ev = {
|
||||
.node_local = &ln->node,
|
||||
};
|
||||
@@ -438,7 +439,14 @@ usteer_local_node_snr_kick(struct usteer_local_node *ln)
|
||||
if (si->connected != STA_CONNECTED)
|
||||
continue;
|
||||
|
||||
if (si->signal >= min_signal)
|
||||
if (si->signal >= min_signal) {
|
||||
si->below_min_snr = 0;
|
||||
continue;
|
||||
} else {
|
||||
si->below_min_snr++;
|
||||
}
|
||||
|
||||
if (si->below_min_snr <= min_count)
|
||||
continue;
|
||||
|
||||
si->kick_count++;
|
||||
|
Reference in New Issue
Block a user