Skip to content

Commit 6798064

Browse files
nxf58150dkalowsk
authored andcommitted
net: wifi: Fix 11k command errors
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]>
1 parent 41064c8 commit 6798064

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

subsys/net/l2/wifi/wifi_mgmt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,9 @@ static int wifi_11k_cfg(uint32_t mgmt_request, struct net_if *iface,
741741
}
742742

743743
#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING
744-
roaming_params.is_11k_enabled = params->enable_11k;
744+
if (params->oper == WIFI_MGMT_SET) {
745+
roaming_params.is_11k_enabled = params->enable_11k;
746+
}
745747
#endif
746748

747749
return wifi_mgmt_api->cfg_11k(dev, params);

subsys/net/l2/wifi/wifi_shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ static int cmd_wifi_11k(const struct shell *sh, size_t argc, char *argv[])
12481248
}
12491249

12501250
if (params.oper == WIFI_MGMT_GET) {
1251-
PR("11k is %s\n", params.enable_11k ? "disabled" : "enabled");
1251+
PR("11k is %s\n", params.enable_11k ? "enabled" : "disabled");
12521252
} else {
12531253
PR("%s %s requested\n", argv[0], argv[1]);
12541254
}

0 commit comments

Comments
 (0)