Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp355396rwr; Thu, 27 Apr 2023 02:12:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5v0nZa6YS01ZQuPV2qJ41U8Yx6cA9XuntfroZIwekJePFQcjc+P0NSieMiG6UzQfeuEIYq X-Received: by 2002:a05:6a20:a096:b0:d9:2d4e:c08c with SMTP id r22-20020a056a20a09600b000d92d4ec08cmr720833pzj.61.1682586728304; Thu, 27 Apr 2023 02:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682586728; cv=none; d=google.com; s=arc-20160816; b=QHZ08FrZh3AW1HcovG9UfKAPdRiHs+K9CMJKvEO8sL3dOlHRx8vDsOO4+pf2WQRmg2 yxomtAFBtNeA0WiV+jfdXE5tQfA7Q6FbT18wmDp0v0dcKRC3175JmEBzJTFpSezAnToY M3/P1noKhAOCCWXFIzUNa4UfgGSD0BDLhf4hhcIC8UguCSOSxi8To/jYqN2+79q8EiJl zNAe56Iv5KHJkI11V2uKkcgS1hCjctSMh/6HWH3xfwrJg+MkoE3tgEeGpEPxv5KTsW8h zH/qciV1k1NrIyVJ3apF6BuMxwA6kQjALBaNQhZrD6eQT0bb3zcflbbpOZjoCBlH3pUO OesQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=YHLQndD8+02gH+3IgdO6pIZSW7YIjRMlN8iFKSxa69A=; b=zXYG8pBxe5Van70SB0sTmqjVMn6QGt+8es6YI952wHoxqQavkD+OTzdhsh+WpLJROr tgqWtDDWjGhwqZkLiFTu8pkv4R41BoIucPCi6sweJ36nv3BBycaTMuK1WQD3gwjnBwuq nUF1rayqaM1Gd7J3nIBXN0FQWarz4/1pOhFHkNSSytgAokJpiMYGdkIWBCaqciOdsNdR W4iBtz43WNu6N1gukhE3DtFO4IIwiMrD7EwLcAG4ZWOaZufD3Rw8eWJIXFAZ8PlmC09A lZdK/DTYO9Isnap67I0zzzxNVxvY1ZRQ0HNLuts0Oye4OIdzR+71IXovKmKvXrKML1Rz WBJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QucGN90v; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=SkKxSAGy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c31-20020a631c5f000000b0052087b60637si18563826pgm.144.2023.04.27.02.12.00; Thu, 27 Apr 2023 02:12:08 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QucGN90v; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=SkKxSAGy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243246AbjD0JJ6 (ORCPT + 62 others); Thu, 27 Apr 2023 05:09:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243354AbjD0JJv (ORCPT ); Thu, 27 Apr 2023 05:09:51 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 848DD30FC for ; Thu, 27 Apr 2023 02:09:46 -0700 (PDT) From: Martin Kaistra DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1682586584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YHLQndD8+02gH+3IgdO6pIZSW7YIjRMlN8iFKSxa69A=; b=QucGN90vGZmqgwu3j30OfTng6MhpaPWSDeWHytWEsDWCvLZ7+oOw9uDQmfKsRPsys+sNx3 fIVDRA4sCaiFDxSzIbwvroj7EKd0HWlgkxyMmsioByHgdZ6Sz+a1gF+ENWvsGOlIkePbtE jtwhCv9HPjmaRf6hWSK6voOwr69VJvCMcPbw8GEKTtkirw21nqUoUJfwuz4ujOZs8osjo/ u+lSvi/Z4G9nOr65WBh1LEYinA3Tvip0XaDIEiHiHnXLBbyo15jjGeyzrLlghANeNywRdC 6KTwa9FXQ/1rdfpxn+PrAbf2whbEvss4HJcNlOymWThkP54SYG0Bru4sT9ydyQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1682586584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YHLQndD8+02gH+3IgdO6pIZSW7YIjRMlN8iFKSxa69A=; b=SkKxSAGy01yhpP6YlX816mx/BpT0RXmjnir648ms8m6oyhAEfITopTxTVETtO4QUeXusZv P4ZE6WwWsQFTx2Bg== To: linux-wireless@vger.kernel.org Cc: Jes Sorensen , Kalle Valo , Ping-Ke Shih , Bitterblue Smith , Sebastian Andrzej Siewior Subject: [PATCH v3 01/18] wifi: rtl8xxxu: Add start_ap() callback Date: Thu, 27 Apr 2023 11:09:05 +0200 Message-Id: <20230427090922.165088-2-martin.kaistra@linutronix.de> In-Reply-To: <20230427090922.165088-1-martin.kaistra@linutronix.de> References: <20230427090922.165088-1-martin.kaistra@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 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 --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h index 8eafbf1cee718..9cd6d171e9933 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h @@ -1727,6 +1727,7 @@ struct rtl8xxxu_cfo_tracking { }; #define RTL8XXXU_HW_LED_CONTROL 2 +#define RTL8XXXU_BC_MC_MACID 0 struct rtl8xxxu_priv { struct ieee80211_hw *hw; diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index fd8c8c6d53d60..b8fcf911c072e 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -4968,6 +4968,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, RTL8XXXU_BC_MC_MACID, true); + + return 0; +} + static u32 rtl8xxxu_80211_to_rtl_queue(u32 queue) { u32 rtlqueue; @@ -7093,6 +7107,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