From patchwork Mon Jan 24 18:42:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 535744 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8E18C2BA4C for ; Mon, 24 Jan 2022 20:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391877AbiAXUt4 (ORCPT ); Mon, 24 Jan 2022 15:49:56 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:35002 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388693AbiAXUj7 (ORCPT ); Mon, 24 Jan 2022 15:39:59 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7403F61545; Mon, 24 Jan 2022 20:39:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50D6CC340E5; Mon, 24 Jan 2022 20:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056796; bh=bKv49uldl9R9SC7HIVxX+ClVCBnMzrgTe9Li/DYxUJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=epbamufp1D2cEQXW8DNkddDXweJ+yYuO55rDO6cEIUbfkxdw539TcSYhT1r8pCMKj ZOuDHbmam9xhyM/SHE4A+7ij4ZoqbVd0F0klxfo8LkDPrQ8fZr9syOvnMT/duIlWsW 1By5DEoJ1EjPHXurOLLxy2tIkMnzNGjuo84izNao= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Goldwyn Rodrigues , Ping-Ke Shih , Johannes Berg , Sasha Levin Subject: [PATCH 5.15 603/846] mac80211: allow non-standard VHT MCS-10/11 Date: Mon, 24 Jan 2022 19:42:00 +0100 Message-Id: <20220124184121.832271046@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ping-Ke Shih [ Upstream commit 04be6d337d37400ad5b3d5f27ca87645ee5a18a3 ] Some AP can possibly try non-standard VHT rate and mac80211 warns and drops packets, and leads low TCP throughput. Rate marked as a VHT rate but data is invalid: MCS: 10, NSS: 2 WARNING: CPU: 1 PID: 7817 at net/mac80211/rx.c:4856 ieee80211_rx_list+0x223/0x2f0 [mac8021 Since commit c27aa56a72b8 ("cfg80211: add VHT rate entries for MCS-10 and MCS-11") has added, mac80211 adds this support as well. After this patch, throughput is good and iw can get the bitrate: rx bitrate: 975.1 MBit/s VHT-MCS 10 80MHz short GI VHT-NSS 2 or rx bitrate: 1083.3 MBit/s VHT-MCS 11 80MHz short GI VHT-NSS 2 Buglink: https://bugzilla.suse.com/show_bug.cgi?id=1192891 Reported-by: Goldwyn Rodrigues Signed-off-by: Ping-Ke Shih Link: https://lore.kernel.org/r/20220103013623.17052-1-pkshih@realtek.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 1958e4d59b524..92ce173dd0c13 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -4933,7 +4933,7 @@ void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta, goto drop; break; case RX_ENC_VHT: - if (WARN_ONCE(status->rate_idx > 9 || + if (WARN_ONCE(status->rate_idx > 11 || !status->nss || status->nss > 8, "Rate marked as a VHT rate but data is invalid: MCS: %d, NSS: %d\n",