Skip to content

Commit b65e77c

Browse files
krish2718rlubos
authored andcommitted
[nrf fromtree] wifi: shell: Display RSSI only for station mode
RSSI makes sense only for modes that have a single peer, so, add a station mode check. Signed-off-by: Chaitanya Tata <[email protected]> (cherry picked from commit eaba474)
1 parent 85a2548 commit b65e77c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

subsys/net/l2/wifi/wifi_shell.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,9 @@ static int cmd_wifi_status(const struct shell *sh, size_t argc, char *argv[])
656656
wifi_security_txt(status.security));
657657
shell_fprintf(sh, SHELL_NORMAL, "MFP: %s\n",
658658
wifi_mfp_txt(status.mfp));
659-
shell_fprintf(sh, SHELL_NORMAL, "RSSI: %d\n", status.rssi);
659+
if (status.iface_mode == WIFI_MODE_INFRA) {
660+
shell_fprintf(sh, SHELL_NORMAL, "RSSI: %d\n", status.rssi);
661+
}
660662
shell_fprintf(sh, SHELL_NORMAL, "Beacon Interval: %d\n", status.beacon_interval);
661663
shell_fprintf(sh, SHELL_NORMAL, "DTIM: %d\n", status.dtim_period);
662664
shell_fprintf(sh, SHELL_NORMAL, "TWT: %s\n",

0 commit comments

Comments
 (0)