luci-mod-status: only add infos if the band matches

This prevents adding entries to mismatching bands when a channel
number exists on more than one band.

Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2023-07-31 19:52:35 +02:00 committed by Christian Marangi
parent 9f8a553d19
commit 31d7943bcd

View file

@ -205,6 +205,7 @@ return view.extend({
scanCache[results[i].bssid].data.stale = false;
}
if (band + 'g' == radio.dev.get('band')) {
if (scanCache[local_wifi.bssid] == null)
scanCache[local_wifi.bssid] = {};
@ -236,6 +237,7 @@ return view.extend({
'%h'.format(local_wifi.bssid)
]);
}
}
for (var k in scanCache)
if (scanCache[k].data.stale)
@ -266,6 +268,8 @@ return view.extend({
chan_width = 2;
/* Skip WiFi not supported by the current band */
if (band != res.band)
continue;
if (chan_analysis.offset_tbl[res.channel] == null)
continue;