Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp289609rdb; Mon, 29 Jan 2024 02:16:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsSOw5hcXtjmxZnSmrcYAcBVT18sCfAN2xdpVytGl9XA2M7Qq2Wog0sj7opWF2W81U/yS3 X-Received: by 2002:a17:902:e545:b0:1d6:f7b9:8cf9 with SMTP id n5-20020a170902e54500b001d6f7b98cf9mr5150765plf.10.1706523367860; Mon, 29 Jan 2024 02:16:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706523367; cv=pass; d=google.com; s=arc-20160816; b=eA/XQ/DqXWT1afUUcwLgQjlrNh4FVFHbU/ZL9w+xlVbNaiuzNy+nHUAtejGTu4pUTQ Zyb8R9fLinDs+++HNdcTo4xVimBl3TxO/E14t/upHV0Z1GUBNmTuHPPnG1m3pmIM5rSH ArZwCvNe2aIjcMaBYZdj9AEyGPfFGY2hWaeHKcpC5Ai5rxFXXsBRVJDGBeAzoRu5Khla yi0mXfVm+/sALkbBh4PgbGk6Bq9asoyhsBU6RH5W9qQERf2zT3bvD8bbhrBZoZKmNo6G h4hg69X9s3B+ElTqHN9eYhDDMlq0r2bXnVRu11ix+qVNJYvFfWPA6mHxFvIVhIpzRnRh MR3A== 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=vs0eZlldsOW6GO89KmiRSQUxPj3n/kM9Y24RP8nN2u4=; fh=k/ozYhjIof+aFYk/IhZuPdz/xrrE7rrHpyvi9RUysIs=; b=LDimEO2NM2S0UyurBrg4kX00BepPp9AsJISldd+coBvQUqfzAXoNpklUjNQQymxuhY 9rIxNR7FvmdavaKFuWcln5sXIPTpx+L1rRg81zdakTZyjfASI2QdilB8HOd1XsBD5IsR fqlF/DecuJlRb6gtO6k2O9LumnLSSF9+DNNK7YJNpMASCM7AcTKyTnJYONsafMxAaZgV m/s3Iv2EvD7fiLd0nkurTUYhQxgRdwgLSzonDKGF1SFL7k+c5N94DAo2Lt+OlPDMbov3 9eEnqrfbE3BUUQf+4WJkxBxLbUy2DPkUoIF7O4UKdefAPl3GDd6fS+F1Bt2MzeDA2VaY 7j3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=io79VaUP; 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-2661-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2661-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=1; AJvYcCVoqPrAtID0Zi7or7QD3HPUN5zEva2Wrn8N6oHnZQLgpCJ1nCffkbDBBBNJv8I18CNXQpIq4JiLV+nXjZJnXCdWex4W2fzR1kiXISeheQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k18-20020a170902c41200b001d8d6c3762fsi1940561plk.374.2024.01.29.02.16.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 02:16:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2661-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=io79VaUP; 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-2661-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2661-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 832E22832E8 for ; Mon, 29 Jan 2024 10:16:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE35558AA5; Mon, 29 Jan 2024 10:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="io79VaUP" 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 307F758237 for ; Mon, 29 Jan 2024 10:15:32 +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=1706523333; cv=none; b=fT/AgsVu3Wh5lqTE2RqiuzYB6jb9yGevP8XAFQLJncKvD5nTQ3Tk0RP7cix0k1fiNuMhNI4DUJwfHyXoSihGJqXWRDOyA+SQEcrBxpgepMlcbDQ2YloIG3ugQI5XfMwthmKQzWQ5YvjmxamZiBpbIZfBsNDhegPd8IUcC8Z1BPk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706523333; c=relaxed/simple; bh=VOd0QFXwg4UCTLzHF5Ag+az5PqStQo+Szakhsn693t4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZoKWm7q/2/CopQr+xBZP8LUzyDIcgUvsNjgqmHFCgVw/3Btgdpw4mI57qvoSjMkUU7cev4deqmgFUaTURRIuhuJzvOfCYmVfZGY7Jd4cYDpbMGmXdqXNZznri7Ipm7aGB+0f6q5Gfj92kL8LFboM7oYYISCrs9H6/u7QuX+M4TI= 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=io79VaUP; 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 (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40T56D0g023912; Mon, 29 Jan 2024 10:15:30 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=vs0eZlldsOW6GO89KmiRSQUxPj3n/kM9Y24RP8nN2u4=; b=io 79VaUPFeU5EzaGFsY3gMFpIJLy/e0funrNcrrD4oXVF0hmsjOfD+QrdGjR5F9wNc 4mIWzYC8Lk8Av3nQSOCaI2t3MxD99zxOWIYgTHpQAWQQvUgmUCnBiQ4WnN2x33ce k/YH6NkDFK8QKXRFfQYrkB09f2fB4AUb+oi51AJVK2WGSttP+FqTsyXL6vmm1mOU bWMUlMyMS52f1hpWHDERgAD1gjZOb8m8cTqBw3c3KvjKr66hOfW4d1eeGOXtm45n LpuOh4qm2NYsJ0SXkVaMulelN60ZayVY9q31T7ci0AbhVb1R3l9vqUd1W5kH7nMC HQLj/rxnbr6+iVxK7i9A== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvqhmuj2p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Jan 2024 10:15:29 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40TAFTCl020510 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Jan 2024 10:15:29 GMT Received: from yk-E5440.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; Mon, 29 Jan 2024 02:15:27 -0800 From: Kang Yang To: CC: , Subject: [PATCH v5 11/11] wifi: ath12k: advertise P2P dev support for WCN7850 Date: Mon, 29 Jan 2024 18:14:53 +0800 Message-ID: <20240129101453.368494-12-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129101453.368494-1-quic_kangyang@quicinc.com> References: <20240129101453.368494-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: wtX_236sYhXmsNSoHWlf1Qgfr8lW_fwr X-Proofpoint-ORIG-GUID: wtX_236sYhXmsNSoHWlf1Qgfr8lW_fwr 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-01-29_06,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=605 spamscore=0 impostorscore=0 clxscore=1015 mlxscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401290073 Now that all the necessary pieces are implemented we can enable P2P support for WCN7850. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kang Yang --- v5: no change. v4: no change. v3: no change. v2: 1. add Tested-on tag of QCN9274. 2. update copyright. --- drivers/net/wireless/ath/ath12k/hw.c | 7 +++++-- drivers/net/wireless/ath/ath12k/mac.c | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c index cbb6e2b6d826..b804d9f88a1b 100644 --- a/drivers/net/wireless/ath/ath12k/hw.c +++ b/drivers/net/wireless/ath/ath12k/hw.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -953,7 +953,10 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { .vdev_start_delay = true, .interface_modes = BIT(NL80211_IFTYPE_STATION) | - BIT(NL80211_IFTYPE_AP), + BIT(NL80211_IFTYPE_AP) | + BIT(NL80211_IFTYPE_P2P_DEVICE) | + BIT(NL80211_IFTYPE_P2P_CLIENT) | + BIT(NL80211_IFTYPE_P2P_GO), .supports_monitor = false, .idle_ps = true, diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 6b8b92d22553..1632cd3322fa 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -5745,17 +5745,25 @@ static int ath12k_mac_op_add_interface(struct ieee80211_hw *hw, case NL80211_IFTYPE_UNSPECIFIED: case NL80211_IFTYPE_STATION: arvif->vdev_type = WMI_VDEV_TYPE_STA; + if (vif->p2p) + arvif->vdev_subtype = WMI_VDEV_SUBTYPE_P2P_CLIENT; break; case NL80211_IFTYPE_MESH_POINT: arvif->vdev_subtype = WMI_VDEV_SUBTYPE_MESH_11S; fallthrough; case NL80211_IFTYPE_AP: arvif->vdev_type = WMI_VDEV_TYPE_AP; + if (vif->p2p) + arvif->vdev_subtype = WMI_VDEV_SUBTYPE_P2P_GO; break; case NL80211_IFTYPE_MONITOR: arvif->vdev_type = WMI_VDEV_TYPE_MONITOR; ar->monitor_vdev_id = bit; break; + case NL80211_IFTYPE_P2P_DEVICE: + arvif->vdev_type = WMI_VDEV_TYPE_STA; + arvif->vdev_subtype = WMI_VDEV_SUBTYPE_P2P_DEVICE; + break; default: WARN_ON(1); break; -- 2.34.1