Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp743243lqo; Wed, 8 May 2024 13:30:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVUV/bzmmRFW2FfUkfEn77Zqh6bsHXm9Uf/MdukrtzswthzO710IF8tRSDm5T4OvHBu6W0bCQid/K7QFVaEquQSV2ixrOLb3CpNAu6slQ== X-Google-Smtp-Source: AGHT+IE8iCZzAO5l6Sqdam9esYzUf+lLUUgR7LTh/uLLeP8XIgKDresPsu5Nyg7QxtbVfDLHDdRw X-Received: by 2002:a05:600c:548e:b0:41a:408b:dbaa with SMTP id 5b1f17b1804b1-41f7093c527mr33115975e9.0.1715200205369; Wed, 08 May 2024 13:30:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715200205; cv=pass; d=google.com; s=arc-20160816; b=yO860m6qHdb74+pRZadbrXgS7cX59H0H9lTa5VWmW5AzzMyOOJgmiAeNPJOAiEOW+k ErKpHqTrPdShSPm8RAxRMOrPkGLcERUGc/UH5yH3fW6rN21rg+7DA96whKPwBpHUPi5X jpLA6o1SLqFZRWwmBb4hUBJpi477SjD7AUhLXxhZ2VQmYIgXK0WXjvZ0p7PEtYNqZ+28 e0lUYQrm2Hx4QvebME+aY9535/h3a1OeRJnMtAmahnNXI8K/sfYJN31wUyqdX8DHCmGf 55sjQVPBIu5Rn9xb+ArIlOQVVdN/MlCBXrKuf+Arz8+vJf1IXGz62mCgKYOjGsXqq9Rn DIBw== 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=bPhaYa9ueoCxhBgDg/0eyjwvppCIZ433XJPWNiByEHA=; fh=AgvgObJSbqiHpC0Eby6xztr0btLk3/3EQVO3ZGIiSPY=; b=mXw+HghmHW97/R/2YOrUdc8cUILrpIlanVaDbRRvUtytNbUCj++c64CYkIJS30fQv3 1QLrCbZZle9V/WiVQvjrVs5H8lWrsnSCWtyorgLC06im2brG+hyW3C42mHSGEJq5BKdJ PCL/2h/1P6RmXtB9eJhjvIslV5BFzUeV3i4hGge3X2xv6zzZ1SdqqotPewh6qBj4RkLF Y5GFvZIynxP+rkjopaxVK20JXo33RKDVjHkCn6B0oh2qa7jMrX4odGXYY/bW8VrIIK55 jFKvMkJvDN3yNU/V+HFj4TjqlFrHFxyI2T5qCNH290owHc1J70OB2sTYEb8Jge5UpdWZ zsPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YRbXBcle; 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-7361-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7361-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n23-20020a170906841700b00a59af83e402si5223777ejx.837.2024.05.08.13.30.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 13:30:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7361-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YRbXBcle; 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-7361-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7361-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 D96881F21681 for ; Wed, 8 May 2024 20:30:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E01171311AA; Wed, 8 May 2024 20:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="YRbXBcle" 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 6E39E130E55 for ; Wed, 8 May 2024 20:29:39 +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=1715200180; cv=none; b=OhCO4ZhAQiR83jwjY/WRpjgeXh0x00LpNbpIWJAyW8KCdPbLXw7tJ5zUOsZiQw16Z8KtN+KhTjHejNFhqzZy7IJYihJWRP43vABCCWx3luVDbSzJ8XBpSuTKnqE+JMCPZGWoYI5RvEupUWr/7G6uzozW21hh66K1JnmP6HxtO1A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715200180; c=relaxed/simple; bh=6TNrtz/uWs08edS3XuT7jbv59WHaLeeO6CABLMfvUxc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oDI85PRQLkNmftHLiVbDq6+4PZukc7/a4Ow16MrdPUZkTAsWuKUdnE5JrI0MsYFr+ZG9zip74rd2aOPwZeQ4u3MQ/kwWSUuzuitOfce52TMRY2INigTpoh+90Bqvw05klynvNTDgfr/+TN4z4oYgS32LD1PbszAJ7oXaVyLmek8= 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=YRbXBcle; 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 (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 448Fn24M024818; Wed, 8 May 2024 20:29: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=bPhaYa9ueoCxhBgDg/0eyjwvppCIZ433XJPWNiByEHA=; b=YR bXBcleFQxc6FMek+RyScJrkfowXzMed+7ewdL6sJzmk9dbm89HphmdFaQNvhMg7j GE92iO+3tfHuzhTwEtkkkFw5jIQ9SY/jRR7yPnYLV+cH77zifyfUbK0Cswn5tChc GUeSzlI8fyM/aCz4SbhfDCkZHYVER1SXfllhwE4xj5LtK0KscNoIV7Th/vEXy+fq v9finkaYYMORrOcRfclphl8fS5/5OAE5+15vIi2mFFsFM93eQTgOAyAZVYDV4bz0 yqPXZZmiT2OFe92+UDMKZIilex7XdYctJ7+EFTgIgrwIJONqgekRugKrXOYeWzO+ LUS05hTbDs1dWQ+pH9tQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y08ne16p1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 20:29:34 +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 448KTQ2O023178 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 8 May 2024 20:29:26 GMT Received: from alokad-linux.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.1544.9; Wed, 8 May 2024 13:29:26 -0700 From: Aloka Dixit To: , CC: Aloka Dixit , Jeff Johnson Subject: [PATCH v2 9/9] wifi: ath12k: skip sending vdev down for channel switch Date: Wed, 8 May 2024 13:29:12 -0700 Message-ID: <20240508202912.11902-10-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20240508202912.11902-1-quic_alokad@quicinc.com> References: <20240508202912.11902-1-quic_alokad@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: Fl4zXmhldJlY4w9BANQMMtTY5FOOqcSC X-Proofpoint-ORIG-GUID: Fl4zXmhldJlY4w9BANQMMtTY5FOOqcSC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-08_09,2024-05-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 spamscore=0 impostorscore=0 phishscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=684 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405080151 Remove the unnecessary WMI vdev down operation as firmware internally does so already as part of WMI vdev restart. Repeated vdev down results in a firmware crash during channel switch operation when multiple BSSID advertisements are enabled: ath12k_pci 0000:06:00.0: firmware crashed: MHI_CB_SYS_ERROR ath12k_pci 0000:06:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID ath12k_pci 0000:06:00.0: failed to set vdev 5 HE MU mode: -108 param_value 7b ath12k_pci 0000:06:00.0: failed to set he mode vdev 5 ath12k_pci 0000:06:00.0: failed to restart vdev 5: -108 ath12k_pci 0000:06:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID ath12k_pci 0000:06:00.0: failed to set vdev 4 HE MU mode: -108 param_value 7b ath12k_pci 0000:06:00.0: failed to set he mode vdev 4 ath12k_pci 0000:06:00.0: failed to restart vdev 4: -108 ath12k_pci 0000:06:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/mac.c | 29 +++------------------------ 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 71da4fe0006f..7d7aac553b3c 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7290,9 +7290,10 @@ ath12k_mac_update_vif_chan(struct ath12k *ar, lockdep_assert_held(&ar->conf_mutex); for (i = 0; i < n_vifs; i++) { - arvif = ath12k_vif_to_arvif(vifs[i].vif); + vif = vifs[i].vif; + arvif = ath12k_vif_to_arvif(vif); - if (vifs[i].vif->type == NL80211_IFTYPE_MONITOR) + if (vif->type == NL80211_IFTYPE_MONITOR) monitor_vif = true; ath12k_dbg(ab, ATH12K_DBG_MAC, @@ -7303,30 +7304,6 @@ ath12k_mac_update_vif_chan(struct ath12k *ar, vifs[i].old_ctx->def.width, vifs[i].new_ctx->def.width); - if (WARN_ON(!arvif->is_started)) - continue; - - if (WARN_ON(!arvif->is_up)) - continue; - - ret = ath12k_wmi_vdev_down(ar, arvif->vdev_id); - if (ret) { - ath12k_warn(ab, "failed to down vdev %d: %d\n", - arvif->vdev_id, ret); - continue; - } - } - - /* All relevant vdevs are downed and associated channel resources - * should be available for the channel switch now. - */ - - /* TODO: Update ar->rx_channel */ - - for (i = 0; i < n_vifs; i++) { - vif = vifs[i].vif; - arvif = ath12k_vif_to_arvif(vif); - if (WARN_ON(!arvif->is_started)) continue; -- 2.39.0