Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3570935pxb; Mon, 24 Jan 2022 12:29:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0Fr8V6+bSPyCZOIY9H6X00smI52YMEVKmTjgzcfA4dFHuImPb2UBi/jOVrnA+QYZaKAQm X-Received: by 2002:a17:90a:7784:: with SMTP id v4mr6935pjk.7.1643056178622; Mon, 24 Jan 2022 12:29:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056178; cv=none; d=google.com; s=arc-20160816; b=OxcoeHC14AxlDx+iURCZyV2bwx9R8zXH7Cv4udvXpe9/PA0zHO5/FJG9VhYVo18pm5 MdxabqmCFjvwcrMX66j2aLwHSiC/TCrXva0X6pGhrsoH6KoVePsl8KICEm2iKpK3TN2g S+sBB7YfCPkHuOoPOc/jeUQhQ1oSeJ/TkZ58TTYg6AGzHzqkYHr/ciLMbjH1OF3o4GTr 3MA5G7EFev78yumNKJvnCOLV0zix2lZjt7v4tH8gzpmqtYUxwHxIq0D64oWLoom9X4be 81BdGvHKVUmngz4tmjB0thU/a94cUZhVTnrIY0zn5+MfxpzUHJLDgTOj1mYJ7DE65Pz6 K5Ig== 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=trHWeY3i2jb9Rmv4sb1v+Ls9UCJLd1Yr8rnro6t2V/U=; b=o6LXlTxbSYT3U4ZKzDWKR0wCAqgEWcwFGJLR9mtEXyu/SYufqvRPb+6tCEuEcTuEj4 yGP/KF62TWEcV200oCZBzv3kQoxuFF4fSWUpFrKWO/XH3kQ835relzCVl/IwKak0I2+7 DW3HmbjxypP6gNqbwrzC65wAQyHiVBrBm3oLbB6suOyxQzrY6pPla/srcu+Q8kFvWO8z g2+dJP9jJgganNjt7cdf35FFt7uE55P8Gf6iGqLc+mrQSFILoE1JVytCHRf8Le0S6Me0 BEQMRc0ZHcHn0EV1GI0dDWEBIbpTLXlnRQjpJkKAHLsgB92ibNB6lFF3ojyzcoVsu/o7 jk5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RIWSYVQb; 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 d12si36133pfv.38.2022.01.24.12.29.24; Mon, 24 Jan 2022 12:29:38 -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=RIWSYVQb; 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 S1352755AbiAXTbB (ORCPT + 99 others); Mon, 24 Jan 2022 14:31:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345170AbiAXTWY (ORCPT ); Mon, 24 Jan 2022 14:22:24 -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 AD4BDC02B85F; Mon, 24 Jan 2022 11:08:42 -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 4A5C360917; Mon, 24 Jan 2022 19:08:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1005CC340E5; Mon, 24 Jan 2022 19:08:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051321; bh=gWcyayrhV3kl6VcZyrQy5mSYOYdJGgNgI7BXa77Y0EU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RIWSYVQbtlRT5CS5ShNRqefhQeXAhC7tG7FLEMlZMEKfhU+TxAQKpnjLJ95/43w63 KsxVRUp4WpZuprnOwuGBMOrgVfws/NzEvPPKorG2943Utyf5dGX/ed1Umcmz9ETrmD b9q9TA3O5pbqMk1lq8LbGKiElioLTs8Qo/xeoJMI= 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 4.14 125/186] mac80211: allow non-standard VHT MCS-10/11 Date: Mon, 24 Jan 2022 19:43:20 +0100 Message-Id: <20220124183941.131597974@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@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 cbe1177d95f9e..13cae95a34662 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -4434,7 +4434,7 @@ void ieee80211_rx_napi(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