]> git.ipfire.org Git - thirdparty/openwrt.git/commit
wifi-scripts: ucode: simplify wpa_pairwise default selection
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 19 Apr 2026 20:26:59 +0000 (22:26 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 2 May 2026 18:34:21 +0000 (20:34 +0200)
commit1f86f4e471f81038a9b69a4f121a55637634c7cf
tree729596ddfa314ab2da1be40f4942f1f3c7a24999
parent588330e92b307879e342ce2aef5547a94c6388af
wifi-scripts: ucode: simplify wpa_pairwise default selection

parse_encryption() stashed a preliminary wpa_pairwise value in a
local wpa3_pairwise variable, cleared it per auth_type, then let a
switch default either copy it back or special-case wpa3-192.  The
result was three separate places where wpa_pairwise was clobbered
and behavior that was awkward to trace when the explicit cipher
suffix (encryption[1]) and the auth_type disagreed.

Replace the scaffolding with a single block at the end of
parse_encryption() that only assigns wpa_pairwise via ??= when no
earlier branch (explicit cipher suffix, wpa3-192, or sae-compat)
has already set one:

  no WPA              -> null
  60 GHz (hw_mode=ad) -> GCMP
  HE or EHT htmode    -> GCMP-256 CCMP
  everything else     -> CCMP

wpa3-192 now sets wpa_pairwise='GCMP-256' directly in its switch
case, so the final default block can stay short.  No functional
change for existing encryption values.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Link: https://github.com/openwrt/openwrt/pull/23009
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc