-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
modules: hostap: 11k/v/r roaming support #78684
base: main
Are you sure you want to change the base?
Conversation
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
The 11kvr roaming RFC link: #76307 |
modules/hostap/src/supp_api.c
Outdated
if (params && strlen(params->ssid)) { | ||
if (strlen(params->ssid) > WIFI_SSID_MAX_LEN) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use here a temporary variable for ssid length, now the length is calculated three times in this function which is pointless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a local variable for ssid length. Thanks!
subsys/net/l2/wifi/wifi_shell.c
Outdated
|
||
context.sh = sh; | ||
|
||
if (argc != 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we show the current 11k status if user does not give a parameter. And only show the warning if user gives wrong number of parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. The new command "wifi 11k
" will be used to get 11k status (enabled or disabled) if no parameter was given.
subsys/net/l2/wifi/wifi_shell.c
Outdated
@@ -2909,6 +2978,10 @@ SHELL_STATIC_SUBCMD_SET_CREATE(wifi_commands, | |||
cmd_wifi_btm_query, | |||
2, 0), | |||
#endif | |||
SHELL_CMD_ARG(11k_enable, NULL, "<0/1>\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a big fan of just giving 0/1 here, it would be more logical if user could just say "enable" or "disable".
So wifi 11k enable
or wifi 11k disable
or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. The new command "wifi 11k [enable/disable]
" can be used to enable or disable 11k, instead of giving paramter 0/1.
subsys/net/l2/wifi/wifi_shell.c
Outdated
} | ||
(void)memcpy((void *)params.ssid, (const void *)argv[2], | ||
(size_t)strlen(argv[2])); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
subsys/net/l2/wifi/wifi_shell.c
Outdated
if (argc == 3) | ||
PR("%s %s %s requested\n", argv[0], argv[1], argv[2]); | ||
else | ||
PR("%s requested\n", argv[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{}
are missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added {}
modules/hostap/src/supp_api.c
Outdated
if (!wpa_cli_cmd_v("set_network %d key_mgmt WPA-PSK", | ||
resp.network_id)) { | ||
if (!wpa_cli_cmd_v("set_network %d key_mgmt WPA-PSK%s", | ||
resp.network_id, params->ft_used ? " FT-PSK" : "")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
@@ -249,6 +249,9 @@ if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE | |||
default 16384 | |||
endif | |||
|
|||
config WIFI_NM_WPA_SUPPLICANT_ROAMING | |||
bool "Roaming support" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could there be a help text also describing the supported roaming functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added help text.
@@ -75,6 +75,8 @@ static void supp_shell_connect_status(struct k_work *work); | |||
static K_WORK_DELAYABLE_DEFINE(wpa_supp_status_work, | |||
supp_shell_connect_status); | |||
|
|||
#define STR_CUR_TO_END(cur) (cur) = (&(cur)[0] + strlen((cur))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes the length to be calculated multiple times when this is called, why not have a len parameter in this macro and calculate the value only once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This macro define is not created in this PR. I just moved it to this location. This macro define was created and used for DPP feature.
modules/hostap/src/supp_api.c
Outdated
char cmd[100] = {0}; | ||
char *pos = cmd; | ||
char *end = pos + 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you have a define for the array length, or alternatively use sizeof. It is error prone to hard code the value as they can become mismatched if changed later.
So we could say here char *end = pos + sizeof(cmd);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Added new macro define for the array length.
@@ -73,6 +73,8 @@ CONFIG_ZPERF_WORK_Q_THREAD_PRIORITY=3 | |||
CONFIG_NET_SOCKETS_SERVICE_THREAD_PRIO=3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In commit subsys: net: Increase net_mgmt task priority
, please remove the subsys:
prefix as that is not needed to mention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed subsys:
in commit message.
6bfcd76
to
4a76bbd
Compare
f9f47bd
to
e8bd2a4
Compare
Add 11k cmds support. User can issue 11k cmds to enable/disable 11k and send Neighbor Report Request packet. Signed-off-by: Hui Bai <hui.bai@nxp.com>
Add 80211R support in hostap. Add cmd wifi connect option '-R' to enable 80211R. Signed-off-by: Hui Bai <hui.bai@nxp.com>
Added new ops and events in glue layer to support roaming. Added new flag WIFI_NM_WPA_SUPPLICANT_ROAMING to control roaming feature. Signed-off-by: Hui Bai <hui.bai@nxp.com>
Originally, the net_mgmt task priority is very low. Based on roaming implementation, roaming is triggered in net_mgmt task. When running UDP test while doing roaming, the net_mgmt task won't have much chance to run and roaming can't be triggered. Increase it to 3, which is same value of supplicant task. Signed-off-by: Hui Bai <hui.bai@nxp.com>
Update hostap repo in west.yml Signed-off-by: Hui Bai <hui.bai@nxp.com>
e8bd2a4
to
cc509bc
Compare
Added 11k/v/r roaming support.