Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp652416pxb; Tue, 5 Apr 2022 17:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkda1p+dqspceLhVBTxCjxdCprQcVAinKoC++RxaY//1Ftq6XIYns/0yf/xWq2BHf8Kxuo X-Received: by 2002:a17:906:1645:b0:6ce:de9:6eb1 with SMTP id n5-20020a170906164500b006ce0de96eb1mr6022918ejd.616.1649204504784; Tue, 05 Apr 2022 17:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649204504; cv=none; d=google.com; s=arc-20160816; b=E5zdwM/302npfAxdMmcdDlhzOeGErwO+GzIE21thB84515ZHv3STvT+/FOTBfTxXXB oSDIwiM41nrXQerXaNwGlM7XllL+ddGSTCbSDyZLEQsb7ctu61wSH101+0FZpL0BWoCz N1WdZClsE5yfzz/5Z5rgw1AKfgCRp3QrXCuy+Y7yRO3ZECXdH5uInHJx1Gt7eSUjkAKF qSiPsGdX/7TqsZsU/UGOJtbfN+GNgjfadN2myjFKN3GCsQ+HV/hJD9lsSxa1ErWa2qpe 1XRX0Zh+GqpCllIyNRp7cJ04iKTKhqbaOU5UgxYGDh5fEaOqnAQ47svfsuL/RREYgNd9 93MQ== 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=5kvSxqmD/ml2YdCNcudIz5Yr2FHbF9D/ZAljmB+zsRw=; b=cjpda+d5oYYfNdvIJL0rpG9v7zVlsBO5yqJe5+ZWUN9UDnFI1FCCQUJs+m+S4fwPF7 RF+YCqCL9OEMdw+70YZJrpIvUsBU7vNqH0XhzbOWzYno4Y61eO4RNku+M2vbjQuLFnGc 8oZVwEcHII9j3rtTyQ+Gq0IhlsjosBn7fg3oIxQ9lwYQGeeds8EzRpICIxbzuTttdjwa 3gLyQzP/79E0gZ9O0YhnVcCZbZuE8DOpxdavL2avQOxtEnf07+ZviSb8U5wgvQaK/t7E t1hfdybgfGhVn3JcGjYD3sEGWdItzp0nLyqE0ds/MraHNvn1gztGOnGO1UdxatTqjq4z XAfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Bb+wcrms; 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 el10-20020a170907284a00b006e74d7ff06fsi7250986ejc.402.2022.04.05.17.21.18; Tue, 05 Apr 2022 17:21:44 -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=Bb+wcrms; 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 S1386351AbiDEMlP (ORCPT + 99 others); Tue, 5 Apr 2022 08:41:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239354AbiDEJFi (ORCPT ); Tue, 5 Apr 2022 05:05:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5DED3FBF6; Tue, 5 Apr 2022 01:56:16 -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 29E39B81C6A; Tue, 5 Apr 2022 08:56:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67CBBC385A3; Tue, 5 Apr 2022 08:56:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148973; bh=ikaKZbvRWV/crQmsUAovjojXBg7T3u4AmjkH0nSGrtY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bb+wcrmso4Qrzy82cCiFMlBi2DiR9/NhHLu+Cv/IMs4k//9WTFc5lVr1rKcOIOhJu cmF/GUi5AvquRWv24DREqWjLtZFge4QNDqQIPGR+Gx8oY80CVhrGSw95P5Q4XDkGMc KBrFLQ5RWA6DvjVJR/28yBj+mzlaxEcwqbykztSo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ryder Lee , MeiChia Chiu , Felix Fietkau , Sasha Levin Subject: [PATCH 5.16 0547/1017] mt76: mt7915: fix the muru tlv issue Date: Tue, 5 Apr 2022 09:24:20 +0200 Message-Id: <20220405070410.522934486@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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: MeiChia Chiu [ Upstream commit d98a72725bc96c98f68eac12e5a91ec349322c88 ] The muru enable/disable are only set after the first station connection. Without this patch, the firmware couldn't enable muru if the first connected station is non-HE type. Fixes: 16bff457dd33a ("mt76: mt7915: rework mt7915_mcu_sta_muru_tlv()") Reviewed-by: Ryder Lee Signed-off-by: MeiChia Chiu Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 21fbe7a6141f..5ea82f05fd91 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -1515,9 +1515,6 @@ mt7915_mcu_sta_muru_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, vif->type != NL80211_IFTYPE_AP) return; - if (!sta->vht_cap.vht_supported) - return; - tlv = mt7915_mcu_add_tlv(skb, STA_REC_MURU, sizeof(*muru)); muru = (struct sta_rec_muru *)tlv; @@ -1525,9 +1522,12 @@ mt7915_mcu_sta_muru_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, muru->cfg.mimo_dl_en = mvif->cap.he_mu_ebfer || mvif->cap.vht_mu_ebfer || mvif->cap.vht_mu_ebfee; + muru->cfg.mimo_ul_en = true; + muru->cfg.ofdma_dl_en = true; - muru->mimo_dl.vht_mu_bfee = - !!(sta->vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE); + if (sta->vht_cap.vht_supported) + muru->mimo_dl.vht_mu_bfee = + !!(sta->vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE); if (!sta->he_cap.has_he) return; @@ -1535,13 +1535,11 @@ mt7915_mcu_sta_muru_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, muru->mimo_dl.partial_bw_dl_mimo = HE_PHY(CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO, elem->phy_cap_info[6]); - muru->cfg.mimo_ul_en = true; muru->mimo_ul.full_ul_mimo = HE_PHY(CAP2_UL_MU_FULL_MU_MIMO, elem->phy_cap_info[2]); muru->mimo_ul.partial_ul_mimo = HE_PHY(CAP2_UL_MU_PARTIAL_MU_MIMO, elem->phy_cap_info[2]); - muru->cfg.ofdma_dl_en = true; muru->ofdma_dl.punc_pream_rx = HE_PHY(CAP1_PREAMBLE_PUNC_RX_MASK, elem->phy_cap_info[1]); muru->ofdma_dl.he_20m_in_40m_2g = -- 2.34.1