diff --git a/package/mtk/applications/luci-app-mtwifi-cfg/root/usr/share/luci-app-mtwifi-cfg/wireless-mtk.js b/package/mtk/applications/luci-app-mtwifi-cfg/root/usr/share/luci-app-mtwifi-cfg/wireless-mtk.js index 494a61c592..55bc25a2bc 100644 --- a/package/mtk/applications/luci-app-mtwifi-cfg/root/usr/share/luci-app-mtwifi-cfg/wireless-mtk.js +++ b/package/mtk/applications/luci-app-mtwifi-cfg/root/usr/share/luci-app-mtwifi-cfg/wireless-mtk.js @@ -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]); + } } });