Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6131108rwn; Mon, 12 Sep 2022 22:16:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR4XxkuxcQUYlOQyThRb0b4OstmBvo70K/ay6sggFfYmJbbL8kyTA/zTQGGoxT9GucNzzJk0 X-Received: by 2002:a05:6a00:16c4:b0:535:890:d52 with SMTP id l4-20020a056a0016c400b0053508900d52mr31297109pfc.9.1663046218280; Mon, 12 Sep 2022 22:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663046218; cv=none; d=google.com; s=arc-20160816; b=N345QPq1VaapowAKTiME0Qh/9uQxNCjjSHWEoH7ysHrtoAvpRZfxgdzK9t689P9z30 n6B5RwlHs+zuJnLCnw13yDZWJ+MtdBHRujVH8KbUHl/pxX71L8ipPdv9NJb7n631n9yG k2AhfFLZMD16W8NskotoaBySerXjSt1XJLPXEzC6p+M1ODwfFWQBqM1pr5KpbsodVKKV 9tqxae5MtLqAsBYzVr1OGnF/tnn6apxaHFgnxya5WNoL+rW887G0pFnG3DR6NBBv8Qy3 9oXg+jY6RctLsmjMb8qUdOmc3AYmJ9qT2Lie5fp3YNQLx8wkYlquxyYqhCvATLqQwXUP fGGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DtXcuBlSExBATrIdB55cL/NY3zQkOo2HdkOUWKlgm/A=; b=zqXI6OjMhtc74yNT6tsv9V71XshnKNQdO81jPf8/3QNvHg6uzfyyAA8lj5fnW3NzWK aJKmbF3RQUcTGyHU8/lGSLBMr1c92uZsiMcX6CEp0belKLlO2WQU274iRHDpPnKeR4bE EPlaKR4yo1jJ2DXKHwgkx7F0OmPMVf1qBD00Kya5+16b01/AWDFDDZ0qjrVk6pGa/Cgh Po0E9WrdMV83VDvq/q/DDYNnQABRRjZfdBDsdH28Y52oYcSQ4euSQJVthY7XQ/6k9mxW 5+Gam7M/L8h4zrE8St3IlfAybO+6ASfqcPkYFQ+LnUp8jUSycx+w5sKXJ07QjVYyvCkN UCbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MBW9n3Qe; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w14-20020a170902e88e00b00176ba0a8ccbsi13600282plg.17.2022.09.12.22.16.50; Mon, 12 Sep 2022 22:16:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MBW9n3Qe; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229865AbiIMFQV (ORCPT + 64 others); Tue, 13 Sep 2022 01:16:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbiIMFPs (ORCPT ); Tue, 13 Sep 2022 01:15:48 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69B204C618 for ; Mon, 12 Sep 2022 22:15:47 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28D4estR025694; Tue, 13 Sep 2022 05:15:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=DtXcuBlSExBATrIdB55cL/NY3zQkOo2HdkOUWKlgm/A=; b=MBW9n3QeLAXwXxWJrdfsIISNUbGSrb5UDS3WMRcj7GB8d4n9h4eTXHXp+Hykoc/vKDj/ FhF/cHg4mSnAHeIcwa+dIndx7qFXi13dM17NawG8gbTVEHHUXmZpY9GP9ybTpqMsdV3F cnPPAM7pVkVKfCYr9bGPHWu6NRzECiKZt3V7+Wx1A2rL6LX4zS1bBIu2tfiNxeXNXQP9 ZViraWhcb1O7ifhBmJNc9Y/etchb4T92Qf/NBM2tgUoMwE0dSyfeTDNFK0u8HPAMyveX O4M6yalGyhjzzbxzk8MWlQnKfM1jy0jrMK4dxcGUY+o7SWMiHfFuuzt86+YkIkDvcHs7 lw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jgk3be3hp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Sep 2022 05:15:44 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28D5FhAY004557 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Sep 2022 05:15:43 GMT Received: from wgong-HP3-Z230-SFF-Workstation.qca.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 12 Sep 2022 22:15:42 -0700 From: Wen Gong To: CC: , Subject: [PATCH v3 06/15] wifi: ath11k: update regulatory rules when interface added Date: Tue, 13 Sep 2022 01:15:09 -0400 Message-ID: <20220913051518.23051-7-quic_wgong@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220913051518.23051-1-quic_wgong@quicinc.com> References: <20220913051518.23051-1-quic_wgong@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 4IZRwx81uQDz_IK3UYcGxZaJJS9Bb5Cs X-Proofpoint-GUID: 4IZRwx81uQDz_IK3UYcGxZaJJS9Bb5Cs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-13_02,2022-09-12_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209130023 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When wlan boot up, WMI_REG_CHAN_LIST_CC_EXT_EVENTID is sent from firmware at an early stage, the interface mode is not decided at this point, then ath11k select reg rules of AP mode as default. After interface is created, it is exactly decided AP/station mode, then ath11k need to update reg rules to the exact one. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Wen Gong --- drivers/net/wireless/ath/ath11k/mac.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index ae7e40332cef..fc9556a1327e 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -6352,6 +6352,14 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw, } } + if (ath11k_hw_supports_6g_cc_ext(ar)) { + struct cur_regulatory_info *reg_info; + + reg_info = &ab->reg_info_store[ar->pdev_idx]; + ath11k_dbg(ab, ATH11K_DBG_MAC, "mac interface added to change reg rules\n"); + ath11k_reg_handle_chan_list(ab, reg_info, IEEE80211_REG_LPI_AP); + } + mutex_unlock(&ar->conf_mutex); return 0; -- 2.31.1