From nobody Mon Jun 8 09:49:04 2026 Received: from mail.andi.de1.cc (mail.andi.de1.cc [178.238.236.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 753973DB308; Thu, 4 Jun 2026 10:33:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.238.236.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780569213; cv=none; b=Ne0K0RSTOr0Mww9QLAcKa6Jf0iPLUdjxI8FSY+O0LK5Rq+PO95rAdUDCZkWlVHomedhtju8L4sf+4jz6ii3rm3C7GQHPoU0zINJ15YhXeTsmRiDCUuOzGSDYuqIhCTD1BmrSXnp/xEr7sqx/PdoOun1YCBbdQWaZLR31X/9mmjc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780569213; c=relaxed/simple; bh=BLc07fKVhXzZnWvTKJ4XMwVDTHiS8Mpeo7tD3taTAyk=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=f5+J0TbaR3n6xVRmczmUAkCzH4RsyoyiGK3bAAzguG1KtLvipwZGX3OmWjM2W2UDX6AW8W3jMX28OarCZ2lRU3aV0TFsHMgXHAuoih50N6Z67t2SDcPmQTQlY4QOKqiJVvmr3R/+cX0/K78oNZPwAHG1Fg/4RCqSxVxBCbbGJhs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info; spf=pass smtp.mailfrom=kemnade.info; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b=3Gd+ZVrk; arc=none smtp.client-ip=178.238.236.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kemnade.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kemnade.info Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="3Gd+ZVrk" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=ctqp3CGlY5sM1PgS+2m+8jYbn8Iw3joc7iBSUmspyLM=; b=3Gd+ZVrkvGmkYr5UAQ66p/zprE QbxrwBiBvvYbvmWlMKu3T77oEb6CdaBnOST7FQSQz8SGQGugrmfXxUEIuG0iOFPMVKRGKwRWLo/Ls GFStsdqOf3XxxgPYavuCyEk5H0sE1EhidfHHGuDGwCBATXDQga36Dhu8p3W1hCz48MmBZ9Q9RqKxu z8sKvXy1XtbJlltu5xEUm5Ajecx2bKtaHTV4kMpl9edHNGfe0e4ENLYeALvu9XqfvC+EHI00t8gtl HjxEg2GD6uH/EvxhNtNFHoiTubagAHKWTH8Yd0qp8Uzn/sT5O+1vEO/86hSoijB7aNq6fXEtsDhW8 H0ChtRfg==; From: Andreas Kemnade To: johannes.berg@intel.com, astrand@lysator.liu.se, quic_rdevanat@quicinc.com, kees@kernel.org, sakari.ailus@linux.intel.com, andreas@kemnade.info, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] wireless: wlcore: enable the right set of ciphers Date: Thu, 4 Jun 2026 12:33:16 +0200 Message-ID: <20260604103316.377251-1-andreas@kemnade.info> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The firmware version number check for IGTK introduced in commit c34dbc5900b0 ("wifi: wlcore: Add support for IGTK key") lets the amount of ciphers decrease on every boot of a too old firmware and that is practically happening. It also does not take into account other chips than the wl18xx. On some wl128x, the following can be observed when connecting via nm to a common ap: [ 484.113311] wlcore: WARNING could not set keys [ 484.117828] wlcore: ERROR Could not add or replace key [ 484.123016] wlan0: failed to set key (5, ff:ff:ff:ff:ff:ff) to hardware = (-5) [ 484.123046] wlcore: Hardware recovery in progress. FW ver: Rev 7.3.10.0.= 142 [ 484.139923] wlcore: pc: 0x0, hint_sts: 0x00000048 count: 1 [ 484.145721] wlcore: down [ 484.148986] ieee80211 phy0: Hardware restart was requested [ 484.610473] wlcore: firmware booted (Rev 7.3.10.0.142) [ 484.633758] wlcore: Association completed. [ 484.690490] wlcore: ERROR command execute failure 14 [ 484.690490] ------------[ cut here ]------------ [ 484.700195] WARNING: drivers/net/wireless/ti/wlcore/main.c:872 at wl12xx= _queue_recovery_work+0x64/0x74 [wlcore], CPU#0: kworker/0:0/892 This repeats endlessly. Always disable IGTK on wl12xx and fix the decrementing mess. Fixes: c34dbc5900b0 ("wifi: wlcore: Add support for IGTK key") Signed-off-by: Andreas Kemnade --- drivers/net/wireless/ti/wlcore/main.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/t= i/wlcore/main.c index 1c340a4a0930..be583ae331c0 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -32,6 +32,15 @@ #define WL1271_BOOT_RETRIES 3 #define WL1271_WAKEUP_TIMEOUT 500 =20 +static const u32 cipher_suites[] =3D { + WLAN_CIPHER_SUITE_WEP40, + WLAN_CIPHER_SUITE_WEP104, + WLAN_CIPHER_SUITE_TKIP, + WLAN_CIPHER_SUITE_CCMP, + WL1271_CIPHER_SUITE_GEM, + WLAN_CIPHER_SUITE_AES_CMAC, +}; + static char *fwlog_param; static int fwlog_mem_blocks =3D -1; static int bug_on_recovery =3D -1; @@ -2367,6 +2376,7 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, st= ruct ieee80211_vif *vif) =20 static int wl12xx_init_fw(struct wl1271 *wl) { + struct wlcore_platdev_data *pdev_data =3D dev_get_platdata(&wl->pdev->dev= ); int retries =3D WL1271_BOOT_RETRIES; bool booted =3D false; struct wiphy *wiphy =3D wl->hw->wiphy; @@ -2421,8 +2431,9 @@ static int wl12xx_init_fw(struct wl1271 *wl) =20 /* WLAN_CIPHER_SUITE_AES_CMAC must be last in cipher_suites; support only with firmware 8.9.1 and newer */ - if (wl->chip.fw_ver[FW_VER_MAJOR] < 1) - wl->hw->wiphy->n_cipher_suites--; + if (wl->chip.fw_ver[FW_VER_MAJOR] < 1 || + (!strncmp(pdev_data->family->name, "wl12", 4))) + wl->hw->wiphy->n_cipher_suites =3D ARRAY_SIZE(cipher_suites) - 1; =20 /* * Now we know if 11a is supported (info from the NVS), so disable @@ -6198,14 +6209,6 @@ static void wl1271_unregister_hw(struct wl1271 *wl) static int wl1271_init_ieee80211(struct wl1271 *wl) { int i; - static const u32 cipher_suites[] =3D { - WLAN_CIPHER_SUITE_WEP40, - WLAN_CIPHER_SUITE_WEP104, - WLAN_CIPHER_SUITE_TKIP, - WLAN_CIPHER_SUITE_CCMP, - WL1271_CIPHER_SUITE_GEM, - WLAN_CIPHER_SUITE_AES_CMAC, - }; =20 /* The tx descriptor buffer */ wl->hw->extra_tx_headroom =3D sizeof(struct wl1271_tx_hw_descr); --=20 2.47.3