Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp867834rdb; Fri, 19 Jan 2024 00:58:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1GhNqJWqBQOinAlKfaxv35N4jn3aAMvdf+sq+5juatUbSImaVpBZ+1MlsKwDBQF49ohow X-Received: by 2002:ac8:7e82:0:b0:42a:15cb:c55e with SMTP id w2-20020ac87e82000000b0042a15cbc55emr2495742qtj.119.1705654696307; Fri, 19 Jan 2024 00:58:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705654696; cv=pass; d=google.com; s=arc-20160816; b=aOcExMYkqYRQLB/kIbm3TKqpcNsTOhHM+xI7HsyvEo05l9MxP1sLwWFyEYRAdzQLoA vNJMoKpPq3JD5CLQitggfz64fIEXrEtJf67aAFTj81tLym2FOnNuUwxHnF95wk/b2nP7 pcpYwE1wEQA6IgOAvJFJBPw0amL8hVmGL818g6/Gu4BqNkMzDJ946X7+8/OfW8c7j3E1 crzXYNKAD5XC63KFx3SPzAuTh6Uhc/rQnXPWrfWizziYqTTP+7wkxWhEdUR4elviqmxU Z9LNdhLRcvqV/fBwNBUWrcaCAiWgLcMUJL9VdkH4VieQ25aRb3tcx8vawuyvMhoVfigF XXvw== 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=CprID0kYRxdIpvoTLuqLkrEdyQZnRVPhVd6rP/t5gIA=; fh=1a7k04hd71D9PKmwLWjCJssMR3qLe078MgNrYO0ixa0=; b=0LxAhKXLPFYz7W3ayh/75PDNTl3mcmTnYcQbOQPbqwoQ/AaHFxF8SYI7LtBxdnv2gP MRZyWGH/L1tcB8xLTUuacfZeyfkblvfwpzRuPkoGvJBXCRS1iOl2oDF6cXdq65lWubUL A+lpidcZSpylYr3gs/ZmdKEkYd09lWQDacmO2ufCQRrAW5cL3OjsFI5X02fo/5RjABvW s7eG9gKIKyEvANj7rNclQRSleLXStto6V2c8ZH1B5ZZdkJxFlTwyWISVE1N53UG++UUo gOolnsoQnBBMkfxYC523FV0p81OnZEWL7NNLoPtGMa5ozVsvZGjHiJLO6coxaq7IV8XP u1wQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="U/ShzYpo"; 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-2240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c16-20020a05622a025000b0042a08802770si6755703qtx.355.2024.01.19.00.58.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 00:58:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="U/ShzYpo"; 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-2240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2240-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 169D51C227EC for ; Fri, 19 Jan 2024 08:58:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DF6828E07; Fri, 19 Jan 2024 08:57:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="U/ShzYpo" X-Original-To: linux-wireless@vger.kernel.org Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (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 CBC4C24208 for ; Fri, 19 Jan 2024 08:57:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705654667; cv=none; b=dWEaq/ZD2PsIvo8pkXiMpUcra3gfOJdF8/4ezdZhhb97wQCIJSUFhQBeQH++ny8GfnArDtDpgzvB5WnNzFHw80+RaPyyp5b1G2StzNlnRvrsCjmk/Xqk2DFAdswBGy5/3jQyhYKbuZ9MLiH1tViUdpIFgLTDfYsxvCLVkHqOwhA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705654667; c=relaxed/simple; bh=NB6gkQjrqTYDnKz2ylAeilRdqpcQRvjYET53wp4mp8c=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=syMwgc2io863VOLfB/lCwHjbaX5IBRcDvrsm02kx2r/ix45GXo3W8+1ABAnCYBY2LX3waqQ+fsQ1zUqp5zyNWp7BamtDbG90jb6Gl/v/VAeICGQC8fGDOHlJtAQx1Xw2lYa8JgQXaVH5HyO3OozmDq0GmBCBWfpqMmmxw+HCWmA= 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=U/ShzYpo; arc=none smtp.client-ip=60.244.123.138 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: cb89b938b6a811ee9e680517dc993faa-20240119 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=CprID0kYRxdIpvoTLuqLkrEdyQZnRVPhVd6rP/t5gIA=; b=U/ShzYpoVEKFnrobGjUiC9xSu1HYeFiDUc631MVOvhbcLPW4/6dFimaOrgsPpjUzLMNz4s9Hbb9MBOe40QehmYUKBv5ndlpBQgMGKK/D4u9hRt/Q7gyCVTiyYYfmGZUrHDci/aW52EvvpKZRjp0HMyocvr92Rb4Q8hyNt839u5g=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.36,REQID:9b567c47-5f20-439a-844d-d4bc036ef1da,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:a7a2877f-4f93-4875-95e7-8c66ea833d57,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: cb89b938b6a811ee9e680517dc993faa-20240119 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1488538541; Fri, 19 Jan 2024 16:57:38 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 19 Jan 2024 16:57:36 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 19 Jan 2024 16:57:36 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Bo Jiao , linux-mediatek , Shayne Chen Subject: [PATCH 11/12] wifi: mt76: connac: set correct muar_idx for mt799x chipsets Date: Fri, 19 Jan 2024 16:57:07 +0800 Message-ID: <20240119085708.23592-11-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240119085708.23592-1-shayne.chen@mediatek.com> References: <20240119085708.23592-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-MTK: N Set the muar_idx to 0xe for the BMC WTBL entries of mt799x chipsets. Signed-off-by: Shayne Chen --- 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