Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2233539rwl; Sun, 26 Mar 2023 18:57:45 -0700 (PDT) X-Google-Smtp-Source: AKy350Yi5nMg+mOlSYYEO5E8inNmrd9lXMYsZLAbZFChEwrpWW0KBv1WleoK8z3WvDgdYqP61I/o X-Received: by 2002:a17:907:c608:b0:92b:e1ff:be4e with SMTP id ud8-20020a170907c60800b0092be1ffbe4emr11557167ejc.1.1679882265501; Sun, 26 Mar 2023 18:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679882265; cv=none; d=google.com; s=arc-20160816; b=nJ0t5qw6WEiJkPEElqfBtd6L2l8Yqwtruy0aGXvQDqnohjHTQKIGCGKY2peWhXN5BC unoLZfQT1Ww2fjpQt9odIdHtFpu9uBirw8hOJNqmWoQwYXrxgqif7YHJF5Bk1+5SXocE 6eSXOlgUCsNMQcDM9fqOYhKpK9Xp/O4Mv2fGyMS26EchWHpF9bQoKl6YSsj0+fe8LX89 H3V5nEr5zqxywQTZq8BvQFOTVqKUIdz/mNI44ig9L4U/1/o0WaCNHd9CskXtzMbkRskQ DyucC/25rERbwGZpkhn7jR5+y7HK2e5ILMF8xb2OotvS094nD+sKhBfUHukUEWkTVIDM Dhkg== 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=rce6KPnTbcOCALb4uO5YFS5uVK8DNbpFIjbZnkixBJ8=; b=vZVOyRyfAxyN7VC29yFRZplSyOY94OhbTGdMbBAEYGZhTmFoAEh7kViDi1Vd8NWtFv /bkZVf/EKlRG7SpCgMEYTPaABRNXDBTUZOpudQ6Ex5GLPvGKJHYSRnNTnswV5VMo/eDo JQwamFGFXuz13ORZ+/PGdPkIPqQRFwCQD33+ICO8I4S/4b/QFkDawSkhuXZseYXKTf07 68quLGxBtegv8+tQMb/83eVH3c5066cpFn9TP2VdW/aPNJsMcn0Za0jw7I4U93aond8e 9H0KkQPwz0NJcGEq+iK/+S50b+iLrwAB++QCMvJIsYHa6UsOWyMqk0B55sRpvq65hn/k tj2g== 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 lv26-20020a170906bc9a00b008dc76bf3a69si21989428ejb.735.2023.03.26.18.57.30; Sun, 26 Mar 2023 18:57:45 -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 S229640AbjC0B4s convert rfc822-to-8bit (ORCPT + 59 others); Sun, 26 Mar 2023 21:56:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjC0B4r (ORCPT ); Sun, 26 Mar 2023 21:56:47 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B48C049EE for ; Sun, 26 Mar 2023 18:56:46 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 32R1uJdwD012036, 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 32R1uJdwD012036 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Mon, 27 Mar 2023 09:56:19 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) 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; Mon, 27 Mar 2023 09:56:35 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Mon, 27 Mar 2023 09:56:35 +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 09:56:35 +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 10/14] wifi: rtl8xxxu: Add sta_add() callback Thread-Topic: [RFC PATCH 10/14] wifi: rtl8xxxu: Add sta_add() callback Thread-Index: AQHZXOKklylqoHQC2UaKQtUi5RrUs68N5Iuw Date: Mon, 27 Mar 2023 01:56:35 +0000 Message-ID: <866d047d719342d5a50abb5dfd4462c7@realtek.com> References: <20230322171905.492855-1-martin.kaistra@linutronix.de> <20230322171905.492855-11-martin.kaistra@linutronix.de> In-Reply-To: <20230322171905.492855-11-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: RTEXMBS02.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=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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, 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 10/14] wifi: rtl8xxxu: Add sta_add() callback > > This function gets called in AP mode, when a new STA gets associated to > us. Call rtl8xxxu_refresh_rate_mask() to set a rate mask for the newly > connected STA (referenced by the macid) and then send a media connnect > report. > > Signed-off-by: Martin Kaistra Reviewed-by: Ping-Ke Shih > --- > .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > index 5e36fddbbb488..d74a3c6452507 100644 > --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > @@ -7159,6 +7159,19 @@ static void rtl8xxxu_stop(struct ieee80211_hw *hw) > rtl8xxxu_free_tx_resources(priv); > } > > +static int rtl8xxxu_sta_add(struct ieee80211_hw *hw, > + struct ieee80211_vif *vif, > + struct ieee80211_sta *sta) > +{ > + struct rtl8xxxu_priv *priv = hw->priv; > + > + if (sta) { > + rtl8xxxu_refresh_rate_mask(priv, 0, sta); > + priv->fops->report_connect(priv, sta->aid + 1, H2C_ROLE_STA, true); > + } > + return 0; > +} > + > static const struct ieee80211_ops rtl8xxxu_ops = { > .tx = rtl8xxxu_tx, > .wake_tx_queue = ieee80211_handle_wake_tx_queue, > @@ -7179,6 +7192,7 @@ static const struct ieee80211_ops rtl8xxxu_ops = { > .sta_statistics = rtl8xxxu_sta_statistics, > .get_antenna = rtl8xxxu_get_antenna, > .set_tim = rtl8xxxu_set_tim, > + .sta_add = rtl8xxxu_sta_add, > }; > > static int rtl8xxxu_parse_usb(struct rtl8xxxu_priv *priv, > -- > 2.30.2