blob: 2dfd13541d96cd6cbd34b0024efc5f4a691c1ad9 [file] [log] [blame]
developer5f1d3ca2024-04-25 05:25:22 +08001From cd576eae15b45ef97e3ee180482d2e884889fb09 Mon Sep 17 00:00:00 2001
developer0415fc32024-04-19 18:29:00 +08002From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Fri, 12 Apr 2024 11:45:41 +0800
4Subject: [PATCH 60/61] mtk: wifi: mac80211: defer enabling beacon for MLD AP
5
6Do not enable beacon on the first beacon update (NL80211_CMD_NEW_BEACON)
7for MLD AP, let it start from the next beacon update
8(NL80211_CMD_SET_BEACON).
9This is used to make sure that MLD AP start beacon after all links
10finish settings.
11
developer0415fc32024-04-19 18:29:00 +080012Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
developer0415fc32024-04-19 18:29:00 +080013---
14 net/mac80211/cfg.c | 7 ++++++-
15 1 file changed, 6 insertions(+), 1 deletion(-)
16
17diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
18index 856c956..e091ccd 100644
19--- a/net/mac80211/cfg.c
20+++ b/net/mac80211/cfg.c
21@@ -1424,7 +1424,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
22 }
23
24 link_conf->dtim_period = params->dtim_period;
25- link_conf->enable_beacon = true;
26+ link_conf->enable_beacon = !ieee80211_vif_is_mld(&sdata->vif);
27 link_conf->allow_p2p_go_ps = sdata->vif.p2p;
28 link_conf->twt_responder = params->twt_responder;
29 link_conf->he_obss_pd = params->he_obss_pd;
30@@ -1491,6 +1491,11 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
31 ieee80211_recalc_dtim(local, sdata);
32 ieee80211_vif_cfg_change_notify(sdata, BSS_CHANGED_SSID);
33 ieee80211_link_info_change_notify(sdata, link, changed);
34+ /* for MLD AP, enable_beacon is false during the first beacon set,
35+ * enable it after that. This allows userspace to control the
36+ * beacon enable timing.
37+ */
38+ link_conf->enable_beacon = true;
39
40 if (ieee80211_num_beaconing_links(sdata) <= 1)
41 netif_carrier_on(dev);
42--
developer5f1d3ca2024-04-25 05:25:22 +0800432.18.0
developer0415fc32024-04-19 18:29:00 +080044