Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2439245rbb; Wed, 28 Feb 2024 01:36:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVN7U8pkHnGptV0PPLkEZHLHBB5P/dcgWYBssvNm94tpaqWhJwQFXiPnD40YDlsMYGgvtlXZMiS6bjFt1WCPe434S/9Ren7WPz7e1Xldg== X-Google-Smtp-Source: AGHT+IHq9iJIW3mpLDjgQUMOufkOJD1Jqe0izdiLEfrNAis1fToZU7XHE8MmfPhL/791386nkQiF X-Received: by 2002:a17:906:2b57:b0:a3f:cd6b:80fd with SMTP id b23-20020a1709062b5700b00a3fcd6b80fdmr1839367ejg.7.1709112981708; Wed, 28 Feb 2024 01:36:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709112981; cv=pass; d=google.com; s=arc-20160816; b=DoVkiBTTmjkzx5kxNOYMSi+a2V1DysBvd1DhM0wZTS7hi4PMz3h8j+oh+v8SSFUMEh P+6m37VlRvIXHZ9zdHx9gJ+wEsQxDvJP9y6zMQvx2uCPmyEGrj1NagufTZrjXIgXY0+v 6P0vWclAwc/ak1TU2v3K2vqQalboeOR9nC2vJE5MWOPI1euBrd5+kG0ZCFVn38nrliJR w3zAq6aJINVAVuY08/f1Zkz94qdXyy7s0ZS7tsrn3fsArEK/Y5pr6N4dZjs0bqVDyaOq eL8rixi+eXgQYNwEaoGccG1HO+mKPpS1gf39tKJ51MwX0Lndle0Ks7+qTxoRRCNJiGBi GOWw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=EiWUsyXpw5t79ba+ke6QpSk5O9AgzQN2yOHp6omEHrM=; fh=VjEXHNW5NZrs1Y/dkG9Zsf/aOTyMoB2CPB4Ny1yH9GY=; b=bHSj4ZzGMhmDzXDkFYbJxPEUQK2gXAxIewMHSb+UlpFAuXHRB+tDeLkz5Suh7XLBXl 530we3QEJ6TJ1kYlYD9cOXFmptsspLmTu3//zzxYQ4njlfzlNPrhn+hGLUbbCEJSeoXy MEfnRENVmxQZuRVL6xJStgTrBghWHazixG4FZJfeJmyltAggjhw9xuQ45Tx+bduofLqJ q4b7rjQSG9SoK1HRBNVByoZ89BQ97/dZlJZfOGPGSZ6AJAOhqmRPAvz5kGQZNeDElc6h FjpvmYCvZzABPh3OPcGvFvpDYf4VPhR0DdTEbhhEsW2HUb9okqm1DHHoGCthEcVBC7ph 3kbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cn71L4Uz; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-4165-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4165-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b21-20020a170906039500b00a438e8f40d1si1586839eja.456.2024.02.28.01.36.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 01:36:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4165-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cn71L4Uz; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-4165-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4165-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 49E611F26EEC for ; Wed, 28 Feb 2024 09:36:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1ED93612E; Wed, 28 Feb 2024 09:36:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="cn71L4Uz" 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 4A8C53307B for ; Wed, 28 Feb 2024 09:36:01 +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=1709112962; cv=none; b=aKqWOd8/r8A3ZEGcxY/jKXF/4JONvGF0fNyj6Ny3L/jnqiMyJiIK5iS6FpG39eVs7IcJnwNsxekeZG6N+MSM3rzWY6KkepaQO4RREk0X1xewT3+qVLif3GN1OQZbz1ilZdmNn8c1ZNyFOY4cHxxzhoU/a5L1wSNQFRzPURlI9gs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709112962; c=relaxed/simple; bh=dFKlaMUenisT/hdQAHyihQ0rGfusikR/wTUJylzOwC4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CopuGVqwXywyTRDVLQe7vWk698rKnXx4O7h5P5sOyv/Jcl7F57pQQijIMqfOdCjByi0sRAjlEKxvlddJIYfcPSH1D74dD9obxJUPVABO3OLFHu7pO3ZAmbmfFfOPkCSwD1NNirGkF1Gb1sNvpeZbna1/A/E0Qg9EB8B9s6x2ANA= 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=cn71L4Uz; 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=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41S8WCgE004856; Wed, 28 Feb 2024 09:35:57 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=EiWUsyXpw5t79ba+ke6QpSk5O9AgzQN2yOHp6omEHrM=; b=cn 71L4Uzkh8PeIMmNDAKmZiMb8D5ru5E7RnzoZ6I77DAMb6m6LKfOeBl02KIguld+9 FKo7CSfjeAmNZKTiPqx1Ccko5scdUqm1Ekdv9G7+h0Z1O8SQ0XofIS/EGfZTeZjg FBcq+U6e/TzR5NF0Mg6eee9lTx6qAClybOWV5BOfSKflrEQNyZJAv7aMmmeOGZva FbWN5YeXt14Hkx06QLImXkbqxdU1g1OFYr7ixZr9lyNWnmLOA96HlKYE3x1Qt6j6 TAUAsC8qvimaQ9DFi65Fdt5s078YhxslRWiSWEMVQfSNspvJKssB8uSLgbQCOmHy QHKTrI7Nv/9NYwFHcKIQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wj1d9r42u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 09:35:56 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41S9Zu2R022396 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 09:35:56 GMT Received: from Mayan.qca.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.1118.40; Wed, 28 Feb 2024 01:35:54 -0800 From: Kang Yang To: CC: , Subject: [PATCH v2 1/6] wifi: ath11k: change interface combination for P2P mode Date: Wed, 28 Feb 2024 17:35:32 +0800 Message-ID: <20240228093537.25052-2-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240228093537.25052-1-quic_kangyang@quicinc.com> References: <20240228093537.25052-1-quic_kangyang@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: vSwY1HcSMNqWMjdE0w7IN9eYgaWCqsFK X-Proofpoint-ORIG-GUID: vSwY1HcSMNqWMjdE0w7IN9eYgaWCqsFK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-28_04,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 impostorscore=0 spamscore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402280075 Current interface combination doesn't support P2P mode. So change it for P2P mode. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.2 Signed-off-by: Kang Yang Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath11k/mac.c | 47 ++++++++++++++------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index a6a37d67a50a..9240dedf3217 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -9857,12 +9857,18 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar) struct ieee80211_iface_combination *combinations; struct ieee80211_iface_limit *limits; int n_limits; + bool p2p; + + p2p = ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_P2P_DEVICE); combinations = kzalloc(sizeof(*combinations), GFP_KERNEL); if (!combinations) return -ENOMEM; - n_limits = 2; + if (p2p) + n_limits = 3; + else + n_limits = 2; limits = kcalloc(n_limits, sizeof(*limits), GFP_KERNEL); if (!limits) { @@ -9870,39 +9876,29 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar) return -ENOMEM; } + limits[0].types |= BIT(NL80211_IFTYPE_STATION); + limits[1].types |= BIT(NL80211_IFTYPE_AP); + if (IS_ENABLED(CONFIG_MAC80211_MESH) && + ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT)) + limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT); + + combinations[0].limits = limits; + combinations[0].n_limits = n_limits; + combinations[0].beacon_int_infra_match = true; + combinations[0].beacon_int_min_gcd = 100; + if (ab->hw_params.support_dual_stations) { limits[0].max = 2; - limits[0].types |= BIT(NL80211_IFTYPE_STATION); - limits[1].max = 1; - limits[1].types |= BIT(NL80211_IFTYPE_AP); - if (IS_ENABLED(CONFIG_MAC80211_MESH) && - ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT)) - limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT); - combinations[0].limits = limits; - combinations[0].n_limits = 2; combinations[0].max_interfaces = ab->hw_params.num_vdevs; combinations[0].num_different_channels = 2; - combinations[0].beacon_int_infra_match = true; - combinations[0].beacon_int_min_gcd = 100; } else { limits[0].max = 1; - limits[0].types |= BIT(NL80211_IFTYPE_STATION); - limits[1].max = 16; - limits[1].types |= BIT(NL80211_IFTYPE_AP); - - if (IS_ENABLED(CONFIG_MAC80211_MESH) && - ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT)) - limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT); - combinations[0].limits = limits; - combinations[0].n_limits = 2; 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; combinations[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | BIT(NL80211_CHAN_WIDTH_20) | BIT(NL80211_CHAN_WIDTH_40) | @@ -9911,6 +9907,13 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar) BIT(NL80211_CHAN_WIDTH_160); } + if (p2p) { + limits[1].types |= BIT(NL80211_IFTYPE_P2P_CLIENT) | + BIT(NL80211_IFTYPE_P2P_GO); + limits[2].max = 1; + limits[2].types |= BIT(NL80211_IFTYPE_P2P_DEVICE); + } + ar->hw->wiphy->iface_combinations = combinations; ar->hw->wiphy->n_iface_combinations = 1; -- 2.34.1