Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3719288pxb; Mon, 24 Jan 2022 16:15:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0UASxkCXtGUDNT+ly9ORbmup+yOmswIYDzmqFVBeCINmbp6e/bG+fM34d/648T/uvRowW X-Received: by 2002:a17:90b:3ec5:: with SMTP id rm5mr682697pjb.241.1643069713645; Mon, 24 Jan 2022 16:15:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643069713; cv=none; d=google.com; s=arc-20160816; b=VcHh51lvmhJBYUdEiSvMHFy4WREyzxF4zz0YAL/PtQCUM208bBZ1yQv6DD1EUfLqhJ ir31sQfHl3bvHT8FUtcBgVE32z4PyyOFwaEs58Xgx9KTTjZXXi87bJBxYl6W8xq/mEbJ vf77Fxs4J9+1OTzKrsyqycXIrrTX+7B2dQa6Ou0EXNYwV2vqgipngds+Yqt53XlL3HHo ZhRQXlHZ8OJ7AqFMZv93lszuhj1dG880xbSR3M3cv22RejKEjQz6PG0lGfhaQUA+v6vQ 9JiphIB/vXk1LPFXB7G6jbOcVZR5Tig/MMPAkH9z+wXe2KS51W94IOkuiWTl//KW65qk jNVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4a/F76ro9OUWdqhfydqhcBKc9Wo99lKNGtmBCZO0mMw=; b=XFCEnh4WES1OD620MEKfEYTqWRSsSvdUbk/Z3OAGxsOS49YaAG+dfy9cy+FGAYnR7k 3xIDFNcgY3qlmZvUUP6P7mlnXyd8dIETXWN6FSYsk47hT/NVfe3kQp7BDxMrafmKHvfU 8uHg6cvyNMfJEf0PsLFrtzEDMMbtmoW5taL0Vqcp3vJs6cQB6pkzkU8gjZp/e+hgmfNS 33OGid4Zyko1iXlnlMk8rvA9wIAP/bEMREeItuFQcQM6W2xCpPCLQIawE7+QnilkfAxr ql/+L6OGV1r/f5ADnRZgVRQFTO08fx1/kkalXInFWpqp1o2LSHh1ZshLJSRRd3/Or7dX 5afg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l0vlyvlY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si13789133plb.487.2022.01.24.16.15.01; Mon, 24 Jan 2022 16:15:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l0vlyvlY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2371333AbiAYAHg (ORCPT + 99 others); Mon, 24 Jan 2022 19:07:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1848230AbiAXXWB (ORCPT ); Mon, 24 Jan 2022 18:22:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E59DC0258C0; Mon, 24 Jan 2022 13:28:46 -0800 (PST) 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 C3F9061320; Mon, 24 Jan 2022 21:28:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A91D1C33E61; Mon, 24 Jan 2022 21:28:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059725; bh=6Rc/Jh0n96J2clf1qa2snYTGrhhbmofQBPfgvlR57fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l0vlyvlYIhJux9Z5pUqJbMbnrnavlbFuXjeZvUyu2/z/Ji16zdk3c4qn/aLGmKpbz I4gCzp6ddGnK2THf7bkKXJphdHp5zIcMw4nwQ7EzFCrp/Y1wlauonlDyuT/4/SUKjR OCO9lIlAEMH7SeTW8yAJvugz9Rn5m6EQNvDdHkPA= 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.16 0712/1039] mac80211: allow non-standard VHT MCS-10/11 Date: Mon, 24 Jan 2022 19:41:41 +0100 Message-Id: <20220124184149.270631865@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 0544563ede522..d2e8b84ed2836 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -4924,7 +4924,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", -- 2.34.1