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>
This commit is contained in:
David Bauer
2021-09-27 19:35:55 +02:00
parent 30f9ba7617
commit d3ff0d59da
5 changed files with 17 additions and 11 deletions

2
ubus.c
View File

@@ -540,7 +540,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 = 0;
si->connected = STA_NOT_CONNECTED;
si->roam_kick = current_time;
}