Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp498709rdb; Fri, 26 Jan 2024 02:00:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IF73lSbK1HDprTzKoqWJBxk+sIGE3N4rKBK8RNY4CfFGNfTetMZCQZUTrwyftHXgr6u9HjQ X-Received: by 2002:a2e:9c4e:0:b0:2cf:48fd:b4d4 with SMTP id t14-20020a2e9c4e000000b002cf48fdb4d4mr205306ljj.26.1706263211101; Fri, 26 Jan 2024 02:00:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706263211; cv=pass; d=google.com; s=arc-20160816; b=wKQXjdKKtL5Yx/F9IbsFHx/uvDwc1RvP4x0oOgG5sAIiJdQieZCGTUc3X5qJQ5KOha kpZX1mMLn+28avio7TYKK8HFRi/SaICot2j5CH/bzE2a2VVIGldbbJrlsEL7Ghpj2XT3 HNJ1CX4+7+A19tfISN9JOOSZHCIKS0XO6DCP8yp5+OSGDzDnoiu4naVB1v+80ihrJb01 S0MGkzVbDxOunmPASiFSYiZppB3LB1JTz+gRe/p/teCxJx/wm9IY4Pw6YAX7/oOotptC obhpSbt66s2BA7wI1CGILpLJ77HtX8FZYgh/S947M5OD0CtyYlzYkGw7y5IfgTxztUbR jVyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8R6XJUdM4OX6YZvqNiswbsRfy05UZJX8Sl1ACJA7ofE=; fh=1a7k04hd71D9PKmwLWjCJssMR3qLe078MgNrYO0ixa0=; b=a/CmSm2dpoCQjmX2wXe4CtneuCVZqk1YlIcwpeFcNLQONdSB5u3rRxBQ63ThCtQQjN m1kUCbTg3rnuxEtz1fZybjb7+XoTb/ImQqRrCiN345d0YhX6YmoouOrhFXDDBR7UG1My 9AbIoRvTFedDAvs/7E03JY9IufWtJNZoJhrSTZ/N5R7iu8R94gBNRLHrHPWsWYIo+mtq Eb8dRer51gy4wvJhalM1ZUn0RZ3YyolyZvkOTf5vFXWshh/sQtPQ3okiKuEqqSCln98h HAvAZEXR5Hu6wfhpHz01eahvg68syJRBWn73SHk6r1I25Zs293CmPy6/m8I//ifQz39H q+ag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ug8IkZKq; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-wireless+bounces-2533-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y20-20020a50e614000000b0055371b94b83si469745edm.53.2024.01.26.02.00.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 02:00:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2533-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ug8IkZKq; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-wireless+bounces-2533-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9DDCF1F24D58 for ; Fri, 26 Jan 2024 09:59:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DC4663112; Fri, 26 Jan 2024 09:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="ug8IkZKq" X-Original-To: linux-wireless@vger.kernel.org Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BFC51CD32 for ; Fri, 26 Jan 2024 09:10:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706260205; cv=none; b=rIY/wmR7b90+4qz1OaTh9G16CrjKkBxG9RCHfcGSB3UqM8nGcWUeQg+VVsH098r9V9iYxkpV+4fh+NVpCnl/K6aZi2TsV7H9D+pfb4A/Yc3Oxa/ASMSHh/mWRIGWyPnf3UK9GOnhzJ6YkaN30VCDFWbIvDXwN7WFSExi+9mS0UU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706260205; c=relaxed/simple; bh=YIm97YixRBHsCqczOSKY2Ky+nXfixVYB7ionXMyg64w=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Rumd7EMfQfMiTls3qQT4t8LopE6A+nOKB2RYK9P5PBzCygaC4VKfRul8GjJnYv7zNCTo83bHlaRunOJeS8FjY16GQDtlbfUa0o0tfRuxJvxsuzfTJI7r5iI27/mgL0BYVOsJOZUaVAyorsNuLKsbc1e2gPAN/YwWA/OEt4WPTak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=ug8IkZKq; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: a9e1d11cbc2a11eea2298b7352fd921d-20240126 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=8R6XJUdM4OX6YZvqNiswbsRfy05UZJX8Sl1ACJA7ofE=; b=ug8IkZKqAtxgMYo+hI0sHdq3GoYNeGgikX2O0IFElbPIrrOv4oob8SjmvLiU9oR6oWBQum84OwCjHE6XIlTmfejkIXKqy4AJKE4eaQKF4WwVaMuJsMiHndi+ZJLjSIAi7M12UOd32cV5xMEbGPDh7zmL+ZeCrqDircn82jw3+SE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.36,REQID:c38eea74-5cbe-4b97-bf3b-f63694665930,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6e16cf4,CLOUDID:1a414983-8d4f-477b-89d2-1e3bdbef96d1,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: a9e1d11cbc2a11eea2298b7352fd921d-20240126 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1249075196; Fri, 26 Jan 2024 17:09:51 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 26 Jan 2024 17:09:50 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 26 Jan 2024 17:09:50 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Bo Jiao , linux-mediatek , Shayne Chen Subject: [PATCH v2 11/12] wifi: mt76: connac: set correct muar_idx for mt799x chipsets Date: Fri, 26 Jan 2024 17:09:22 +0800 Message-ID: <20240126090923.6357-11-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240126090923.6357-1-shayne.chen@mediatek.com> References: <20240126090923.6357-1-shayne.chen@mediatek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--7.828000-8.000000 X-TMASE-MatchedRID: vws8hDIFFaMWBq7RS3cuV+G5dRZCgxC3gHzgwy8qV5os/uUAk6xP7PlY oV6p/cSxmX/XWgxo3gzY07Y6b1ctINvWh31RtNY8ngIgpj8eDcAZ1CdBJOsoY8RB0bsfrpPIfiA qrjYtFiQbwNee2pVTlW6Utbit3SRvfw8OUuId6ZupSfcXfsp6K37cGd19dSFd X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--7.828000-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: CE695003E5315B9D23078F5661B99C05B3B81D8F4AFE8FDED07608DF2AACEA182000:8 X-MTK: N The MUAR (multicast unicast address) is an address mapping table that participates in the process of searching WTBL entries. For mt799x chipsets, the default muar index of BMC WTBL is 0xe. Signed-off-by: Shayne Chen --- v2: update commit message --- drivers/net/wireless/mediatek/mt76/mt76_connac.h | 5 +++++ drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac.h index fdde3d70b300..98d64d3d2993 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac.h +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac.h @@ -227,6 +227,11 @@ static inline bool is_mt7992(struct mt76_dev *dev) return mt76_chip(dev) == 0x7992; } +static inline bool is_mt799x(struct mt76_dev *dev) +{ + return is_mt7996(dev) || is_mt7992(dev); +} + static inline bool is_mt7622(struct mt76_dev *dev) { if (!IS_ENABLED(CONFIG_MT7622_WMAC)) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 96494ba2fdf7..3140d0cc8f59 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -283,6 +283,9 @@ __mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif *mvif, }; struct sk_buff *skb; + if (is_mt799x(dev) && !wcid->sta) + hdr.muar_idx = 0xe; + mt76_connac_mcu_get_wlan_idx(dev, wcid, &hdr.wlan_idx_lo, &hdr.wlan_idx_hi); skb = mt76_mcu_msg_alloc(dev, NULL, len); -- 2.39.2