luci-mod-network: support newer wireless.wifi-device.band option 5110/head
authorJo-Philipp Wich <jo@mein.io>
Wed, 9 Jun 2021 07:59:15 +0000 (09:59 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 9 Jun 2021 08:03:54 +0000 (10:03 +0200)
commit0829d31290e7c902743fbd86ea91b06ee90c6e42
tree24d5c7d5bf9be880be1341f3dd17c726944d423b
parentb4c394f2d275ab093a16d994333da4f104e1723f
luci-mod-network: support newer wireless.wifi-device.band option

OpenWrt switched from "option hwmode" to "option band" in order to select
the frequency band to use for the radio phy.

Extend the channel selector to recognize and use an existing "option band"
to select the appropriate channel list. When operating upon a wireless
configuration still using "option hwmode", then translate it to a band
value internally and translate it back to "option hwmode" on save.

This should provide forward- and backwards compatibility with both current
OpenWrt master and older versions still using hwmode.

Fixes: #5106
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js