Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3577784pxb; Mon, 24 Jan 2022 12:39:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJy257tt2xBW6F6j4qY5ExtX14kSZVN6YZdivOXgp17wHwXer11fPsyfa0dzqZqsVnRX7f+0 X-Received: by 2002:a17:90b:4c0d:: with SMTP id na13mr108028pjb.96.1643056775939; Mon, 24 Jan 2022 12:39:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056775; cv=none; d=google.com; s=arc-20160816; b=efBltb2FY03KA4k1KD23yuRfdGrA0zR+8h+Y8B13gV13M8//fAeYQq1J0JmTBWKWX2 c0XcjNrYkUJHUuI2WJpzHcd2XYQLb05MZmX/y1TT1LGV8hMlC+ypyJ1T6AKfYs4hQlDJ AEHKOrGA5Z/EJ3o7VqiYC8SSCwGn8B+f9yib1GHeZE6t2sEj15yK4XCTtY/mF3G/8ZTu qC9oQc8D+/nymJuqwcq6v6H+FuIcA9YC8fKpAu9yybEoJHeioA1k/dBM6WlErVb3c+Lp GapT+1ba/nfCk3l0t1t/S28kF94H7nAc+ofzb/kMi6d+VDt8CtixSM64zLQzvnGGag4p ly3Q== 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=fatvEvyXk1zmTBsc2gmcVRAaeVemDSBSScdHa6H5L48=; b=ZI9R6/EVV3uov8juWgh2oPIGC6S9RfZg1oabbaSREFhEYnlke4/IAHARpJsUVfrQdr gnnqIdFoYJZmBcvC9WanGcmlIw1H90Njn/Tck4+PBQPtsESyYUkZgojh8Ht1nY8wtdJt oxkK8fw8WqYo61VTLEPwGH7tsR2c5dXjtBOgTYCnHfByTOMlk7/mRlddk17ELEhWfuPx 9zVPG1fZny1rmvHtQ5Djl4zUvby4LQl1oz3dFRSwJJ5MowSfzy2kE2cnvMXF2o//kMNl PtHLk5zsPm8w3fnQvHMaNatK2JvXezjBKOB4nhYDWGcr32QGEibpyuEfeQre3Vl1g+WQ 5SYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GbVwo8cj; 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 w36si14404272pga.836.2022.01.24.12.39.21; Mon, 24 Jan 2022 12:39:35 -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=GbVwo8cj; 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 S1358476AbiAXTzT (ORCPT + 99 others); Mon, 24 Jan 2022 14:55:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353371AbiAXTlC (ORCPT ); Mon, 24 Jan 2022 14:41:02 -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 13839C07A974; Mon, 24 Jan 2022 11:20:45 -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 AE96EB8121C; Mon, 24 Jan 2022 19:20:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBD82C340E5; Mon, 24 Jan 2022 19:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052043; bh=XjqBh/T238oH1vfD/s4WhMqH03h32udr8UJJtPFrAFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GbVwo8cjkDpyXL4cqassSTIBrLVgsa/SpYanV7pAxiCFHH71V2RlGwW7/KiCEKw+3 94kABVstu9lKCpIOCnJqfk391xHummTobmeXR7MNq1p25yBL95MEXI/rFq1Fwoo08b B3RO3+H5g/77n/444gj6sVwD/qyavoIIOnZLYO/M= 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.19 169/239] mac80211: allow non-standard VHT MCS-10/11 Date: Mon, 24 Jan 2022 19:43:27 +0100 Message-Id: <20220124183948.470185428@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183943.102762895@linuxfoundation.org> References: <20220124183943.102762895@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 e0baa563a4dea..c42cc79895202 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -4620,7 +4620,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