From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 873E6158A22; Tue, 23 Jul 2024 18:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721759456; cv=none; b=NFqoBe3r/tFUOy5zqPf4yf+6P0zvBvGM/I5qv9UULS9yfEfKIWL/OMgNVN8lqrYALrWAu9Lbp7rhpPNrRxWfUY9OIJXeEP8p/Uz0WKFGc2SJxD3Ngo4iiO/I7zF8OCYfCZOx8/mdjEImloRKpVglx7zYyG7I0Z0OZEaJoeLTpmg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721759456; c=relaxed/simple; bh=qn40qDMluWAsf1wkyMxm7fdEd/BMK8KYFUj1ANYKU9U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DXHlxrezExHQbLLDMMpI11Nzj00xUAtGkMhJcmJjy5Q1kiStsCFS/N75hulQFhl6uvcZq7Q9AutDwGmeq8HL3s+kTMXLxcdlJHLD2jpmjISt+ZjPnKAF568z+mORTtcJPff7rJCRRZcy7KBFlmsqEoq+YN8rMwQ2krO0IK9YU8Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jbWf01X7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jbWf01X7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BBB6C4AF0B; Tue, 23 Jul 2024 18:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721759456; bh=qn40qDMluWAsf1wkyMxm7fdEd/BMK8KYFUj1ANYKU9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jbWf01X7CsBgXYjX3B+bc4g3HiXc6gTyrmI3s5NXJe7JlJvax/pCRJ0U5uuCY7B67 TaQzgx1/C5nhhxPOVuuH5rSf+DOm608Iiqs2DFX99+aaBqbhtp3DHP2p89oZhxdptX oRzmKJFLkeUaFO0Bd5EvQCPcTZEb2ZgqCwzjkfLI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yedidya Benshimol , Miri Korenblit , Johannes Berg , Sasha Levin Subject: [PATCH 6.6 017/129] wifi: iwlwifi: mvm: Handle BIGTK cipher in kek_kck cmd Date: Tue, 23 Jul 2024 20:22:45 +0200 Message-ID: <20240723180405.451884808@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240723180404.759900207@linuxfoundation.org> References: <20240723180404.759900207@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yedidya Benshimol [ Upstream commit 08b16d1b5997dc378533318e2a9cd73c7a898284 ] The BIGTK cipher field was added to the kek_kck_material_cmd but wasn't assigned. Fix that by differentiating between the IGTK/BIGTK keys and assign the ciphers fields accordingly. Signed-off-by: Yedidya Benshimol Signed-off-by: Miri Korenblit Link: https://msgid.link/20240513132416.7fd0b22b7267.Ie9b581652b74bd7806980364d59e1b2e78e682c0@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 66aed6635d92c..9c89f0dd69c86 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -595,6 +595,12 @@ static void iwl_mvm_wowlan_gtk_type_iter(struct ieee80211_hw *hw, void *_data) { struct wowlan_key_gtk_type_iter *data = _data; + __le32 *cipher = NULL; + + if (key->keyidx == 4 || key->keyidx == 5) + cipher = &data->kek_kck_cmd->igtk_cipher; + if (key->keyidx == 6 || key->keyidx == 7) + cipher = &data->kek_kck_cmd->bigtk_cipher; switch (key->cipher) { default: @@ -606,10 +612,13 @@ static void iwl_mvm_wowlan_gtk_type_iter(struct ieee80211_hw *hw, return; case WLAN_CIPHER_SUITE_BIP_GMAC_256: case WLAN_CIPHER_SUITE_BIP_GMAC_128: - data->kek_kck_cmd->igtk_cipher = cpu_to_le32(STA_KEY_FLG_GCMP); + if (cipher) + *cipher = cpu_to_le32(STA_KEY_FLG_GCMP); return; case WLAN_CIPHER_SUITE_AES_CMAC: - data->kek_kck_cmd->igtk_cipher = cpu_to_le32(STA_KEY_FLG_CCM); + case WLAN_CIPHER_SUITE_BIP_CMAC_256: + if (cipher) + *cipher = cpu_to_le32(STA_KEY_FLG_CCM); return; case WLAN_CIPHER_SUITE_CCMP: if (!sta) -- 2.43.0