developer | 5f1d3ca | 2024-04-25 05:25:22 +0800 | [diff] [blame^] | 1 | From cd576eae15b45ef97e3ee180482d2e884889fb09 Mon Sep 17 00:00:00 2001 |
developer | 0415fc3 | 2024-04-19 18:29:00 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Fri, 12 Apr 2024 11:45:41 +0800 |
| 4 | Subject: [PATCH 60/61] mtk: wifi: mac80211: defer enabling beacon for MLD AP |
| 5 | |
| 6 | Do not enable beacon on the first beacon update (NL80211_CMD_NEW_BEACON) |
| 7 | for MLD AP, let it start from the next beacon update |
| 8 | (NL80211_CMD_SET_BEACON). |
| 9 | This is used to make sure that MLD AP start beacon after all links |
| 10 | finish settings. |
| 11 | |
developer | 0415fc3 | 2024-04-19 18:29:00 +0800 | [diff] [blame] | 12 | Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> |
developer | 0415fc3 | 2024-04-19 18:29:00 +0800 | [diff] [blame] | 13 | --- |
| 14 | net/mac80211/cfg.c | 7 ++++++- |
| 15 | 1 file changed, 6 insertions(+), 1 deletion(-) |
| 16 | |
| 17 | diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c |
| 18 | index 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 | -- |
developer | 5f1d3ca | 2024-04-25 05:25:22 +0800 | [diff] [blame^] | 43 | 2.18.0 |
developer | 0415fc3 | 2024-04-19 18:29:00 +0800 | [diff] [blame] | 44 | |