Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp267688rdb; Mon, 22 Jan 2024 03:44:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/TpwLOEzXnzRXz+vrKB6BKeQ0cesJOsCsJAAtQAIrpyWeBwduI4GHS/f9wGEUzCk5b9JM X-Received: by 2002:a81:7304:0:b0:5ff:9095:2d77 with SMTP id o4-20020a817304000000b005ff90952d77mr3895161ywc.80.1705923840360; Mon, 22 Jan 2024 03:44:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705923840; cv=pass; d=google.com; s=arc-20160816; b=kJsbrCTFYSldoWAOLj70XViodPZy81lx4glfcPg9MFcZoifErfcjY18q+3gx8aT/DR 2vZz4m7cNq6C3tGgtVrHzUzgL43aSze/9fEGmVdHjJa1le9FcwQNYeON2IAQc4RhWz37 DhowepA2+BZY77EI0R+X7L00ARB0cDLfhILslGidzwHlJuhJTtu8xF89+hZe+GHWIjld kOby6IkVm6ydmBZSriJwpS+jVSGTt7dNJ6tm1Bw+3xKELNlqzBEbSWObumoB5aKDkkn9 St8S9WjssgCoJ0D6JC0w9ZV9w6BR3fzbWhq4chGQu1Mzs86zuH0JpyfWVm32AyL5cw4V zBoA== 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=HBALOrUIoJncMSgE9LOut+h5W/C0H94IHwomEhjIkQk=; fh=nsXMNwyQ6Js4V/BswY1tH4B32D/qQcO3q9PUs38uuf4=; b=stOd/ISrcLvjL7eGWm6YXZBYexbPReMdFqAXaA+jTEDtN/QIoREnDY9Z/tBS6KyvD0 cdAhsiXeJ4h3BHDX5jYxtFQCqSC1Q8rNL8uEN1kgPgiQAtevRQLQdg4+0HInAibZyH/X GlD0wmXj5Ke6IpJ/RZn7txKUeEBTfvgPYXUEBGvCAZN4h3RxatHF5owzKeDCoRWrH8Lf PCYTeDZ3H0EmfvBmLY8ZNs463tieYgmUMWmrLQ296LkC17zkt94lGRyYaCNkxHJvI0md cF62j4QFu7BTiM0lhE8Sov7zp+vnbW8aT9gbQn4KDB+Iw7SvoRgEzHgr7VEEtGHQD2Q/ yjHA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="RhLuhiY/"; 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-2323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q13-20020a05622a04cd00b0042a0ece12c4si5288101qtx.247.2024.01.22.03.44.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 03:44:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="RhLuhiY/"; 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-2323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2323-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 22F9D1C26D6C for ; Mon, 22 Jan 2024 11:44:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAADB3D964; Mon, 22 Jan 2024 11:39:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RhLuhiY/" X-Original-To: linux-wireless@vger.kernel.org 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 49E263D99C for ; Mon, 22 Jan 2024 11:39:43 +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=1705923584; cv=none; b=iF3fyKkZjJeaYCm5wMry8PqvlmpZxcDdhQLxdxl4rzh4tC1I30+KkWbjWlXK3pBy03dd547CajAtmmvaQb3ovwX+oUVr1JJJX5e0ZXOlprAI68NYnb+oku24JmZVqynLY2pIDZxx5jC4fUou+5NrfqOOKJ3elw1LH1ywErubtDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705923584; c=relaxed/simple; bh=p01vPnjBgxRaRUNVbhjGNJeZ2KUEX75bgVvpjKJBP1c=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=r1caMGdL+x1a0f+UcF64AGP4sfNnx3HvTFewsr5tuAIzUZQ7HDezdc3w/hJdHdCBa8eqwKiZdwvTaMFzXEGiiujLn5yJh2vw+2lC1NwcbJH7Z1D2j2XFFfCFNYBN5anTMmsCNNoxvQ4k78Hn344rO4imm4nt3JtdoKcGOivJhgE= 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=RhLuhiY/; 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 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40M8c3nM015705; Mon, 22 Jan 2024 11:39:40 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=HBALOrUIoJncMSgE9LOut+h5W/C0H94IHwomEhjIkQk=; b=Rh LuhiY/cN0bdDfvriG6k/KIfeDU187zKKukic7gOZNdYriDRpA9CUaBeo7QOe1bZX sNlLsXBDUcrYgi3cZ35Xs1/BeeMmHqpUR/y4q0nhocoFyo0vrbU90gjnVsI+f4Hd Pk/p/8GDbnmpYfAy+qWVG/xPrvXoMQxg200o9vKNF75/L3KxumERmpLK6DjFEFwI FwFRvVjp/VagIA6shYBm6QzH5kwtOivCTvM6Nm4bIfqIGZS5CgmXJ/YjG7/IKAhT lDf74+SR8HIogzThrH1EASYWSC2CcYa5F3q4Omx8FP6Ruum2RmBC+KDwn7cLHCIT NwNXvygFSdJUfcTAQrPA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vsn0wrcd2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Jan 2024 11:39:40 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40MBddd4014953 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Jan 2024 11:39:39 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, 22 Jan 2024 03:39:37 -0800 From: Kang Yang To: CC: , Subject: [PATCH v3 10/10] wifi: ath12k: advertise P2P dev support for WCN7850 Date: Mon, 22 Jan 2024 19:39:04 +0800 Message-ID: <20240122113904.8938-11-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240122113904.8938-1-quic_kangyang@quicinc.com> References: <20240122113904.8938-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-ORIG-GUID: _dh7kINkx6QRe7hB1WDz6BLs45qoEEru X-Proofpoint-GUID: _dh7kINkx6QRe7hB1WDz6BLs45qoEEru 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-22_02,2024-01-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 mlxlogscore=606 bulkscore=0 clxscore=1015 suspectscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401220083 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 --- 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 10aa8b20ef7a..d811bcc01456 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