wifi-scripts: iwinfo: show units for signal and noise

Add 'dBm' units to 'Signal' and 'Noise' to match what non-ucode iwinfo shows.

Before:
  Signal: -49  Noise: -103

After:
  Signal: -49 dBm  Noise: -103 dBm

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18039
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Sean Khan 2025-02-19 19:34:30 -05:00 committed by Robert Marko
parent 9bcc287414
commit 0088a5a179

View file

@ -47,7 +47,7 @@ function print_info(list) {
printf(`${padding}Mode: ${bss.mode} Channel: ${bss.channel} (${bss.freq} GHz) HT Mode: ${bss.htmode}\n`);
printf(`${padding}Center Channel 1: ${bss.center_freq1} 2: ${bss.center_freq2}\n`);
printf(`${padding}Tx-Power: ${bss.txpower} dBm Link Quality: ${bss.quality}/70\n`);
printf(`${padding}Signal: ${bss.signal} Noise: ${bss.noise}\n`);
printf(`${padding}Signal: ${bss.signal} dBm Noise: ${bss.noise} dBm\n`);
printf(`${padding}Bit Rate: ${bss.bitrate == 'unknown' ? 'unknown' : bss.bitrate + ' MBit/s'}\n`);
printf(`${padding}Encryption: ${bss.encryption}\n`);
printf(`${padding}Type: nl80211 HW Mode(s): 802.11${bss.hwmode}\n`);