Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1400863rwr; Thu, 27 Apr 2023 17:42:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ktkULu8FkY5JADI9kfp7rHCM38OKqxBSgsZ5iB+yGtmY2DJC6KK1Wt4hdPd5lmXoboJt2 X-Received: by 2002:a17:902:cf0e:b0:1a1:a8eb:d34d with SMTP id i14-20020a170902cf0e00b001a1a8ebd34dmr3100711plg.46.1682642544608; Thu, 27 Apr 2023 17:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682642544; cv=none; d=google.com; s=arc-20160816; b=tCtFutHckQcwvvW0lfzNjsahrWJGre2w/5hp/4nQDx7WO2bzVtXH2/OuhUqDNQKfe/ D6ShtS8VaPQnEpMEfA6HfPZtOjvrZ/D0ggwUVwKuqdycllRHYq7txAzlvxb+WYcmKawZ 1e8qtouobaY2InMOoa4Vc7mM/+gvTavkmtgdoPp62KjO0fzq4R1ihoz/PREizWAmUhvg EUyBirt7QlU+k405v5V8Cm3qxgMrn4RzLuSERB6GbqCVCKJEaC49tRng207MRw5uHtzs rQZU3tsCkUuS9Ot+3T0T56zxLVomjR2v76hjdbgBBiHtsoGiLzxB5UogShZhkgsOH38Q TFDg== 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=h2l87hRQoQ42VGZ5o04IMq3cPHKZ0S7eLk7ui2y42UY=; b=pT5CnBcepjPj9uP0OiKajQG+HNMRxMPG4rWEj0Umgg86aAJZ/VE3nvqv2ZxBlg2dkU rsAj6/B3pIQfWvPEnfRxEuWWne4YSZlZJWlkeOdofKl/EZzI85GrmwKc978ZEwZs72CB LWw93CtJZIL5/kTFrqWAq2JF3b1c5C/uu/IDGESJ7Wd1eq/iAU4Isni+LDAROQ+kxGGP IDJEG+WghExxceGI8SQN/+sDodrIrDYz7HYX/NBxE9xtPIPNRPYCAZFMv+bARIKE1aDE PI6/nYOI/cuQ6D+Mh58eWztp3MGY+BsImuVDdkbNDVKgjCyyWK/Xmd55XV9I5D6/VcYz GDGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a170902e55100b001a6e8791eedsi22391325plf.458.2023.04.27.17.42.12; Thu, 27 Apr 2023 17:42:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229750AbjD1AjG convert rfc822-to-8bit (ORCPT + 63 others); Thu, 27 Apr 2023 20:39:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjD1AjF (ORCPT ); Thu, 27 Apr 2023 20:39:05 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C246C213A for ; Thu, 27 Apr 2023 17:39:03 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 33S0ca4C3015062, 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 33S0ca4C3015062 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Fri, 28 Apr 2023 08:38:36 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) 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; Fri, 28 Apr 2023 08:38:39 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS01.realtek.com.tw (172.21.6.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 28 Apr 2023 08:38:38 +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; Fri, 28 Apr 2023 08:38:38 +0800 From: Ping-Ke Shih To: Martin Kaistra , "linux-wireless@vger.kernel.org" CC: Jes Sorensen , Kalle Valo , Bitterblue Smith , Sebastian Andrzej Siewior Subject: RE: [PATCH v3 03/18] wifi: rtl8xxxu: Add beacon functions Thread-Topic: [PATCH v3 03/18] wifi: rtl8xxxu: Add beacon functions Thread-Index: AQHZeOgGGoRHEtLeQ0Ksj5W7CE3Kna8/4FpA Date: Fri, 28 Apr 2023 00:38:38 +0000 Message-ID: <39b41578a55e4375a6bdd5b127a3f20b@realtek.com> References: <20230427090922.165088-1-martin.kaistra@linutronix.de> <20230427090922.165088-4-martin.kaistra@linutronix.de> In-Reply-To: <20230427090922.165088-4-martin.kaistra@linutronix.de> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXMBS01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Martin Kaistra > Sent: Thursday, April 27, 2023 5:09 PM > To: linux-wireless@vger.kernel.org > Cc: Jes Sorensen ; Kalle Valo ; Ping-Ke Shih > ; Bitterblue Smith ; Sebastian Andrzej Siewior > > Subject: [PATCH v3 03/18] wifi: rtl8xxxu: Add beacon functions > > Add a workqueue to update the beacon contents asynchronously and > implement downloading the beacon to the HW and starting beacon tx like > the vendor driver. > > Signed-off-by: Martin Kaistra > --- [...] > /* > * The rtl8723a has 3 channel groups for it's efuse settings. It only > @@ -4964,6 +4978,16 @@ rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, > dev_dbg(dev, "Changed BASIC_RATES!\n"); > rtl8xxxu_set_basic_rates(priv, bss_conf->basic_rates); > } > + > + if (changed & BSS_CHANGED_BEACON_ENABLED && bss_conf->enable_beacon) > + rtl8xxxu_start_tx_beacon(priv); > + > + if (changed & BSS_CHANGED_BEACON) > + schedule_work(&priv->update_beacon_work); > + > + if (changed & BSS_CHANGED_BEACON_ENABLED && !bss_conf->enable_beacon) > + rtl8xxxu_stop_tx_beacon(priv); > + I thought these three synchronous works, so I have this suggestion, but actually update_beacon_work is asynchronous. Then, we can start/stop tx_beacon into a branch. if (changed & BSS_CHANGED_BEACON_ENABLED) { if (bss_conf->enable_beacon) rtl8xxxu_start_tx_beacon(priv); else rtl8xxxu_stop_tx_beacon(priv); } if (changed & BSS_CHANGED_BEACON) schedule_work(&priv->update_beacon_work); Ping-Ke