mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 09:09:55 -04:00
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@linutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230428150833.218605-2-martin.kaistra@linutronix.de
This commit is contained in:
committed by
Kalle Valo
parent
28b17f6270
commit
ac48499e2b
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user