Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6415078pxb; Tue, 15 Feb 2022 01:48:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVgevuj2bwMu78yqcgEoZU7rZpobpf+empeS0Md0e52P9FpJy+pJo4lGWlkmVf8A91rU+N X-Received: by 2002:a17:90a:19de:: with SMTP id 30mr3409874pjj.120.1644918523387; Tue, 15 Feb 2022 01:48:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644918523; cv=none; d=google.com; s=arc-20160816; b=MP7mwaIxQiQQRI32Luen+nnyOmyGCEfZzNvRJzd6ev0w2QpqwzZtvVEcNHkkwzstUe GGJ0eoI8jLdPfAFDFCSbxyYx5qBaBj4QHzs2yfZXzdtJeyCyRbgJDPsvKBBKGMhxxBLP FMtE2K8wpLR2G2LCUtB84p+ZRfNurUPeDC/9kKelXCTWf/bSs5VusmSGtW0ZvhF0Yh4r /L/KNqJWLg++/FKsfcxHf2Zr7YTQWICAr9IiX8vn9m8aBP3lOVuQbUlUgXHiMv5bErcs CHHGJsLeXF9ZWb1wv4d8xQUWsHMoMRxVHmXyHUwLud94LmXPSlIwjKNHbtofG7dQ0bjt HE7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=7+8q5Uw/0hQLtlcnksQi6vYCceEPw3XP/W/ByIiSi3k=; b=evOdPlRDxidYBu45INzeq4o3htG3gvjupQhTbXxYq2p4mmegQFvu/WcLUGjlWFRPrS e/IVmHhGm4nJN9iDHQK9R0gYgbbn623VAcLs34u/uAlAl5bDp+GP/Sm/nS+LgddlWgil nJBUloVRstSGs7nqht1SuNR7Z+W/61kShloK6IV9cBBdUx+rRbhq9+Yci9YDS48uBhmA sVs/y1FZXrCM12ESotO160jVJ/iDLGVptpEfX8GuAQbhqQA5eBWm4QwjRpU4Qts9gpSO 4zcSrhgMjvitopMdHjCl2eElV9dt3nReZ6WYO59cjxEi8/QEoQpPK4HhtzxC3zA6Muev 1WeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k93si14448487pjc.86.2022.02.15.01.48.26; Tue, 15 Feb 2022 01:48:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234142AbiBOItP (ORCPT + 72 others); Tue, 15 Feb 2022 03:49:15 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232387AbiBOItP (ORCPT ); Tue, 15 Feb 2022 03:49:15 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF4941133E9 for ; Tue, 15 Feb 2022 00:49:04 -0800 (PST) X-UUID: 33e2aec6abad43c08e0a579f6d4923f3-20220215 X-UUID: 33e2aec6abad43c08e0a579f6d4923f3-20220215 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 125842322; Tue, 15 Feb 2022 16:49:02 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Feb 2022 16:49:00 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Feb 2022 16:49:00 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 15 Feb 2022 16:49:00 +0800 From: MeiChia Chiu To: Felix Fietkau CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , Ryder Lee , , , MeiChia Chiu Subject: [PATCH] mt76: mt7915: fix the muru tlv issue Date: Tue, 15 Feb 2022 16:48:58 +0800 Message-ID: <20220215084858.3429-1-MeiChia.Chiu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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-wireless@vger.kernel.org From: MeiChia Chiu 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 --- 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 02f93189370e..0addb5a112d9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -924,9 +924,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 = mt76_connac_mcu_add_tlv(skb, STA_REC_MURU, sizeof(*muru)); muru = (struct sta_rec_muru *)tlv; @@ -934,9 +931,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; @@ -944,13 +944,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.29.2