luci-app-mtwifi-cfg: fix noscan option

This commit is contained in:
hanwckf 2024-01-01 15:19:18 +08:00
parent a913be490b
commit c545172bdb

View File

@ -935,6 +935,7 @@ return view.extend({
s.addModalOptions = function(s) {
return network.getWifiNetwork(s.section).then(function(radioNet) {
var hwtype = uci.get('wireless', radioNet.getWifiDeviceName(), 'type');
var band = uci.get('wireless', radioNet.getWifiDeviceName(), 'band');
var ifmode = radioNet.getMode();
var o, ss;
@ -1010,8 +1011,10 @@ return view.extend({
o = ss.taboption('advanced', CBIWifiCountryValue, 'country', _('Country Code'));
o.wifiNetwork = radioNet;
o = ss.taboption('advanced', form.Flag, 'noscan', _('Force 40MHz mode'), _('Always use 40MHz channels even if the secondary channel overlaps. Using this option does not comply with IEEE 802.11n-2009!'));
o.depends({'_freq': '2g', '!contains': true});
if (band == '2g') {
o = ss.taboption('advanced', form.Flag, 'noscan', _('Force 40MHz mode'), _('Always use 40MHz channels even if the secondary channel overlaps. Using this option does not comply with IEEE 802.11n-2009!'));
o.rmempty = false;
}
o = ss.taboption('advanced', form.Flag, 'mu_beamformer', _('MU-MIMO'));