Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1133394lqa; Sun, 28 Apr 2024 21:27:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXweqxW0WooilcZelzTzj7quIQ12V/uKGHFu1ceDd97U8CFZtvj7Rb0cC79ajRk/AHCqY01UHxw4JshutzMD8pm7m55LPAEDb6xJL3rHQ== X-Google-Smtp-Source: AGHT+IEN7JgAAUe1R7RcFBJ59ZXTozmC/hwKQBdl8WqkBiN3cLl7Vu16DxF27avSTcbuNIq9AcjJ X-Received: by 2002:a17:906:194b:b0:a58:c0a1:f22e with SMTP id b11-20020a170906194b00b00a58c0a1f22emr4293398eje.2.1714364866047; Sun, 28 Apr 2024 21:27:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714364866; cv=pass; d=google.com; s=arc-20160816; b=jbskVX0XfzJkHNkntSQpsO5EAQN7BCvGS1Bja4hlbuNU6g1xgvhi4LGmPmxXyG849u qsry9naHRq1LbV6aezKzAyyf+6BTcCAzCqO6bzC4+DHJgEApqhHKpaV1UvzMPct/dFrt WqM7cxcBeTnFeBn12PMi3Ns+1s0MQVYCX+/Vk6rLC7ycL+YIyFunI8ldvmKPm/Y4+6QS HAREPDVQ9gZUXeMTHXv0NPcXUOglVxPp54kDFYMl8lcfHB2zCZOhUEkL0JTRA4W2pfDe jb8Dd4iSN0Oqjeh0TcGewnDpratth92yNQzV95JesmvImZAr5rKn0OcEWRkDQtLGVbrZ +s1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=5q2K8xBKQ9Jl844a5SugdurDoUavfSeIvZB8oGF/J+o=; fh=/AMwtqXM7brNFwulNL4ctWuyxTEmTnKmmzwz9UDIU5Y=; b=GQYZReh2Ds6aCwxWb+ey59I/NRzxlpiAYBZYEQ3Tn24E3qDqe5sfUYbUtXjPAZ2G7c q3tekzJza8VO77Mqf8A2NQ3erdDQEL/b+dUgYAvh1pFmr2qXXHjm5L1xjQMWOhfzVjUl 3ITkNRL/wLgu7u8oB5s/Wg73vuZwaf4iPTV+VejgpsJOo95Y7LjZynTZ+zE+UgnaHJ0i ZS4YxNSfZSpNJq92sSajVZTHFmoy6DBAQGuuryI9DnXjZ0hgS6IXVk68NDIFGjfEl3uS uk0kaCclMBTF7jZBUzRzdz3oHmlk+g6D9PxTQoUmy57nAV2QVDMvKZi/5HL+r0uE/iMF Bt2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="bE4ye/EO"; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6960-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6960-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hq31-20020a1709073f1f00b00a5883f37d0bsi7370287ejc.389.2024.04.28.21.27.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 21:27:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6960-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="bE4ye/EO"; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6960-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6960-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BBBD31F21893 for ; Mon, 29 Apr 2024 04:27:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6920E8F6E; Mon, 29 Apr 2024 04:27:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="bE4ye/EO" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B17819463 for ; Mon, 29 Apr 2024 04:27:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714364862; cv=none; b=THuBJU7kLQp/LzaKyduzd6Sghsf876qxMlHoOKODXHC87jvqKfH3YCETWBJfi/y3uOdgVojBpPER5AhJbJO/Oz76/v/XHWNFjFopDmEX/M80PjMdW8ESlAi39tRwXAtoR0cB3Ghh7IGXgbwL2ByDcJZtafPK3ZEBVz7NFo90Ql0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714364862; c=relaxed/simple; bh=WZ8d4gU+qgu6zNJUgW9aRz9KQTGihzKhRpaSLiWMJaQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=TmV2tG1e8Ka55XTVJchacF9Fg92qXwXm+MAZrUBwzuBYFfP24c/JJoRS4jXXAObvKPZ/hVmHlX/JAr1mhslmvbL6jGam+VAIwcfWDMUyTx97U3H5UR/Q54pBRhperxdcEDJLtTYMLzGFcv5O6IaO/EB6t87o+mbCU1vMFV82wj4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=bE4ye/EO; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43T3QH11007150; Mon, 29 Apr 2024 04:27:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=qcppdkim1; bh=5q2K8xBKQ9Jl844a5Sug durDoUavfSeIvZB8oGF/J+o=; b=bE4ye/EO9ydx61Vdy7GpI9ikYekPtnZfh+A7 noQ9Q+gedHUhdpe77VgWkjP3ejzikIc0pQbX5fzBouTmBZGza3ZKxb67lybnNYmE XjufMpQw26QB6uOVcf3MOHrhpYxXDuB70rkGz60n9mVca1+DTrs4q6muuibsL+eG LzeFUBeSHZLCds/dfpUlwLoPUuyubatW3SDkg9bQdFgbxQMw4hD8MkK27d6hRIu2 Ln6ci6ByBiarmcvWKneB1SQhoNTHCKw0q++mlaxtjhOfwZJYIK2BlixchibEwlzM Xx1DDkCIfvhKItWmW2wcL5Cc3B4LfCU2cya25CFkdBc5/ouDFg== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xrsk7an97-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 04:27:30 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 43T4RQge001768; Mon, 29 Apr 2024 04:27:26 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3xrtekr37d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 04:27:26 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43T4RQ4w001763; Mon, 29 Apr 2024 04:27:26 GMT Received: from hu-devc-blr-u22-a.qualcomm.com (hu-hprem-blr.qualcomm.com [10.190.108.75]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 43T4RQZY001762 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 04:27:26 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 4146166) id 40A754114B; Mon, 29 Apr 2024 09:57:25 +0530 (+0530) From: Harshitha Prem To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Harshitha Prem Subject: [PATCH] cfg80211: Allow pre-CAC for self-managed wiphy Date: Mon, 29 Apr 2024 09:57:23 +0530 Message-Id: <20240429042723.2847389-1-quic_hprem@quicinc.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Owekhh_DmlNsuFF7cS65VjSlZdOhQrnt X-Proofpoint-ORIG-GUID: Owekhh_DmlNsuFF7cS65VjSlZdOhQrnt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-29_01,2024-04-26_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 suspectscore=0 priorityscore=1501 mlxlogscore=603 bulkscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404290028 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 --- 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