@@ -887,6 +887,9 @@ static int cmd_wifi_ps(const struct shell *sh, size_t argc, char *argv[])
887
887
config .twt_flows [i ].trigger ,
888
888
config .twt_flows [i ].twt_wake_interval ,
889
889
config .twt_flows [i ].twt_interval );
890
+ shell_fprintf (context .sh , SHELL_NORMAL ,
891
+ "TWT Wake ahead duration : %d us\n" ,
892
+ config .twt_flows [i ].twt_wake_ahead_duration );
890
893
}
891
894
}
892
895
return 0 ;
@@ -1045,7 +1048,7 @@ static int cmd_wifi_twt_setup(const struct shell *sh, size_t argc,
1045
1048
1046
1049
context .sh = sh ;
1047
1050
1048
- if (argc != 11 ) {
1051
+ if (argc != 12 ) {
1049
1052
shell_fprintf (sh , SHELL_WARNING , "Invalid number of arguments\n" );
1050
1053
shell_help (sh );
1051
1054
return - ENOEXEC ;
@@ -1105,6 +1108,11 @@ static int cmd_wifi_twt_setup(const struct shell *sh, size_t argc,
1105
1108
}
1106
1109
params .setup .twt_interval = (uint64_t )value ;
1107
1110
1111
+ if (!parse_number (sh , & value , argv [idx ++ ], 0 , WIFI_MAX_TWT_WAKE_AHEAD_DURATION_US )) {
1112
+ return - EINVAL ;
1113
+ }
1114
+ params .setup .twt_wake_ahead_duration = (uint32_t )value ;
1115
+
1108
1116
if (net_mgmt (NET_REQUEST_WIFI_TWT , iface , & params , sizeof (params ))) {
1109
1117
shell_fprintf (sh , SHELL_WARNING , "%s with %s failed. reason : %s\n" ,
1110
1118
wifi_twt_operation_txt (params .operation ),
@@ -1798,9 +1806,10 @@ SHELL_STATIC_SUBCMD_SET_CREATE(wifi_twt_ops,
1798
1806
"<negotiation_type, 0: Individual, 1: Broadcast, 2: Wake TBTT>\n"
1799
1807
"<setup_cmd: 0: Request, 1: Suggest, 2: Demand>\n"
1800
1808
"<dialog_token: 1-255> <flow_id: 0-7> <responder: 0/1> <trigger: 0/1> <implicit:0/1> "
1801
- "<announce: 0/1> <twt_wake_interval: 1-262144us> <twt_interval: 1us-2^31us>.\n" ,
1809
+ "<announce: 0/1> <twt_wake_interval: 1-262144us> <twt_interval: 1us-2^31us>.\n"
1810
+ "<twt_wake_ahead_duration>: 0us-2^31us>\n" ,
1802
1811
cmd_wifi_twt_setup ,
1803
- 11 , 0 ),
1812
+ 12 , 0 ),
1804
1813
SHELL_CMD_ARG (teardown , NULL , " Teardown a TWT flow:\n"
1805
1814
"<negotiation_type, 0: Individual, 1: Broadcast, 2: Wake TBTT>\n"
1806
1815
"<setup_cmd: 0: Request, 1: Suggest, 2: Demand>\n"
0 commit comments