Skip to content

Commit

Permalink
net: wifi: Fix 11k command errors
Browse files Browse the repository at this point in the history
Add condition check so that the 11k flag will be updated for set
operation only.
Fix print log error when getting 11k status.

(cherry picked from commit 6798064)

Original-Signed-off-by: Hui Bai <hui.bai@nxp.com>
GitOrigin-RevId: 6798064
Cr-Build-Id: 8731843854160875777
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8731843854160875777
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: I38d8cf8e23cc6c223933e52b92f1de8916ff8c79
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6004815
Reviewed-by: Yuval Peress <peress@google.com>
Tested-by: Yuval Peress <peress@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Commit-Queue: Yuval Peress <peress@google.com>
  • Loading branch information
nxf58150 authored and Chromeos LUCI committed Nov 8, 2024
1 parent 7d8b853 commit 2ec2eb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion subsys/net/l2/wifi/wifi_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,9 @@ static int wifi_11k_cfg(uint32_t mgmt_request, struct net_if *iface,
}

#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING
roaming_params.is_11k_enabled = params->enable_11k;
if (params->oper == WIFI_MGMT_SET) {
roaming_params.is_11k_enabled = params->enable_11k;
}
#endif

return wifi_mgmt_api->cfg_11k(dev, params);
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 @@ -1248,7 +1248,7 @@ static int cmd_wifi_11k(const struct shell *sh, size_t argc, char *argv[])
}

if (params.oper == WIFI_MGMT_GET) {
PR("11k is %s\n", params.enable_11k ? "disabled" : "enabled");
PR("11k is %s\n", params.enable_11k ? "enabled" : "disabled");
} else {
PR("%s %s requested\n", argv[0], argv[1]);
}
Expand Down

0 comments on commit 2ec2eb9

Please sign in to comment.