Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp8139423rdb; Thu, 4 Jan 2024 22:44:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFOfFUo/6fgGnkloe6MkUUh/vnCKfJDMMq5+6JRZGUEA1cXdsWvKbbMyArccJJmqmUFRSFj X-Received: by 2002:ac8:43d8:0:b0:429:729c:8353 with SMTP id w24-20020ac843d8000000b00429729c8353mr1881977qtn.8.1704437067085; Thu, 04 Jan 2024 22:44:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704437067; cv=none; d=google.com; s=arc-20160816; b=gC2yETmnS5OqSynRhfYLKuL2ft+XXZfIp7keJkhrp38sbdEBUxwlrEcsys6n0P5TbS FyW9cEiUqyP5jkqnTQNF8L0ErRqbcrThdCR6TuH5akGHZnhThsHPEBs5GoB6CHNniNDC RhNKIgtWijUf9ZDeptWT7naAjnKW1QwzhTE6+D+eto5kOmFOcUauToeG5QBx0McyjFDI Pm1ATcwiPZpX17OpyQoMtTidH/A6rwDAIdpOlY5xYL7PvfSoKNX7qYARGn4ZLcY3yCzj evK6d8rYPqsWdxfLD6LqGtzkkYT0gdGpQq7TqMFYz5xucSNf6v1Yds+IpME1KlloKP1V +ViA== ARC-Message-Signature: i=1; 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=lCjkRAm8T9TzxZo6WZKot9r4E9OZau/1ei540f0MbO8=; fh=4TwZRPLNtLn/VqA3P2pgPgY9r+920GaYRrLXbPJjOsY=; b=YNFsu3w51g81kAuDgWZ1rrpYTnL5bBaO0EjOXEev66nsUEh342SuynuIW97PjZkjJo 0IH13ZkUx0Bon2NVxprU/SEHuQK26pG37c11yxbynaN/LTmIlpFFw3CKOsBuRmWcH7iZ ZS8kyQM/1zW7gI/MDCWmv5GP+pbydbplKbS8xgZMayzjVqiilxrYK7wIfQLxRFxSTWNa UGWjwSPEcJMWlLD0u9MU7tq79ZbRn585aUnbnvMdmyTo7/bcJYKmOv2PTCiQYNh0MfRK +0ikQyEUB3IujA09UIJceCf7fg9LJ0+kURlBURtNeznIPccIH38EO+yqsK/WKGRS/s2L h6Pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-1515-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1515-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v7-20020a05622a130700b00428032714basi1204173qtk.212.2024.01.04.22.44.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 22:44:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1515-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-1515-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1515-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D0ACA1C21324 for ; Fri, 5 Jan 2024 06:44:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09B3A7E; Fri, 5 Jan 2024 06:44:24 +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 A51C920B09 for ; Fri, 5 Jan 2024 06:44:22 +0000 (UTC) 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 4056iHSA12201670, 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 4056iHSA12201670 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 Jan 2024 14:44:17 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Fri, 5 Jan 2024 14:44:18 +0800 Received: from [127.0.1.1] (172.21.69.94) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 5 Jan 2024 14:44:17 +0800 From: Ping-Ke Shih To: CC: , , Subject: [PATCH 5/8] wifi: rtw89: phy: ignore special data from BB parameter file Date: Fri, 5 Jan 2024 14:44:07 +0800 Message-ID: <20240105064407.36750-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240105064228.36580-1-pkshih@realtek.com> References: <20240105064228.36580-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 RTEXDAG02.realtek.com.tw (172.21.6.101) X-KSE-ServerInfo: RTEXDAG02.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback 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 BB parameter file is a list of tuple {addr, val} with conditional hardware version. However, tuples within a condition can't be empty, so insert a special dummy tuple for this case. Then, ignore this tuple when writing. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/phy.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h index 1b74ba9e1a8b..662425ba395b 100644 --- a/drivers/net/wireless/realtek/rtw89/core.h +++ b/drivers/net/wireless/realtek/rtw89/core.h @@ -32,6 +32,7 @@ extern const struct ieee80211_ops rtw89_ops; #define MASKDWORD 0xffffffff #define RFREG_MASK 0xfffff #define INV_RF_DATA 0xffffffff +#define BYPASS_CR_DATA 0xbabecafe #define RTW89_TRACK_WORK_PERIOD round_jiffies_relative(HZ * 2) #define RTW89_FORBID_BA_TIMER round_jiffies_relative(HZ * 4) diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wireless/realtek/rtw89/phy.c index 37fc1a7e888f..3efc6bbdf624 100644 --- a/drivers/net/wireless/realtek/rtw89/phy.c +++ b/drivers/net/wireless/realtek/rtw89/phy.c @@ -905,6 +905,8 @@ static void rtw89_phy_config_bb_reg(struct rtw89_dev *rtwdev, udelay(5); else if (reg->addr == 0xf9) udelay(1); + else if (reg->data == BYPASS_CR_DATA) + rtw89_debug(rtwdev, RTW89_DBG_PHY_TRACK, "Bypass CR 0x%x\n", reg->addr); else rtw89_phy_write32(rtwdev, reg->addr, reg->data); } -- 2.25.1