ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Crispin <john@phrozen.org>
To: Johannes Berg <johannes@sipsolutions.net>,
	Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
	John Crispin <john@phrozen.org>
Subject: [PATCH 7/7] ath11k: add handling for BSS color
Date: Fri,  6 Dec 2019 15:34:01 +0100	[thread overview]
Message-ID: <20191206143401.4080-7-john@phrozen.org> (raw)
In-Reply-To: <20191206143401.4080-1-john@phrozen.org>

This patch adds code to handle the BSS_CHANGED_BSS_COLOR flag. IT will
trigger the propagation of BSS color settings into the FW. Handling is
slightly different between AP and STA interfaces.

Signed-off-by: John Crispin <john@phrozen.org>
---
 drivers/net/wireless/ath/ath11k/mac.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 6a8c1c3b8da2..c692922513b2 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -1928,6 +1928,19 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
 		ath11k_wmi_send_obss_spr_cmd(ar, arvif->vdev_id,
 					     &info->he_obss_pd);
 
+	if (changed & BSS_CHANGED_HE_BSS_COLOR) {
+		if (vif->type == NL80211_IFTYPE_AP) {
+			ath11k_wmi_send_obss_color_collision_cfg_cmd(
+				ar, arvif->vdev_id, info->he_bss_color.color,
+				ATH11K_BSS_COLOR_COLLISION_DETECTION_AP_PERIOD_MS,
+				!info->he_bss_color.disabled);
+		} else if (vif->type == NL80211_IFTYPE_STATION) {
+			ath11k_wmi_send_bss_color_change_enable_cmd(ar, arvif->vdev_id, 1);
+			ath11k_wmi_send_obss_color_collision_cfg_cmd(ar, arvif->vdev_id, 0,
+				ATH11K_BSS_COLOR_COLLISION_DETECTION_STA_PERIOD_MS, 1);
+		}
+	}
+
 	mutex_unlock(&ar->conf_mutex);
 }
 
-- 
2.20.1


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

  parent reply	other threads:[~2019-12-06 14:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 14:33 [PATCH 1/7] mac80211: add a struct for holding BSS color settings John Crispin
2019-12-06 14:33 ` [PATCH 2/7] nl80211: add handling for BSS color John Crispin
2019-12-06 19:13   ` John Crispin
2019-12-06 14:33 ` [PATCH 3/7] mac80211: " John Crispin
2019-12-06 14:33 ` [PATCH 4/7] iwlwifi: use new bss_color struct John Crispin
2019-12-06 14:33 ` [PATCH 5/7] mac80211: drop now unused bss_color element John Crispin
2019-12-06 14:34 ` [PATCH 6/7] ath11k: add WMI calls required for handling BSS color John Crispin
2019-12-09  4:33   ` vthiagar
2019-12-06 14:34 ` John Crispin [this message]
2019-12-09  4:35   ` [PATCH 7/7] ath11k: add handling for " vthiagar

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=20191206143401.4080-7-john@phrozen.org \
    --to=john@phrozen.org \
    --cc=ath11k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=kvalo@codeaurora.org \
    --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