net: mgmt: Update app of TWT teardown status
Update user/app status of TWT teardown sessions. Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
This commit is contained in:
parent
62c8b066c0
commit
3053484dcb
|
@ -345,6 +345,14 @@ enum wifi_twt_fail_reason {
|
|||
WIFI_TWT_FAIL_FLOW_ALREADY_EXISTS,
|
||||
};
|
||||
|
||||
/** Wi-Fi Target Wake Time (TWT) teradown status. */
|
||||
enum wifi_twt_teardown_status {
|
||||
/** TWT teardown success */
|
||||
WIFI_TWT_TEARDOWN_SUCCESS = 0,
|
||||
/** TWT teardown failure */
|
||||
WIFI_TWT_TEARDOWN_FAILED,
|
||||
};
|
||||
|
||||
/** @cond INTERNAL_HIDDEN */
|
||||
static const char * const wifi_twt_err_code_tbl[] = {
|
||||
[WIFI_TWT_FAIL_UNSPECIFIED] = "Unspecified",
|
||||
|
|
|
@ -470,6 +470,8 @@ struct wifi_twt_params {
|
|||
enum wifi_twt_setup_cmd setup_cmd;
|
||||
/** TWT setup response status, see enum wifi_twt_setup_resp_status */
|
||||
enum wifi_twt_setup_resp_status resp_status;
|
||||
/** TWT teardown cmd status, see enum wifi_twt_teardown_status */
|
||||
enum wifi_twt_teardown_status teardown_status;
|
||||
/** Dialog token, used to map requests to responses */
|
||||
uint8_t dialog_token;
|
||||
/** Flow ID, used to map setup with teardown */
|
||||
|
|
|
@ -290,8 +290,13 @@ static void handle_wifi_twt_event(struct net_mgmt_event_callback *cb)
|
|||
(const struct wifi_twt_params *)cb->info;
|
||||
|
||||
if (resp->operation == WIFI_TWT_TEARDOWN) {
|
||||
print(context.sh, SHELL_NORMAL, "TWT teardown received for flow ID %d\n",
|
||||
resp->flow_id);
|
||||
if (resp->teardown_status == WIFI_TWT_TEARDOWN_SUCCESS) {
|
||||
print(context.sh, SHELL_NORMAL, "TWT teardown received for flow ID %d\n",
|
||||
resp->flow_id);
|
||||
} else {
|
||||
print(context.sh, SHELL_NORMAL, "TWT teardown failed for flow ID %d\n",
|
||||
resp->flow_id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue