Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3420936pxv; Sun, 18 Jul 2021 22:47:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz775VoQREzWLjY1UruhdRLDwW29grYSCuGBxWsgtFcAUntqztxzGkFnKWCaJUncwx51ZaD X-Received: by 2002:a17:906:48cd:: with SMTP id d13mr24834025ejt.311.1626673664892; Sun, 18 Jul 2021 22:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626673664; cv=none; d=google.com; s=arc-20160816; b=oA6/VVWeDwIGNEyGODbRvUPhpSnW4WWOgWyoQU3IG7l/ybgZDnvsViU5FHyBsFzUcU BmAqiyn0e8L3atyToPZxjFzzVgkhAEWRbAO+3gMlOH43vFNp4SexJJgZknBPnYYHjiKa FBRZGKion4pzjwp/h86WD5qrJKEIjuQxZ0j+zXOa0oqksHlDqKQz8oLVwBMie1pIVYT3 G1PSdQ8wvIVR0BRI62YJtP07ag/gLPvaiOShBcWTXJoEIN4OrB6PkIMzsUytDarkg00F 9cAz7rcfgkw8B5j5lS35El4LdAYFHgb7BagKgR8t3hR3h2Hrmzco/IOYvQGx9brEE9/s YzQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=84WdQxBw/5tG9JfLaUZogHgcSo8UQvRcscvIaj9kT3c=; b=k8gQkZQCZpOQ41cQlJDFA8oMVeh0BRHsYriNYhNjX74vxN10mtSQqCdvFemIRVQII+ OTW7BD/On6abOqqWqFsHcedD2u06nLx/gG/01MuRG6p8slXg1mS/YTHbn1U/wFnFWwI/ eyvJwzJ+S1vm8+8g0nMPEpAxqgiO2DDtG8gTZ597hMfrE6AZPyntil4ql2up+tDmIVYG f7zvvQaKqaXOWia13wg8wG+j//YBsePt8VTSBycRo5jyZNdq9egjcwvTqfPF1GxCgPze 3OXOkldEwuGtBEPKHOntlBocmfwAPfYKcVj+Q7WCNhAo9O3HrWt43iR3CL3TQ6BdlJ4k 5Kig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si15891774ejj.279.2021.07.18.22.47.16; Sun, 18 Jul 2021 22:47:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234433AbhGSFt4 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 19 Jul 2021 01:49:56 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:56195 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbhGSFt4 (ORCPT ); Mon, 19 Jul 2021 01:49:56 -0400 Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.73 with qID 16J5kfuX7028550, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36502.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.71/5.88) with ESMTPS id 16J5kfuX7028550 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 19 Jul 2021 13:46:41 +0800 Received: from RTEXMBS05.realtek.com.tw (172.21.6.98) by RTEXH36502.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.2106.2; Mon, 19 Jul 2021 13:46:40 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS05.realtek.com.tw (172.21.6.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 19 Jul 2021 13:46:38 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::5bd:6f71:b434:7c91]) by RTEXMBS04.realtek.com.tw ([fe80::5bd:6f71:b434:7c91%5]) with mapi id 15.01.2106.013; Mon, 19 Jul 2021 13:46:38 +0800 From: Pkshih To: Martin Blumenstingl , "linux-wireless@vger.kernel.org" CC: "tony0620emma@gmail.com" , "kvalo@codeaurora.org" , "johannes@sipsolutions.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Neo Jou , Jernej Skrabec Subject: RE: [PATCH RFC v1 1/7] mac80211: Add stations iterator where the iterator function may sleep Thread-Topic: [PATCH RFC v1 1/7] mac80211: Add stations iterator where the iterator function may sleep Thread-Index: AQHXe0wjq+ZTIn5bM0GxLYVmi50q+atJnqoQ Date: Mon, 19 Jul 2021 05:46:37 +0000 Message-ID: References: <20210717204057.67495-1-martin.blumenstingl@googlemail.com> <20210717204057.67495-2-martin.blumenstingl@googlemail.com> In-Reply-To: <20210717204057.67495-2-martin.blumenstingl@googlemail.com> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.146] x-kse-serverinfo: RTEXMBS05.realtek.com.tw, 9 x-kse-attachmentfiltering-interceptor-info: no applicable attachment filtering rules found x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?us-ascii?Q?Clean,_bases:_2021/7/19_=3F=3F_01:06:00?= x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-ServerInfo: RTEXH36502.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-AntiSpam-Outbound-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.20, Database issued on: 07/19/2021 05:35:23 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 0 X-KSE-AntiSpam-Info: Lua profiles 165067 [Jul 18 2021] X-KSE-AntiSpam-Info: Version: 5.9.20.0 X-KSE-AntiSpam-Info: Envelope from: pkshih@realtek.com X-KSE-AntiSpam-Info: LuaCore: 448 448 71fb1b37213ce9a885768d4012c46ac449c77b17 X-KSE-AntiSpam-Info: {Tracking_from_exist} X-KSE-AntiSpam-Info: {Tracking_uf_ne_domains} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;realtek.com:7.1.1 X-KSE-AntiSpam-Info: Rate: 0 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 07/19/2021 05:38:00 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Martin Blumenstingl [mailto:martin.blumenstingl@googlemail.com] > Sent: Sunday, July 18, 2021 4:41 AM > To: linux-wireless@vger.kernel.org > Cc: tony0620emma@gmail.com; kvalo@codeaurora.org; johannes@sipsolutions.net; netdev@vger.kernel.org; > linux-kernel@vger.kernel.org; Neo Jou; Jernej Skrabec; Martin Blumenstingl > Subject: [PATCH RFC v1 1/7] mac80211: Add stations iterator where the iterator function may sleep > > ieee80211_iterate_active_interfaces() and > ieee80211_iterate_active_interfaces_atomic() already exist, where the > former allows the iterator function to sleep. Add > ieee80211_iterate_stations() which is similar to > ieee80211_iterate_stations_atomic() but allows the iterator to sleep. > This is needed for adding SDIO support to the rtw88 driver. Some > interators there are reading or writing registers. With the SDIO ops > (sdio_readb, sdio_writeb and friends) this means that the iterator > function may sleep. > > Signed-off-by: Martin Blumenstingl > --- > include/net/mac80211.h | 18 ++++++++++++++++++ > net/mac80211/util.c | 13 +++++++++++++ > 2 files changed, 31 insertions(+) > > diff --git a/include/net/mac80211.h b/include/net/mac80211.h > index d8a1d09a2141..77de89690008 100644 > --- a/include/net/mac80211.h > +++ b/include/net/mac80211.h > @@ -5575,6 +5575,24 @@ void ieee80211_iterate_active_interfaces_mtx(struct ieee80211_hw *hw, > struct ieee80211_vif *vif), > void *data); > > +/** > + * ieee80211_iterate_stations_atomic - iterate stations ieee80211_iterate_stations - ... [...] -- Ping-Ke