From patchwork Thu Feb 20 03:10:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13983266 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 E07A71DF962 for ; Thu, 20 Feb 2025 03:11:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740021100; cv=none; b=Bp1x8TJg2k6J95hKurqPky2/Pjn6eWGTJ+a6GR7FYslHZ2w4VPsBlblKVtBHabF2n7pOgDI9+AfGjIJQriB0yXH1OolQMg9LOj2hkd+gpJ3RVERRJgCFs1VQxGbgaR0kkWD5raUm9PC6xyNmIfArVo78xSx63b0o6jE6tS6fxNo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740021100; c=relaxed/simple; bh=9+wCTaBjJJ5j4Kp7i7PRgmAWbx196rdm7HSOmWO4Ftw=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=gYa8xqRaqY3fp47YD+UMjJivp0Heb00k+RXXzPiN1/MwoAMdwj4wSO2oR/cMn5TIMUAeG0WN5LckWc5nSvGCUsGfMMLYY68BQC5RlbgozCH27qhV9epi17cSYQsaB8GOaShaZblMq2Z9E+19xsnf6HX5N7PgD35Kce/rYAIM2xw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=bs24SZAc; arc=none smtp.client-ip=205.220.180.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=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="bs24SZAc" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 51JG5HB8010066; Thu, 20 Feb 2025 03:11:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=tBB2puAGMH950qr/Rwk59M ka9bBA3K6nvVrBt8J6yLI=; b=bs24SZAcZG//XvceqcvytZLQQ4pKPH+RexQLyY Sw7+pGcI1xC8wMFXte09pElKutjNGyeU6jbHEuMOOxQzaf6tw1VgbFL/fa+sBj3L Tq/cflHU4sadBy2lZWTe6gGv0q4TcAYuBksF516kTKTGM5a/1kP+7FPqoez2QEvc SEkOO2a1U893CUPC6oaqnKe4m9+xHI2esEBeIy9oIOv6BN8lMqFsANQNOFhY3CiG 81em829v+VC/zSG5SR7/ClTR/ER9OxaM6WWTg/xZdsCuwoKGylx8I80Z/Bu15RPm gXe2zI+OpXH9RhcGrc0GOFXfmmknlq1ATyICbtSs2lVgs+NA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44vyy1vqq1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Feb 2025 03:11:29 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 51K3BSPZ011048 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Feb 2025 03:11:28 GMT Received: from kangyang.ap.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 19 Feb 2025 19:11:26 -0800 From: Kang Yang To: CC: , Subject: [PATCH v11 0/4] wifi: ath12k: add 11d scan offload support and handle country code for WCN7850 Date: Thu, 20 Feb 2025 11:10:52 +0800 Message-ID: <20250220031056.216-1-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 7fF7PWkfTga2hU9miII0MwbGdZWKrDsV X-Proofpoint-ORIG-GUID: 7fF7PWkfTga2hU9miII0MwbGdZWKrDsV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-19_11,2025-02-20_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2502100000 definitions=main-2502200020 This patch-set mainly does four things: 1. Add handler to send WMI_SET_CURRENT_COUNTRY_CMDID to firmware. 2. Use WMI_SET_CURRENT_COUNTRY_CMDID to set country code for WCN7850. 3. Implement 11d scan offload, and update new channel list to firmware when 11d scan finished. 4. Store country code, and update it to firmware after device recovery. With this patch-set, WCN7850 can do 11d offload scan and update country code to firmware successfully. Note: This patch-set is an old patch-set in public review written by Wen Gong. Just resend it for him. Link: https://patchwork.kernel.org/project/linux-wireless/cover/20230914090746.23560-1-quic_wgong@quicinc.com/ v11: 1. swap the order of patch #2 and #3. 2. rebase on tag:ath/main(ath-202502181756). v10: rebase on tag: ath/main(ath-202502111625). v9: update copy right in patch #1, #2, #3. v8: rebase on tag: ath/main(ath-202501172342). v7: 1. rebase on tag: ath/main(ath-202412191756). 2. rewrite commit message for patch#2. v6: rebase on tag: ath/main(ath-202410161539). v5: rebase on tag: ath/main(ath-202410111606). v4: rebase on tag: ath-202410072115. v3: 1. use wiphy::mtx lock instead of adding a new lock(patch#2). 2. rename struct according to wmi naming convention(patch#1, #2). 3. update copyright in reg.h 4. modifiy patch#3, #4 due to struct name change. v2: change per Jeff. 1. change alpha2 length from 3 to 2. 2. change wmi_11d_new_cc_ev to wmi_11d_new_cc_event. Wen Gong (4): wifi: ath12k: add configure country code for WCN7850 wifi: ath12k: use correct WMI command to set country code for WCN7850 wifi: ath12k: add 11d scan offload support wifi: ath12k: store and send country code to firmware after recovery drivers/net/wireless/ath/ath12k/core.c | 34 ++++- drivers/net/wireless/ath/ath12k/core.h | 17 +++ drivers/net/wireless/ath/ath12k/hw.c | 8 +- drivers/net/wireless/ath/ath12k/hw.h | 3 +- drivers/net/wireless/ath/ath12k/mac.c | 167 ++++++++++++++++++++++++- drivers/net/wireless/ath/ath12k/mac.h | 7 ++ drivers/net/wireless/ath/ath12k/reg.c | 72 ++++++++--- drivers/net/wireless/ath/ath12k/reg.h | 2 +- drivers/net/wireless/ath/ath12k/wmi.c | 158 ++++++++++++++++++++++- drivers/net/wireless/ath/ath12k/wmi.h | 38 ++++++ 10 files changed, 482 insertions(+), 24 deletions(-) base-commit: f22471c17f5849b2f20e2c56ec9fcd9dd8d5bf28