Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1495674rdb; Mon, 8 Jan 2024 00:27:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHrJ2NnUPQrr0GCMWP7uBhdDMVwINP6jkplfaQ6XqOOEGz4Qlh9RmZksez/CquRY34DYjWP X-Received: by 2002:a05:6a20:8727:b0:197:6d58:e312 with SMTP id e39-20020a056a20872700b001976d58e312mr678246pzf.68.1704702425160; Mon, 08 Jan 2024 00:27:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704702425; cv=none; d=google.com; s=arc-20160816; b=LIoPVc9JhhiIDy9Oqz3vf28LFIJUJ0vlirBTgWKWnH+cp5qM/bLc3y8qmay2yIaYI4 NxNihtEJaGzTTUmkklKHh3vMuxw/O1gcvjBF6H87NOaakqYNZg9Z9ToAjRo17KgAzP9I XTY1jGoR4eX0TWaCejVaELXP/Zi/XbAYjxA2K6Q4hChhphCMK2rBASKM4JpYuUz2hYOm 16+t2+Jp1J8QvZo+A/nQFVr4aSXYLGj4x3tRntSvxFX4RA+aqaEvZNL6agVuS8mL/72E SaMNkUF1mRrQgtdlVwrxOJ4PC75jsqwddvZMbor2PlEq3lBV6fE6nobXe5zp9bw7+jcy eEiA== 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=5S/ce/2MMigMXg2dnRjAujXxb3fjmoqsA9eFRHd6DP0=; fh=nsXMNwyQ6Js4V/BswY1tH4B32D/qQcO3q9PUs38uuf4=; b=Uoj4+rurwiEbe551i0CxQ2ZBAVii2kquXbz3cnZ4y1zjqEMCBOUFqoH0v8VomW8eKY H79W+aVuq5D7Ve4uwie4jZwX8OVLbL+P3YJWB9cGqWuBWGIn3xhIyZCUf2B/44NMM70p 8MmTKb9d7dTkSkrqJMk7ETrV5xqfpWkebtj7oJAGAjsA6iPoCtEvfFeAx+/GiSOn/nfr we7blrMq/wOGlaydLBWHI3+6vyuIB8i0ZfuOdk4J2Rb4EZOh8AWnSTIB4r/kP6rX7yXl a2AmXBcY8OF7oF/Oc/rQimXCmglOdNVUUNpEvQcMgAV+hWLf/hThrKdGZq5dlVHRNAYp dSbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ijD2bwtj; spf=pass (google.com: domain of linux-wireless+bounces-1569-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1569-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 20-20020a630b14000000b005ceb4a70188si5581563pgl.375.2024.01.08.00.27.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 00:27:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1569-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ijD2bwtj; spf=pass (google.com: domain of linux-wireless+bounces-1569-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1569-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 BDAF428224C for ; Mon, 8 Jan 2024 08:27:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DE2FE57F; Mon, 8 Jan 2024 08:26:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ijD2bwtj" 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 D6B4BD517 for ; Mon, 8 Jan 2024 08:26:37 +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 (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4087Q3OD029130; Mon, 8 Jan 2024 08:26:35 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=5S/ce/2MMigMXg2dnRjAujXxb3fjmoqsA9eFRHd6DP0=; b=ij D2bwtjWeiV5qY0Fql3Njtb/q2dvtftfojR84CobH+vj0A6j0x+/PzHQoRlrbHjWZ W/2Rn9azl4QnnBLgTx2jk33ZlwdoYA7LmloWRhZ5+t5fRMcDbqXI/CwO4d/ZJwla 3Uwq4brvV0zfibUF+R3BFKLvDB12VpZG1dsIIxYOMheP0LpoQZokEzkZqVOb2Vbb OVLXs/pR11+A4z9RNRCQBa39/Apqz8BVzGPoYSlhiYqmZ4yjH+hTY+KL+Z8yNy5s 6cNIapEb/INt+2d4Wrj2dAL/hiXrb+jaN04fsSr++VzQoSspTrCorKt20IhCYQFY Y3OHlnWIloW9vbQuTguQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vgbu2g6e8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Jan 2024 08:26:35 +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 4088QZnm018470 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 8 Jan 2024 08:26:35 GMT Received: from yk-E5440.local (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, 8 Jan 2024 00:26:33 -0800 From: Kang Yang To: CC: , Subject: [PATCH 06/10] wifi: ath12k: allow specific mgmt frame tx while vdev is not up Date: Mon, 8 Jan 2024 16:25:48 +0800 Message-ID: <20240108082552.7227-7-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108082552.7227-1-quic_kangyang@quicinc.com> References: <20240108082552.7227-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: 2LEUHKTltrUF1j-5ZKv9jS0a_STqFE46 X-Proofpoint-ORIG-GUID: 2LEUHKTltrUF1j-5ZKv9jS0a_STqFE46 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 lowpriorityscore=0 suspectscore=0 malwarescore=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401080070 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 Signed-off-by: Kang Yang --- 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 a77fb786bc0a..6632d5266c1a 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -4995,8 +4995,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", @@ -5010,6 +5010,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