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.

Signed-off-by: Hui Bai <[email protected]>
  • Loading branch information
nxf58150 authored and dkalowsk committed Nov 8, 2024
1 parent 41064c8 commit 6798064
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 6798064

Please sign in to comment.