From patchwork Tue Aug 29 02:19:12 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: 719431 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 AD0F9C83F15 for ; Tue, 29 Aug 2023 02:21:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235252AbjH2CUz (ORCPT ); Mon, 28 Aug 2023 22:20:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233502AbjH2CUb (ORCPT ); Mon, 28 Aug 2023 22:20:31 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 164CA124 for ; Mon, 28 Aug 2023 19:20:23 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 37T2JntyE018876, 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.81/5.90) with ESMTPS id 37T2JntyE018876 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 29 Aug 2023 10:19:49 +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; Tue, 29 Aug 2023 10:20:13 +0800 Received: from [127.0.1.1] (172.21.69.25) 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; Tue, 29 Aug 2023 10:20:13 +0800 From: Ping-Ke Shih To: CC: , Subject: [PATCH 0/6] wifi: rtw89: prepare timeslot and trigger firmware for MCC Date: Tue, 29 Aug 2023 10:19:12 +0800 Message-ID: <20230829021918.14599-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [172.21.69.25] 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 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This is second patchset to prepare more materials for MCC. It includes group 5 patch below that is to calculate timeslot assignment (or named pattern) for various combinations, such as use cases with/without BT devices connected. Since the detail calculation of timeslot is complicated, we split them into several patches. Each of them calculates timeslot from 'coarse-grained' to 'fine-grained'. Then, use H2C command to notify firmware to start MCC work that follows these timeslot patterns to switch channels with protocols of 802.11 PS and NoA. <<< Below commit message is kept as first patchset for reference >>> TDMA-based MCC (STA+P2P) is a kind of multiple interfaces concurrence. Basically, driver is to calculate timeslot pattern and firmware follows the pattern to switch channels. Since BT-coexistence is also a TDMA-based mechanism, also consider BT timeslot into pattern if BT devices present. To easier to review these 20+ patches, I summary basic purpose of these patches below by group, and submit them by small patchset one by one. Group 1. [DONE] get BT timeslot from coex mechanism Group 2. [DONE] adjust some stuff related to driver channel context Group 3. [DONE] P2P NoA infrastructure to add the IE to beacon when playing GO Group 4. [DONE] adjust driver to support 2 channel context Group 5. [CURRENT] calculate timeslot patterns and trigger firmware to switch channels followed the patterns Group 6. disable some dynamic tracking mechanism of RF calibration when MCC is running. Group 7. monitor states and adjust timeslot patterns. For example, if BT device leaves, we can reassign the slot to WiFi. Group 8. Remain-on-channel and hardware scan are related to channel context, so need some treatments to work with MCC properly. Group 9. Finally, we declare 8852C to support MCC Zong-Zhe Yang (6): wifi: rtw89: mcc: initialize start flow wifi: rtw89: mcc: fill fundamental configurations wifi: rtw89: mcc: consider and determine BT duration wifi: rtw89: mcc: decide pattern and calculate parameters wifi: rtw89: fix typo of rtw89_fw_h2c_mcc_macid_bitmap() wifi: rtw89: mcc: trigger FW to start/stop MCC drivers/net/wireless/realtek/rtw89/chan.c | 1150 +++++++++++++++++++++ drivers/net/wireless/realtek/rtw89/chan.h | 20 + drivers/net/wireless/realtek/rtw89/core.c | 4 + drivers/net/wireless/realtek/rtw89/core.h | 87 ++ drivers/net/wireless/realtek/rtw89/fw.c | 2 +- drivers/net/wireless/realtek/rtw89/fw.h | 2 +- 6 files changed, 1263 insertions(+), 2 deletions(-)