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:
parent
9f8a553d19
commit
31d7943bcd
1 changed files with 30 additions and 26 deletions
|
@ -205,6 +205,7 @@ return view.extend({
|
||||||
scanCache[results[i].bssid].data.stale = false;
|
scanCache[results[i].bssid].data.stale = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (band + 'g' == radio.dev.get('band')) {
|
||||||
if (scanCache[local_wifi.bssid] == null)
|
if (scanCache[local_wifi.bssid] == null)
|
||||||
scanCache[local_wifi.bssid] = {};
|
scanCache[local_wifi.bssid] = {};
|
||||||
|
|
||||||
|
@ -236,6 +237,7 @@ return view.extend({
|
||||||
'%h'.format(local_wifi.bssid)
|
'%h'.format(local_wifi.bssid)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (var k in scanCache)
|
for (var k in scanCache)
|
||||||
if (scanCache[k].data.stale)
|
if (scanCache[k].data.stale)
|
||||||
|
@ -266,6 +268,8 @@ return view.extend({
|
||||||
chan_width = 2;
|
chan_width = 2;
|
||||||
|
|
||||||
/* Skip WiFi not supported by the current band */
|
/* Skip WiFi not supported by the current band */
|
||||||
|
if (band != res.band)
|
||||||
|
continue;
|
||||||
if (chan_analysis.offset_tbl[res.channel] == null)
|
if (chan_analysis.offset_tbl[res.channel] == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue