Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp750830rdb; Thu, 8 Feb 2024 23:01:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNkHVEFzOSPQ/t6CgUdo03ZFZ2dJuTvwzuDHKN10s+KIYWLvhxaHDS9P7vTJmVa5U9kOqP X-Received: by 2002:a17:902:d902:b0:1d5:f36c:8737 with SMTP id c2-20020a170902d90200b001d5f36c8737mr619636plz.68.1707462078030; Thu, 08 Feb 2024 23:01:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707462078; cv=pass; d=google.com; s=arc-20160816; b=HeJJFJ528voXUomhqRzGhBK34LscSJU5w4j2qfkpafzK6PiPC4uNyxcUpAI/pyJuRu jfdbN2yYS/RcLdldwMnOyWe0Mf+HV096HUsDKpkRwGmbtHktv+VxLqny6UO9MQJ1svyM AZ3w38vf06bZmVPxpbWwpJ7fRxiPiF4ZWXCo+T4venaHZ/1NyPx/KKpq7Z0+IOPqJ2hR Oq1013KnBJENhk/rWl4nI9b8aiwuUXAC+Earv4I7r7S5BGJrAC2KCpR9kpRC5JUxaYKP j6S/x4TEYqL4N+VRH/tB8FO1ng0XXsTXBLxpD3SAfjWIet6SIygZr1PxJAemdXLu6949 2NlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=ZivO0TWvBbOKxd7kDt6AL94whU4Gsa4rTkmCkcb6eRY=; fh=LKcNVyqaX+mNHBuOQogGJBFWT/PHm3L+7TNBCHVd3dQ=; b=bnWSyEz3JdYzY1JaI4i5M1kUdiQeiuDjR+qOrwsstg22NCYUYd2n/G2V6gKZM6V627 CCVSXqL+Zv1Utc0hJJJ9lKcTVmKuyAf/j4Az0jpRCIs/hVIhtI+gphCA10xua6D9xMaI MgxCgJDegy2jQ/Zzv/JMiopWw/UZDYQpdEh7aT6OjtGt1gIPXM30vstJ0YOTxSjiJN0w C1sWljK0ag2dLxT/zu2MAoGSEtz/CbDiF+oulyikZcQbIEqA/A8QqAQzChjc3QYpuw5O 4rn3O10awXUxMbYZmYILADWh8D1NltYEslJzEE5sHoWvDsp1qtbeVNtty9tPBVbI1jcs pp9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3374-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCWyp+uLLS4JubWZ5tiOZSK7QedCeR1v1c1vIN7OpfK67LpQlCTMXARYdYf2zlcgNkKP16yUCO9kylXx7vx+DIje/wE3MpIPyrkN1Uq/Aw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p5-20020a170902ebc500b001d99ab3b521si1187108plg.568.2024.02.08.23.01.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 23:01:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3374-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D5A53B2788B for ; Fri, 9 Feb 2024 06:54:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5343965BB6; Fri, 9 Feb 2024 06:53:45 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F5D565BB2 for ; Fri, 9 Feb 2024 06:53:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707461625; cv=none; b=KGaTG0H0+xMyiI64wq4+20QSGQSpjW0ADiDmwBHJLvd9h5hwpoaywBs4Ae8upjTZ87WtS63RxubMvBa/5F5DmcnWyv0GMi2LEt/jwV9iSQXGJTrFRjbsN9CLKnRDxmdHN19CqL8u3K7iJjKi98kGutOE+BR3nuETkV72wRurxnU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707461625; c=relaxed/simple; bh=8pGvmfwUQthgVaat8/Dz+7LloEvIPB6wdcKqYxaXbew=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=s0Sj9hn8bL7xFYdOs3TltII+z+83aMN2M4f5F4qQA3Vs+xRpJR2AXOEphBHZRJDH9/B/eLT9R0B8WHrgwR9VCVxMBs5p/CZMs4HaXxZaVMyF21BwibURZ83nRRjpWozU8Lrvu8N1PoAjwQX4L9fQp2yMsWAOefCNo1TApTJCCto= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 4196rcwB7548399, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 4196rcwB7548399 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 9 Feb 2024 14:53:38 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.17; Fri, 9 Feb 2024 14:53:38 +0800 Received: from [127.0.1.1] (172.16.16.210) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 9 Feb 2024 14:53:38 +0800 From: Ping-Ke Shih To: CC: , , , Subject: [PATCH v2 05/11] wifi: rtw89: mac: reset PHY-1 hardware when going to enable/disable Date: Fri, 9 Feb 2024 14:52:23 +0800 Message-ID: <20240209065229.34515-6-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240209065229.34515-1-pkshih@realtek.com> References: <20240209065229.34515-1-pkshih@realtek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) When going to use PHY-1, reset the hardware to make it work properly. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/mac_be.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/mac_be.c b/drivers/net/wireless/realtek/rtw89/mac_be.c index fdbfb76f97ee..f3c82751993c 100644 --- a/drivers/net/wireless/realtek/rtw89/mac_be.c +++ b/drivers/net/wireless/realtek/rtw89/mac_be.c @@ -1546,6 +1546,13 @@ static int preload_init_be(struct rtw89_dev *rtwdev, u8 mac_idx, static int dbcc_bb_ctrl_be(struct rtw89_dev *rtwdev, bool bb1_en) { + u32 set = B_BE_FEN_BB1PLAT_RSTB | B_BE_FEN_BB1_IP_RSTN; + + if (bb1_en) + rtw89_write32_set(rtwdev, R_BE_FEN_RST_ENABLE, set); + else + rtw89_write32_clr(rtwdev, R_BE_FEN_RST_ENABLE, set); + return 0; } -- 2.25.1