wifi-scripts: don't set wpa_pairwise for wpa=0

Without this patch, the

    if (!config.wpa)
	  	config.wpa_pairwise = null;

is overwritten immediately.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Link: https://github.com/openwrt/openwrt/pull/21215
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Leon M. Busch-George 2025-12-18 22:24:51 +01:00 committed by Robert Marko
parent fb15ef4b23
commit bc4e7fd38e

View file

@ -16,10 +16,11 @@ export function parse_encryption(config, dev_config) {
config.wpa = v;
break;
}
if (!config.wpa)
config.wpa_pairwise = null;
config.wpa_pairwise = (config.hw_mode == 'ad') ? 'GCMP' : 'CCMP';
config.wpa_pairwise = null;
if (config.wpa)
config.wpa_pairwise = (config.hw_mode == 'ad') ? 'GCMP' : 'CCMP';
config.auth_type = encryption[0] ?? 'none';
let wpa3_pairwise = config.wpa_pairwise;