diff options
author | Andre Heider <a.heider@gmail.com> | 2022-11-23 13:29:22 +0100 |
---|---|---|
committer | Andre Heider <a.heider@gmail.com> | 2023-01-23 14:51:28 +0100 |
commit | 01c5a63934392ab66c66c594fbd93a796e36d6e6 (patch) | |
tree | 97d66d04aa43f753c462d88f2119b9b3ed3cc20f /modules/luci-mod-network | |
parent | abad257fbbe75b67f9507a96f73ac4772d73c248 (diff) |
luci-mod-network: use "band" from iwinfo freqlist
Instead of mapping it by frequency.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'modules/luci-mod-network')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 3c6f51afeb..a2b0c84ce2 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -319,19 +319,11 @@ var CBIWifiFrequencyValue = form.Value.extend({ }; for (var i = 0; i < data[1].length; i++) { - var band; - - if (data[1][i].mhz >= 2412 && data[1][i].mhz <= 2484) - band = '2g'; - else if (data[1][i].mhz >= 5160 && data[1][i].mhz <= 5885) - band = '5g'; - else if (data[1][i].mhz >= 5925 && data[1][i].mhz <= 7125) - band = '6g'; - else if (data[1][i].mhz >= 58320 && data[1][i].mhz <= 69120) - band = '60g'; - else + if (!data[1][i].band) continue; + var band = '%dg'.format(data[1][i].band); + this.channels[band].push( data[1][i].channel, '%d (%d Mhz)'.format(data[1][i].channel, data[1][i].mhz), |