Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6960620rdb; Tue, 2 Jan 2024 22:38:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IELvQbrDKhy5o9IkqBMrjrcoa3aOvKTPhMr/IUL6UoEIISSV8l0qSOfh6oakCo4vLurI7AH X-Received: by 2002:a05:622a:1183:b0:428:326d:3198 with SMTP id m3-20020a05622a118300b00428326d3198mr1737994qtk.115.1704263925184; Tue, 02 Jan 2024 22:38:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704263925; cv=none; d=google.com; s=arc-20160816; b=pjxPJ5TH+EsJ5SbwSaSSTZrnqbEzrh+rhTjPUtKdpKs6aqAoQuz7qvPd0hqmfVBbUp +RqcJPEUPhqkIYUGBRCs7WK6p7PyNwoxI6d2q+hdVeib18PPDat64h1kjTPcqI3rnjXt VH6brrlXoi2AciM1AZfyuSzO2IJLAG62PI6ZVbOtdEpZrwmKxGf4C45nJ6A9N7uyXEfc gjISmqoGk4HWhZjlVYkeOqoQUxOn0+Tk18xxsdF6Qq1LbU5j4K9ICGz+sWMRMKaDMNhh mQpazAYQ8VnF4ZDRdyp86v6+p2J5dURL9nRtbswN34qrSrhpfEpv4GdtelP7MKKE8LAt cSZw== 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=iDHPcu06Vp/H7UGHAlf8EtJK34/JamD1tjpx9S1ZcDc=; fh=MxTMBbpPis+LJg6f98kFxxaQtu01YonzaHniHOzTjro=; b=qYha6fIba7vTRf0guV7rXKOtRIfLH/y0itFOKK9+Lhi+kfz2ueJhg8cS0vltLLaM60 ZRaJoqrExZAxnmSEApumgJmcw83L33DRUDpNzyumATm7DGK6NMq4bQ1VKQoy3zrcqUW5 ODRCKVisj8vfTzDz/Ijvy/WOgONF5s+kvXruJiEDaxHSkiBTQ+QHPRXkq9lycpBK5ewn pR8cDzUKmvlC2fIqikhMwz5PM3h5kW7CLUY/g2lf5GFhqXyvjJ0s5SXK5A3RKBbHWsHf vJkd+Q5SF7sijonORZbSnuVar31LEqujCycKD6zAr5o5XQap33NIE7Ou1HVallD/PLQ6 WSBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FUXfKUJx; spf=pass (google.com: domain of linux-wireless+bounces-1433-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w3-20020ac857c3000000b004281b23680fsi6762021qta.481.2024.01.02.22.38.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 22:38:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1433-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FUXfKUJx; spf=pass (google.com: domain of linux-wireless+bounces-1433-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1433-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id ED4E71C22F62 for ; Wed, 3 Jan 2024 06:38:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A11818631; Wed, 3 Jan 2024 06:38:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="FUXfKUJx" 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 BEEE918629 for ; Wed, 3 Jan 2024 06:38:08 +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 (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4034kCDc031155; Wed, 3 Jan 2024 06:38:06 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=iDHPcu06Vp/H7UGHAlf8EtJK34/JamD1tjpx9S1ZcDc=; b=FU XfKUJxkG5n8YWfttvvzwwnqiyLRIU37z+J1sxLNDowE2ox2tXnJ4lBbYGIgc4w0Y iSSs5lMaV/eecvADaT6m4rI0frGk2gKYrUnfDN1IdSxZCOITpwj+dnZ/kLTMYtp1 3imwrDoPTckgzmLx/SKSBb5fFfb007VZmSKn8ChSJ+Cg7kF8U4ioxRZFBbvbEY7+ SjTEBiZbhopZFdpM7illmRt4c/KZpKr4tomEwXzMOC0CMAUC1zr3VsiAAGqYb9J7 Ea4VCYFaN2IVQxOf754mMCiYyurhsy6PIrxqB+atq9cE7D82XPPkrXgQgxOvbLmn +fJEL8jZ7jDpf8kz7Ong== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vcguba9vf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jan 2024 06:38:06 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4036c6bu009990 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 3 Jan 2024 06:38:06 GMT Received: from hu-periyasa-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 2 Jan 2024 22:38:04 -0800 From: Karthikeyan Periyasamy To: CC: , Karthikeyan Periyasamy Subject: [PATCH 09/10] wifi: ath12k: Refactor mac callback of flush Date: Wed, 3 Jan 2024 12:07:30 +0530 Message-ID: <20240103063731.3356060-10-quic_periyasa@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240103063731.3356060-1-quic_periyasa@quicinc.com> References: <20240103063731.3356060-1-quic_periyasa@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 nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: GUvqxIbPUFTKHQePngcbUG9TFzyjGd9i X-Proofpoint-GUID: GUvqxIbPUFTKHQePngcbUG9TFzyjGd9i 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 malwarescore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 clxscore=1015 mlxlogscore=824 impostorscore=0 adultscore=0 spamscore=0 mlxscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401030052 To support single wiphy abstraction, introduce link/radio specific helper function in the mac80211 callback flush(). This way, the callback can be extended to handle multiple link/radio in the future. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Karthikeyan Periyasamy --- drivers/net/wireless/ath/ath12k/mac.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index c505bac365f6..84587c5782e6 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -6644,15 +6644,10 @@ static int ath12k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value) return -EOPNOTSUPP; } -static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - u32 queues, bool drop) +static void ath12k_mac_flush(struct ath12k *ar) { - struct ath12k *ar = hw->priv; long time_left; - if (drop) - return; - time_left = wait_event_timeout(ar->dp.tx_empty_waitq, (atomic_read(&ar->dp.num_tx_pending) == 0), ATH12K_FLUSH_TIMEOUT); @@ -6667,6 +6662,17 @@ static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *v time_left); } +static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + u32 queues, bool drop) +{ + struct ath12k *ar = hw->priv; + + if (drop) + return; + + ath12k_mac_flush(ar); +} + static int ath12k_mac_bitrate_mask_num_ht_rates(struct ath12k *ar, enum nl80211_band band, -- 2.34.1