From d0d5556fcc4beea323864eead147865687f867bf Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Tue, 11 Aug 2026 00:53:43 +0200 Subject: [PATCH] wifi-scripts: fix default cipher selection for 11ad in iface.uc hw_mode property is only present in device configuration section, not the interface section, so testing for config.hw_mode in iface.parse_encryption is wrong. Test for (dev_config.band == 60g) instead, this will cause GCMP to be properly selected instead of CCMP unless set explicitly, and while at that will cover both hostapd and wpa_supplicant cases. Signed-off-by: Lech Perczak Link: https://github.com/openwrt/openwrt/pull/24586 (cherry picked from commit 00045786e600de8f73c5b521fb97ef1d8e4045e0) Link: https://github.com/openwrt/openwrt/pull/24762 Signed-off-by: Hauke Mehrtens --- .../wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 428df2d2faa..7afb65e3f67 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 @@ -114,7 +114,7 @@ export function parse_encryption(config, dev_config, phy_features) { if (!config.wpa) config.wpa_pairwise ??= null; - else if (config.hw_mode == 'ad') + else if (dev_config.band == '60g') config.wpa_pairwise ??= 'GCMP'; else if (config.gcmp256 && phy_features?.cipher_gcmp256) config.wpa_pairwise ??= 'GCMP-256 CCMP';