policy: count kick total
authorDavid Bauer <mail@david-bauer.net>
Wed, 17 Aug 2022 22:41:41 +0000 (00:41 +0200)
committerDavid Bauer <mail@david-bauer.net>
Thu, 18 Aug 2022 13:30:28 +0000 (15:30 +0200)
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>
policy.c
ubus.c

index bb10be58963be2e16eb321f2e815f9a2a022ba3c..3d21f324d4deade118cc1f853d4ffa25a5870d7f 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -477,8 +477,6 @@ usteer_local_node_snr_kick(struct usteer_local_node *ln)
                if (si->below_min_snr <= min_count)
                        continue;
 
-               si->kick_count++;
-
                ev.type = UEV_SIGNAL_KICK;
                ev.threshold.cur = si->signal;
                ev.count = si->kick_count;
diff --git a/ubus.c b/ubus.c
index 756f25332ed0c9179edbc4672a0aa9f0f4170276..92442b3da6df8be50484d7ff7500f642bf184d37 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -751,6 +751,7 @@ void usteer_ubus_kick_client(struct sta_info *si)
        blobmsg_add_u8(&b, "deauth", 1);
        ubus_invoke(ubus_ctx, ln->obj_id, "del_client", b.head, NULL, 0, 100);
        usteer_sta_disconnected(si);
+       si->kick_count++;
        si->roam_kick = current_time;
 }