mirror of https://lore.kernel.org/ath12k/
 help / color / mirror / Atom feed
* [PATCH] cfg80211: Allow pre-CAC for self-managed wiphy
@ 2024-04-29  4:27 Harshitha Prem
  2024-04-29  7:35 ` Kalle Valo
  2024-05-03  8:26 ` Johannes Berg
  0 siblings, 2 replies; 5+ messages in thread
From: Harshitha Prem @ 2024-04-29  4:27 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, Harshitha Prem

Currently, to allow pre-CAC it requires both driver's regulatory domain
in wiphy and cfg80211 local regulatory domain to be same, along with the
region to be in ETSI.

But, for self-managed driver, some countries have mismatch between these
two regulatory domains and it would not allow for a pre-CAC. For example,
in ath12k driver (self-managed), country Sri Lanka (LK) is classified as
FCC domain as per cfg80211 local regulatory database but as per ath12k
driver it falls under ETSI domain then because of this mismatch, the
driver might not be able to do a pre-CAC.

Hence, add changes to allow pre-CAC based on wiphy's regulatory setting
if it is a self-managed wiphy.

Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
---
 net/wireless/reg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 3cef0021a3db..e8cc38e37377 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -4214,7 +4214,8 @@ bool regulatory_pre_cac_allowed(struct wiphy *wiphy)
 		return pre_cac_allowed;
 	}
 
-	if (regd->dfs_region == wiphy_regd->dfs_region &&
+	if ((regd->dfs_region == wiphy_regd->dfs_region ||
+	     wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) &&
 	    wiphy_regd->dfs_region == NL80211_DFS_ETSI)
 		pre_cac_allowed = true;
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-06 17:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29  4:27 [PATCH] cfg80211: Allow pre-CAC for self-managed wiphy Harshitha Prem
2024-04-29  7:35 ` Kalle Valo
2024-04-29 10:16   ` Harshitha Prem
2024-05-03  8:26 ` Johannes Berg
2024-05-06 17:01   ` Harshitha Prem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox