All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rameshkumar Sundaram <quic_ramess@quicinc.com>
To: <johannes@sipsolutions.net>, <ath11k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>,
	Rameshkumar Sundaram <quic_ramess@quicinc.com>
Subject: [PATCH 2/2] ath11k: add support to enable/disable BSS color collision detection
Date: Mon, 26 Dec 2022 14:03:28 +0530	[thread overview]
Message-ID: <20221226083328.29051-3-quic_ramess@quicinc.com> (raw)
In-Reply-To: <20221226083328.29051-1-quic_ramess@quicinc.com>

Enable/Disable BSS color collision detection based on user
configuration of collision detection and BSS color feature
itself.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1

Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/mac.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 9e923ecb0891..6d5290996d9f 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -3112,6 +3112,7 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
 	u8 rateidx;
 	u32 rate;
 	u32 ipv4_cnt;
+	bool color_collision_detect;
 
 	mutex_lock(&ar->conf_mutex);
 
@@ -3370,10 +3371,12 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
 
 	if (changed & BSS_CHANGED_HE_BSS_COLOR) {
 		if (vif->type == NL80211_IFTYPE_AP) {
+			color_collision_detect = (info->he_bss_color.enabled &&
+						  info->he_bss_color.collision_detection_enabled);
 			ret = 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.enabled);
+				color_collision_detect);
 			if (ret)
 				ath11k_warn(ar->ab, "failed to set bss color collision on vdev %i: %d\n",
 					    arvif->vdev_id,  ret);
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Rameshkumar Sundaram <quic_ramess@quicinc.com>
To: <johannes@sipsolutions.net>, <ath11k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>,
	Rameshkumar Sundaram <quic_ramess@quicinc.com>
Subject: [PATCH 2/2] ath11k: add support to enable/disable BSS color collision detection
Date: Mon, 26 Dec 2022 14:03:28 +0530	[thread overview]
Message-ID: <20221226083328.29051-3-quic_ramess@quicinc.com> (raw)
In-Reply-To: <20221226083328.29051-1-quic_ramess@quicinc.com>

Enable/Disable BSS color collision detection based on user
configuration of collision detection and BSS color feature
itself.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1

Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/mac.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 9e923ecb0891..6d5290996d9f 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -3112,6 +3112,7 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
 	u8 rateidx;
 	u32 rate;
 	u32 ipv4_cnt;
+	bool color_collision_detect;
 
 	mutex_lock(&ar->conf_mutex);
 
@@ -3370,10 +3371,12 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
 
 	if (changed & BSS_CHANGED_HE_BSS_COLOR) {
 		if (vif->type == NL80211_IFTYPE_AP) {
+			color_collision_detect = (info->he_bss_color.enabled &&
+						  info->he_bss_color.collision_detection_enabled);
 			ret = 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.enabled);
+				color_collision_detect);
 			if (ret)
 				ath11k_warn(ar->ab, "failed to set bss color collision on vdev %i: %d\n",
 					    arvif->vdev_id,  ret);
-- 
2.17.1


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

  parent reply	other threads:[~2022-12-26  8:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-26  8:33 [PATCH 0/2] wifi: Add support to enable/disable bss color collision detection Rameshkumar Sundaram
2022-12-26  8:33 ` Rameshkumar Sundaram
2022-12-26  8:33 ` [PATCH 1/2] nl80211: add " Rameshkumar Sundaram
2022-12-26  8:33   ` Rameshkumar Sundaram
2023-01-19 14:02   ` Johannes Berg
2023-01-19 14:02     ` Johannes Berg
2023-01-19 14:52     ` Nicolas Cavallari
2023-01-19 14:52       ` Nicolas Cavallari
2023-01-19 14:54       ` Johannes Berg
2023-01-19 14:54         ` Johannes Berg
2023-01-19 18:36         ` Lorenzo Bianconi
2023-01-19 18:36           ` Lorenzo Bianconi
2023-01-20 15:55       ` Lorenzo Bianconi
2023-01-20 15:55         ` Lorenzo Bianconi
2023-01-20 16:10         ` Nicolas Cavallari
2023-01-20 16:10           ` Nicolas Cavallari
2023-01-24 11:13         ` Nicolas Cavallari
2023-01-24 11:13           ` Nicolas Cavallari
2023-01-24 14:09           ` Lorenzo Bianconi
2023-01-24 14:09             ` Lorenzo Bianconi
2023-01-23  4:57     ` Rameshkumar Sundaram (QUIC)
2023-01-23  4:57       ` Rameshkumar Sundaram (QUIC)
2022-12-26  8:33 ` Rameshkumar Sundaram [this message]
2022-12-26  8:33   ` [PATCH 2/2] ath11k: add support to enable/disable BSS " Rameshkumar Sundaram

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=20221226083328.29051-3-quic_ramess@quicinc.com \
    --to=quic_ramess@quicinc.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.