luci-mod-network: fix legacy_rates option dependency
authorJo-Philipp Wich <[email protected]>
Mon, 9 Aug 2021 17:41:30 +0000 (19:41 +0200)
committerJo-Philipp Wich <[email protected]>
Mon, 9 Aug 2021 17:44:22 +0000 (19:44 +0200)
The recently introduced band option support changed the internal frequency
selector choice values, breaking the legacy rates option dependency.

Fixes: #5234
Fixes: 0829d31290 ("luci-mod-network: support newer wireless.wifi-device.band option")
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit fd2e755b6f30d80ffdf15536669fdb739212ac96)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js

index 5115a69eb6ef6e6de27dbca4f192d252f797e9bc..9cfb378906d7629caedbf6543c11c475b044fa49 100644 (file)
@@ -941,7 +941,7 @@ return view.extend({
 
                                if (hwtype == 'mac80211') {
                                        o = ss.taboption('general', form.Flag, 'legacy_rates', _('Allow legacy 802.11b rates'), _('Legacy or badly behaving devices may require legacy 802.11b rates to interoperate. Airtime efficiency may be significantly reduced where these are used. It is recommended to not allow 802.11b rates where possible.'));
-                                       o.depends({'_freq': '11g', '!contains': true});
+                                       o.depends({'_freq': '2g', '!contains': true});
 
                                        o = ss.taboption('general', CBIWifiTxPowerValue, 'txpower', _('Maximum transmit power'), _('Specifies the maximum transmit power the wireless radio may use. Depending on regulatory requirements and wireless usage, the actual transmit power may be reduced by the driver.'));
                                        o.wifiNetwork = radioNet;