Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3624718pxb; Mon, 24 Jan 2022 13:47:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNr6teP8YTzFx2NGuBMSZu0XwfuwkLE1O9dTsx1eel2NewsqzVvvfYwbaI6C443eUKvTwj X-Received: by 2002:a63:fb41:: with SMTP id w1mr6569674pgj.293.1643060878016; Mon, 24 Jan 2022 13:47:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643060878; cv=none; d=google.com; s=arc-20160816; b=dsLcYSHzNwibGJjaLfw3a42DzKbG2VGpzq72Uib1uBIy2SpMz5z2IWemdCyFLuMYGN /q1eLoHDF/SeaxsjDabW3yrRwCyHDRb9ZOCTKG2W/dxK1LxBLCYnvk7JyCZe9QULemns cDXaf3qMX4rnsu6zcs8XbE/PSreez+82yJgRIP2nGN+pp0go28su8UhMnESgdlMDrS+V HmkPkMo+TV5J/AJand7Svw4OcmYgWoqnw7VXgjrB5M1tsqeAJ2o92VaIvX4Zcp4UFw68 J5UcC7uxZAzEOYl+wv0bDWGBnxWOn1Ukgd3OXAZqeaehpLcdeYiM9IV6InUh7+Sl7id6 hCWw== 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=WV2Elk+smm20oAFuo0G2NP/54b5RL97d5CyVd40Fec8=; b=cwx3N2Dp3K74m6Xw1kJT7GM8HtYZiR10/FVA0ekjcSVb/FcifAL7DXM1A+s9aC1vh0 kedpgbAsv/J5vcIrLNG24hYjrr8Rm6S+nTI/KcGkh7LpA7myKtqT7pyMvPZS2eCiPBq4 8BiAfn0p9l6zz1UlL4glXUpLJOCh9VCMJfJX7Vvw6lOmvnxPwBMv6yYfEAvkHG5Q0IkB zqukuUe/pIz/o6z8fIeyFllQ0kyV3mXKCmtE98PnP1BwTKQI8ZmVO8nAfWh353TRVKOF vORc52TerFkGTjmyGUw7m9m/V0sV+7Y2pInDdIP3MWLrFnKAefT+/8fv4LEGz1wiQ55+ 0Nhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y5DeWmrJ; 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 q6si15378838plh.410.2022.01.24.13.47.46; Mon, 24 Jan 2022 13:47:58 -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=Y5DeWmrJ; 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 S1454934AbiAXVeH (ORCPT + 99 others); Mon, 24 Jan 2022 16:34:07 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:51358 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344693AbiAXU6X (ORCPT ); Mon, 24 Jan 2022 15:58:23 -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 EE1B66148B; Mon, 24 Jan 2022 20:58:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC6ABC340E8; Mon, 24 Jan 2022 20:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057902; bh=yoRT3qfphQJgL7iYKNchLDHmu3yMtDJ7MmX9qJOVqRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y5DeWmrJPMwYZGi9+Kv8HN/GqVGWc7yMtyY8rZjN6p3K+iVuDxn6AaEMuOuVWKmv0 YXDf54g7b28hoMnbeP3+qSE6EGkcHsySnepDMkaOLMclfZ3vgUFnkCwIdM2mM/E2pH x4+r6WCgYalX/ISxDtsG0zzTiC4ftEFoJNl0KweA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Li , Loic Poulain , Kalle Valo , Sasha Levin Subject: [PATCH 5.16 0115/1039] wcn36xx: fix RX BD rate mapping for 5GHz legacy rates Date: Mon, 24 Jan 2022 19:31:44 +0100 Message-Id: <20220124184128.992544933@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: Benjamin Li [ Upstream commit cfdf6b19e750f7de8ae71a26932f63b52e3bf74c ] The linear mapping between the BD rate field and the driver's 5GHz legacy rates table (wcn_5ghz_rates) does not only apply for the latter four rates -- it applies to all eight rates. Fixes: 6ea131acea98 ("wcn36xx: Fix warning due to bad rate_idx") Signed-off-by: Benjamin Li Tested-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20211104010548.1107405-3-benl@squareup.com Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/wcn36xx/txrx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c index f0a9f069a92a9..dd58dde8c8363 100644 --- a/drivers/net/wireless/ath/wcn36xx/txrx.c +++ b/drivers/net/wireless/ath/wcn36xx/txrx.c @@ -272,7 +272,6 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb) const struct wcn36xx_rate *rate; struct ieee80211_hdr *hdr; struct wcn36xx_rx_bd *bd; - struct ieee80211_supported_band *sband; u16 fc, sn; /* @@ -350,12 +349,11 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb) status.enc_flags = rate->encoding_flags; status.bw = rate->bw; status.rate_idx = rate->mcs_or_legacy_index; - sband = wcn->hw->wiphy->bands[status.band]; status.nss = 1; if (status.band == NL80211_BAND_5GHZ && status.encoding == RX_ENC_LEGACY && - status.rate_idx >= sband->n_bitrates) { + status.rate_idx >= 4) { /* no dsss rates in 5Ghz rates table */ status.rate_idx -= 4; } -- 2.34.1