Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp651801lqo; Thu, 16 May 2024 18:36:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVUkWEh2zy1Z1IGdJSWIIJmp7gmwU2dZ4PNDKYCiO87OAisLM0R7DnUa1auvPDVo9550Pp+uZvMel8q+lk3pLprUX+rmH8EHKMNSJmkpw== X-Google-Smtp-Source: AGHT+IFxBKKaOagv4bPADFWOjRClpjAJCoofKgQ7THRkhmrF9yu3eMvJvNibiNBxAKOfjRbSfRTV X-Received: by 2002:a17:907:980d:b0:a5a:5496:3c76 with SMTP id a640c23a62f3a-a5a54963cdfmr1413472466b.6.1715909770202; Thu, 16 May 2024 18:36:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715909770; cv=pass; d=google.com; s=arc-20160816; b=arlNxkw+pBrwJsJxGt2C55itYstfXBD1orJDSev6seCrIxKTdtwRHSQ9L3GfKuva2/ SKND3NfuhtL/JRP7BLUZo5zYzY5zq0i+/c6O5mXL6C0oDMayir01SfYB4Aq2jAhc7/8S RePxVjtTS52zhpMvBJvPyqkuB1eyTXMJtma8NGngqutS78P41vfUa9YvcTdi+QmYEo+e e7dTgoscw0ziRxfjUw7K6VDQEIAmfd5AaL/TQldzkzWx84noOd965/YqXGJWdj7Fc7ls owefKCaO4vX44Gu5Q3n23PL3yefa1ayGx9Vbf1C1C5l9afYTpTyF0E/7sNGLDXNsXcrk HeDw== 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:message-id:date:subject:to:from; bh=RE3v1y1Ny1cjPALYk+syYiNigX7CUeT+eXdWbmnKees=; fh=i+pR0Y9t94OKZsARqUkLMEmtPQHvmw7bpTYa9QkhXpo=; b=z3mgQWms0CnADCo5y7DNh0VF/FTSrf31H0y0F0mh1pcON/6BTvBdmrXx1/a4Ifb5JK Ub7n8PUCsjFFfAzfLr3fc12f40T6R/d1aMXaaOt4I8gUNnjsepY/I/iwyyKAVuPcKPBB KeiNFT3iLufbePWRTcVoXU5paBmJgnmIpK5tIuChXI6gYfbm5q+Hl9nvRcW+wsSrXaPX hX7FQNOd+CECZF9Lyxe1hYpz2+U3UQ3/QPGahTU77eIoNBcSDtONXV0gkT4RcQ8XRgGB Kq1jkroRuIaavWJP13hRztBK1l9VOjQ6mytgiEGalMbin5T/x2q7DpF90uOMfkc2qi92 rCVg==; 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-7756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7756-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21adcsi901324866b.401.2024.05.16.18.36.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 18:36:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-7756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7756-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B0ACF1F231AF for ; Fri, 17 May 2024 01:36:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC9E710F9; Fri, 17 May 2024 01:36:05 +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 1E9047E2 for ; Fri, 17 May 2024 01:36:01 +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=1715909765; cv=none; b=i9fifbajdcpdDN5Dkuq0cfFyXqpd1G3BXXpby5TP6aYhCcBzw1v1RVsHUL5k0wyXor+cxsE4wndG5nPvHvSjZKaGvFYI4CdrZmfkUX4upxCkxdOtVHdRC15Wxb9OgfM+nlabWpZ+S2W6Mqs9oNs0fFmIzdGylR0zrOB4LUFuma4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715909765; c=relaxed/simple; bh=xabT62dYwSdB8WjsKQQ1r0Lhb+KLUFt3QDSLHtK2+kM=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=eraGA5MrkPIUys8CEF85i0+Pji0uARAxTOuRcUWocR1twz2HZsWkzjNSEcB8TSVfuPjaQCDcX1mqenwk42+gSEYW+oGa9UYzL3/ArXFK/Oo2JdEkKs/h291yB840Ywnh1IxDNqaie6Ae70GZlGopeiDmuLN6Uy7MN1n5VgaMnDQ= 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 44H1ZxgwE1833836, 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 44H1ZxgwE1833836 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 17 May 2024 09:35:59 +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.2507.39; Fri, 17 May 2024 09:36:00 +0800 Received: from [127.0.1.1] (172.21.69.94) 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, 17 May 2024 09:35:59 +0800 From: Ping-Ke Shih To: Subject: [PATCH] wifi: rtw89: 8852b: restore setting for RFE type 5 after device resume Date: Fri, 17 May 2024 09:35:43 +0800 Message-ID: <20240517013543.11533-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 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) The RFE type 5 set SPS analog parameters only once at probe stage, but the setting is missing after suspend/resume, so remove restriction and set the value when card power on/off. Fixes: 3ef60f44830a ("wifi: rtw89: 8852b: update hardware parameters for RFE type 5") Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/rtw8852b.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852b.c b/drivers/net/wireless/realtek/rtw89/rtw8852b.c index 53ae00b5ab7c..517ad1a763fa 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852b.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852b.c @@ -403,6 +403,8 @@ static int rtw8852b_pwr_on_func(struct rtw89_dev *rtwdev) u32 val32; u32 ret; + rtw8852b_pwr_sps_ana(rtwdev); + rtw89_write32_clr(rtwdev, R_AX_SYS_PW_CTRL, B_AX_AFSM_WLSUS_EN | B_AX_AFSM_PCIE_SUS_EN); rtw89_write32_set(rtwdev, R_AX_SYS_PW_CTRL, B_AX_DIS_WLBT_PDNSUSEN_SOPC); @@ -530,9 +532,7 @@ static int rtw8852b_pwr_off_func(struct rtw89_dev *rtwdev) u32 val32; u32 ret; - /* Only do once during probe stage after reading efuse */ - if (!test_bit(RTW89_FLAG_PROBE_DONE, rtwdev->flags)) - rtw8852b_pwr_sps_ana(rtwdev); + rtw8852b_pwr_sps_ana(rtwdev); ret = rtw89_mac_write_xtal_si(rtwdev, XTAL_SI_ANAPAR_WL, XTAL_SI_RFC2RF, XTAL_SI_RFC2RF); -- 2.25.1