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>
This commit is contained in:
David Bauer
2021-11-28 23:20:48 +01:00
parent 806e647cbc
commit 55e98d852c
4 changed files with 10 additions and 5 deletions

2
ubus.c
View File

@@ -578,7 +578,7 @@ void usteer_ubus_kick_client(struct sta_info *si)
blobmsg_add_u32(&b, "reason", config.load_kick_reason_code);
blobmsg_add_u8(&b, "deauth", 1);
ubus_invoke(ubus_ctx, ln->obj_id, "del_client", b.head, NULL, 0, 100);
si->connected = STA_NOT_CONNECTED;
usteer_sta_disconnected(si);
si->roam_kick = current_time;
}