Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1342188pxb; Tue, 26 Oct 2021 07:20:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGNV6zN1lxJuAf8Wx+VQsr5lFSzxyYlTMUB6toemTwBLPAhWNRKekbxPXgjkdKRXAgPG3U X-Received: by 2002:a17:902:e544:b0:13e:e863:6cd2 with SMTP id n4-20020a170902e54400b0013ee8636cd2mr22863073plf.41.1635258055040; Tue, 26 Oct 2021 07:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635258055; cv=none; d=google.com; s=arc-20160816; b=Pn1tn6DjvMQ5OLK8EOw8sBsWp/j4Di5IeqWql9vDLiUA6PgZ6YK6Wj8oD8ah2lzOId J/AjeTWAILsREdGwWiTVbTNkHZdgAFTKb/FPPK1ErMDMAKOjGgg0PqtnxdbTmne+HkqZ CT3rcXNDoFLWaZamukc8ASE9zt7H4GococNhEjijSlXyHzBy4I2g432QwbnaFyfxHc0u f0D8mOkln9yQNpE8jAhD8KY9CCCv0YA8hICfMn4Y/AgWQ3VZc1+npvxH5PkWaYyUD0ha mcRtCq8ygcU7PQAQn6gBXyL/LknHsQX8/5K/ss51wl41AdxVB9YCNTvJUuuDc8mdJRBp dPjg== 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=3D/VUADKnb7G3mKyABz343EVM5vSqCrGoJnBl084SOo=; b=QBbRQiH7Yja6x/lRYWCExnT6fjSUIe1n50t4egJhy7cUsXydqkNsU+DMkN2Yv5wBPr Q12UCh3IkjVkC7SE77qy6ijRE39ZBswDc373n0XkzSJSaZ3zkAoMnIiLnn1u/zYfzMJU 0SnCM5Alc9Kf8EYiRxApU6JxsbUuEbUdi1S5112aRlYfygjK0i3mE7XYb9PHiXd13Gdn pm7u7dmSbQ1PCMjaTjKp3bn5tLxpWqeTB2OWfRvfMKNTEzoLngqNQKcsJYgVO9klyHsg pFxpICfdnnIMOsEnw0dlFUHlGomzCS576g/zvyL7J0zDtP71GUCCB3IMKpItPHnYf50t vzpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=IZKv7VU4; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 144si602560pgc.5.2021.10.26.07.20.45; Tue, 26 Oct 2021 07:20:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=IZKv7VU4; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 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 S235472AbhJZLWS (ORCPT + 67 others); Tue, 26 Oct 2021 07:22:18 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:47817 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234946AbhJZLWR (ORCPT ); Tue, 26 Oct 2021 07:22:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1635247194; x=1666783194; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3D/VUADKnb7G3mKyABz343EVM5vSqCrGoJnBl084SOo=; b=IZKv7VU41I8/dKqYpnHxJEAwF+ZOC/GwA+DoQkyXZkoOY4/P0ZOGE5zh Z3g/SieOWZzZHqv1yG317XrX5UrRV05c2f8AGyAN7ixwlZZzZeWbPEVcb pXyU9zfAhhHWCHuObkZdHFVWqE8TNpUD5+kfXsf0thYhN+HsJdt/PJjae 0=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 26 Oct 2021 04:19:54 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2021 04:19:54 -0700 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.922.7; Tue, 26 Oct 2021 04:19:52 -0700 From: Wen Gong To: CC: , Subject: [PATCH 04/15] ath11k: allow only one interface up simultaneously for WCN6855 Date: Tue, 26 Oct 2021 07:19:02 -0400 Message-ID: <20211026111913.7346-5-quic_wgong@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211026111913.7346-1-quic_wgong@quicinc.com> References: <20211026111913.7346-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: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Currently ath11k support both station/AP mode for WCN6855, and it is configured with single_pdev_only, it means it has only one ath11k and one ieee80211_hw which registered in mac80211 and one wiphy registered in cfg80211. Now it does not have requirement to start up both station and AP interface simultaneously for WCN6855, this is to disable station and AP concurrency mode. After this patch, when station interface is up, then AP interface can not start up. AP interface can start up after station interface down. Also when AP interface is up, station interface can not start up. station interface can start up after AP interface down. 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/core.h | 5 +++++ drivers/net/wireless/ath/ath11k/mac.c | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index a65f7d00eea2..e6c4963e41ac 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -972,4 +972,9 @@ static inline bool ath11k_support_cc_ext(struct ath11k_base *ab) test_bit(WMI_TLV_SERVICE_REG_CC_EXT_EVENT_SUPPORT, ab->wmi_ab.svc_map); } +static inline bool ath11k_support_6G_cc_ext(struct ath11k *ar) +{ + return ath11k_support_cc_ext(ar->ab) && ar->supports_6ghz; +} + #endif /* _CORE_H_ */ diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 61e70f3b4a7c..2d96eea9300d 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -6431,7 +6431,22 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar) combinations[0].limits = limits; combinations[0].n_limits = n_limits; - combinations[0].max_interfaces = 16; + + /* When single pdev is set, there is only one ieee80211_hw/wiphy + * of mac80211/cfg80211, and it has only one reg rules stored + * The reg rules of 6 GHz is different for station and AP, please + * refer WMI_REG_CHAN_LIST_CC_EXT_EVENTID handler. + * When start station/AP simultaneously, there is not more + * struct to store the second reg rules in cfg80211. + * Also it does not have requirement for station/AP concurrency + * for WCN6855, so disable it currently. + */ + if (ab->hw_params.single_pdev_only && + ath11k_support_6G_cc_ext(ar)) + combinations[0].max_interfaces = 1; + else + combinations[0].max_interfaces = 16; + combinations[0].num_different_channels = 1; combinations[0].beacon_int_infra_match = true; combinations[0].beacon_int_min_gcd = 100; -- 2.31.1