Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2177986rdd; Fri, 12 Jan 2024 01:30:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5XgQ0l62n3876Ori0ws0WHWDmR29oU/KBNj2o7RB/p94FrdcoLaxz9ZKVEzxFs+iU5e0d X-Received: by 2002:a05:622a:1b0d:b0:429:d0f2:7e57 with SMTP id bb13-20020a05622a1b0d00b00429d0f27e57mr391559qtb.0.1705051831137; Fri, 12 Jan 2024 01:30:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705051831; cv=none; d=google.com; s=arc-20160816; b=ETzSP84SAfrhP4q3AfCQZ8AaEdA+Z89Re9NR85sqY0ANcTokv54rrhnPcBf6flDWaS KS5WZKAACaFg6m990/0SfrNmmcZ58dke3Arp0JXCPdVBKtxuD9mZvJ+ZEeOlS/4Aci/w rB+8zds9KxTY/lSeJ8ImmtmPkGgVscLsW+UnJBp0La7VKkFQckAYqSBKelpHrpqoZBIs 8jOFAkhQ+vSLEk/WeDMqCZk0pW/IopUvQFcEWfTYCUdYqRUMAD1O1PbSQKyLn/eUKvO3 nkXuemLDC+xdQM67Kypohavao209wG/I00kUrxiP5aFR+XZ23X7FokY+U3bBZ3ZDMd8n N/9g== ARC-Message-Signature: i=1; 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=hczmYvediNtpijpTXbDHi83aRiBE5sT8RSY912eBhXo=; fh=nsXMNwyQ6Js4V/BswY1tH4B32D/qQcO3q9PUs38uuf4=; b=KjUMpVDNW+skFerzxgKpparyUyQw7VerMy4phCnD5NAQ4sKO1OzNkJVFbhmDIWOOpY ta44nJMiZn2e++akpn5Q0gLSID8kK/vjKyAAxicXbNyoJluPTWdY9WbkeDrVcCIKs6PY qkl6LmmBg1tYX1Yguyd7ac5ai8v/AzzVeQNT6fTss7vzRZzH89g0DzZDSEyl3KQPYP7H CBxBN7E2UScZVQ6sqMq0YU1cu/7a96ueuzMSdk4emwEcJTkqSsZ38iIANYzO7y6gz/KI ilghHJcZJMaLAork0uuOGcZPLp1mcdC//PbDBaZqiFYt/76lCYOGi1INtckfJCPjLSAh fThA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=LBTo5RLy; spf=pass (google.com: domain of linux-wireless+bounces-1804-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1804-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 w21-20020a05622a135500b00429c8cc281dsi2039989qtk.722.2024.01.12.01.30.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 01:30:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1804-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=LBTo5RLy; spf=pass (google.com: domain of linux-wireless+bounces-1804-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1804-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 D958B1C21149 for ; Fri, 12 Jan 2024 09:30:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5070E5EE6C; Fri, 12 Jan 2024 09:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="LBTo5RLy" 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 00F815DF3F for ; Fri, 12 Jan 2024 09:28:55 +0000 (UTC) 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 (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40C7esG0018971; Fri, 12 Jan 2024 09:28:54 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=hczmYvediNtpijpTXbDHi83aRiBE5sT8RSY912eBhXo=; b=LB To5RLyMNOEGuJduAfgFpuqJN5BhVIu44ptFOhaXUiF1dbA5d6GxwY2B5/I7vRuDR sEILzgWYiwRCVUylr9MCCuzk3z9kE5TxcWBcY9uiryHtjms0KgaZuGFQVlC3WVFl 6ZqHdsyJuJccQhplTA5yEB8i6m5dp2bXKiy9qvlF0WyHjVY/HSXFK5WlVy2olxAm 2I82uCF//zg9i/8gAQgx0mvKsjU3zRs/zwqn0wEKOlsxIychuqaWfjr0tVuFnoUp j1DxLj+ovK0y2P6XjFCXbXGpL0S/1NZkNVq9WhXG1SwOtsBw517yDupncYIh2pD8 Ohgxo2So9l0QxMIJB9Hg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vk18d0c4d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Jan 2024 09:28:53 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40C9SrB2021415 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Jan 2024 09:28:53 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; Fri, 12 Jan 2024 01:28:52 -0800 From: Kang Yang To: CC: , Subject: [PATCH v2 10/10] wifi: ath12k: advertise P2P dev support for WCN7850 Date: Fri, 12 Jan 2024 17:28:24 +0800 Message-ID: <20240112092824.7664-11-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240112092824.7664-1-quic_kangyang@quicinc.com> References: <20240112092824.7664-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: nasanex01a.na.qualcomm.com (10.52.223.231) 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: _91eoYOlKZLFXUOPmz2n5a0h42S8rZll X-Proofpoint-ORIG-GUID: _91eoYOlKZLFXUOPmz2n5a0h42S8rZll X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_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 adultscore=0 malwarescore=0 suspectscore=0 bulkscore=0 clxscore=1015 mlxlogscore=602 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401120072 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 --- 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 de60d988d860..b71854ae842f 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 @@ -950,7 +950,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 717bb26df163..af36d43e9eec 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -5635,17 +5635,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