Search Linux Wireless

[PATCH] cfg80211: Allow pre-CAC for self-managed wiphy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux