diff --git a/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 69200e35a..e979ecad4 100644 --- a/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -1809,24 +1809,26 @@ return view.extend({ o.placeholder = '201'; o.rmempty = true; - if (L.hasSystemFeature('hostapd', 'ocv') || L.hasSystemFeature('wpasupplicant', 'ocv')) { - o = ss.taboption('encryption', form.ListValue, 'ocv', _('Operating Channel Validation'), _("Note: Workaround mode allows a STA that claims OCV capability to connect even if the STA doesn't send OCI or negotiate PMF.")); - o.value('0', _('Disabled')); - o.value('1', _('Enabled')); - o.value('2', _('Enabled (workaround mode)')); - o.default = '0'; - o.depends('ieee80211w', '1'); - o.depends('ieee80211w', '2'); + if (not (string.find(uci.get('openmptcprouter','settings','version'), '5.4'))) { + if (L.hasSystemFeature('hostapd', 'ocv') || L.hasSystemFeature('wpasupplicant', 'ocv')) { + o = ss.taboption('encryption', form.ListValue, 'ocv', _('Operating Channel Validation'), _("Note: Workaround mode allows a STA that claims OCV capability to connect even if the STA doesn't send OCI or negotiate PMF.")); + o.value('0', _('Disabled')); + o.value('1', _('Enabled')); + o.value('2', _('Enabled (workaround mode)')); + o.default = '0'; + o.depends('ieee80211w', '1'); + o.depends('ieee80211w', '2'); - o.validate = function(section_id, value) { - var modeopt = this.section.children.filter(function(o) { return o.option == 'mode' })[0], - modeval = modeopt.formvalue(section_id); + o.validate = function(section_id, value) { + var modeopt = this.section.children.filter(function(o) { return o.option == 'mode' })[0], + modeval = modeopt.formvalue(section_id); - if ((value == '2') && ((modeval == 'sta') || (modeval == 'sta-wds'))) { - return _('Workaround mode can only be used when acting as an access point.'); + if ((value == '2') && ((modeval == 'sta') || (modeval == 'sta-wds'))) { + return _('Workaround mode can only be used when acting as an access point.'); + } + + return true; } - - return true; } }