mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
wifi-scripts: ucode: fix parsing of legacy hwmode option
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
parent
4c60fba3d8
commit
3ab1a69339
@ -17,8 +17,8 @@ let phy_capabilities = {};
|
||||
/* make sure old style UCI and hwmode and newer band properties are correctly resolved */
|
||||
function set_device_defaults(config) {
|
||||
/* validate the hw mode */
|
||||
if (config.hwmode in [ '11a', '11b', '11g', '11ad' ])
|
||||
config.hw_mode = substr(config.hwmode, 2);
|
||||
if (config.hw_mode in [ '11a', '11b', '11g', '11ad' ])
|
||||
config.hw_mode = substr(config.hw_mode, 2);
|
||||
else if (config.channel > 14)
|
||||
config.hw_mode = 'a';
|
||||
else
|
||||
|
@ -6,7 +6,7 @@ import * as fs from 'fs';
|
||||
export function parse_encryption(config) {
|
||||
let encryption = split(config.encryption, '+', 2);
|
||||
|
||||
config.wpa_pairwise = (config.hwmode == 'ad') ? 'GCMP' : 'CCMP';
|
||||
config.wpa_pairwise = (config.hw_mode == 'ad') ? 'GCMP' : 'CCMP';
|
||||
|
||||
switch(encryption[1]){
|
||||
case 'tkip+aes':
|
||||
|
Loading…
Reference in New Issue
Block a user