diff --git a/drivers/wifi/nxp/nxp_wifi_drv.c b/drivers/wifi/nxp/nxp_wifi_drv.c index cd6ea6b024a182e..53041d1497ca242 100644 --- a/drivers/wifi/nxp/nxp_wifi_drv.c +++ b/drivers/wifi/nxp/nxp_wifi_drv.c @@ -1356,10 +1356,12 @@ static int nxp_wifi_set_twt(const struct device *dev, struct wifi_twt_params *pa twt_setup_conf.implicit = params->setup.implicit; twt_setup_conf.announced = params->setup.announce; twt_setup_conf.trigger_enabled = params->setup.trigger; + twt_setup_conf.twt_info_disabled = params->setup.twt_info_disable; twt_setup_conf.negotiation_type = params->negotiation_type; twt_setup_conf.twt_wakeup_duration = params->setup.twt_wake_interval; twt_setup_conf.flow_identifier = params->flow_id; twt_setup_conf.hard_constraint = 1; + twt_setup_conf.twt_exponent = params->setup.exponent; twt_setup_conf.twt_mantissa = params->setup.twt_interval; twt_setup_conf.twt_request = params->setup.responder; ret = wlan_set_twt_setup_cfg(&twt_setup_conf); diff --git a/include/zephyr/net/wifi_mgmt.h b/include/zephyr/net/wifi_mgmt.h index 29e92efa0dfda00..e2e6c8000d4b493 100644 --- a/include/zephyr/net/wifi_mgmt.h +++ b/include/zephyr/net/wifi_mgmt.h @@ -752,6 +752,10 @@ struct wifi_twt_params { * prepare the data before TWT SP starts. */ uint32_t twt_wake_ahead_duration; + /** TWT info enabled or disable */ + bool twt_info_disable; + /** TWT exponent */ + uint8_t exponent; } setup; /** Setup specific parameters */ struct { diff --git a/subsys/net/l2/wifi/wifi_shell.c b/subsys/net/l2/wifi/wifi_shell.c index affa25b33ac27ed..a42304e626612bb 100644 --- a/subsys/net/l2/wifi/wifi_shell.c +++ b/subsys/net/l2/wifi/wifi_shell.c @@ -1609,6 +1609,8 @@ static int twt_args_to_params(const struct shell *sh, size_t argc, char *argv[], {"wake-interval", required_argument, 0, 'w'}, {"interval", required_argument, 0, 'i'}, {"wake-ahead-duration", required_argument, 0, 'D'}, + {"info-disable", required_argument, 0, 'd'}, + {"exponent", required_argument, 0, 'e'}, {"help", no_argument, 0, 'h'}, {0, 0, 0, 0}}; @@ -1703,6 +1705,21 @@ static int twt_args_to_params(const struct shell *sh, size_t argc, char *argv[], params->setup.twt_wake_ahead_duration = (uint32_t)value; break; + case 'd': + if (!parse_number(sh, &value, state->optarg, NULL, 0, 1)) { + return -EINVAL; + } + params->setup.twt_info_disable = (bool)value; + break; + + case 'e': + if (!parse_number(sh, &value, state->optarg, NULL, 0, + WIFI_MAX_TWT_EXPONENT)) { + return -EINVAL; + } + params->setup.exponent = (uint8_t)value; + break; + case 'h': return -ENOEXEC; } @@ -3323,9 +3340,11 @@ SHELL_STATIC_SUBCMD_SET_CREATE(wifi_twt_ops, "<-w --wake-interval>: 1-262144us\n" "<-i --interval>: 1us-2^31us\n" "<-D --wake-ahead-duration>: 0us-2^31us\n" + "<-d --info-disable>: 0/1\n" + "<-e --exponent>: 0-63\n" "[-h, --help]: Print out command usage.\n", cmd_wifi_twt_setup, - 23, 1), + 27, 1), SHELL_CMD_ARG( btwt_setup, NULL, " Start a BTWT flow:\n"