From patchwork Mon Apr 29 08:15:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13646447 X-Patchwork-Delegate: kvalo@adurom.com 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 E9C38171C1 for ; Mon, 29 Apr 2024 08:15:50 +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=1714378552; cv=none; b=rP9Pmnbacf2KNm9wLHCftGNiWd/LbkeqJnof1Nh5NqJnZoIaYa4HLhgcUFnsDMpl4K+0eOU5J4i7grJhMDip9y68q3ubrzUPHKPnMMejJ1vsQx8hzfLAYYyC1nFSi0l3yupR66lGRuS7n3B0X64WuxcqnfTbc4oE02kGB7ZlmIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714378552; c=relaxed/simple; bh=+KPoyP9hA6sGt4ASizQkrVrFLf7PwXtz7Kw56F3ZRA8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=djNejD+zMh3pq0U6NKzu5zU1exozjXwhToNYIdIGsQCvB1KrzfBqZ/KNKuJAZ0cOFTqAIbhpaMb3nf/l8zdMQupuO2XzD0unHR7TPbNZe6TN9kioYyDCbLd9LueXfoTGMyJO2/L+uMiK/WrnrZRx0jPU/DIxSvBpXlHTMozRWfo= 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=R1pesYzq; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="R1pesYzq" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43T5tnTZ002468; Mon, 29 Apr 2024 08:15:48 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=cZy8WHNz+U8iVqZk4edckW0X50EEgV5UPLQbTdH0uPg=; b=R1 pesYzqSdoOS5FRAMfLf33asRDBvAXT3zqD/0ZAM+RKDJAzWRMqd2DRzNL1BD0VwP XPwbfhyJmr56UPy0fsvVxX6rD6N9BWH7s5DfiJC4K8VWRlN+sWhNla+L8Iyt6/Fx g/HmLoNTs70LSO0TKuChm1eEDBHF54tzPH70nxUAHd/nLJM6BmFmNoIRmNcEc1sz OpBkOf2ZorUj9dmw6upDUU5T4CtrugSxqsQZdrzkdMhbpvIx0TA0hz61ndGD391L 8tblLGQiAxncs6YNnfJlsi7GW61Ui3Rl/ZNAaP1RSX0vNFhrqAeeSpF5CDX2Va7B pLFQgPOpEHtHoAVDtTIA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xrq2k39fp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:48 +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 43T8FlKb028829 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:47 GMT Received: from kangyang.ap.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; Mon, 29 Apr 2024 01:15:45 -0700 From: kangyang To: CC: , Subject: [PATCH 1/5] wifi: ath12k: remove unused variable monitor_flags Date: Mon, 29 Apr 2024 16:15:21 +0800 Message-ID: <20240429081525.983-2-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20240429081525.983-1-quic_kangyang@quicinc.com> References: <20240429081525.983-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 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-ORIG-GUID: JT1TxCx8zCmKQ3xx0Du_Jv4VeKvX7a-u X-Proofpoint-GUID: JT1TxCx8zCmKQ3xx0Du_Jv4VeKvX7a-u X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-29_05,2024-04-26_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 malwarescore=0 mlxscore=0 priorityscore=1501 suspectscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404290050 From: Kang Yang monitor_flags is defined in struct ath12k. Although it is changed in some places, but it is not actually used. So remove related code. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/core.h | 5 ----- drivers/net/wireless/ath/ath12k/mac.c | 10 +--------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 47dde4401210..db139152e372 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -212,10 +212,6 @@ enum ath12k_dev_flags { ATH12K_FLAG_EXT_IRQ_ENABLED, }; -enum ath12k_monitor_flags { - ATH12K_FLAG_MONITOR_ENABLED, -}; - struct ath12k_tx_conf { bool changed; u16 ac; @@ -533,7 +529,6 @@ struct ath12k { unsigned long dev_flags; unsigned int filter_flags; - unsigned long monitor_flags; u32 min_tx_power; u32 max_tx_power; u32 txpower_limit_2g; diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 56b1f8b6844e..3e9a7dec7eba 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -6492,7 +6492,6 @@ static int ath12k_mac_vdev_delete(struct ath12k *ar, struct ieee80211_vif *vif) /* Recalc txpower for remaining vdev */ ath12k_mac_txpower_recalc(ar); - clear_bit(ATH12K_FLAG_MONITOR_ENABLED, &ar->monitor_flags); /* TODO: recal traffic pause state based on the available vdevs */ arvif->is_created = false; @@ -6563,15 +6562,9 @@ static void ath12k_mac_configure_filter(struct ath12k *ar, reset_flag = !(ar->filter_flags & FIF_BCN_PRBRESP_PROMISC); ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, reset_flag); - if (!ret) { - if (!reset_flag) - set_bit(ATH12K_FLAG_MONITOR_ENABLED, &ar->monitor_flags); - else - clear_bit(ATH12K_FLAG_MONITOR_ENABLED, &ar->monitor_flags); - } else { + if (ret) ath12k_warn(ar->ab, "fail to set monitor filter: %d\n", ret); - } ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "total_flags:0x%x, reset_flag:%d\n", @@ -8832,7 +8825,6 @@ static void ath12k_mac_setup(struct ath12k *ar) INIT_WORK(&ar->wmi_mgmt_tx_work, ath12k_mgmt_over_wmi_tx_work); skb_queue_head_init(&ar->wmi_mgmt_tx_queue); - clear_bit(ATH12K_FLAG_MONITOR_ENABLED, &ar->monitor_flags); } int ath12k_mac_register(struct ath12k_base *ab) From patchwork Mon Apr 29 08:15:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13646449 X-Patchwork-Delegate: kvalo@adurom.com 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 7F9051758C for ; Mon, 29 Apr 2024 08:15:53 +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=1714378554; cv=none; b=tUnfTZLoakaoAS29lUw2lBIlTMBqn7HgxpYGRZ2YRPJ5iiobSLrMVpG6r7O9NCY5CC+YGxXrNiBsAHYloEzIT9NTfpUgRcrHYgittM8lCHH1iwmAbukm/BFh2lHBdiXguvuJQjGDxZCCObL4j6o8GFYgZuw8YgMl4CC68hS7y9w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714378554; c=relaxed/simple; bh=rJVR5VYfsUi0e5Br/AfBDRCIVNtJd2MID6V7ZglOZBI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bzzAiL4l2N9lm5NyhQTJ83p15wurABY/H4YVerYMJWuQd3So4JQ1YWYwASf9KokzV90yLgC8i4gGR7f/1rKrhjAiOyuev0FGcMDTIK3PhLRlMd7XFLmuEupuGamSq8eisSITdNJMM66JcVZaB+bxAa/bARwsfZbnCaUA3bBnTbk= 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=StojCLmA; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="StojCLmA" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43T6b8sQ026312; Mon, 29 Apr 2024 08:15:50 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=9G3zrctaFCDSY3o51Uq6vw7ZK/2OcFFnfziKUSc1zao=; b=St ojCLmAgekiDo5dRDVfxyaXuHP4YxeiiX5vLLwUHywmiNtLpYSf09SGJr95Ki2eZP pW2HvagHc2YOzCiEcvVRz5VH38xeWs7lAEYUTHr0HlFZMCWb21/gEsN5KHUj+dTa s2vngxOA/XOFO0X+yM9T6fgb9OYOiODQ99TG5tGFCwhAQtdNoMO/VHkFLYe2zGyq MS770ZNpmZT1ZUPc5RF55k4Mm+0PaYjwvpEq1+rDBtA4i6DPx5IroYtIUvJxIGIz rcSr+uRMcsshYFcwqkfFYm7F/ClKr1knpCBWWNP6jSv/e36vzIFVlwovC7RS/R6+ 4VK/dolfPWpSUhWGv+rQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xt2sernu6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:49 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43T8FmVq006919 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:48 GMT Received: from kangyang.ap.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; Mon, 29 Apr 2024 01:15:47 -0700 From: kangyang To: CC: , Subject: [PATCH 2/5] wifi: ath12k: avoid duplicated vdev stop Date: Mon, 29 Apr 2024 16:15:22 +0800 Message-ID: <20240429081525.983-3-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20240429081525.983-1-quic_kangyang@quicinc.com> References: <20240429081525.983-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 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: 6OWU0iPGA0qFE8WM5XB1RCzQrA702RIB X-Proofpoint-ORIG-GUID: 6OWU0iPGA0qFE8WM5XB1RCzQrA702RIB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-29_05,2024-04-26_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=847 malwarescore=0 suspectscore=0 clxscore=1015 mlxscore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404290050 From: Kang Yang ath12k_mac_op_unassign_vif_chanctx() will do vdev stop in ath12k_mac_monitor_stop(). This ath12k_mac_vdev_stop() will do vdev stop again, then might trigger firmware crash. So add judgement to avoid duplicated vdev stop. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: c9e4e41e71ff ("wifi: ath12k: move peer delete after vdev stop of station for WCN7850") Signed-off-by: Kang Yang Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 3e9a7dec7eba..4f553f2a7165 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7369,7 +7369,8 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw, arvif->is_started = false; } - if (arvif->vdev_type != WMI_VDEV_TYPE_STA) { + if (arvif->vdev_type != WMI_VDEV_TYPE_STA && + arvif->vdev_type != WMI_VDEV_TYPE_MONITOR) { ath12k_bss_disassoc(ar, arvif); ret = ath12k_mac_vdev_stop(arvif); if (ret) From patchwork Mon Apr 29 08:15:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13646448 X-Patchwork-Delegate: kvalo@adurom.com 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 5C7FB17582 for ; Mon, 29 Apr 2024 08:15:53 +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=1714378554; cv=none; b=IjCSnU7pjlsYs5tcF8f8DsGprCZrfRdHgONxyAmEmcSfiUBYAC/4mPh/9ndAg8lmvXtGU5gi+njCTiYN3rY6qOG0f9KpbJEEXeAE5dFbrxmxDsV6VP6vdo1cqNpH/yojk2jfR0v2MHKmED/zxY0c1Hu8if3o2m8fX9JyPRmgnYw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714378554; c=relaxed/simple; bh=+5tqUgv0Rjw4IaGVhTkTGs2DAklBKH4+WEBQbo+QmFY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=O8QMv8kaRIZv/P8WTSsaWuB6JmYYYixDzIJDV7LqDvyMBpL06Lps4nTzV5CwEU54my8b+qn649HiVn7MqOlQa7f8iAFqjwvLVW3dfywyk8JtqADBIcJYC2rQsZImJrDl23kUy+wa9NG2cPti8kKLp+ME6vGFNMzIpA8D/vZq8Fc= 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=RawDPStT; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RawDPStT" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43T1xrfl030205; Mon, 29 Apr 2024 08:15:51 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=4C2J8OA+H7fPCrRDHxEC5ADNKT7hcaz80clQmZsRa0U=; b=Ra wDPStT7ebdnJK0vwPIZso4w5ZAeXP5F64tHCcVVKJJEzP6m/nq3BxHtAhmNhtZ5X LSJMEXkjh4HEI3SaX+0VYpvmPB4i3RMX5ntkjdXAFU484Dxd9QPYF+42nZ/pLaEF N7kHVdLuWAm5oJ+IAdA2Oyin9JIpfzfGn6lz1OdP1jdCsQ24l+I6GViZcBOcboJi yIrY+7vMOoELKdJb/atB0mY5oHe76GUdQ1Yx6vOLx3v9IRJHsSDqi78LVSZxmOi8 zzFVNf4CfgqEhbTlOC13qozASUKus9FxKW/H3pghcIFjXrRMmRQqgqMlb/8jpuj3 GdIuZ/2ZKEC6un58UD7A== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xrtnek28q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:51 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43T8FoNY006940 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:50 GMT Received: from kangyang.ap.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; Mon, 29 Apr 2024 01:15:48 -0700 From: kangyang To: CC: , Subject: [PATCH 3/5] wifi: ath12k: avoid duplicated vdev down Date: Mon, 29 Apr 2024 16:15:23 +0800 Message-ID: <20240429081525.983-4-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20240429081525.983-1-quic_kangyang@quicinc.com> References: <20240429081525.983-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 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: 8PhAODuSfYGPXw_c9DG1RiJjMkpjMsjo X-Proofpoint-ORIG-GUID: 8PhAODuSfYGPXw_c9DG1RiJjMkpjMsjo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-29_06,2024-04-26_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 spamscore=0 mlxlogscore=635 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404290051 From: Kang Yang ath12k_mac_op_unassign_vif_chanctx() will do vdev down in function ath12k_mac_monitor_stop(). So no need to do vdev down again. remove the duplicated one. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/mac.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 4f553f2a7165..9a2823bcf8fc 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7379,10 +7379,6 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw, } arvif->is_started = false; - if (ab->hw_params->vdev_start_delay && - arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) - ath12k_wmi_vdev_down(ar, arvif->vdev_id); - if (arvif->vdev_type != WMI_VDEV_TYPE_MONITOR && ar->num_started_vdevs == 1 && ar->monitor_vdev_created) ath12k_mac_monitor_stop(ar); From patchwork Mon Apr 29 08:15:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13646450 X-Patchwork-Delegate: kvalo@adurom.com 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 5037117592 for ; Mon, 29 Apr 2024 08:15:54 +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=1714378555; cv=none; b=iFY7YNclWcAjLj90WICPBcuzzzRoOw/ruv7ZSKBg430j3/cNdRbCa/A4hCeltY4QAc9PZOvL/JSs8ShpxOqICuUDNW9waIVEneuSKpu/kA0V6e9H1L6IT2+v5t335ZYbam8f8wMs35mkfnthBJk0VHEte5mP7LnA38h48LxNBv0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714378555; c=relaxed/simple; bh=GNAkfHWp7HCGgkRZQMpXZqgLlfutUsV7OZq8jmH5y2o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qPr6Ove046nIcw/EcZpt3WO0YayLeAObF+MHJDT28aL4oi3GqdqaQk9kT7HAGbdCtu+LrVcPVw/61Kl8RAP2W/51fqC5PPUnVm751Dkwcdru5B+u0LQyRnRm26u4OojEyC8uJSKwi8VKCUn7n5K+8o8tMwEOGh6NM+asmTn3Djo= 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=RLDo8UJj; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RLDo8UJj" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43T5H35j032085; Mon, 29 Apr 2024 08:15:52 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=U2Md2tSftTGHp4nYoJdxRz6i1DgHZzpoHZpoM2WBy28=; b=RL Do8UJjnTikcK7ynAcuyJUz9RuuY0QkFk+cLqqqKMluwWIqZ8rMJzGJaKZ3oWZzgu Dlf1DJcFv+QQiKMosQrDG+3YEmP5ga/cDkjJ4FSeGztRNNdak9vr0DCw4wOs/wSS bjK04qlVlptVpE7rZhG6wU4hvMfRs31n/cx3xICYdI6qVk5eiSI1wRjgCVJ/TGUC +JW7HJnR8wr4Ya51HGTtFY175IZNsQmoTpWJelLYCAWbyiDwcYuNBHu72rPxn52B ws807SCQC0aopFI4OMMs9GrikAR5sUeXC3Ekcn0sJfOhh6mOqU++GdFwC/tvKe+E lwJjynE55VWNly3TEm1Q== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xrtnek28s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:52 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43T8FpeU006947 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:51 GMT Received: from kangyang.ap.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; Mon, 29 Apr 2024 01:15:50 -0700 From: kangyang To: CC: , Subject: [PATCH 4/5] wifi: ath12k: remove redundant peer delete Date: Mon, 29 Apr 2024 16:15:24 +0800 Message-ID: <20240429081525.983-5-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20240429081525.983-1-quic_kangyang@quicinc.com> References: <20240429081525.983-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 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: i43JtGQqi2FZdx04eVKpEQSgtbhk6SVP X-Proofpoint-ORIG-GUID: i43JtGQqi2FZdx04eVKpEQSgtbhk6SVP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-29_06,2024-04-26_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 spamscore=0 mlxlogscore=727 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404290051 From: Kang Yang Firmware will create internal peer for monitor mode. For host no need to do peer create and peer delete. So remove related code. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/mac.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 9a2823bcf8fc..f994a78e7dc5 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7354,11 +7354,6 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw, WARN_ON(!arvif->is_started); - if (ab->hw_params->vdev_start_delay && - arvif->vdev_type == WMI_VDEV_TYPE_MONITOR && - ath12k_peer_find_by_addr(ab, ar->mac_addr)) - ath12k_peer_delete(ar, arvif->vdev_id, ar->mac_addr); - if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { ret = ath12k_mac_monitor_stop(ar); if (ret) { From patchwork Mon Apr 29 08:15:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kang Yang X-Patchwork-Id: 13646451 X-Patchwork-Delegate: kvalo@adurom.com 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 E2E1C179AF for ; Mon, 29 Apr 2024 08:15:55 +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=1714378557; cv=none; b=Qx7DIjC2hR+6/yYicwLFrHfiASZb461sxs05IGuRmlnLYDBIbP/tFCXW6kRXyCGHStKcp91IBeEZpaLCqCSunL2+rkztGvTNg2Mvr4aq4FxfPtdEfrjEU34HGOiVT7OtOQ2M/onXOhnDVT2BMlwo/cbak+qse80+zeQPS0owMb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714378557; c=relaxed/simple; bh=zc7J4iHEcYONY+tb8pmvrGrT/0/c+57oAUjHotpYmJ8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tH8r+SjnGHG1DI3JlLSUsCzWqq3UEPH66D14clp5YkHITQiDsUuUXyr4GcaaaBFvrKkTLO+j1mKd/Vp/nt7zOmLdrikikWQE2l56ec3GVKHf5m1iO0x687WH+9njOvR+ZJcrsbvR0QWGljTPs3VB9t+PH3eDzsXily7AOamU3to= 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=B7vPVgmy; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="B7vPVgmy" 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 43T8Frnj019934; Mon, 29 Apr 2024 08:15:53 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=wBlsOlD/Sz44Qkk5Uwr20/rdUzbHgB3zSXY5H+ToLhs=; b=B7 vPVgmyHjY3dZWKtyN0KGASo+NHeLt27kFgE9+qI+g5xD6cFioO4PeI5Nk2N0iHhg ckxQIwjdwFbbwlxXpWDfDT74uHnKQNdiH6oIgi92t70jZHO+e8yyawjq0p4WIWE/ lweOIFXaDFRGe2tDUfaYVSFGNexlo6cs1BCv5oZOMTF0oKuojrsz+M0zha2hse7I QrNTgg56d96SnMCpl07N0TlBg5a7Kel78TnqE/wjj0z7X9bY9tMbNji1EAYvbe4v PBmj9gUpxWaTty8RFROyWZLr6Kxmam1Vbyn+k2RViFClaqf4kGbCeQCEazbpENRP GE93i5Ve1c9riSv9GSYw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xrthtb1gm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:53 +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 43T8Fq4S028025 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Apr 2024 08:15:52 GMT Received: from kangyang.ap.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; Mon, 29 Apr 2024 01:15:51 -0700 From: kangyang To: CC: , Subject: [PATCH 5/5] wifi: ath12k: remove invalid peer create logic Date: Mon, 29 Apr 2024 16:15:25 +0800 Message-ID: <20240429081525.983-6-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20240429081525.983-1-quic_kangyang@quicinc.com> References: <20240429081525.983-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 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-ORIG-GUID: ZEPhIi81zZpS--HVhsIg0E1nWgY5lck6 X-Proofpoint-GUID: ZEPhIi81zZpS--HVhsIg0E1nWgY5lck6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-29_06,2024-04-26_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 mlxscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 phishscore=0 mlxlogscore=993 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404290051 From: Kang Yang In ath12k_mac_op_assign_vif_chanctx(), there is a logic to create peer using ar->mac_addr for a STA vdev. This is invalid because a STA vdev should have a peer created using AP's MAC address. Besides, if we run into that logic, it means a peer has already been created earlier, we should not create it again. So remove it. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/mac.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index f994a78e7dc5..be961de26c6d 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7242,7 +7242,6 @@ ath12k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw, struct ath12k_base *ab; struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif); int ret; - struct ath12k_wmi_peer_create_arg param; /* For multi radio wiphy, the vdev was not created during add_interface * create now since we have a channel ctx now to assign to a specific ar/fw @@ -7278,21 +7277,6 @@ ath12k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw, goto out; } - if (ab->hw_params->vdev_start_delay && - arvif->vdev_type != WMI_VDEV_TYPE_AP && - arvif->vdev_type != WMI_VDEV_TYPE_MONITOR) { - param.vdev_id = arvif->vdev_id; - param.peer_type = WMI_PEER_TYPE_DEFAULT; - param.peer_addr = ar->mac_addr; - - ret = ath12k_peer_create(ar, arvif, NULL, ¶m); - if (ret) { - ath12k_warn(ab, "failed to create peer after vdev start delay: %d", - ret); - goto out; - } - } - if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { ret = ath12k_mac_monitor_start(ar); if (ret)