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 96C62230BD9; Mon, 2 Jun 2025 14:56:47 +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=1748876207; cv=none; b=cvwdvzPRAfH9qEmr+zFGUMuP0YZc+y5Gq4MHITEJvjkW3lnxIP8tiSuIJeEOd4gw/fMKPRO8wsPesAu+JDbHlphn5p3IqwlKNxOtS5a4eaO33rx6Z+bAEAPFPxu9aFJk2ylLt5D7mk6aE0N8+CE3SB9y/74A0nV+TjEoDLi72XE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748876207; c=relaxed/simple; bh=0/EFMtPkeNJDGlmdz3yCtMxOsnqIeXPiA2cTuqafwh0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DPFe0pLlNHdp8QmijQrqLIj3waakWIbEUOFQjzc/4cEbjAseA8GqbbQP20erM8/9cyhGV37sUHVxj6gDeU2u09ukwGfFGW8EE6HqBreRZ3ErgFpBTuPpFA8Ux8AEDVqDabGo6/LVBBsI2eJQa+wBaOsxL2BMiPM4HIYeLfAVENA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XDHF7jaF; 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="XDHF7jaF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1624BC4CEEB; Mon, 2 Jun 2025 14:56:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748876207; bh=0/EFMtPkeNJDGlmdz3yCtMxOsnqIeXPiA2cTuqafwh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XDHF7jaFic1RUwLgkk5mtjIZWB1BrvL3a2ucb/HKS8bbklQeWo9isReSeqqWzj2KZ O7F/fUvaBOiLmUNMRFXk3MlK21fd6EbloFV4Ws5xTJD2I7v4JFZ0fNYdoM9G9pcP53 IeISqxaU9fPBfAiINo3M19m6sgTD99XYAJLRsNcc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bitterblue Smith , Ping-Ke Shih , Sasha Levin Subject: [PATCH 5.15 105/207] wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31 Date: Mon, 2 Jun 2025 15:47:57 +0200 Message-ID: <20250602134302.849139860@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134258.769974467@linuxfoundation.org> References: <20250602134258.769974467@linuxfoundation.org> User-Agent: quilt/0.68 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 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bitterblue Smith [ Upstream commit 86d04f8f991a0509e318fe886d5a1cf795736c7d ] This function translates the rate number reported by the hardware into something mac80211 can understand. It was ignoring the 3SS and 4SS HT rates. Translate them too. Also set *nss to 0 for the HT rates, just to make sure it's initialised. Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/d0a5a86b-4869-47f6-a5a7-01c0f987cc7f@gmail.com Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtw88/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c index 2c515af214e76..bfd017d53fef8 100644 --- a/drivers/net/wireless/realtek/rtw88/util.c +++ b/drivers/net/wireless/realtek/rtw88/util.c @@ -101,7 +101,8 @@ void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss) *nss = 4; *mcs = rate - DESC_RATEVHT4SS_MCS0; } else if (rate >= DESC_RATEMCS0 && - rate <= DESC_RATEMCS15) { + rate <= DESC_RATEMCS31) { + *nss = 0; *mcs = rate - DESC_RATEMCS0; } } -- 2.39.5