From patchwork Wed Dec 13 00:50:48 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: 753913 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FA90A0 for ; Tue, 12 Dec 2023 16:52:15 -0800 (PST) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3BD0q7IR13838288, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 3BD0q7IR13838288 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Dec 2023 08:52:07 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Wed, 13 Dec 2023 08:52:07 +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_128_GCM_SHA256) id 15.1.2375.7; Wed, 13 Dec 2023 08:52:07 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH v2 0/6] wifi: rtw89: add/modify three fw elements and related RFK log Date: Wed, 13 Dec 2023 08:50:48 +0800 Message-ID: <20231213005054.10568-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 X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback Patches 1/6 to 3/6 are to add/modify three firmware elements. First is to add an new element to add TX power track tables that helps to adjust TX power according to increasing/decreasing thermal value. Second is to modify existing element of BB MCU firmware, because we need to add a field to point out hardware version. Since we have not released firmware yet, no need to process backward compatible thing. The third patch is to add formatted string of firmware C2H events triggered by firmware RFK (RF calibration) to help debugging. When RFK is running in firmware, it sends logs with formatted string ID via C2H events, and then patch 6/6 uses the ID to find corresponding formatted string as first argument of printf() with fixed four arguments. The remaining patches are to handle the C2H events and print out RFK status or log in plain text. v2: - rebase to top of wireless-next to avoid conflict of patch 5/6, because another patchset change fw.h nearby. Ping-Ke Shih (6): wifi: rtw89: fw: load TX power track tables from fw_element wifi: rtw89: fw: add version field to BB MCU firmware element wifi: rtw89: load RFK log format string from firmware file wifi: rtw89: add C2H event handlers of RFK log and report wifi: rtw89: parse and print out RFK log from C2H events wifi: rtw89: phy: print out RFK log with formatted string drivers/net/wireless/realtek/rtw89/core.h | 6 + drivers/net/wireless/realtek/rtw89/fw.c | 110 +++++++- drivers/net/wireless/realtek/rtw89/fw.h | 144 +++++++++++ drivers/net/wireless/realtek/rtw89/phy.c | 300 ++++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/phy.h | 24 +- 5 files changed, 581 insertions(+), 3 deletions(-)