diff --git a/src/include/ubus.h b/src/include/ubus.h index 2eb3828..2987941 100644 --- a/src/include/ubus.h +++ b/src/include/ubus.h @@ -6,6 +6,13 @@ #include "datastorage.h" +#define WLAN_STATUS_SUCCESS 0 +#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17 + +// Disassociation Reason +#define UNSPECIFIED_REASON 0 +#define NO_MORE_STAS 5 + void start_umdns_update(); int dawn_init_ubus(const char *ubus_socket, const char *hostapd_dir); diff --git a/src/storage/datastorage.c b/src/storage/datastorage.c index 98c361e..4dccd69 100644 --- a/src/storage/datastorage.c +++ b/src/storage/datastorage.c @@ -450,7 +450,7 @@ void kick_clients(uint8_t bssid[], uint32_t id) { // don't deauth station? // maybe we can use handovers... - del_client_interface(id, client_array[j].client_addr, 5, 0, 1000); + del_client_interface(id, client_array[j].client_addr, NO_MORE_STAS, 0, 1000); client_array_delete(client_array[j]); // don't delete clients in a row. use update function again... diff --git a/src/utils/ubus.c b/src/utils/ubus.c index 2429afb..786f8ac 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -9,9 +9,6 @@ #define ETH_ALEN 6 #endif -#define WLAN_STATUS_SUCCESS 0 -#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17 - #define REQ_TYPE_PROBE 0 #define REQ_TYPE_AUTH 1 #define REQ_TYPE_ASSOC 2