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 600181A3A9C; Mon, 17 Jun 2024 13:26:40 +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=1718630800; cv=none; b=jR7ZG/uf+Fu807xTKbkbJsY44ywZyJYhzr0Pb959UcaRZapC5wPirW3zJWNXWPPUeamyIWo0R/TgsqxY5BqUSJmzfvjJT5tg+4d9xEQq6dAQWEjAjP1mIbzBwTtfdXyS1wwM0UwYFQGwN7ekjEWGhZ+lVY1WlmpmKGxVp6d56g8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718630800; c=relaxed/simple; bh=hGELTWT64dy1t2dAK0Bdf0Ge04DzJ4GkdbOEaR5s/d4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u8iK+OpaZa+DX73npnKDDtOpXjDKa5yD7I4LbO42YU7mBsSKWdnDtPG8ZVgtEaKaUlJsmherMg7n2LxB4R8j5X/25iWcq+fZlz214WiHBuOZCk1HCvEYXcmIc0JA3/pZKI3HeBvRx6ZqywRhiIiStsMGBf6w559yLQ/K5nRSJJg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y3ZTUcSB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Y3ZTUcSB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE129C4AF1D; Mon, 17 Jun 2024 13:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718630799; bh=hGELTWT64dy1t2dAK0Bdf0Ge04DzJ4GkdbOEaR5s/d4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y3ZTUcSBe0cxAwFTusAxfEH+QgZSLol7vgZa9jiB4UgcHVBxjY+jUB0PGy6bC9uJa bRwrsXZYD49XiGAJwjYbwBCMoHwZQBOS4zmGWJVFkbjpvl212ZX6bnpWR0R3KwPEad Z0Rn68FhynqAam0lmkyb3umVQwdF4YbM3Z4jZNrTwFP2bsluoi77ptJIDb3eVdaZWg 171Xm9tUrcUW7vz+p5xRB4kJjvENarby1uqfcv6il6Ez03JhVRZxXSd+ipFjQ5VfBO D7qLun9U9YtPVBvLbcUBStEE4PdtUj7xCWRvSz9wPNQSYAPq6sHSkdlRqz+BQutjFt LIe462DeZGmyg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yedidya Benshimol , Miri Korenblit , Johannes Berg , Sasha Levin , kvalo@kernel.org, gregory.greenman@intel.com, shaul.triebitz@intel.com, benjamin.berg@intel.com, linux-wireless@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 11/21] wifi: iwlwifi: mvm: Handle BIGTK cipher in kek_kck cmd Date: Mon, 17 Jun 2024 09:25:48 -0400 Message-ID: <20240617132617.2589631-11-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240617132617.2589631-1-sashal@kernel.org> References: <20240617132617.2589631-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.15.161 Content-Transfer-Encoding: 8bit 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 f9b004d139501..24c1666b2c88a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -595,16 +595,25 @@ 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: 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