Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2162246iof; Tue, 7 Jun 2022 21:49:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+5KUF8m6aLuR2BCdI6QEV6/2XOhvsgSnv8teSID9oRWSY1ZSL2zQKHNwYIqywc5gcms/E X-Received: by 2002:a17:90b:1211:b0:1e2:cb44:c68 with SMTP id gl17-20020a17090b121100b001e2cb440c68mr57417526pjb.146.1654663792350; Tue, 07 Jun 2022 21:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663792; cv=none; d=google.com; s=arc-20160816; b=wna/FojWfPPHmGweJT5r4kWV9icQZPIwGUkppI/9rt5gfEasnzp1QVH4hMUkr0hER0 Am06x9YHcL+Syzku4hFn8xZJ2oWsIWAIrz/Hr5QWT2w6pUiKwn8Fe4U+u2/k+yLLpxK7 89tveRedch0+hUN9xcHswVn9X/f+HQLak4ZEClKIKwC2xisLB/djCdMtC9vdJ3tsUk2F ndQva7p26MJVb61efUpQhfY+Cyb9Rre6zaoR0h4eq+0UWwJVEpwszjzAoiEMvkmuAKx2 0fQs+hpDpAstbDc9LtPJcdbP/FD019lYDwe4D6vBA+zMoH+hjDJP6PId9xxS6MsaVhzE VHIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tMITvTIFCb2DJlrnCZhpK6uYsr7KUK+dKgvs2NvIiSM=; b=D3lOXQUHZvoAbVroDq/1G1U/4s/72WdjZoI8cEUq2bg5COlJMQuk31b8ca+0WKBnhe zu/5ld5ja5qCKIOpn+mjVKVTQnYPmdxRSz4pygxv1x4vvFIuNLz9SUjAjGEQLRbcEISi BpiRdnQrmwsqKVZdUNIdAvjPCu4GXKivmJEE7pL9DeVoliKRWB88pIllZ6nQX4sctdUX epOyZlsfRARODBwNC1suAB0MRagFDCzOAzb68oejR4PkOmIL+trPMYphUIXT/Ih6JX7t TVLW8tPvkuFS4I4+pEvzs/uOu/0I4qLX3+cepXIyxQnu7XX9Y0cMlE6VDxupnzTk8otB jA1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xkUK9EWM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q80-20020a632a53000000b003fd157f7e9dsi21865817pgq.857.2022.06.07.21.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:49:52 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xkUK9EWM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 254133BD4F2; Tue, 7 Jun 2022 21:19:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379552AbiFGVGE (ORCPT + 99 others); Tue, 7 Jun 2022 17:06:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358641AbiFGUHL (ORCPT ); Tue, 7 Jun 2022 16:07:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBCA91C4B0C; Tue, 7 Jun 2022 11:26:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0BEFA611B9; Tue, 7 Jun 2022 18:26:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17D88C34115; Tue, 7 Jun 2022 18:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654626362; bh=bkChc6VIB6JtzS4Rga/CFkQ8bKYrPOAxs2A1bHKiS9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xkUK9EWM+ajCcCu/MWvJSM7Va5h6nJjYvoSWrnGUkwox5rcSR7kxKzvdmyWcJ4R0k /GNKGfMIPZw39kjU+E4p1KZp+TMtBzuwKkiGMwGlFSCX38k8ubUO5H76PUDE65KmHf SugnOaFcR3mzU5LoNon5bG4bTCthd3wXoo8O3e88= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baochen Qiang , Kalle Valo , Sasha Levin Subject: [PATCH 5.17 352/772] ath11k: Dont check arvif->is_started before sending management frames Date: Tue, 7 Jun 2022 18:59:04 +0200 Message-Id: <20220607164959.392543958@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164948.980838585@linuxfoundation.org> References: <20220607164948.980838585@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Baochen Qiang [ Upstream commit 355333a217541916576351446b5832fec7930566 ] Commit 66307ca04057 ("ath11k: fix mgmt_tx_wmi cmd sent to FW for deleted vdev") wants both of below two conditions are true before sending management frames: 1: ar->allocated_vdev_map & (1LL << arvif->vdev_id) 2: arvif->is_started Actually the second one is not necessary because with the first one we can make sure the vdev is present. Also use ar->conf_mutex to synchronize vdev delete and mgmt. TX. This issue is found in case of Passpoint scenario where ath11k needs to send action frames before vdev is started. Fix it by removing the second condition. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Fixes: 66307ca04057 ("ath11k: fix mgmt_tx_wmi cmd sent to FW for deleted vdev") Signed-off-by: Baochen Qiang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220506013614.1580274-3-quic_bqiang@quicinc.com Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 16b45b742f9d..d46f53061d61 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -5515,8 +5515,8 @@ static void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work) } arvif = ath11k_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 = ath11k_mac_mgmt_tx_wmi(ar, arvif, skb); if (ret) { ath11k_warn(ar->ab, "failed to tx mgmt frame, vdev_id %d :%d\n", @@ -5534,6 +5534,7 @@ static void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work) arvif->is_started); ath11k_mgmt_over_wmi_tx_drop(ar, skb); } + mutex_unlock(&ar->conf_mutex); } } -- 2.35.1