25d02384615bf852a5ca61640f58b20d3437822d
[openwrt/staging/ansuel.git] /
1 From 61fdbd9e2a9d74c716bf4d9684653de5efdee691 Mon Sep 17 00:00:00 2001
2 From: Martin Kaistra <martin.kaistra@linutronix.de>
3 Date: Fri, 22 Dec 2023 11:14:37 +0100
4 Subject: [PATCH 16/21] wifi: rtl8xxxu: support multiple interface in
5 start_ap()
6
7 Call set_bssid() with the correct port_num now.
8
9 Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
10 Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
11 Signed-off-by: Kalle Valo <kvalo@kernel.org>
12 Link: https://msgid.link/20231222101442.626837-17-martin.kaistra@linutronix.de
13 ---
14 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
18 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
19 @@ -5111,11 +5111,12 @@ error:
20 static int rtl8xxxu_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
21 struct ieee80211_bss_conf *link_conf)
22 {
23 + struct rtl8xxxu_vif *rtlvif = (struct rtl8xxxu_vif *)vif->drv_priv;
24 struct rtl8xxxu_priv *priv = hw->priv;
25 struct device *dev = &priv->udev->dev;
26
27 dev_dbg(dev, "Start AP mode\n");
28 - rtl8xxxu_set_bssid(priv, vif->bss_conf.bssid, 0);
29 + rtl8xxxu_set_bssid(priv, vif->bss_conf.bssid, rtlvif->port_num);
30 rtl8xxxu_write16(priv, REG_BCN_INTERVAL, vif->bss_conf.beacon_int);
31 priv->fops->report_connect(priv, RTL8XXXU_BC_MC_MACID, 0, true);
32