Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp687250pxb; Tue, 5 Apr 2022 18:48:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtCH7wbmMHn5PzGz/ta1Gq1wHS1RTWedO/BAbI9XQET7b8rEJ14yD2sa6GaiyhoKEEb7Nm X-Received: by 2002:a17:906:7746:b0:6ce:a12e:489f with SMTP id o6-20020a170906774600b006cea12e489fmr5953427ejn.551.1649209735616; Tue, 05 Apr 2022 18:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649209735; cv=none; d=google.com; s=arc-20160816; b=XaXmnx4yPrdglkmqBwhyvCTf40mH+M60m057qQKU7XDnCe2MZH4ooU/79DdKBLVxh/ hcYb12lEmUN95knqo32LXVhswmvfUX2pFFzt4MJfZVfoMO+rt5pNoGfGNODIWNQsb/b2 OB/g5dZv5ROcvUx6uJ4ocpyF2aaVhsc1aSARkI4PZ1aFSgL5b4RjdTPEFJyry/Nu4+BB sapv5sg0yS2NBORqmQs+nJkUraMvLjTxra1WotbOdCkePoOEX4p3113ULc7iGEIUYI+J 4XDJAlVPYc7IFNZQCKY+HJj3OLAGXYtcXF/ccaqwvxDSLdBns2HNvDTsFf9B1iabG6/y YChQ== 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=vcC3fwWS8pgVSLh4bg3kUB6AxGMGyF/X3m+z3NkbYNg=; b=xJ6TZJH5oVIeTfLDWfNJF8mWk96mpqpJ56pOmx8eGCXQ5MloXmPdG+C+wWDHdxkzvj LFfrHHdDqspxX8TrysUGRq+qQWP73hLA1aFmL+DcqWFwCbtBMZRS/adAaZxVdUNoFBI9 Wr9AZAZfWNEWk8gQAmgGQrE1vuokBkdn6ndyuDyL8ror87fjgU6g1CL/deOfM4VVgzob drQVn4vEz4jmOO5827WiyOiKjAr03ZY53ni5yg0zOsblzjTu9lpe+5guQmyWouNMpCMd 3vDs1eWyr98YUNZ1+7yuMKYl8T2Y4XTh37QVYB4SYmG+fxq9rMr5oC1Y3J+7AzNmbUP8 2YyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dxYgwsTE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a50bf4e000000b00418c2b5bf5csi9820363edk.574.2022.04.05.18.48.22; Tue, 05 Apr 2022 18:48:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dxYgwsTE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1350614AbiDEJ7H (ORCPT + 99 others); Tue, 5 Apr 2022 05:59:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238009AbiDEISg (ORCPT ); Tue, 5 Apr 2022 04:18:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5833EB82C2; Tue, 5 Apr 2022 01:07:57 -0700 (PDT) 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 B7B7AB81B90; Tue, 5 Apr 2022 08:07:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F4C3C385A1; Tue, 5 Apr 2022 08:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146074; bh=7Hx+qRXd0CrtR87QMOgKP65BTtVs3ZkoBfh5NpUkhhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dxYgwsTESIW3fxi7Exl7Ib6Aw7lmoHtr/cKM8TJtcaVY+5NWzmmDHdDobWV/Kf5FN h2LM1qPj81kzlMxZr4mlA+VbyaQNOIBxpGMs8MqMexARxCIzOHt4C5lhLQHz2gpZEG 5tDTzSx6InVOlP2LndrBUtfIsp6vFnc5Cck9GYDY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sean Wang , Leon Yen , Deren Wu , Lorenzo Bianconi , Felix Fietkau , Sasha Levin Subject: [PATCH 5.17 0595/1126] mt76: mt7921s: fix missing fc type/sub-type for 802.11 pkts Date: Tue, 5 Apr 2022 09:22:22 +0200 Message-Id: <20220405070425.098877195@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Deren Wu [ Upstream commit 355c060d5f38a784822d544e969121a273bcf545 ] For non-mmio devices, should set fc values to proper txwi config Fixes: 48fab5bbef40 ("mt76: mt7921: introduce mt7921s support") Tested-by: Sean Wang Co-developed-by: Leon Yen Signed-off-by: Leon Yen Signed-off-by: Deren Wu Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 12 +++++++++--- drivers/net/wireless/mediatek/mt76/mt7921/mac.h | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c index f8d95d64fe46..84f72dd1bf93 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c @@ -919,9 +919,15 @@ mt7921_mac_write_txwi_80211(struct mt7921_dev *dev, __le32 *txwi, txwi[3] |= cpu_to_le32(val); } - val = FIELD_PREP(MT_TXD7_TYPE, fc_type) | - FIELD_PREP(MT_TXD7_SUB_TYPE, fc_stype); - txwi[7] |= cpu_to_le32(val); + if (mt76_is_mmio(&dev->mt76)) { + val = FIELD_PREP(MT_TXD7_TYPE, fc_type) | + FIELD_PREP(MT_TXD7_SUB_TYPE, fc_stype); + txwi[7] |= cpu_to_le32(val); + } else { + val = FIELD_PREP(MT_TXD8_L_TYPE, fc_type) | + FIELD_PREP(MT_TXD8_L_SUB_TYPE, fc_stype); + txwi[8] |= cpu_to_le32(val); + } } void mt7921_mac_write_txwi(struct mt7921_dev *dev, __le32 *txwi, diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.h b/drivers/net/wireless/mediatek/mt76/mt7921/mac.h index 544a1c33126a..12e1cf8abe6e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.h +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.h @@ -284,6 +284,9 @@ enum tx_mcu_port_q_idx { #define MT_TXD7_HW_AMSDU BIT(10) #define MT_TXD7_TX_TIME GENMASK(9, 0) +#define MT_TXD8_L_TYPE GENMASK(5, 4) +#define MT_TXD8_L_SUB_TYPE GENMASK(3, 0) + #define MT_TX_RATE_STBC BIT(13) #define MT_TX_RATE_NSS GENMASK(12, 10) #define MT_TX_RATE_MODE GENMASK(9, 6) -- 2.34.1