From cc42d16b1c6bb26dcabe754a485a7b2d0ca8ac02 Mon Sep 17 00:00:00 2001 From: Kapil Bhatt Date: Wed, 22 May 2024 14:45:28 +0530 Subject: [PATCH] net: wifi: Add disconnection success code When disconnect request is successful, the status was taking as WIFI_REASON_DISCONN_UNSPECIFIED only. Adding WIFI_REASON_DISCONN_SUCCESS which can be help to determine status of disconnect request. If this status is failed then reason can be useful. Signed-off-by: Kapil Bhatt --- include/zephyr/net/wifi_mgmt.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/zephyr/net/wifi_mgmt.h b/include/zephyr/net/wifi_mgmt.h index 0442a91c2f2..8c2b61fa936 100644 --- a/include/zephyr/net/wifi_mgmt.h +++ b/include/zephyr/net/wifi_mgmt.h @@ -427,8 +427,10 @@ enum wifi_conn_status { * in the disconnect result event for detailed reason. */ enum wifi_disconn_reason { + /** Success, overload status as reason */ + WIFI_REASON_DISCONN_SUCCESS = 0, /** Unspecified reason */ - WIFI_REASON_DISCONN_UNSPECIFIED = WIFI_STATUS_DISCONN_FIRST_STATUS, + WIFI_REASON_DISCONN_UNSPECIFIED, /** Disconnected due to user request */ WIFI_REASON_DISCONN_USER_REQUEST, /** Disconnected due to AP leaving */