From mboxrd@z Thu Jan 1 00:00:00 1970 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 0D51AC7619A for ; Mon, 27 Mar 2023 00:46:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbjC0Aqn convert rfc822-to-8bit (ORCPT ); Sun, 26 Mar 2023 20:46:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbjC0Aqm (ORCPT ); Sun, 26 Mar 2023 20:46:42 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51B7C49FC for ; Sun, 26 Mar 2023 17:46:41 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 32R0jxWM3016779, 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.81/5.90) with ESMTPS id 32R0jxWM3016779 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Mon, 27 Mar 2023 08:45:59 +0800 Received: from RTEXMBS06.realtek.com.tw (172.21.6.99) by RTEXH36505.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.2375.32; Mon, 27 Mar 2023 08:46:15 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 27 Mar 2023 08:46:15 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02]) by RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02%5]) with mapi id 15.01.2375.007; Mon, 27 Mar 2023 08:46:15 +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: [RFC PATCH 01/14] wifi: rtl8xxxu: Add start_ap() callback Thread-Topic: [RFC PATCH 01/14] wifi: rtl8xxxu: Add start_ap() callback Thread-Index: AQHZXOKRYT+MvfsxukK4ImPrnPVroK8N0TMA Date: Mon, 27 Mar 2023 00:46:15 +0000 Message-ID: <31c3ee6fe34b418e993fb3d26258e71d@realtek.com> References: <20230322171905.492855-1-martin.kaistra@linutronix.de> <20230322171905.492855-2-martin.kaistra@linutronix.de> In-Reply-To: <20230322171905.492855-2-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: RTEXMBS06.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:_2023/3/26_=3F=3F_06:25: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: RTEXH36505.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 > -----Original Message----- > From: Martin Kaistra > Sent: Thursday, March 23, 2023 1:19 AM > To: linux-wireless@vger.kernel.org > Cc: Jes Sorensen ; Kalle Valo ; Ping-Ke Shih > ; Bitterblue Smith ; Sebastian Andrzej Siewior > > Subject: [RFC PATCH 01/14] wifi: rtl8xxxu: Add start_ap() callback > > This gets called at the start of AP mode operation. Set bssid, beacon > interval and send a connect report to the HW. > > Signed-off-by: Martin Kaistra Reviewed-by: Ping-Ke Shih > --- > .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > index c152b228606f1..90b98b9dcbd9d 100644 > --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > @@ -4899,6 +4899,20 @@ rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, > return; > } > > +static int rtl8xxxu_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, > + struct ieee80211_bss_conf *link_conf) > +{ > + struct rtl8xxxu_priv *priv = hw->priv; > + struct device *dev = &priv->udev->dev; > + > + dev_dbg(dev, "Start AP mode\n"); > + rtl8xxxu_set_bssid(priv, vif->bss_conf.bssid); > + rtl8xxxu_write16(priv, REG_BCN_INTERVAL, vif->bss_conf.beacon_int); > + priv->fops->report_connect(priv, 0, true); > + > + return 0; > +} > + > static u32 rtl8xxxu_80211_to_rtl_queue(u32 queue) > { > u32 rtlqueue; > @@ -7026,6 +7040,7 @@ static const struct ieee80211_ops rtl8xxxu_ops = { > .config = rtl8xxxu_config, > .conf_tx = rtl8xxxu_conf_tx, > .bss_info_changed = rtl8xxxu_bss_info_changed, > + .start_ap = rtl8xxxu_start_ap, > .configure_filter = rtl8xxxu_configure_filter, > .set_rts_threshold = rtl8xxxu_set_rts_threshold, > .start = rtl8xxxu_start, > -- > 2.30.2