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 <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24586
(cherry picked from commit 00045786e6)
Link: https://github.com/openwrt/openwrt/pull/24762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Lech Perczak authored and Hauke Mehrtens committed 2026-08-20 22:45:45 +02:00
1 parent 689bf360e5
commit d0d5556fcc
1 file changed
+1 -1
@@ -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';