Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3628263pxb; Mon, 24 Jan 2022 13:54:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwv+32nlmMCtA6gBmwnZKxORrqZEbdAgGwzb2e+Gemlp2HD75a9l7Megao3RRwvpfC6vfkU X-Received: by 2002:a63:89c8:: with SMTP id v191mr12780650pgd.339.1643061241818; Mon, 24 Jan 2022 13:54:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061241; cv=none; d=google.com; s=arc-20160816; b=ZrgfkSiHUrQjzJBBTe6MkGmh6SqN5Y/ZQuUAxOKa341+7LgzWCuozbdJyhXx+uCCzn GJEwcl9mH6ji6+QEb3cRdRSY4sRmcxY8yjSqhnCwxU818x8fKddKSROD26PaxpwlqGiC y2s/9TLZtYvU1Gf/OUmeDaG5ZL95L6a6qb88hie29BCXffxldX26KNdgH163UiPvYl7v Zr5x1ObPHItNW1OaxQ+/o4gH2Pm4gSbvAUHyZXFVINtdvTtJFfv88VzWQqtIJH5vvCWz W6z8vFPCOWCZB5FET4A/1f+S8UwSI+TnSTH2Uv64M3GgdA9Z8SA3jDKCfxOmvnBA66w2 wfIQ== 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=kyrJIxupIMZLtj+Cvq4nfjfPxkvMDtjzB5KiUCdewVA=; b=EGjpGCwCWAi4QuaVUVWCx1PQPyDiLzt/WO2rWysQVXU8PgRCzAqinVbK4goKrYsCaa 4Q56pWwAqlEEf/z1l+3pzYcO4L0q2YWfno9MDd3S86m1tqQSneTEgWFqlBMR64ppU0/1 exeOVveay19/ipOmDoQfUkSOxfjHD61DYJ2DKcqk3v3mO4bg/JRjkG0wWJDg1l5Xfwos KcCCcZNyxAgfp4QPsmM4lw/g0mBnt/cozoSqGDohZoIrharHV9g93YxV+oofhKE6paAX ImRBGxA203O8gVkLysfJk+DX8Uqg90p6W73kB6BgqYu82JIliyVF455IeSDOG4F0erDl 9MUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ieiNdeBn; 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 s21si15657207pfu.287.2022.01.24.13.53.49; Mon, 24 Jan 2022 13:54:01 -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=ieiNdeBn; 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 S1456200AbiAXViE (ORCPT + 99 others); Mon, 24 Jan 2022 16:38:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444937AbiAXVBq (ORCPT ); Mon, 24 Jan 2022 16:01:46 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95F29C04C074; Mon, 24 Jan 2022 12:02:43 -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 ams.source.kernel.org (Postfix) with ESMTPS id 3BCCCB81218; Mon, 24 Jan 2022 20:02:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64263C340E5; Mon, 24 Jan 2022 20:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643054562; bh=xU/E0UOkkueNXhNTpQtFR0kqDRHiSMIPw0I95vr7Xqk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ieiNdeBn39DBLpTWENtubSho5QRsO7H0OHdj7qsBOFs9X4sEjiV/F4LJir4bCb6p5 tE13HsQkbwshWthuk3oavUyQhcavGZfZD65ileg6PhhB9I/fL9sfGgUZ522Jd1h3PT 62B0hMiDq5CZjc5ikOjQEvh/SW6wpYdjDxkmo7eI= 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.10 396/563] mac80211: allow non-standard VHT MCS-10/11 Date: Mon, 24 Jan 2022 19:42:41 +0100 Message-Id: <20220124184038.122519714@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184024.407936072@linuxfoundation.org> References: <20220124184024.407936072@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 6a24431b90095..d27c444a19ed1 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -4800,7 +4800,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