luci-mod-network: wifi_join.js: Add WPA3 support
Signed-off-by: Antoine Deschênes <antoine@antoinedeschenes.com> [squashed commits, cherry-picked into openwrt-19.07 branch] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
1f6d7fdc10
commit
c981cfd02a
1 changed files with 26 additions and 8 deletions
|
@ -29,21 +29,39 @@ function format_signal(bss) {
|
|||
}
|
||||
|
||||
function format_encryption(bss) {
|
||||
var enc = bss.encryption || { }
|
||||
var enc = bss.encryption || {};
|
||||
var WPA = 1, WPA2 = 2, WPA3 = 4;
|
||||
var wpa_label;
|
||||
|
||||
if (enc.wep === true)
|
||||
return 'WEP';
|
||||
else if (enc.wpa > 0)
|
||||
else if (enc.wpa > 0) {
|
||||
switch (enc.wpa) {
|
||||
case WPA2|WPA3:
|
||||
wpa_label = _('mixed WPA2/WPA3');
|
||||
break;
|
||||
case WPA3:
|
||||
wpa_label = _('WPA3');
|
||||
break;
|
||||
case WPA|WPA2:
|
||||
wpa_label = _('mixed WPA/WPA2');
|
||||
break;
|
||||
case WPA2:
|
||||
wpa_label = _('WPA2');
|
||||
break;
|
||||
default:
|
||||
wpa_label = _('WPA');
|
||||
}
|
||||
|
||||
return E('abbr', {
|
||||
title: 'Pairwise: %h / Group: %h'.format(
|
||||
enc.pair_ciphers.join(', '),
|
||||
enc.group_ciphers.join(', '))
|
||||
},
|
||||
'%h - %h'.format(
|
||||
(enc.wpa === 3) ? _('mixed WPA/WPA2') : (enc.wpa === 2 ? 'WPA2' : 'WPA'),
|
||||
enc.auth_suites.join(', ')));
|
||||
else
|
||||
return E('em', enc.enabled ? _('unknown') : _('open'));
|
||||
},
|
||||
'%h - %h'.format(wpa_label, enc.auth_suites.join(', ')));
|
||||
}
|
||||
|
||||
return E('em', enc.enabled ? _('unknown') : _('open'));
|
||||
}
|
||||
|
||||
function format_actions(dev, type, bss) {
|
||||
|
|
Loading…
Reference in a new issue