Skip to content

Commit

Permalink
driver: wifi: nxp: 11k neighbor request support for embedded supplicant
Browse files Browse the repository at this point in the history
Add 11k neighbor request support for embedded supplicant.

Signed-off-by: Gang Li <[email protected]>
  • Loading branch information
gangli02 committed Jan 8, 2025
1 parent c99a61a commit c64d3b7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions drivers/wifi/nxp/nxp_wifi_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,26 @@ static int nxp_wifi_11k_cfg(const struct device *dev, struct wifi_11k_params *pa

return 0;
}

static int nxp_wifi_11k_neighbor_request(const struct device *dev, struct wifi_11k_params *params)
{
int ret = WM_SUCCESS;

if (params != NULL) {
if (strlen(params->ssid) > WIFI_SSID_MAX_LEN) {
LOG_ERR("ssid too long");
return -EINVAL;
}

ret = wlan_host_11k_neighbor_req(params->ssid);
if (ret != WM_SUCCESS) {
LOG_ERR("send neighbor report request fail");
return -EAGAIN;
}
}

return 0;
}
#endif

static int nxp_wifi_power_save(const struct device *dev, struct wifi_ps_params *params)
Expand Down Expand Up @@ -1866,6 +1886,7 @@ static const struct wifi_mgmt_ops nxp_wifi_sta_mgmt = {
#endif
#ifdef CONFIG_NXP_WIFI_11K
.cfg_11k = nxp_wifi_11k_cfg,
.send_11k_neighbor_request = nxp_wifi_11k_neighbor_request,
#endif
.set_power_save = nxp_wifi_power_save,
.get_power_save_config = nxp_wifi_get_power_save,
Expand Down
2 changes: 1 addition & 1 deletion subsys/net/l2/wifi/wifi_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ static int cmd_wifi_11k_neighbor_request(const struct shell *sh, size_t argc, ch

context.sh = sh;

if ((argc != 1 && argc != 3) || (argc == 3 && !strncasecmp("ssid", argv[1], 4))) {
if ((argc != 1 && argc != 3) || (argc == 3 && strncasecmp("ssid", argv[1], 4))) {
PR_WARNING("Invalid input arguments\n");
PR_WARNING("Usage: %s\n", argv[0]);
PR_WARNING("or %s ssid <ssid>\n", argv[0]);
Expand Down

0 comments on commit c64d3b7

Please sign in to comment.