Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp637870lqg; Fri, 1 Mar 2024 17:00:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUrftylzia9iOXBoXghWZTHNLLqFwGiN67RiUWi/VDLaNxqaB5B81CcfRwtSH7rR87trrlLwywTlPOGhwJRRUUc5pRcYLBY3NqYxrgk8w== X-Google-Smtp-Source: AGHT+IH96r739kdY0PKcZbrksDN7mO/r4DGD5SZWrMvhDyKniY4sPrkW1FDmfxW9nfFT+vql8/hm X-Received: by 2002:a05:6358:c97:b0:17b:f6d6:2d54 with SMTP id o23-20020a0563580c9700b0017bf6d62d54mr3769776rwj.28.1709341248881; Fri, 01 Mar 2024 17:00:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709341248; cv=pass; d=google.com; s=arc-20160816; b=fKCPYhLXkB2Y/T5w2ZZ/x73sBOqGtrHaseNGEkilY3k9zkAYeBVD/HWYUvCqvRuY1M 6GYwJYahTqd6jCDkO3Cfd9bc1h5GULm08S2cv/SmZrxZISPUeYGgi6Z5NTnkf2bu6eV6 tvohpTibfNHS+DH2cpFhPeDItP9wPxj5elTB2+xMz2Ee9nLDhzZp6aJ6pzftVG6orau3 jo77A2k7+KPdKn+P3mIEqyQxv6n9ajtQrNGD5We9qTh22bm19ZhyLUERy3nxVbEsv+P5 ZNZyInq7biubYXODv9WWDKCAagqkPeaGvtQaAsnI9mvC7CFWYIpW4ulaJ15E04hm/a46 0WyQ== 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=PTer8gK2Gg/HXdT+DRE9nZbBEwbNPkWUpjsUi6DqhUU=; fh=rwbbOpirGLazcG3VmHY7vQI1XGYPlr4kq9/FvO3l4jE=; b=fJ4QgIRwbroWu6O3o7GAMYsRt7MsW9EyPaxasZmX2yfYLXLN5JF/Jk45gMfjyeAgX+ PhkUDyBhOVrCDw0wpzFadBpOxVsL8QNh0hSXKX/x6PjH2t7Bkff94o5Ieoc94He16Ebh bAEirbtbo+t/wLe5QlmKn7ifd2AqSZe9MJ1ssrWirqBgtkokQ2m8dTY1WUZlspq4P1qn ZY727PVJBT9PdZH6SqLcajlPlI0odRSVG7zU6swvYOqomf476jXBEf/NzPf4oWQB7JAq iLVfWIU3Nwpgo9fb+vFrIhtpclZJbrMnS6T66+xlAsrkr0YikeOo9oQRCSFHPU+hIrDk nxSQ==; 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-4320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4320-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 or32-20020a05621446a000b0068fd04b90b0si4661531qvb.103.2024.03.01.17.00.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 17:00:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4320-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; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-4320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4320-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 984751C218EE for ; Sat, 2 Mar 2024 01:00:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F73A10942; Sat, 2 Mar 2024 01:00:08 +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 624537482 for ; Sat, 2 Mar 2024 01:00:04 +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=1709341208; cv=none; b=JY8d55rmnsBRTwn47jImJ32FE7zrZF+f2WZGhMKVl7FUIkh0qO9udQjWxqvV+on0hUI6LWh3wx3PNHFrTGHSiZYEsx0ihm+B4m2btiHlUcNP1cALxHwJQ5Qv90vUfoJrhtzYKQEjEPLGkDsjbmHd78UahsA4+HGYurgj9MxwV3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709341208; c=relaxed/simple; bh=EU35oZDg58FzvIpCxltGl5VTlzicXLQTmNP/lawpntU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XrstNBVBAcCSJWMiKDJNCgW0s6+NejHjjxhZknBweMW6pz5FT+fv2DLFfcBLFuggD2Tx+YyWsygt1Uryi1nDV5uQ82WwQ7ngxLQ0KGHMSotXofap0ushLSAbCjkWuWwt4QI1zdqWLWPFRcB6kU2UkhUBysR9Pj7o1NAeq5hDH8A= 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 4220xx9T32370316, 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 4220xx9T32370316 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 2 Mar 2024 08:59: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.2375.32; Sat, 2 Mar 2024 09:00:00 +0800 Received: from [127.0.1.1] (172.16.16.155) 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; Sat, 2 Mar 2024 08:59:59 +0800 From: Ping-Ke Shih To: CC: , Subject: [PATCH 7/7] wifi: rtw89: wow: move release offload packet earlier for WoWLAN mode Date: Sat, 2 Mar 2024 08:58:28 +0800 Message-ID: <20240302005828.13666-8-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240302005828.13666-1-pkshih@realtek.com> References: <20240302005828.13666-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 Now WoWLAN firmware will disable PCIE DMA after driver call cfg_wake function, and it will lead to release offload packet fail because driver can't receive completion notification from firmware. We move release offload packet earlier to avoid this error. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/wow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c index 689a4e94387a..ccad026defb5 100644 --- a/drivers/net/wireless/realtek/rtw89/wow.c +++ b/drivers/net/wireless/realtek/rtw89/wow.c @@ -667,14 +667,14 @@ static int rtw89_wow_fw_stop(struct rtw89_dev *rtwdev) goto out; } + rtw89_fw_release_general_pkt_list(rtwdev, true); + ret = rtw89_wow_cfg_wake(rtwdev, false); if (ret) { rtw89_err(rtwdev, "wow: failed to disable config wake\n"); goto out; } - rtw89_fw_release_general_pkt_list(rtwdev, true); - ret = rtw89_wow_check_fw_status(rtwdev, false); if (ret) { rtw89_err(rtwdev, "wow: failed to check disable fw ready\n"); -- 2.25.1