Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp784rdb; Wed, 7 Feb 2024 18:30:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjcOG852gv0PVlHQW0AdGv+a8gNKiIwofjiYhprEPSjbSW9ZPzPiT/laJ1fDTpSvc/r+se X-Received: by 2002:a17:902:e549:b0:1d8:f6af:77db with SMTP id n9-20020a170902e54900b001d8f6af77dbmr2084744plf.12.1707359417734; Wed, 07 Feb 2024 18:30:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707359417; cv=pass; d=google.com; s=arc-20160816; b=LUSHLYKfmZwOSPto+MeSfZChwxtEkD1nD6Dr3C7u7F8381zBfGgCTghb27nP9K9AP9 0kmikfPR3IbpBFWO56s7vYsthH9xRX3NVrMEWbLdvmOz3BY2QZevRcwlVcJ7ILoc++b4 MYxZl76n73iWRKb3Ib/7CUp3AZgAmlObYoWM45n25i5Y/920zkYuERYPq60ypnt/L2ys hYFlW6tIrV2zAOHzgXLx8Tf9M45Aeq5Hmi9pV0NTIK+M22Hs1ySeHEV8XxGy86fQApuv WayvyZH/D6k+XEVigdlaGRogN6QxWw3TfAIGnHajM/Cbq2E4o0RSJhy1Wx2pHXPr2wgW WLgQ== 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=bHKoNQvV6ox54jiYCPcgBciku7vWNO4jJbxxGBAAWnM=; b=nkQBShRGxs3UCNIKDZoPt7nZCqxkcGQvLi8cTHV+lRiHn8GsOLbD72wUunXQhbHLG9 /r1wXKpE4nI+QC6fI8Gg6hc9Kx1qvz0QXPo+O9FCY4Iv1vZmcXIuvVrqgR505DqeMRMN VdUdCCGBItr0vwJ5c1SEZ9SK6KTGmc7pwVisZQoFHs0X8ry6OQwmwCr1959UFAIsSMHe lHrDqs1yEpZIme7/eh3b0Hvzb13JkLlKX4NX89z39FJ4oQRvn7MqWyaM1Vk+yIlTOXLe 4A+HMgXo0Ch0CbMbdDbiIh3vd4UPCizpjqJ4k5AeY8ZX3Szb79sIYUmlDSwl+BEPtkyO XCAQ==; 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-3317-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3317-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCVIfi2IgKQTwXFlm9pV3fSdlBvzdtmVcQdIusEVZ0qPqW1QZ7vaH5RDtonY/PTdxm1IjfTOcLui5ihsPTHfvuHBlb0FenPf2cUc9mBF1g== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u4-20020a170902e80400b001d9f92ead03si2057446plg.523.2024.02.07.18.30.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 18:30:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3317-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3317-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3317-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 432B02864BF for ; Thu, 8 Feb 2024 02:30:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78C041BDE2; Thu, 8 Feb 2024 02:30:12 +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 B620919470 for ; Thu, 8 Feb 2024 02:30:10 +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=1707359412; cv=none; b=YNNaTHVfSOlRM6UD5RRc4DrstiS2TMOodI4KO1ZZNGLMYnL6khM5IfrBurXFEq/09TIZDpcRdKTSDvTZ3SQnT1VenUeWh5IJF/GLK/x2ACuCntGvFMgTMmM2Mc9M49FzPh1TYUZWTXECaYnpIlxb4nHjJL3r0P8vcEl05aGtVyI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707359412; c=relaxed/simple; bh=8pGvmfwUQthgVaat8/Dz+7LloEvIPB6wdcKqYxaXbew=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tVut85zIi6YKth3FscRBUg6UXLlPt8/09NweP04fmYvFEF+AQX+j1MldGE5Q7Caw788nte86TNxWtTi19eUBJ4oNtu+k3bCW7PHHAL6tQeE+gIK+RtPO+ql+vg+9gv9oPWSSIMS9ska4wb1zUL3YcM0K2vMmoWFp7FcJ+05t9Vw= 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 4182U5lnC191992, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 4182U5lnC191992 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Feb 2024 10:30:05 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.32; Thu, 8 Feb 2024 10:30:05 +0800 Received: from [127.0.1.1] (172.16.17.45) 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; Thu, 8 Feb 2024 10:30:04 +0800 From: Ping-Ke Shih To: CC: , , , Subject: [PATCH 05/11] wifi: rtw89: mac: reset PHY-1 hardware when going to enable/disable Date: Thu, 8 Feb 2024 10:28:51 +0800 Message-ID: <20240208022857.14379-6-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240208022857.14379-1-pkshih@realtek.com> References: <20240208022857.14379-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) X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback 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