* [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
* Re: [PATCH] cfg80211: Allow pre-CAC for self-managed wiphy
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
1 sibling, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2024-04-29 7:35 UTC (permalink / raw)
To: Harshitha Prem; +Cc: ath12k, linux-wireless
Harshitha Prem <quic_hprem@quicinc.com> writes:
> 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>
"wifi:" missing from from title but I suspect no need to resend just
because of this.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cfg80211: Allow pre-CAC for self-managed wiphy
2024-04-29 7:35 ` Kalle Valo
@ 2024-04-29 10:16 ` Harshitha Prem
0 siblings, 0 replies; 5+ messages in thread
From: Harshitha Prem @ 2024-04-29 10:16 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath12k, linux-wireless
On 4/29/2024 1:05 PM, Kalle Valo wrote:
> Harshitha Prem <quic_hprem@quicinc.com> writes:
>
>> 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>
>
> "wifi:" missing from from title but I suspect no need to resend just
> because of this.
>
sure, missed it. Thank you for pointing out, I will take note of it.
Regards,
Harshitha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cfg80211: Allow pre-CAC for self-managed wiphy
2024-04-29 4:27 [PATCH] cfg80211: Allow pre-CAC for self-managed wiphy Harshitha Prem
2024-04-29 7:35 ` Kalle Valo
@ 2024-05-03 8:26 ` Johannes Berg
2024-05-06 17:01 ` Harshitha Prem
1 sibling, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2024-05-03 8:26 UTC (permalink / raw)
To: Harshitha Prem, ath12k; +Cc: linux-wireless
On Mon, 2024-04-29 at 09:57 +0530, Harshitha Prem wrote:
> 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.
Any idea why that is?
> 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.
I don't see how that's really all that much more helpful than simply
removing the restriction? But then why is the restriction there?
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cfg80211: Allow pre-CAC for self-managed wiphy
2024-05-03 8:26 ` Johannes Berg
@ 2024-05-06 17:01 ` Harshitha Prem
0 siblings, 0 replies; 5+ messages in thread
From: Harshitha Prem @ 2024-05-06 17:01 UTC (permalink / raw)
To: Johannes Berg, ath12k; +Cc: linux-wireless
On 5/3/2024 1:56 PM, Johannes Berg wrote:
> On Mon, 2024-04-29 at 09:57 +0530, Harshitha Prem wrote:
>> 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.
>
> Any idea why that is?
>
>> 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.
>
> I don't see how that's really all that much more helpful than simply
> removing the restriction? But then why is the restriction there?
>
> johannes
Hi Johannes,
Seems like, there can be a possibility to have two wiphy devices with
two different regulatory domains to be present on a single system and
for cfg80211 to respect it. In this case, a core central regulatory
domain will consist of the intersection between the two wiphy's
regulatory domains. Because of this mostly, in case of DFS, in cfg80211
apis like reg_get_dfs_region() , there is a check to ensure like if both
the core central regulatory and device's regulatory are same.
Drivers which are not self managed can have this restriction, just to
ensure to allow precac only if both matches or May be should we relax
this restriction? but I am quite not sure on the impact. Will try to
analyze on this.
Thanks,
Harshitha.
^ permalink raw reply [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