From patchwork Wed Apr 19 11:45:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping-Ke Shih X-Patchwork-Id: 13216678 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A347CC77B75 for ; Wed, 19 Apr 2023 11:45:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232831AbjDSLp6 (ORCPT ); Wed, 19 Apr 2023 07:45:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232403AbjDSLp5 (ORCPT ); Wed, 19 Apr 2023 07:45:57 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0684A4231 for ; Wed, 19 Apr 2023 04:45:55 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 33JBjlqT7009724, 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.81/5.90) with ESMTPS id 33JBjlqT7009724 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Wed, 19 Apr 2023 19:45:47 +0800 Received: from RTEXDAG01.realtek.com.tw (172.21.6.100) 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; Wed, 19 Apr 2023 19:45:47 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG01.realtek.com.tw (172.21.6.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 19 Apr 2023 19:45:47 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d]) by RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d%5]) with mapi id 15.01.2375.007; Wed, 19 Apr 2023 19:45:47 +0800 From: Ping-Ke Shih To: "kvalo@kernel.org" CC: "linux-wireless@vger.kernel.org" , "Kevin Yang" Subject: [PATCH 0/5] wifi: rtw89: wait for firmware ack for certain H2C commands Thread-Topic: [PATCH 0/5] wifi: rtw89: wait for firmware ack for certain H2C commands Thread-Index: AQHZcrR7E24lA9wuLUieNbPlauh+Xw== Date: Wed, 19 Apr 2023 11:45:47 +0000 Message-ID: Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.36.1-2 x-originating-ip: [172.16.16.139] x-kse-serverinfo: RTEXDAG01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-ID: <33634438B49274469746A351E57A4000@realtek.com> MIME-Version: 1.0 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 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Two H2C commands related scanning are needed to wait for firmware ack before sending another one, because firmware can't always handle burst H2C properly. To resolve this potential problem, add a wait mechanism. Also, refine related flow to delete offload packets. Zong-Zhe Yang (5): wifi: rtw89: release bit in rtw89_fw_h2c_del_pkt_offload() wifi: rtw89: refine packet offload delete flow of 6 GHz probe wifi: rtw89: packet offload wait for FW response wifi: rtw89: mac: handle C2H receive/done ACK in interrupt context wifi: rtw89: scan offload wait for FW done ACK drivers/net/wireless/realtek/rtw89/core.c | 44 ++++++++++++- drivers/net/wireless/realtek/rtw89/core.h | 20 +++--- drivers/net/wireless/realtek/rtw89/fw.c | 72 ++++++++++++---------- drivers/net/wireless/realtek/rtw89/fw.h | 70 ++++++++++++++------- drivers/net/wireless/realtek/rtw89/mac.c | 75 ++++++++++++++++++++--- 5 files changed, 208 insertions(+), 73 deletions(-)