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 D09A220E6E3; Mon, 2 Jun 2025 14:47:00 +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=1748875620; cv=none; b=ST2yBgZkYRW7aQcyOuuNSQ3SUlZ5ikC5YmHtdV3RwSulFh9lS47BrYAfAL8nhMQKz1cI8a1VTOtyRdAa5YTOYS2NaWuyAgvs7Nc4MaauG5eExVE7CqNUROjPZAq5BI1jUnB974ZapfBl59wBwAotUC/+NUwW3p7LApp+Fqwl98Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748875620; c=relaxed/simple; bh=cL+Gbcl432m5pxC9d0eW8BLNKzVtjEOeOzMkfy8w9Pw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QoOZoVIuT4S8LX2lYqtx1o8zxMebaIS829TNHjWGci5yzTB4ZTNzEvBMqxxlJtlV7Uy7tfqdgCnV/aO/0QYibOjkPfNsuTVe6hFt307qRvU5oD5ZU9108a5ny6SmI2atJUaRn6WijHy2vaYHUwyi/biooD40chnYYeNOfp7oQfc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BWhCQRcE; 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="BWhCQRcE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50B69C4CEEB; Mon, 2 Jun 2025 14:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748875620; bh=cL+Gbcl432m5pxC9d0eW8BLNKzVtjEOeOzMkfy8w9Pw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BWhCQRcEJEOhf5HaxSJ189DXTt1CXLHcR6Dtw0jxuBvm60h5yCwzXYU4Ny6EJVD6F b2T78hxpyPi6FSpC9ve18AnhZKnCE1Ara8T44BbAGTDrDNWf0T2P8cvaK8+mm0v1SI eXR94FTHz/WExBAXwUMG0Q+u+T24Hrj+eNm/OxR0= 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.10 190/270] wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31 Date: Mon, 2 Jun 2025 15:47:55 +0200 Message-ID: <20250602134314.972355163@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134307.195171844@linuxfoundation.org> References: <20250602134307.195171844@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.10-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