@@ -791,7 +791,10 @@ static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif)
if (arvif->vdev_type != WMI_VDEV_TYPE_AP)
return 0;
- bcn = ieee80211_beacon_get_template(hw, vif, &offs);
+ if (arvif->vif->multiple_bssid.non_transmitted)
+ return 0;
+
+ bcn = ieee80211_beacon_get_template_ema(hw, vif, &offs);
if (!bcn) {
ath11k_warn(ab, "failed to get beacon template from mac80211\n");
return -EPERM;
@@ -822,16 +825,23 @@ static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif)
void ath11k_mac_bcn_tx_event(struct ath11k_vif *arvif)
{
struct ieee80211_vif *vif = arvif->vif;
+ int multiple_bssid = 0;
- if (!vif->cca_active)
+ if (!vif->multiple_bssid.non_transmitted &&
+ !list_empty(&vif->multiple_bssid.list))
+ multiple_bssid = 1;
+
+ if (!multiple_bssid && !vif->cca_active)
return;
- if (ieee80211_beacon_cntdwn_is_complete(vif)) {
+ if (vif->cca_active && ieee80211_beacon_cntdwn_is_complete(vif)) {
ieee80211_cca_finish(vif);
return;
}
- ieee80211_beacon_update_cntdwn(vif);
+ if (vif->cca_active)
+ ieee80211_beacon_update_cntdwn(vif);
+
ath11k_mac_setup_bcn_tmpl(arvif);
}
We need to update the beacon in multiple bssid mode after each completion event to get the next EMA beacon. Signed-off-by: John Crispin <john@phrozen.org> --- drivers/net/wireless/ath/ath11k/mac.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)