summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin2024-12-11 11:02:18 +0000
committerJohn Crispin2024-12-11 11:28:43 +0000
commit3ab1a69339cf2f98046480474be712e18919b6db (patch)
tree002e460f8f19007f72975eb7148d5b7e87433c2e
parent4c60fba3d809ff30bad1baae03b90b208b7afe0d (diff)
downloadopenwrt-3ab1a69339cf2f98046480474be712e18919b6db.tar.gz
wifi-scripts: ucode: fix parsing of legacy hwmode option
Signed-off-by: John Crispin <john@phrozen.org>
-rw-r--r--package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc4
-rw-r--r--package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc2
2 files changed, 3 insertions, 3 deletions
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
index f7eaa2741d..c7baa8d85b 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
@@ -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
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
index 69805a4b6f..daddb801ef 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
@@ -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':