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 2160B15821A; Tue, 23 Jul 2024 18:37:35 +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=1721759855; cv=none; b=OFgPHBDCsupAljFqO5wMT4rbLINtB8e8p6vZRHkip5W5TOP0C/yAs4weDpUyq/bLRGGH+VlS90D56YtZJ3m3ENpIvEK3Fa3PLd/TSdo9RB7kg41ek1FGvqpM8iEAaFFdtnFC3JIgxZKwBMJg5hTQet9OfqWKUMAl2L8n34Tw2oA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721759855; c=relaxed/simple; bh=6Djtc48wtl1Sw5Wd5cBFKknL82R3w3JR4aXjxu7kR30=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=boLaxp5IMRfAP7nglir6WkFyYNA75Euf1JXm4ts4ZA/o4bTXB32uFgJ8JRE3kbYCg0iZQa6TeI+ydBp5DA7wnQPoEZ4LV73bjRzWoDeHMwemEOrFVUTW/Fwtx/w9FgdQPWJSplDFlFIAhibA2wDfk4DA3KYD1aQ0n1Alzg7Yk4w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FJcmQ/9T; 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="FJcmQ/9T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D20FC4AF09; Tue, 23 Jul 2024 18:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721759855; bh=6Djtc48wtl1Sw5Wd5cBFKknL82R3w3JR4aXjxu7kR30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FJcmQ/9TuowYLgN/u2sJ1cBFr17hto9JF1MzFFjNQjBAkBJXUJFL159211eUHiwj9 A1DABjj66gvlv4MZY/C1xssJM7yYk7XNeC0G3+3DKLI0cRGklcVaVa6FZs99JBNnFg Iki93jyo5JpXiIAgPIQNZ90/spSMUZu2CbhuaV2s= 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.9 020/163] wifi: iwlwifi: mvm: Handle BIGTK cipher in kek_kck cmd Date: Tue, 23 Jul 2024 20:22:29 +0200 Message-ID: <20240723180144.250955963@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240723180143.461739294@linuxfoundation.org> References: <20240723180143.461739294@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.9-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 74743c3ceeefb..6f16b5b33f0c0 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