> -----Original Message----- > From: Martin Kaistra <martin.kaistra@xxxxxxxxxxxxx> > Sent: Thursday, March 23, 2023 1:19 AM > To: linux-wireless@xxxxxxxxxxxxxxx > Cc: Jes Sorensen <Jes.Sorensen@xxxxxxxxx>; Kalle Valo <kvalo@xxxxxxxxxx>; Ping-Ke Shih > <pkshih@xxxxxxxxxxx>; Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx>; Sebastian Andrzej Siewior > <bigeasy@xxxxxxxxxxxxx> > 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 <martin.kaistra@xxxxxxxxxxxxx> Reviewed-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx> > --- > .../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