From: John Crispin <john@phrozen.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
John Crispin <john@phrozen.org>
Subject: [PATCH V3 8/9] ath11k: add EMA beacon support
Date: Wed, 12 Aug 2020 17:00:49 +0200 [thread overview]
Message-ID: <20200812150050.2683396-9-john@phrozen.org> (raw)
In-Reply-To: <20200812150050.2683396-1-john@phrozen.org>
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(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 08e7f4ac8a26..306f123c09a7 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -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);
}
--
2.25.1
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2020-08-12 15:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 15:00 [PATCH V3 0/9] mac80211: add multiple bssid / EMA John Crispin
2020-08-12 15:00 ` [PATCH V3 1/9] nl80211: add basic multiple bssid support John Crispin
2020-08-19 2:48 ` Aloka Dixit
2020-08-19 4:32 ` John Crispin
2020-08-27 12:58 ` Johannes Berg
2020-08-12 15:00 ` [PATCH V3 2/9] mac80211: add multiple bssid support to interface handling John Crispin
2020-08-27 13:03 ` Johannes Berg
2020-08-27 13:08 ` Johannes Berg
2020-10-08 0:33 ` Pradeep Kumar Chitrapu
2020-10-08 8:06 ` John Crispin
2020-10-08 17:21 ` Pradeep Kumar Chitrapu
2020-10-08 19:42 ` John Crispin
2020-08-12 15:00 ` [PATCH V3 3/9] mac80211: add multiple bssid support to beacon handling John Crispin
2020-08-12 15:00 ` [PATCH V3 4/9] mac80211: add multiple bssid/ema support to bcn templating John Crispin
2020-08-27 13:10 ` Johannes Berg
2020-08-28 3:20 ` Aloka Dixit
2020-08-12 15:00 ` [PATCH V3 5/9] ath11k: add a struct to pass parameters into ath11k_wmi_vdev_up John Crispin
2020-08-12 15:00 ` [PATCH V3 6/9] ath11k: add the multiple bssid WMI commands John Crispin
2020-08-12 15:00 ` [PATCH V3 7/9] ath11k: add multiple bssid support to device creation John Crispin
2020-08-12 15:00 ` John Crispin [this message]
2020-08-12 15:00 ` [PATCH V3 9/9] ath11k: set the multiple bssid hw flags and capabilities John Crispin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200812150050.2683396-9-john@phrozen.org \
--to=john@phrozen.org \
--cc=ath11k@lists.infradead.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox