mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-05 00:53:32 +08:00
luci-app-mtwifi-cfg: check channel/htmode before uci set
This commit is contained in:
parent
1b99cd51c5
commit
0bbf681b20
@ -579,14 +579,11 @@ var CBIWifiFrequencyValue = form.Value.extend({
|
||||
},
|
||||
|
||||
write: function(section_id, value) {
|
||||
uci.set('wireless', section_id, 'htmode', value[0] || null);
|
||||
|
||||
if (this.useBandOption)
|
||||
uci.set('wireless', section_id, 'band', value[1]);
|
||||
else
|
||||
uci.set('wireless', section_id, 'hwmode', (value[1] == '2g') ? '11g' : '11a');
|
||||
|
||||
uci.set('wireless', section_id, 'channel', value[2]);
|
||||
if (value[0] && value[1] && value[2])
|
||||
{
|
||||
uci.set('wireless', section_id, 'htmode', value[0]);
|
||||
uci.set('wireless', section_id, 'channel', value[2]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user