Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp267687rdb; Mon, 22 Jan 2024 03:44:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjTRRpkkckaeib3MSaw/iXvaTTOFLSrFah9Qv3omRZfbs6nZci8cXv1C3eRZNw0N9X/XlC X-Received: by 2002:a17:907:842:b0:a2b:1a80:7b72 with SMTP id ww2-20020a170907084200b00a2b1a807b72mr2362873ejb.30.1705923840328; 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=g4mzanLmCeRlX4SjHxt/CyPLNIR2VTL2duKggrB9JEdB9VVlyUKz2EdH2lbV8UGk0P YtdOXwvaFkBajgcPn1Q+RupU22hUeEWqn/SjskHY/Do6axZbucXWuLFHNVP8O9AmFzNy nxllpq/uv6gxta7/xhd4sk99EpObVBo/bxFSzy+x7fEpgsMxbwHXwdqTWy8VOB2Typok a/f0G0nskN9uBqeR3jMmYJHyKuJ6Xdmk8COPf2qelhhd1lwEDLB1eDLt/1atrKeHGUTW v1gJ4nhgRIdjssyl9/piuuZ6Zd0HWBjKotP4vwyjKLsAd0A4ekNuDqPG237LnHKe/qxp faaw== 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=irSnxmr4WkJzAJDcQdBIvSGSCBvNuapuPXfTi9at0ko=; fh=nsXMNwyQ6Js4V/BswY1tH4B32D/qQcO3q9PUs38uuf4=; b=N70/ypFWMyyTgBNI1N0m4279eaYP/p27yUGAXmhMOxFmPLv3AwA7l71e+N06mMo5aP 8uUo3RyXlhArJF7b7Ch4nIyKuTqBukjUes39BqEAZY3QJQD2GEom0cSAuZxEhh92toUO 0FMVCQBxCT6uAvDjNDCioDCM8dvaR/MeScP0biAwN/NhiL8VH9lmyvkUuybMNdboUlmx IgKZc+6He9s9m0rNgIyYQPvTzM6/Q3l54ECBgli8A9v1ihzJp5S+Jawe7Z+yZrBdI+66 MgyhHg/lrSfTelbqO+T4LQwVByEX4xRMDY+cP/o01gNIctcw793XT1lOA/RJZ3mfJQ1a 5ivw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Vvd2pg2Z; 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-2319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2319-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. [147.75.80.249]) by mx.google.com with ESMTPS id a1-20020a170906368100b00a2f4a501c3dsi3861857ejc.823.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-2319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Vvd2pg2Z; 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-2319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2319-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 62D7C1F28410 for ; Mon, 22 Jan 2024 11:43:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 220B93D96F; Mon, 22 Jan 2024 11:39:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Vvd2pg2Z" 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 9E7593D964 for ; Mon, 22 Jan 2024 11:39:37 +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=1705923579; cv=none; b=lqUIhwhiPTEudVvO0youeUvZmL0AeiBRmkV0dcyE4slQJkhzA8NpUfTUR8lIkf1Kh5ZzoXeUeD/KgLyhNLH9pCfOJCipVOmVHeM5t/xc2PFQGMlIyY698z67Pk5XZttcn9vbIxmBqDOV0Agnzy/mQqmXLT48lj6GdWGLuLe1qls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705923579; c=relaxed/simple; bh=G+37iptBW2XsNCPEZ3Vr78m9rznfobjbqht8I6C3qgs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OyucPND6IVgefTqspcVveRyEDfBg5QJAekz9rNXn78pJkKqjqLvNTB4BQfEd9y5y9vNJYF3xJ9TGWl416knjsLZKI6VoHEHvoQXGfaL/vAQ2BXvZXrr/FnTRwRM2zFW5lvwpv6LkZ5kkGvrT+pfP8ftYnywvummusDruPav9G5o= 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=Vvd2pg2Z; 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 (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40MAkABt032343; Mon, 22 Jan 2024 11:39:34 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=irSnxmr4WkJzAJDcQdBIvSGSCBvNuapuPXfTi9at0ko=; b=Vv d2pg2Zic2nDXjDLpi0d7AJtH8yMGvkp97XMX6DeA08MsMhkhD3O8q9lI7x6RVhbG B0LFbfDUxXv4b40j6opLEVmuK8rRNG4l4Qug6KextxlSXqzWxY4GwHeEhpavNuml jGaoUTHcm4yaFlnh19l3J9Q2zUrvpIKan/NmFW4UNqi3yUuBqf2KPg76yThQgxc/ vbfBk42KyPrG3m0sEx8v3lw726MLoHfzw/ZxKMT9/mRnnuIecw9xOewaYRf7Lm6x ZDT3Zn9NAA26a1R1QUWHzDTfkO/Jv3oNeh1KpnlVTWVT37K6IkZ4rYDFyaIPMfGK tGCbQiKVfdOigkKLapWA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vspw8r3xt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Jan 2024 11:39:34 +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 40MBdXHW027201 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Jan 2024 11:39:33 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:31 -0800 From: Kang Yang To: CC: , Subject: [PATCH v3 06/10] wifi: ath12k: allow specific mgmt frame tx while vdev is not up Date: Mon, 22 Jan 2024 19:39:00 +0800 Message-ID: <20240122113904.8938-7-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-GUID: rfOTlS8r5pyzCYI5uZOnQMoziwLSeYBk X-Proofpoint-ORIG-GUID: rfOTlS8r5pyzCYI5uZOnQMoziwLSeYBk 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 phishscore=0 malwarescore=0 adultscore=0 mlxscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 suspectscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401220083 In current code, the management frames must be sent after vdev is started. But for P2P device, vdev won't start until P2P negotiation is done. So this logic doesn't make sense for P2P device. Also use ar->conf_mutex to synchronize vdev delete and mgmt, TX. 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: add Tested-on tag of QCN9274. --- drivers/net/wireless/ath/ath12k/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 8b106aae3260..65ac1d0b52a4 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -5069,8 +5069,8 @@ static void ath12k_mgmt_over_wmi_tx_work(struct work_struct *work) } arvif = ath12k_vif_to_arvif(skb_cb->vif); - if (ar->allocated_vdev_map & (1LL << arvif->vdev_id) && - arvif->is_started) { + mutex_lock(&ar->conf_mutex); + if (ar->allocated_vdev_map & (1LL << arvif->vdev_id)) { ret = ath12k_mac_mgmt_tx_wmi(ar, arvif, skb); if (ret) { ath12k_warn(ar->ab, "failed to tx mgmt frame, vdev_id %d :%d\n", @@ -5084,6 +5084,7 @@ static void ath12k_mgmt_over_wmi_tx_work(struct work_struct *work) arvif->is_started); ath12k_mgmt_over_wmi_tx_drop(ar, skb); } + mutex_unlock(&ar->conf_mutex); } } -- 2.34.1