Skip to content

Modify btwt_setup usage #89294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NXP-Liam-Li
Copy link
Contributor

subsys: net: l2: wifi: Modify btwt_setup usage.

Usage:
wifi twt btwt_setup <sta_wait> <offset>
<twtli> <session_num>
<id0> <mantissa0> <exponent0> <nominal_wake0>
<id1> <mantissa1> <exponent1> <nominal_wake1>
<idx> <mantissax> <exponentx> <nominal_wakex>
The total number of '0, 1, ..., x' is session_num

For example:
wifi twt btwt_setup 0 0 0 2 0 112 10 128 1 32 10 64

drivers: nxp: wifi: Modify shim driver to support btwt changes.

Align struct wlan_btwt_config_t in shim driver
with nxp wifi driver.

Comment on lines 1896 to 1986
if (err) {
PR_ERROR("Parse btwt parameters (err %d)\n", err);
return -EINVAL;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only checks the status of the latest conversion. I think you need to verify the status after every call to shell_strtol()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


if (!parse_number(sh, &value, argv[idx++], NULL, 1, 0xFFFF)) {
if (err) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, the error status needs to be checked after every conversion call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -702,6 +702,20 @@ struct wifi_ps_params {
enum wifi_ps_exit_strategy exit_strategy;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message is missing why this change is needed.
Also information about this change could be placed to migration guide

Copy link
Contributor Author

@NXP-Liam-Li NXP-Liam-Li Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soft ap supports WIFI_BTWT_AGREEMENT_MAX BTWT sessions. The BTWT parameters for each session can be different.

The current usage can only set one set of parameters. All sessions follow this set of parameters.

Add enhance code to support setting different BTWT parameters for every sessions.

Also add this information in commit message.

@NXP-Liam-Li NXP-Liam-Li force-pushed the update_btwt_usage branch 3 times, most recently from e341ce2 to 1224e1f Compare April 30, 2025 09:57
@NXP-Liam-Li NXP-Liam-Li requested a review from jukkar May 7, 2025 03:05
@NXP-Liam-Li
Copy link
Contributor Author

@jukkar please review.

Soft ap supports WIFI_BTWT_AGREEMENT_MAX BTWT sessions.
The BTWT parameters for each session can be different.

The current usage can only set one set of parameters.
All sessions follow this set of parameters.

Add enhance code to support setting different
BTWT parameters for every sessions.

Usage:
wifi twt btwt_setup <sta_wait> <offset>
<twtli> <session_num>
<id0> <mantissa0> <exponent0> <nominal_wake0>
<id1> <mantissa1> <exponent1> <nominal_wake1>
<idx> <mantissax> <exponentx> <nominal_wakex>
The total number of '0, 1, ..., x' is session_num

For example:
wifi twt btwt_setup 0 0 0 2 0 112 10 128 1 32 10 64

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
@github-actions github-actions bot requested a review from George-Stefan May 26, 2025 02:23
Align struct wlan_btwt_config_t in shim driver
with nxp wifi driver.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants