2023-04-28 15:09:13

by Martin Kaistra

[permalink] [raw]
Subject: [PATCH v4 01/18] 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 <[email protected]>
Reviewed-by: Ping-Ke Shih <[email protected]>
---
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


2023-05-05 07:36:14

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v4 01/18] wifi: rtl8xxxu: Add start_ap() callback

Martin Kaistra <[email protected]> wrote:

> 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 <[email protected]>
> Reviewed-by: Ping-Ke Shih <[email protected]>

18 patches applied to wireless-next.git, thanks.

ac48499e2bf5 wifi: rtl8xxxu: Add start_ap() callback
25ed009cc0aa wifi: rtl8xxxu: Select correct queue for beacon frames
cde8848cad0b wifi: rtl8xxxu: Add beacon functions
f5db4d11fda1 wifi: rtl8xxxu: Add set_tim() callback
20d595154894 wifi: rtl8xxxu: Allow setting rts threshold to -1
fd5440f9311f wifi: rtl8xxxu: Allow creating interface in AP mode
d59a105acc03 wifi: rtl8xxxu: Actually use macid in rtl8xxxu_gen2_report_connect
2be2eed4c39b wifi: rtl8xxxu: Add parameter role to report_connect
40d02ff2b186 wifi: rtl8xxxu: Add parameter force to rtl8xxxu_refresh_rate_mask
726e478ce1b3 wifi: rtl8xxxu: Add sta_add() and sta_remove() callbacks
9aa45598d054 wifi: rtl8xxxu: Put the macid in txdesc
769f326322e7 wifi: rtl8xxxu: Add parameter macid to update_rate_mask
89819a651144 wifi: rtl8xxxu: Enable hw seq for mgmt/non-QoS data frames
66dcb574418e wifi: rtl8xxxu: Clean up filter configuration
07342528f7c8 wifi: rtl8xxxu: Remove usage of ieee80211_get_tx_rate()
19b396c241cf wifi: rtl8xxxu: Remove usage of tx_info->control.rates[0].flags
b468481c9ad3 wifi: rtl8xxxu: Declare AP mode support for 8188f
b9a07c443a82 wifi: rtl8xxxu: Set maximum number of supported stations

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches