Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3050389lqp; Mon, 25 Mar 2024 18:48:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULUI2mYDCZoDrl5yLcQMiT3NeZWxdElCyJnK09CJlM8SQebahvxnlebvahR+rTXTI5TrESaahuakPvex17+2ipLxeEapAKszBa/wYS4g== X-Google-Smtp-Source: AGHT+IHOSPtUlWrOmnIIeu7UFhTF/J7uW2KG9KBrv67WcAte4pCdac2e6OqUnHZFz97+WcVGgRZd X-Received: by 2002:a05:6a00:2d87:b0:6ea:7981:d40b with SMTP id fb7-20020a056a002d8700b006ea7981d40bmr1597745pfb.16.1711417719540; Mon, 25 Mar 2024 18:48:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711417719; cv=pass; d=google.com; s=arc-20160816; b=Xu75i7MgsFWXqE3Q6Z0wUFs+6EX4e9jayQH7fMF8xbZ+rpE6kKiz0XWRa5QcFdviMY vktCJxqg9Q7jBk+nGHqKzpkDL11ZGa1yJ3YVbzlyCCWeGCHAlb5xePLpldojKK2oEfeU Zdte/ir2tUGraX1Liuq6QLlpmTVBp95SUhKT3Xh4REo/dtKxdX+jU0Z9ktuioc8A/4Oa 0q831Mkt4Wk5qezKwYb6S9oIxWmY21fudlNrMtQC6v1VrS+EUggV/U0wpoZYKwbP+9B8 xWgZlgNsDBeAIgz+mdRfFLcNQfw3qKEli7w4IelIX3z/LeD6d8K8iDk9qW+dk3rTlHv0 +z1A== 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:message-id:date:subject:cc:to :from; bh=9FPJBN8woQziv7tYsisyNnYDCyL/BuuwrPGlKZwRnCg=; fh=jlQO+135r541u77QDC/N9RVvrQnqXR+bvnPT5YYTt4A=; b=bbCFvQWDPtvGRwwp+q5duKbAYB9uq2Ib9wWzmND7WwSx27Xy5p2z5BXKX0cX5Cg5/t nmVKoBXis/3yG/5O9SHHZHAJwXTE5PWHFNRlNuH2d/sQ/XTpDEvGIXMGP7kyBLvRWR4s zEH0b+ORnVqFXjiOpyPnLeg3+5EwOWVcCX91f2nfvPad/KsdcFnkM12DIMEiciONr3RY MnL5p5nuhbkQi4UNxVQuYYps7g4nuNrc+khAY5cj/dKc0hbWJqgBu9/MnaRwo670SJY7 T3XdsclQNilVIWYToHzytjxDnlywUhOh8WZmiAhYtnzsWAvz7lndFqlcEx5OeMWHbG85 4NJA==; 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-5262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5262-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x27-20020a056a00271b00b006e69e291eadsi4990300pfv.379.2024.03.25.18.48.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 18:48:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-5262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5262-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 84CB82944CB for ; Tue, 26 Mar 2024 01:48:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B96E822EE4; Tue, 26 Mar 2024 01:48:23 +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 66AE6208C3 for ; Tue, 26 Mar 2024 01:48:20 +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=1711417703; cv=none; b=EAK1SEwXPAIryG8/a52/1I2EXaAZFNA/FP6TEYCfi4xF+RxTwltOzX4vuTG+xoUJMKe1JxN1Jn1wOsUIEAws1yar8dM62u2OZlFLBHbBRbimOkakt8VMgPQMPdsD87yILZO8PGeOWLLq5BGOsgpqqbeasoRP0MOfQOwy3zkbYu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711417703; c=relaxed/simple; bh=bECuANPufVb5oVvXNTsCh/IJfYO8+N/wwvhOs+FBC8A=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=c9PWYfXyN6eTDYDGTMsJAlDQa0BjW9jsnA5XejKW79t/cv7LMkpH4nTSKTGU2ZotDldrlxAejM+yi8RU00GX6sX5Dcesgu2brehQvrLXn097NyGqYacS04cZsWmZeMBBExan4SKBdVVTxQ1jXO2qDpz5Ow0iRU3hKtty2D+pO8g= 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 42Q1mGzxD3448198, 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 42Q1mGzxD3448198 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Mar 2024 09:48:16 +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; Tue, 26 Mar 2024 09:48:17 +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; Tue, 26 Mar 2024 09:48:17 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH] wifi: rtw89: station mode only for SDIO chips Date: Tue, 26 Mar 2024 09:47:07 +0800 Message-ID: <20240326014707.17458-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 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 Since only station mode has been tested on SDIO chips, only keep it support for SDIO chips to reflect correct supported features. Link: https://lore.kernel.org/linux-wireless/87wmpu1do6.fsf@kernel.org/T/#t Link: https://lore.kernel.org/linux-wireless/36972ff5-0c48-4bd2-8f9a-9649bfa24225@lexina.in/ Cc: Martin Blumenstingl Signed-off-by: Ping-Ke Shih --- Hi Martin, I Cc'ed you to prevent you missing this patch that I disable AP mode. --- drivers/net/wireless/realtek/rtw88/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 81ef4717dbf4..d1f0e7541bfa 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -2203,6 +2203,7 @@ EXPORT_SYMBOL(rtw_core_deinit); int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw) { + bool sta_mode_only = rtwdev->hci.type == RTW_HCI_TYPE_SDIO; struct rtw_hal *hal = &rtwdev->hal; int max_tx_headroom = 0; int ret; @@ -2231,10 +2232,13 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw) ieee80211_hw_set(hw, TX_AMSDU); ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS); - hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | - BIT(NL80211_IFTYPE_AP) | - BIT(NL80211_IFTYPE_ADHOC) | - BIT(NL80211_IFTYPE_MESH_POINT); + if (sta_mode_only) + hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); + else + hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | + BIT(NL80211_IFTYPE_AP) | + BIT(NL80211_IFTYPE_ADHOC) | + BIT(NL80211_IFTYPE_MESH_POINT); hw->wiphy->available_antennas_tx = hal->antenna_tx; hw->wiphy->available_antennas_rx = hal->antenna_rx; @@ -2245,7 +2249,7 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw) hw->wiphy->max_scan_ssids = RTW_SCAN_MAX_SSIDS; hw->wiphy->max_scan_ie_len = rtw_get_max_scan_ie_len(rtwdev); - if (rtwdev->chip->id == RTW_CHIP_TYPE_8822C) { + if (!sta_mode_only && rtwdev->chip->id == RTW_CHIP_TYPE_8822C) { hw->wiphy->iface_combinations = rtw_iface_combs; hw->wiphy->n_iface_combinations = ARRAY_SIZE(rtw_iface_combs); } -- 2.25.1