Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp857351lqm; Wed, 1 May 2024 19:25:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGhZr1h5JscL6WuIiyyI4rg7Y2cTVC9YWb5cX2XNDKvon0NfwIkv0hNpG14nPDpOX+JgT2TGvxGFZirJ4zzNlnADqRSW69AVEuxgmpqw== X-Google-Smtp-Source: AGHT+IGPRC4jqGU1QJTS+5FothcECcbkEdRfvWaxGJsmWCMN5E14G4ctDVT4TciFPG/3ym1ZBD4E X-Received: by 2002:a50:a6cf:0:b0:570:1de6:8a2d with SMTP id f15-20020a50a6cf000000b005701de68a2dmr2407763edc.10.1714616729267; Wed, 01 May 2024 19:25:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714616729; cv=pass; d=google.com; s=arc-20160816; b=gvUveKXya1uRZ0vR5yKg6bkNuRte2lKfKOgEK3kPokZsdplFr4N58lZsHutAe63Sb3 zhlUmaixY27rE2Rc5h/GO7y4ETOHVdGo8SYwRsIt3Oub7/4uUnBbVlAxLm9KP4/FkZf/ hi0zPhZnMGIOuEwiyWDb9Y1WjEXJHXDSGk7YKMONv+cba4yePePyspYAIeT+zNsueQJk eNYGh0E8yEg4YdDDPEwo2Py/Y9zd8jdiKlDsB1/2lLPID6+gsO+R4OmT5xSSIZmPQsOi xaP5UrB+jKIzYdfpJsHsWoRK3FBcEoF6SGnmk0+NbZEXSXD/RY+dgC8jA4SFGXuBggoK ndqQ== 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=eMLzEotdlLO7l4L2Wgjuxx5LM/tdn+tR4Q7TEirCIk4=; fh=Q+3JKoLZIMN+muDUq31kjnNN0UgJXr8C3Bak/Yf/zn8=; b=f+hCtlRa0bvpCvvqOgN8CByYxqWyfKPiDRO3rZ/BZPn9iGVMCxDvPmDIvT9CzlmuPi s9YtAmSyBGCu9wX8Qai9YHJINRi9CPk1iHynIqKiJmCtC54FaTlZxsMi/Z/lW+/Kh1DJ r5TfmX5Ypj7Af96Zlwuk3PK+YhBaqO03dupJdhrTI5Rl/+n/D/bOPfq8lGVOasj4ghGp H+94+yD9Vl06lzMLz55oFYtXtDAiLfRrA9wJQMda7ROQNPxUfP1dif9gk9OzLkqu0+em EPxFW23DilVXCoHMHAEFbPYceagtT4FPK0UrsWa9ImdJQ4dt73a3680EeRn3GIZgKWZc umcA==; 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-7088-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7088-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a24-20020a50c318000000b005729ebea898si2117280edb.416.2024.05.01.19.25.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 19:25:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7088-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-7088-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7088-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 0767A1F20F74 for ; Thu, 2 May 2024 02:25:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3995171AA; Thu, 2 May 2024 02:25:27 +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 CD3B21862F for ; Thu, 2 May 2024 02:25:24 +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=1714616727; cv=none; b=ooadresdXXVt1dWpTlki3FsH9v2ONmYAHNRqGBoSRrma4VdNP2JGkBTASOCx2514521JFhstwMorL3CVJ8OkJq1IDpBLGC3/VTHG/tfOvdhKs61fM8C9SFpPEtGDcuDC9uhL50zrqZYmczZArfSOETXYXCjkUh5zkJQC7uzwSX4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714616727; c=relaxed/simple; bh=Epnh8Zz6nAbgQp9ljunITpwsy7xtbtb7BSkqfljswAc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uIZQNGVO0bDLFuLC1iZNXKSEBHieYJBKeaXfLtNdEJX/lCmnK7TAWHgAuhi7QmqidX34R/yWCiwQVuAvUIcfcGUgTRt9H3zquzH22Af4x9JEsRUfEhW7j92k/g3N19XCfpymB8AHiCIJ429pNu93+aLYo4Zv7R57wpZ1RtG5Im0= 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 4422PL3b82026285, 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 4422PL3b82026285 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 2 May 2024 10:25:21 +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.35; Thu, 2 May 2024 10:25:21 +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; Thu, 2 May 2024 10:25:21 +0800 From: Ping-Ke Shih To: CC: , Subject: [PATCH v2 01/12] wifi: rtw89: wow: send RFK pre-nofity H2C command in WoWLAN mode Date: Thu, 2 May 2024 10:24:54 +0800 Message-ID: <20240502022505.28966-2-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240502022505.28966-1-pkshih@realtek.com> References: <20240502022505.28966-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 From: Chin-Yen Lee 802.11be WiFi chips need a RFK (RF calibration) notify H2C command after downloading WoWLAN firmware to make sure RF TX/RX work fine when leaving power save mode, so add it to correct RF TX/RX in WoWLAN mode. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/wow.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c index ccad026defb5..f7e96fcbbaba 100644 --- a/drivers/net/wireless/realtek/rtw89/wow.c +++ b/drivers/net/wireless/realtek/rtw89/wow.c @@ -454,6 +454,7 @@ static int rtw89_wow_check_fw_status(struct rtw89_dev *rtwdev, bool wow_enable) static int rtw89_wow_swap_fw(struct rtw89_dev *rtwdev, bool wow) { enum rtw89_fw_type fw_type = wow ? RTW89_FW_WOWLAN : RTW89_FW_NORMAL; + enum rtw89_chip_gen chip_gen = rtwdev->chip->chip_gen; struct rtw89_wow_param *rtw_wow = &rtwdev->wow; struct ieee80211_vif *wow_vif = rtw_wow->wow_vif; struct rtw89_vif *rtwvif = (struct rtw89_vif *)wow_vif->drv_priv; @@ -519,6 +520,9 @@ static int rtw89_wow_swap_fw(struct rtw89_dev *rtwdev, bool wow) rtw89_chip_cfg_txpwr_ul_tb_offset(rtwdev, wow_vif); } + if (chip_gen == RTW89_CHIP_BE) + rtw89_phy_rfk_pre_ntfy_and_wait(rtwdev, RTW89_PHY_0, 5); + rtw89_mac_hw_mgnt_sec(rtwdev, wow); rtw89_hci_enable_intr(rtwdev); -- 2.25.1