mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-07 01:53:34 +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) {
|
write: function(section_id, value) {
|
||||||
uci.set('wireless', section_id, 'htmode', value[0] || null);
|
if (value[0] && value[1] && value[2])
|
||||||
|
{
|
||||||
if (this.useBandOption)
|
uci.set('wireless', section_id, 'htmode', value[0]);
|
||||||
uci.set('wireless', section_id, 'band', value[1]);
|
uci.set('wireless', section_id, 'channel', value[2]);
|
||||||
else
|
}
|
||||||
uci.set('wireless', section_id, 'hwmode', (value[1] == '2g') ? '11g' : '11a');
|
|
||||||
|
|
||||||
uci.set('wireless', section_id, 'channel', value[2]);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user