Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp599346rdb; Fri, 26 Jan 2024 05:23:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHE/B+65XxO55fS5wwsUZUK9PWSqWYrMIRrhAC+BIOe5HEc7J1X/DboJGjnaHXwspWGtgvR X-Received: by 2002:a17:902:ef8b:b0:1d5:4b18:17c6 with SMTP id iz11-20020a170902ef8b00b001d54b1817c6mr1412746plb.62.1706275417980; Fri, 26 Jan 2024 05:23:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706275417; cv=pass; d=google.com; s=arc-20160816; b=VxCDaaZVo7x2veUOERyRbVmwbrqiHJOCGhF+aiHIAztRln4oNHN2HHIyfZh9Emc0tZ 2DWBOgnbzVnKptsMst4rCW053MQIVErhvIQ02vbnnWM30OBGhLlBXJ8Stmz0TQL5+MUk dMO74xij+mHciqrv6rRQ3xt/x5aPXtltKBMLFYW8AeM8z1zD6sgxzbkVvlVCUgUK2QhU WtS+xxmU/HWB60DAziZlK4JOmjO5IFHW5Iixp+yOARhfRyrqvQg4lzjr/Q7ahxpfAGCc zOGyIdIQZKzBOu/MMsj8KJabSCmuIvOgUeHvbrd7owasIzx1fu90e5OD4jHYfMHDTbz6 SaWw== 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=Vn+C+Onp+Vp3vaJFvhJI+hpO/0RizG7ZQpbprZofnic=; fh=nsXMNwyQ6Js4V/BswY1tH4B32D/qQcO3q9PUs38uuf4=; b=hgfHXH04soaO3B5C308gZkFvHWzDqDdJKicxKMe94nASab0JKUtkeokurBCQvU5Uby mwdpIMZLvS4Leq+O+Zb0b9kW5rqcDZ//2iPamcaulEisQuqhCQ9c0Ndc0xe4cgik8eCX nOcjIC4lM/MJCgcQpYthlle7gMowBkAj8kch7afJeHA5zu5GMzKOrCXXsiSy+CxbE2ej 0aPkjXiQX7gS6A7cZq75oHcEMBoV5sHsouPzM5dezx8HiFPgZ/YEJS5+sWvb6aTkyhDu 9b2wfYjW62+8WO6Y6qtRuJBiIj9I4CWBOwOaMtp7s9heJ3yYqHCTJ+liyOfWlifPBc2l 2WFg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="iGw/unPq"; 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-2566-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2566-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id w63-20020a638242000000b005c220a94525si1144230pgd.90.2024.01.26.05.23.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 05:23:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2566-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="iGw/unPq"; 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-2566-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2566-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 20585B27273 for ; Fri, 26 Jan 2024 12:45:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9181A18B1B; Fri, 26 Jan 2024 12:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="iGw/unPq" 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 C1E7414288 for ; Fri, 26 Jan 2024 12:45:07 +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=1706273109; cv=none; b=NAU0TNZuhJ1WQnmTrOfBlOAo+5IQaZP6Sr/lOHVqlnjaJv0NF7rgTKPcnRZszSLNHrx1SLfjujSOImJZsnHNawAjbtBaYqbX23CZ3kEPCrzPW4rVKDZ6ddj1S0mO1+qSyiTNn8O7QNQLMLCj0zs8dYVJrNsGQFaSDgUtR+fQc0E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706273109; c=relaxed/simple; bh=MY0Iu4YDA9s0g47RNcOiZayzIRJ/PpV5qLLdAFd3XxE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GtEE1CLTO+/XqVF1ilF8gYqJpxRx+XAjBgBbIgU035Hi1KI4uoTnpblghvkBUGtEGRGfQd5OrSk2AO/cSem02G+Wc+NA5vwBINO1GtLpqnyxT2O+n6U2icPWm/nsa9I3RW8Dfrc+ml2DNQ+rrAIfJtqynC2YEzmFF9IE0PCbiaQ= 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=iGw/unPq; 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 40Q57w8o001050; Fri, 26 Jan 2024 11:52:59 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=Vn+C+Onp+Vp3vaJFvhJI+hpO/0RizG7ZQpbprZofnic=; b=iG w/unPqbCVXhJvUo7wmGhmoFYhKZDvLKbOyDlwSxjVWvNPiiNZQBbd9kaB2n6S3Iz 1VMM6kOxFPrArKXqSDra0qiPNjkUbw1JhRWMXyFNHZOPAQtBfqdYlDkkVq1u50gE ovRK0AJ3NEb6CbJE4ablt4m/jbF6cDkjyU7ncpOddPs7EFdkFCq8YbIqGygCKFtV HnIeTRWXhB3KGZukyb9nHMtvDq5CpfOCa7mc1rhzaElbMYzmP2H/tjtmfVkc9XO3 POJM6uWvkU7v7k4vjBdoN2rQjJOIoepPTK+Typs9ug8OaAcpdLiywXwWopGYHRQi /iMPILThgeAvLuPY0+2g== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv4cas14h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 11:52:58 +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 40QBqwuD003977 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 11:52:58 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, 26 Jan 2024 03:52:56 -0800 From: Kang Yang To: CC: , Subject: [PATCH v4 06/11] wifi: ath12k: allow specific mgmt frame tx while vdev is not up Date: Fri, 26 Jan 2024 19:52:26 +0800 Message-ID: <20240126115231.356658-7-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240126115231.356658-1-quic_kangyang@quicinc.com> References: <20240126115231.356658-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-ORIG-GUID: H4k32f3IPVCEA5xqG088Q8R7-44FNtVp X-Proofpoint-GUID: H4k32f3IPVCEA5xqG088Q8R7-44FNtVp 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-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1015 bulkscore=0 impostorscore=0 priorityscore=1501 spamscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260087 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 --- v4: no change. 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 366bb5e5934b..4ad23bc9381c 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