Skip to content

Commit 55ed46f

Browse files
ajayparidafabiobaltieri
authored andcommitted
net: wifi_mgmt: Updated TWT setup response status
Updated TWT setup response status. Removed un-necessary error strings, enum and values updated as per f/w. Signed-off-by: Ajay Parida <[email protected]>
1 parent e94c33d commit 55ed46f

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

include/zephyr/net/wifi.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,8 @@ static const char * const wifi_twt_setup_cmd2str[] = {
320320

321321
enum wifi_twt_setup_resp_status {
322322
/* TWT Setup response status */
323-
WIFI_TWT_RESP_NOT_RECEIVED = 0,
324-
WIFI_TWT_RESP_PROCESSING,
325-
};
326-
327-
static const char * const wifi_twt_setup_resp2str[] = {
328-
/* TWT Setup response status */
329-
[WIFI_TWT_RESP_NOT_RECEIVED] = "TWT response not received",
323+
WIFI_TWT_RESP_RECEIVED = 0,
324+
WIFI_TWT_RESP_NOT_RECEIVED,
330325
};
331326

332327
#endif /* ZEPHYR_INCLUDE_NET_WIFI_H_ */

subsys/net/l2/wifi/wifi_shell.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,7 @@ static void handle_wifi_twt_event(struct net_mgmt_event_callback *cb)
153153
const struct wifi_twt_params *resp =
154154
(const struct wifi_twt_params *)cb->info;
155155

156-
if (resp->resp_status == WIFI_TWT_RESP_NOT_RECEIVED) {
157-
print(context.sh, SHELL_NORMAL, "TWT response status: %s\n",
158-
wifi_twt_setup_resp2str[resp->resp_status]);
159-
} else {
156+
if (resp->resp_status == WIFI_TWT_RESP_RECEIVED) {
160157
print(context.sh, SHELL_NORMAL, "TWT response: %s for dialog: %d and flow: %d\n",
161158
wifi_twt_setup_cmd2str[resp->setup_cmd], resp->dialog_token, resp->flow_id);
162159

@@ -168,6 +165,8 @@ static void handle_wifi_twt_event(struct net_mgmt_event_callback *cb)
168165
resp->setup.twt_wake_interval_ms,
169166
resp->setup.twt_interval_ms);
170167
}
168+
} else {
169+
print(context.sh, SHELL_NORMAL, "TWT response timed out\n");
171170
}
172171
}
173172

0 commit comments

Comments
 (0)