wifi-scripts: don't set wpa_pairwise for wpa=0 main master
authorLeon M. Busch-George <leon@georgemail.eu>
Thu, 18 Dec 2025 21:24:51 +0000 (22:24 +0100)
committerRobert Marko <robimarko@gmail.com>
Tue, 30 Dec 2025 09:39:06 +0000 (10:39 +0100)
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>
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc

index 942fef059a44affd11bd94aa1e460c6367a0fcf0..5b7b14b6ff838c595f3744be7a91c67294308fe6 100644 (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;