From nobody Fri Sep 25 20:48:39 2026 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7689654CF6F for ; Tue, 8 Sep 2026 13:53:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875625; cv=none; b=M54O8VWwNe9F3RsjfzsEHlY1QAQ0dTU4N81u6idhU+UH1whji4gAjyG1YCdy509nXRkxlwLMYGkDAwEAwxOw3iY10jR+KMWAwOa9mq9C45uNhIzgyrvZRtgQZGa0XXNYLfZL8eciyJKyoxKHk87owLTG9RzKVaTBLmhaA7R2/1k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875625; c=relaxed/simple; bh=Ll/celIZkrTx5A2z6F9mlVcPTGNDg8fgqyuBKm56wv0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G83Ji0jrzoFhwdOdhRxBs+5W8qjzTibLTzeYEhYKpcYuMDq8Y2yHbm48rxuHpCa7AFVzPBjYMjducL7hiRyfkj3cVrGhFnIG9nzmwvRQAzqcRwVyjQ7gMYLSHm567z5sXeDCylLb+nMJtFG5jUvRsPA3kR9VdJTNWyvjAUBQT/Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b=nYJz4VPr; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b="nYJz4VPr" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-c252c7270faso685081566b.3 for ; Tue, 08 Sep 2026 06:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1788875601; x=1789480401; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=lUfEGlTlgKOy+Yc5P7GRFfi0p70OFiu/Xw7gbqqsFKY=; b=nYJz4VPr9YDcspOyfOBYUgC9/AFaExynP6ODA2TGCBcAeACPmd/0tk56aBQ95D+adk 4Lh6TkJInHtt3Il0dLwqifyX0Mr+QAOYYtrvTxyyIjN17zBZg7xcaDBcSCRne7nmFUCz xgJobXoddePU84xBcLx4NYRH3nG54nSXBfLl6f0N+KWI3VN/k8d8jq0f6ymd874aX70t Sm3peIcHQt0fz6RCrYWD/C7rVAr568E86fo7w2AaD9oiTFLS7LRwciHdXeJZJRJq+oPZ zTO1Iv8f1t77Mksdp6+9GIQRNd+HR6bnGKgHkBkhxvLJGRij9qyCTFIJRZGToCsYkN1j OYAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788875601; x=1789480401; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=lUfEGlTlgKOy+Yc5P7GRFfi0p70OFiu/Xw7gbqqsFKY=; b=RtSTaIuoRh1sKWD5xRKJB2JVKe8RY4DqqhG7TWRIaJvtPVBDy7lpEmPb+7e8Tn9iSo f4qtSIyATVYg6uC7/7o95NMU3XzZWetaykWYKTjD0yNqCdH3+plMvhoQ9j/6BRpGNr69 I0iN2v4V3cLNhYZvjQgiuyCVv4b+Lnuf3KOGvwhRdxlfV6Bw7rj+wGDMNIHaee6+h+Xa zIQNVneAIP0KxEFfSM82l4NnMMqAM1ZIqUBRlUQBHx20WxtkDHpwLRrKj/xgSvykeTDx TT6bwiRTbj6yiz0aWKCOBTJFp8pnhysO7fMCL7NKxt87q1VLLyRbysuf3omGoH0Rf636 EeiQ== X-Forwarded-Encrypted: i=1; AKwUvBzG3h01nHtMHL9rXZD31+EQSKEYfyTfOGGDHrQq9ogKFObVjFiUqPJvHpy0ECzYIRSUoY2a01PUigIjXdo=@vger.kernel.org X-Gm-Message-State: AFuF++luxwJjx/XhhCF8fO7TFY7bWf4vzPBfF8F/DBv5pMR/xudKKGH4 mo6E0YZIJI/ivB61u1S9rWA52IKr3bzoHXTrcqBVnRt45+X1pE1dZ1B2IMFeKGK2rg== X-Gm-Gg: AYBFou384xYBvvw+rmb9pzSOyLMLOhiRXylM/rED5wxxwCCgnGR7w+zwzm15eCjizkb HdUy8ZznOwPDqT2nsuPZ53ejoDyeFXO0VjdPuSAO9pHGcXccxum/aJCoQDwJBhBfIewm45/9dv4 H1DCf3S/uNyp973mmUzlubYOXMgvHY6mrDjavVNcIhl//wdbTZDtJ3jsYSa260z3KbLb8wixDN6 gQ/Gf2A/r5TWOYdBG/6fRqPX8H8sjOtEyw5ri82srcL9nXX3NTckpq1UNaRULroxMZOZmJyKXDg uZdFyYJ3EJgE9Hjm9nC56IuDIHZzUd/RY0vyAt8BighWJ5fEP3D3S9sQZbmYfuro7wmfWcADrpF 2Fyp7Hh4drmR9GI8kVJezptKnoVW3OqB9gw0rXKSzdpQ9p8XiM/PDwSUPaF40AFzfLwOM8HRvF/ nLxO8pIcV8/BP4kDbFVOMX4JqN6IH5dxEuwr5Pshtk2XFT7o+VQMoti3GxWc6pObhXhyoXfp55f W9ocsUwvl84vJjYejzVYg0e/I586iTqFKCot4RGwfHPbX7kmTsQ0hcOaabD5sJDP0HJP3UbjPve myNuCzrkErwgdRuZN9RD4AoAoL3H9fvZntqWQKnlCmXxf2OD2RMHufyXVosQiB13eeBns95ichx 8sXWuaT1G52PAu8xr52nxCvQ3uBr6fMjsmppR7Whq/ZWocwnBfUoeNTpwatPoVZ5OktmIKvV1PC tgYJwBE8gHDl/A X-Received: by 2002:a17:907:d28:b0:c25:8eb7:f388 with SMTP id a640c23a62f3a-c260cc0bcdbmr2124035566b.17.1788875601078; Tue, 08 Sep 2026 06:53:21 -0700 (PDT) Received: from Desktop (pd951346e.dip0.t-ipconnect.de. [217.81.52.110]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c260d5cdf7asm647602666b.58.2026.09.08.06.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 06:53:20 -0700 (PDT) From: Julius Bairaktaris To: jjohnson@kernel.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, toke@toke.dk, sven@narfation.org, quic_vthiagar@quicinc.com, john@phrozen.org Subject: [PATCH ath-next v4 1/9] wifi: ath11k: free tx skbs through ieee80211_free_txskb() Date: Tue, 8 Sep 2026 15:53:10 +0200 Message-ID: <20260908135319.754140-2-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135319.754140-1-julius@bairaktaris.de> References: <20260908135319.754140-1-julius@bairaktaris.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ath11k_dp_tx_free_txbuf(), reached from the HTT tx completion handler for the REINJ and INSPECT statuses, releases the frame with dev_kfree_skb_any(). Every other tx completion path in dp_tx.c hands the skb back to mac80211, and this one is the last that does not. A frame freed that way keeps whatever state mac80211 was holding for it. A data frame whose socket asked for tx status has a clone parked in local->ack_status_frames and an index allocated from an idr bounded at 8191 entries; ieee80211_free_txskb() releases both through ieee80211_report_used_skb(), and dev_kfree_skb_any() leaks them for the lifetime of the hw. Commit 29d15589f084 ("wifi: ath11k: Cleanup mac80211 references on failure during tx_complete") converted three sibling paths for exactly that reason and left this one. On a driver that advertises NL80211_EXT_FEATURE_AQL, which the next patch makes ath11k do, ieee80211_free_txskb() also returns the pending airtime the frame was charged at dequeue, and dev_kfree_skb_any() does not. The charge then stays on the access category for good, and once local->aql_ac_pending_airtime[] reaches its limit ieee80211_txq_schedule_airtime_check() stops every station on the radio in that category. Neither status was seen on the hardware below during the measurements in this series, so the change is by inspection of the completion path. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/dp_tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless= /ath/ath11k/dp_tx.c index cac970c92806..52c4a9924a31 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.c +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c @@ -305,9 +305,10 @@ static void ath11k_dp_tx_free_txbuf(struct ath11k_base= *ab, u8 mac_id, skb_cb =3D ATH11K_SKB_CB(msdu); =20 dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); - dev_kfree_skb_any(msdu); =20 ar =3D ab->pdevs[mac_id].ar; + ieee80211_free_txskb(ar->hw, msdu); + if (atomic_dec_and_test(&ar->dp.num_tx_pending)) wake_up(&ar->dp.tx_empty_waitq); } --=20 2.53.0 From nobody Fri Sep 25 20:48:39 2026 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E7BA54CF53 for ; Tue, 8 Sep 2026 13:53:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875622; cv=none; b=MpecHpH/kzSaq/CyL5c8uCqiwhRBfhvlFw9Um5mqoSjWQokg6LHAGomK5wj30Rg+xoxyVqwA6uNMkfiXzF9ArqJAr9BcW1YDWeDKO5RXvT9vV7UZrEXDXDB/Qq0KcODj916Hnye6VeJSgq1rPcjHcQdL4foZ8+m+WQjSAYDFaN4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875622; c=relaxed/simple; bh=U+YBo65UubxeHj2ED/frpI+wjbfAB/Yy4rnT49+O/jk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r9hXGAfOXUQ/5YrHH1fGP8T4K2KABvRxRHRhW/5QSLArHMVxC2A7lcj5Pd9Gmh4istJtW1oyswZlyYAO3Dm1ZX2hXtwjiSjnkmLt+mwUJGpD63RdiaiNDJA53kac2lCHlLPXbkbjb7EKCUstL4F5GGCIqvTU4Q+6MW29sDFrQ+w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b=uOBgUL4P; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b="uOBgUL4P" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-c25b661d37dso653167366b.0 for ; Tue, 08 Sep 2026 06:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1788875602; x=1789480402; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=s2hMGkA6N+e7t0Ka56skOJW9Bs0c/5KzjT5GcuZfFgU=; b=uOBgUL4P82zCJc13RTTtMVSAkUoarEB82ITu2i30oe7WTTsqc9sZhNmqaM3aT5QR/5 hdRvPX940xISknfNFQkWicjVHx+dyJMshyp+SsT17F58CkeWvTqHvN05RUCHOf5RjbSY mLEpN+Eh0jl2IC9ELqHWyz00bKKwIuYd+6PpDCOwZdhVGv23OcqwUGMFthrh1tSUjh+J eIR2BtvwjqCSZTxDV/52R5o2tG/j4OG4KDYdSDCQI5pMBh2vSoTYbWJuHE9T/8HdH2JX NUvGIn8Lg4kNK5OPvxs51eRx9kUtyKIRp7meNlKNle9WMUn5H1Bzx01FDzs1J9jLoI/H DmSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788875602; x=1789480402; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=s2hMGkA6N+e7t0Ka56skOJW9Bs0c/5KzjT5GcuZfFgU=; b=cc4XclD2fbp2kBHoxlNFanyFyCCiwcIzeEXBl5fAGs1vgZ82lK+gcPfLk3u3sakE5m NCwJeFo6M2lrvNnK6SRnzZjo7IyOCZu2c/s6Ckx10tRELeuDqix0YvHkw7EuMb7VXEo9 I327QiJwaDOkyY+tH63agGoh953lwUldaXCBmhyJsCiuypS5HEIzDNYvhgK9rqFj/1+J 1hjikcHRBPcOziaNcWSdJv+2C9EuIIqFT722ongENj9sDSWHCTX4HKt0B8VF0HwenCeO qKu8H7LSiE4E9sBFB4ElG6ZnVRjOGVY/R4BPvzuSQqXzxvqNCVPjwnd4ICPRvAHi2P8j pH0w== X-Forwarded-Encrypted: i=1; AKwUvByK5FLEmVTlOcmHl9UKt81D/kGhqt8t6A7oPgd0MZ9Ad732OROEKIPUfqnHOrWXOg4RiOWH96HtYA8AqvY=@vger.kernel.org X-Gm-Message-State: AFuF++lcwrE4akKcUvW0W6T/2ayuPcpgtoma5MUck3nQeqPgSeI7u+/v aT1Ps1fkEKbF4FVsKZaAUMpuWW11jG6pXUK7DU7Ca/XDdfdaTRm4filF2jKzBc2krw== X-Gm-Gg: AYBFou0Lrf4sNU4oGvlbiTETt9tQwFwIL3u7rbpyz/O1pQG37T2rRDsqZQQA61HHvAV 3fty3IVm+JMZXylVKWzYmZ86luH0bAqXYcbnTLU8sVpmUqLeXe4RvbU+T2quqn7foikZzdW8hKf On0hha9A1yn1GyxqM9bn7LaZ6clyffiqP/m0N9K+3+edxvZZr2ozqPog24uwzjaAkcH1ZaN5OyP XVk84CILysQHWW1zBbWc14xkdrhrAtu/7I7Sgjq3Scm8KzmKMTbz1NzjBXYOutYpaFYB0HDPO3o IPt3SdAAlUsaF4tmBReFoBV3tco9W4AF6nvfbAfMrUKUW4AvYE/ZwSHf2bu7SRAn+DQX0OTOqNz pH9lotgfrLpnN3MimsWsIMMGh4UvNALc+ORCdJJ8JzsdKh2VG3TVbaKFa8RWvWklTpme1WI76J9 HCrfJjyRu82UW/5C9Wc4ZAYc/K59yywlQ6GLWVzG1pbTK/U9U2DNQzH1r9CWxhaYHBg+F3DYQuO klg6QEN9QhONk7Ltd/LTiClvxSfQaBxm17gBVg0jiAvXr1YSuQUckFl7R/Dz8n75oEAgVKJ9sH3 jXZanXErE6dQU/kvoE7OH8yTzAECF5lnM82JAzVbdlvZrxwyPmyFdYlyFKPoflEHBOvRM532C6K Z2RCGaKrK7ZkxgTbeDxqq48zouP9nSAw8rYsABANkiqo/xa46smY6RJINzshsgVQCHqvG+mGwEF 30M8On3zPqIoQR X-Received: by 2002:a17:907:7a8e:b0:c26:19e3:e97d with SMTP id a640c23a62f3a-c2619e3eefbmr961872066b.29.1788875601889; Tue, 08 Sep 2026 06:53:21 -0700 (PDT) Received: from Desktop (pd951346e.dip0.t-ipconnect.de. [217.81.52.110]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c260d5cdf7asm647602666b.58.2026.09.08.06.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 06:53:21 -0700 (PDT) From: Julius Bairaktaris To: jjohnson@kernel.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, toke@toke.dk, sven@narfation.org, quic_vthiagar@quicinc.com, john@phrozen.org Subject: [PATCH ath-next v4 2/9] wifi: ath11k: enable airtime queue limits Date: Tue, 8 Sep 2026 15:53:11 +0200 Message-ID: <20260908135319.754140-3-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135319.754140-1-julius@bairaktaris.de> References: <20260908135319.754140-1-julius@bairaktaris.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ath11k does not advertise NL80211_EXT_FEATURE_AQL, and every user of AQL in mac80211 is gated on that bit: the airtime charge in ieee80211_tx_dequeue(), ieee80211_txq_airtime_check(), ieee80211_sta_update_pending_airtime(), and the per-station aql file in debugfs, which is not even created. That matters here more than it would elsewhere, because AQL is the only brake. ath11k uses ieee80211_handle_wake_tx_queue(), whose wake_tx_push_queue() drains a selected txq whole into the driver, and the check at the top of ieee80211_tx_dequeue() is what stops that drain. Without the feature bit nothing does, so mac80211 holds no backlog and every queued byte of a saturated download sits in the hardware TX rings, where there is no AQM and no flow separation. Measured on an IPQ8074 AP with a TCP download forwarded from a wired host to one 1x1 VHT80 station at 101 Mbit/s, sampled once a second from that station's own aql file: BE pending airtime sits at the 12000 us default high limit, 12024 us at the median, and at 1008 to 1024 us when the limit is lowered to 500/1000 us. Pending airtime stands a frame above the limit it is tested against because ieee80211_txq_airtime_check() admits a frame while pending is still below it. Without this patch the file does not exist and the limits are never consulted. The rate the estimator needs is already there: ath11k keeps a per-station rate_info in arsta->last_txrate and passes it to ieee80211_tx_status_ext(), which stores it as tx_stats.last_rate_info, and that is what ieee80211_calc_expected_tx_airtime() reads. Where no rate is known yet the estimator falls back to its 4 us floor, so a station's queue is charged the minimum until the first HTT PPDU stats arrive and the per-AC limits of 5000 and 12000 us stay loose over that window. The current code charges nothing and consults no limit at all, so that window changes nothing. A rate that has gone stale low overcharges a station that has since sped up, bounded by the same lag. The estimate is only as fresh as arsta->last_txrate, which is updated from the HTT PPDU stats when a descriptor is evicted from ar->ppdu_stats_info, so the rate behind it can lag a rate change by up to HTT_PPDU_DESC_MAX_DEPTH PPDUs. ieee80211_sta_update_pending_airtime() returns the airtime but does not reschedule the txq, and ath11k has no completion-side push, so a queue held back by AQL is re-poked only by the next enqueue or queue wake. The bit alone brakes the queue but does not refill it: the check at the top of ieee80211_tx_dequeue() stops the drain, and nothing restarts it until mac80211 next calls the wake_tx_queue callback. Later patches in this series give the driver a scheduling round and run it from tx completion, which is what makes a binding limit affordable. ath10k and mt76 set the same feature bit. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/a= th/ath11k/mac.c index 2d55cdc4d165..38f641bbc53c 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -10592,6 +10592,7 @@ static int __ath11k_mac_register(struct ath11k *ar) ar->hw->sta_data_size =3D sizeof(struct ath11k_sta); =20 wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); + wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_AQL); wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_STA_TX_PWR); if (test_bit(WMI_TLV_SERVICE_BSS_COLOR_OFFLOAD, ar->ab->wmi_ab.svc_map)) { --=20 2.53.0 From nobody Fri Sep 25 20:48:39 2026 Received: from mail-ej2-f12.google.com (mail-ej2-f12.google.com [74.125.228.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5DE754529D for ; Tue, 8 Sep 2026 13:53:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.228.140 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875617; cv=none; b=GwC6GfIk5np2yg3DOD7xIAYiwARZtt2LaW5Tnjt7gv9gENbos/e/NHU9X7lB0SpLHFDw47mwoTNU9O1uhpZE5lvBEM0nOa3beNdJcmLUCAHzCOdkr19GoKziuHpg8pwUZgMB8TuTIZymNPGRPoCK72Edvi8d1blPb340jx8EbYk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875617; c=relaxed/simple; bh=AMm5/0s+MwH5AZ/fwZK85cp5dRkmGH+8cbgH0A9qRT4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jcd1tpX4nStso2emB2wMHZ6lo8ss1eFPpt9MIBbHuTdvvpNEzQ7xHboesRCE0gTpHc9ljYbBw7fJEXrimMqliWTyV68cz+eTHRttapXoK1UHWXsM1gkiAw7NSkf4AKqx1DCSzRAoevvr7xyiOKlaBeOTbuOeC1M91IAdzzUDwy4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b=PxY8U2zR; arc=none smtp.client-ip=74.125.228.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b="PxY8U2zR" Received: by mail-ej2-f12.google.com with SMTP id a640c23a62f3a-c254f8694aeso88652866b.0 for ; Tue, 08 Sep 2026 06:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1788875603; x=1789480403; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=R+9FqYSQ2L7Zu1nAHB7ZI+rj9iphBqw0F7t6xJ4R1Qs=; b=PxY8U2zRuW1e+6xuouy3XN6GaXVICPAS+HSnWZNnL4cvMV+pyFvr2GagE/hIAGbMdN P8YEgh5X9CqwgvkeiiuhLl5+w0ESqxOCp1r24SX5Jp/Ct6nYQUc0iWVaFSGcvnwR5AsZ LlDba6aNd6icKIgL4YEzzawTFWaWqvN1bPUBmp3gydul+tSukwm92JtHFopQJG2aidqm or+SZq5WlsqLvrVqJ4Mh69YYbe/epBrPCQTULq36CVGiRKoW828lBXCyycn22sTIUD64 93frtwePj9CLBiA+9m76JczyhKYH4lVN8DAOKZUgpaK3lSgOwAeit9ggRnkLD9XnJlgq L6TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788875603; x=1789480403; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=R+9FqYSQ2L7Zu1nAHB7ZI+rj9iphBqw0F7t6xJ4R1Qs=; b=G6RymPHKYJsfmNRzPYMxQ3T8L9zBAWakYMahUz9EvP1UC3tkppaJUaLuM0fw6PIl9m ebprOLC6L7AutwobDW1z0Z0YkKOfKwN31WZ7fSPKfd2isq+agqDjT4emiyV0LvWEfDrW CJxdadItNzCQWiWfuM58KA7toil2r/twbmXvh1oKz3QQiwuTmEq4Gr3kE3mQiEZDaYuZ OEH7UyharSeKFO/aGK6w9XDcISWxiuyDQp8Za4FSM1p1ibDdVqhIml4NaO+aWR836iSb kbNHF7KiYK5IOkKhld0dhh2UiSwLF1o5oEKUWBr6CheQyStZ8PL90D3XEASgv78CtPal FLCA== X-Forwarded-Encrypted: i=1; AKwUvBzaKTsHRK2L1U6GqTlYzCfkrxHh5EmH+bD0wOD0p+fMXW2Ci8em4Fr+U7dkevj+fkKLoePQc0+EHDLHPQk=@vger.kernel.org X-Gm-Message-State: AFuF++lQWXX/SKoyhBn1D0UeZoJcqIopKiS0gzXeCqHuVuIQcDAEqhWH rUuPcv9zEENQbQpiDpsb4bypRqd+uA4DWj8enRF9m9C7t9EnIhldzCLlQmSxwpdnDQ== X-Gm-Gg: AYBFou1ygNWJadbzdfw+tVumwUenTgbA8sFVM57k3LJN3v6AXSAMkCp8QOURKo6yqRH uzIn8VUx66iF1nICbVeJHCDNT4S1l9KheRKt+XKPGMn5F387UO587HD7lPavHFK+6EL9CjGU8Yk SwkSpg9aEROx0CBmuo5xeg1x2cvbBhOjGx+vrnRfvudUBI6za3y6WUJ6V36rxWFRMXJV76VqHj8 lm5QKsLvxlsPM8fXhMY7u/4r9IuadgHy2d6GvnAm3esVSIeLpLGhttvXl0QFeHuR/6ALOF0kKIU 2dVP72Kjc5P8YK7TCGUNxTmrDYpXhms6kmKB4ovDfK1MnWZLKoiJQLjd7aq6c69Znzzjl/fY/YD 0u8iSKkXUJYI6sBF34vGVJXfJsAzTxL5yxdkALmBltoSkWYCnCbojf7UOZlUpV/buWwF4GESinz X3QWAGCtnbtCYxEjEC5kh/r1IqZwGz7CEpsB86y8Ms/0iYBiUAsIk+d7beYqrz4Scq0ziOOkaM7 q9spLWsyJjRasFopKi/deOkxyz6KOD84O2TKr+2+2yjV/pVPp3GSI84WSD5fgf5AeRam5iZfz7j gV8R7ZYmoPhX9kKNl78U7biklSWtZQBZdKT5qFwagGq4bsLavuXHbkguyuNBJ/kHxgITc04VyeT DkGpdP5yEk8SPt1XptcVBekg5sIEeRpS+kRzoJv4hOgI09s2kF166EgUfpF5DaBQlf1NnLiEtwZ CwjpCuHhFcJiaH X-Received: by 2002:a17:907:930c:b0:c25:f7db:4bee with SMTP id a640c23a62f3a-c29044f2780mr326114266b.20.1788875602673; Tue, 08 Sep 2026 06:53:22 -0700 (PDT) Received: from Desktop (pd951346e.dip0.t-ipconnect.de. [217.81.52.110]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c260d5cdf7asm647602666b.58.2026.09.08.06.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 06:53:22 -0700 (PDT) From: Julius Bairaktaris To: jjohnson@kernel.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, toke@toke.dk, sven@narfation.org, quic_vthiagar@quicinc.com, john@phrozen.org Subject: [PATCH ath-next v4 3/9] wifi: ath11k: report the pending tx MSDU count in soc_dp_stats Date: Tue, 8 Sep 2026 15:53:12 +0200 Message-ID: <20260908135319.754140-4-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135319.754140-1-julius@bairaktaris.de> References: <20260908135319.754140-1-julius@bairaktaris.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ar->dp.num_tx_pending counts the MSDUs the hardware has not completed yet, and is used to wait for the transmit path to drain. It is never shown. soc_dp_stats can therefore say when the transmit path overflowed - TCL ring full, misc transmit failures - and not how deep it is at this instant. The count added here is bounded by the tx descriptor idr, one entry short of DP_TX_IDR_SIZE per ring, which is large enough that occupancy rather than exhaustion is what characterises the path under load. Print it per radio, beside the failure counters it complements. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/debugfs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/debugfs.c b/drivers/net/wirele= ss/ath/ath11k/debugfs.c index 70922612d3fb..ffe1f466aefb 100644 --- a/drivers/net/wireless/ath/ath11k/debugfs.c +++ b/drivers/net/wireless/ath/ath11k/debugfs.c @@ -714,6 +714,16 @@ static ssize_t ath11k_debugfs_dump_soc_dp_stats(struct= file *file, "\nMisc Transmit Failures: %d\n", atomic_read(&soc_stats->tx_err.misc_fail)); =20 + /* Descriptors the hardware has not completed. */ + len +=3D scnprintf(buf + len, size - len, "\nPending Tx MSDUs:\n"); + for (i =3D 0; i < ab->num_radios; i++) { + struct ath11k *ar =3D ab->pdevs[i].ar; + + if (ar) + len +=3D scnprintf(buf + len, size - len, "radio%d: %d\n", + i, atomic_read(&ar->dp.num_tx_pending)); + } + len +=3D ath11k_debugfs_dump_soc_ring_bp_stats(ab, buf + len, size - len); =20 if (len > size) --=20 2.53.0 From nobody Fri Sep 25 20:48:39 2026 Received: from mail-ej2-f1.google.com (mail-ej2-f1.google.com [74.125.228.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8952654DADA for ; Tue, 8 Sep 2026 13:53:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.228.129 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875622; cv=none; b=J984V2ORMyp8SumK3p+NO86YBKlSm99Y8k/Xik745JCBn7p9xogtDwNBFUYys/W+YqWavQOeGzqqOeleGKmZg8/QsTyqTgBzCg69thAI0MNUisVTU/wGnWKh77IWPSgHwb8uTfEjIs9479WIacmh2kDJEHT4FrSQmWQg45QO49A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875622; c=relaxed/simple; bh=ui7a4a3Woi27XfGFxXdwer5CuptT8ACQe6AUJ8sgdPU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kYX4AClJmD/5lpCBrt0mF7gjUqKtz3Xe7lsr32WO6VSLK0uwJKYboEByP41PX9bgpo0/uo3PqQcjmf3T/ddZQCdg8baq4zJqeRr/BQtadT6M9UFDn6cLi4ynnZHSHfq9FVzBX7Q55theeck4m5FiX/e3GyueV1d47ci/pY3X+Jw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b=ZTLi9sj6; arc=none smtp.client-ip=74.125.228.129 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b="ZTLi9sj6" Received: by mail-ej2-f1.google.com with SMTP id a640c23a62f3a-c15be76348eso177210466b.1 for ; Tue, 08 Sep 2026 06:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1788875603; x=1789480403; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=aI13hMT4+xLSGth65Ot3fMrBV+yKj5UHO4cpBnEI4T0=; b=ZTLi9sj6FuIhK1cRGSAf/YkqYixA2wIuvj4zrxzB8f5QVlsoIT49FP8h7hAj8plLv7 5l856ildSQFTff8hRnu7kik+6P0lKm+JEaCMqC657ESGL9ZFt2UByzM0L7czYL0cFl3h xWpvU/0M5p8uKYptKCyCDYigHpRlJulJJmYxK81z9LIirZpciGQNaa+cCrWqVYgyMA1a PQ2cm+L3iWx4sESXvZh5ycY1ONKZY8xier+MxqESbNcipY3Le+r51DQm9LBj2PvFFZ9/ SUyC9MQOIpY6DM21rr2N7e/nKjz3lqkC2vbRd9ucFfgyEkpoLKdQO7Ge2mC/cvqgSTtU hAgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788875603; x=1789480403; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=aI13hMT4+xLSGth65Ot3fMrBV+yKj5UHO4cpBnEI4T0=; b=fK968xxsd+KDhpyelrPT1b+FKnp5z90nAiHD+YgCi0NPrsHM4KifKb2XI+LE/PeBCV EuAL7sx8W6MpItxHLMquF84R8jhQ7QifDV1pKL5T4ryYXlJT9Bc0ysoyH2ohW0aZX4sp frb8ZlOKXDxQB5US0n/N3YLcgTJzaC02K9GgB2W1i7aiD/vG/1v3wvZc8XPlgODTtHSb A27rwl+BfehAm+ow8nnRRnNtCyMOaNv+P2OOTKPY8T60adTSjeNQpsq+mcRtQCn7S4c+ Fi/P530NCNlgLI0u5frxMOaIJ21uZ8Y3oxughIoTzacf6UqBh6LRBwjDwqfkaC0bCh17 QEjQ== X-Forwarded-Encrypted: i=1; AKwUvBwHwXMBybo8yxvi3q+RZD66gmYNwyYL+p/hY1QLD5DLcvUICCfawPETC0YywmaYPy+w2z2OsjjzIdR1v3Q=@vger.kernel.org X-Gm-Message-State: AFuF++kYVBM1tPoIwrhgDEbsEaQ8rr5Cws8MAguvi+9zW0nJO9LGD2yT MY+j4LBQDdeapfM2zCZzZUrzLc1/gVw4LXDrfCXCY5p1BHqMzsMUPOilBbUqeT7SbQ== X-Gm-Gg: AYBFou0ODOMXSm6C2Xq56VMqtlJz9fEhJsmeMTBMA0lIwbEfw5sZvCjMKDvEhUqs92d XAanJZ5flqRpiBokjFssStTp8fT5m9MmBNxC+kcWrzSi0cLHj4gKJw8eXUginvKAT3ldUyuJaO/ BOPCGKJnaF7hEqxB13N4cDXeiZEfHN3fKzJgrj1DeshIunqDRipqAhtY0SSCG4CbDFainVmxa5v t3jTW6nKFZh4UkrCHmMVf43mxStlb/9dlakdw3jmm8/5aQQTXLxwTsIq2DTT91xjFW1tSS4lmv/ Sn/OY5y6p40UT44M5lHX6bAqWxHx8zAiudTDvNmDX6IEJ5envxl7rNFkgFt42xt8frM+wmMZWfy E6fMl8mDAnWBMEdDi8jx2Say+xFmTU4nQIHgy6XLNtN2M8DhV4g13T4U6ZW5ucqbuV0nqsYMXiB V/twNrQOoBBEjq62UDvpzxzuKoO5x8aK69RRVz6shFPZPuT0g5Tdgz04pKcqhY2w2NFAmD1Dvy3 tVDiuxTgFmi52m4I7qu2fPryVaImQedrr4GK7t8AR/T/UkFMl9fAvn9X0hg6PpeEYeHTSu/rsfM 3dVNump1eABwhj038BHF+y5D0Dq3HDWFRoATGHmktwP8qNRCojHT8ibrFAspDjs0dLZeMRrDh0Q L+Ymg0KJPbb/+vTZHFhowcQ4VpPRAKIirHTF+vFIJza0bxvTE3wG+MPme8cLbzTGWkDbCJBRUhB b5upMJbVu1M69h X-Received: by 2002:a17:907:d649:b0:c26:19e3:e982 with SMTP id a640c23a62f3a-c2619e3eee5mr931925666b.34.1788875603444; Tue, 08 Sep 2026 06:53:23 -0700 (PDT) Received: from Desktop (pd951346e.dip0.t-ipconnect.de. [217.81.52.110]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c260d5cdf7asm647602666b.58.2026.09.08.06.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 06:53:23 -0700 (PDT) From: Julius Bairaktaris To: jjohnson@kernel.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, toke@toke.dk, sven@narfation.org, quic_vthiagar@quicinc.com, john@phrozen.org Subject: [PATCH ath-next v4 4/9] wifi: ath11k: report tx airtime and enable airtime fairness Date: Tue, 8 Sep 2026 15:53:13 +0200 Message-ID: <20260908135319.754140-5-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135319.754140-1-julius@bairaktaris.de> References: <20260908135319.754140-1-julius@bairaktaris.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" mac80211's airtime scheduler charges sta->airtime[ac].deficit from one place, ieee80211_sta_register_airtime(). Unlike AQL there is no estimator fallback, and ath11k never calls it, so the ATF feature bit cannot be advertised on its own: the deficit would only ever be replenished, every station would stay permanently in credit, and the DRR would be inert. The bit is not a no-op in that state either, because it also moves txq insertion to the head of the active list, which __ieee80211_schedule_txq() documents as safe only because the DRR moves a station back once its deficit goes negative. fes_duration_us arrives with every PPDU's stats and is already accumulated into arsta->tx_duration a few lines above. Register it, and set the feature bit in the same change so the two cannot be separated. The access category the airtime is charged to comes from the TID, and the ack/BA status TLV that ath11k took it from is emitted only for a PPDU that drew a response. A transmission that timed out, was filtered or was aborted names its TID only in the completion and rate TLVs, both of which already reach the driver and were read nowhere. Take the first of the three the firmware supplied that names one of the sixteen QoS TIDs; a PPDU that names none is charged to best effort, where ieee80211_sta_register_airtime() also puts the management TID. The call runs under ar->data_lock and ab->base_lock. mac80211 takes local->active_txq_lock[ac] inside it and calls nothing back under that lock, and ath10k registers from the same place under its data_lock. Measured on an IPQ8074 AP with two stations on one radio, a 1x1 VHT client and a 2x2 HE client, both receiving at once. Before, 'iw station set airtime_weight' is refused with -EOPNOTSUPP and the per-station airtime file reads zero. After, the weight is accepted and read back, TX airtime accumulates, and the per-AC deficits move. What the deficit can do with that is bounded by how the driver hands frames to the hardware. Every station keeps its full airtime queue limit in flight and the hardware picks among them, so the scheduling order does not reach the air and a weight moves nothing on this driver by itself. The bit is what makes the weight settable and the deficit real; what acts on them is a mac80211 change posted separately, which scales the limit by the weight for a driver that says it pushes everything. fes_duration_us spans the frame exchange sequence, so it includes the SIFS and the responding BlockAck, time the radio spends receiving; the airtime registered is therefore larger than the airtime transmitted. It is a per-PPDU field, so each user of a downlink MU PPDU is charged the whole sequence, as arsta->tx_duration already accumulates it; the stats carry no per-user duration. On the firmware tested here every PPDU carried exactly one user, over 21051 PPDUs. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/dp_rx.c | 17 +++++++++++++++++ drivers/net/wireless/ath/ath11k/mac.c | 2 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless= /ath/ath11k/dp_rx.c index 33425707c084..68472e1e748a 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -1377,6 +1377,7 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, u16 rate =3D 0, succ_pkts =3D 0; u32 tx_duration =3D 0; u8 tid =3D HTT_PPDU_STATS_NON_QOS_TID; + u8 airtime_tid; bool is_ampdu =3D false; =20 if (!(usr_stats->tlv_flags & BIT(HTT_PPDU_STATS_TAG_USR_RATE))) @@ -1485,6 +1486,22 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, =20 arsta->txrate.bw =3D ath11k_mac_bw_to_mac80211_bw(bw); arsta->tx_duration +=3D tx_duration; + + /* The ack/BA status TLV names the TID only for a PPDU that drew a + * response; fall back to the completion and rate TLVs, then to BE. + */ + airtime_tid =3D tid; + if (airtime_tid >=3D IEEE80211_NUM_TIDS && + usr_stats->tlv_flags & BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_COMMON)) + airtime_tid =3D usr_stats->cmpltn_cmn.tid_num; + if (airtime_tid >=3D IEEE80211_NUM_TIDS) + airtime_tid =3D user_rate->tid_num; + if (airtime_tid >=3D IEEE80211_NUM_TIDS) + airtime_tid =3D 0; + + if (tx_duration) + ieee80211_sta_register_airtime(sta, airtime_tid, tx_duration, 0); + memcpy(&arsta->last_txrate, &arsta->txrate, sizeof(struct rate_info)); =20 /* PPDU stats reported for mgmt packet doesn't have valid tx bytes. diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/a= th/ath11k/mac.c index 38f641bbc53c..40a2b6d2f804 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -10593,6 +10593,8 @@ static int __ath11k_mac_register(struct ath11k *ar) =20 wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_AQL); + wiphy_ext_feature_set(ar->hw->wiphy, + NL80211_EXT_FEATURE_AIRTIME_FAIRNESS); wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_STA_TX_PWR); if (test_bit(WMI_TLV_SERVICE_BSS_COLOR_OFFLOAD, ar->ab->wmi_ab.svc_map)) { --=20 2.53.0 From nobody Fri Sep 25 20:48:39 2026 Received: from mail-ej2-f1.google.com (mail-ej2-f1.google.com [74.125.228.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8625626A1AC for ; Tue, 8 Sep 2026 13:53:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.228.129 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875618; cv=none; b=qE5VHDLyHdn+PVDhMxA2Bf8cx3FDQU3jmQ83YkviiWtMrO+f4NR+wHlcuWU9Sp5y32UwIT0pqsbl3E1K1UrjWbc5zz4Zj2jDIj4gLCxWOjiTf6D7E7YoC5gsNSSUzR3VkGbo7eaxLs+xHcBIFhGfobQFmWVu62B4zYf64NAXlWM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875618; c=relaxed/simple; bh=tWeMJdyya94Pj22O2F78rknlFlco4Dn7ExL7y3l21O4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GqFcdKDIdxCKCjiD9ynlVsCeIgPWMCOx9ADswUAQWJS+FyDl9a45x568ztzQ0GtgqQ9GJsC4RWGQOTVlYEaQ46k8/wk53qTDIlWXqb9+yjDrOeP6rFx6LFw9Pyvxg6qNfieToskKRR4k2Lz1QeT2H/f/tZGVL5Ch016gZ3aIqf4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b=PEjGgaYv; arc=none smtp.client-ip=74.125.228.129 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b="PEjGgaYv" Received: by mail-ej2-f1.google.com with SMTP id a640c23a62f3a-c15be76348eso177211466b.1 for ; Tue, 08 Sep 2026 06:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1788875604; x=1789480404; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=1pS1WN+VaDUT/SQWzxBVX651q3Q/xVMNypcReV8SLoo=; b=PEjGgaYvm++KCbWM+BRGWfTHFse+1lH73ilN2jDwTojxqTKx/cJsYVGADiGOa1NfJF ymeFH/chFOtk0rdpGIqbLpH3+hQErRNlaDd+XBF4dhNndCTvqKm08xSExe39YzxIZ+Ac K4JKN1DU7Xxikt/HnH2qRq+W8WxhLtTkNV590EnQDB11U/joLsf5CqiRcOoq72Wd+qBP CETGY9VvSNfWePRVfVWmiGf5N/iQtYvTINvCtZhH32n3hWWdlWpK9feArQvlDbWAlpii F02Q5UaDzb6fq/dvDVQx72tQk5LKKeMAOygij9WsfD/JpxL1DWWI5pmCdiHixA0eAV41 fIqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788875604; x=1789480404; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=1pS1WN+VaDUT/SQWzxBVX651q3Q/xVMNypcReV8SLoo=; b=eSMY0w0Is1DXft7EuQXLzDXtmjv0NDOCzCIaH1ncvtaL3LpvT8CjeRp8hYpUPGhdv+ 1V44N9KATpDhDCWZRwRTyAI5AhnlIWFA67R2sW47T/DjcF+Up+rauo30jJMwhKHLlVpq KC1aKzG5ENcOwnLIL1bTIezbqa1U7/L1oau5FIFn2iG0UY/h3RH1jsoqBoOdDPucBf1F KnT+hLNfsaSKVpSLLcceFaph/bdIsnmZWb06V4HYjxHFUnMm0GAHvqkeFpQY4WaIDc6+ CySfrs2o6WCfKBZtuZhLIsM2+O1RJPYOstyMwYoqW1NHsh7KZdzfhwSLx92tsNFvexd9 HlYQ== X-Forwarded-Encrypted: i=1; AKwUvBz4mH19VlQeGu2w7dURaUXqT235UbmRkRiHzFUiHfr7uLchPODFwa64QTZ7H8Za9U2QCn0QPOdrKt3cH2E=@vger.kernel.org X-Gm-Message-State: AFuF++nK92P9TqhIU+CH0ZrtrhdMWo2EhExzy0JOCbkuiabtkXVDg/96 SLTt5X7zD9MQ2AwjMv0xsh/jnDsvaWnGkqM33StxEgx7RR727rsq+YOQprxVbpM3xA== X-Gm-Gg: AYBFou0bfVTryvcI7WWXOX+xCvAjCJeTrN+UMbDRXfx7VBA5YMy5GkHR5ASzjGKllPl u4oOzAl+e0ACrN5vzuCa1fyI0KK8JZbX00R5vwbnlcSQNs1nkcGqjGJGMEoMxIy4f37rTrB2qeM KLUiZvsWC/vNDsY7vrlzgtnfOE0rM2mwzkkTZPWuNH42aG6nUFa3VAjcSYxlYV9N/FL5B8jYwhy 0vjETyWQVqZzV6eer2zy2flm+sVBoQA8OdXTYrKvvw/mpCks1KQSWP2KA09HJM8QmMC96NOUnms cNGc+N1LsjlPeVrZ5xomB5YjkhsBJsRpoUFBGono+cfbC7NN/6CCos5wJHUdeEDMflQmOP0kKja vj7uC0cMRmKgT1S9waUO8ZTtxLSnYllKHCt2SZOZtKUvqkKsj0CGXi2u7eHASXMRv7WPvnjaSy/ AYndmzI02EVInoE83hbRZI5k6WqUfA8BIlC6E5jmBvuOxPtqrxFYJhTKwvSch5B7MZYnE4pkuWE jt2jY6ngE8Sqkj4lyLL0By2Mys+yuCh/RMKufNnqAwYyadQDzNNkzFv2Y55EzlZ+XpyQOCkU36J 6IVKM6vvX2oa9D0cYmlY8sV6295P6zqjAyDFgQldTQyFFDFQOhy36rMtMEr+JAulbXzXxfDbNmi nfW4YdqiYKeNdltYpRqPsngGEOxDTiFruxKQfSYt2Q1lfXRPOOVPzhSB84IPve6k9x2H7+Cf6Zc MHXybQIH4eMKgK X-Received: by 2002:a17:907:e00c:10b0:c26:19e3:e98e with SMTP id a640c23a62f3a-c2619e3f021mr646105566b.46.1788875604154; Tue, 08 Sep 2026 06:53:24 -0700 (PDT) Received: from Desktop (pd951346e.dip0.t-ipconnect.de. [217.81.52.110]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c260d5cdf7asm647602666b.58.2026.09.08.06.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 06:53:23 -0700 (PDT) From: Julius Bairaktaris To: jjohnson@kernel.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, toke@toke.dk, sven@narfation.org, quic_vthiagar@quicinc.com, john@phrozen.org Subject: [PATCH ath-next v4 5/9] wifi: ath11k: schedule TXQs from the driver Date: Tue, 8 Sep 2026 15:53:14 +0200 Message-ID: <20260908135319.754140-6-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135319.754140-1-julius@bairaktaris.de> References: <20260908135319.754140-1-julius@bairaktaris.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ieee80211_handle_wake_tx_queue() has exactly one entry point, the wake_tx_queue callback, so a round starts only where mac80211 calls that callback: a frame arriving from the network stack, a block ack session starting or stopping, a station leaving powersave, or a stopped hardware queue restarting. Every round runs under local->handle_wake_tx_queue_lock, which is shared by all four access categories of the hardware. That is the wrong shape for a driver whose only backpressure is the airtime queue limit. When ieee80211_txq_airtime_check() refuses a station, ieee80211_tx_dequeue() stops handing out frames and the station's intermediate queue keeps its backlog until the next enqueue, not until the airtime it is waiting on comes back from the hardware. Returning that airtime does not reschedule anything. Open-code the round in the driver so that a second context can drive it. The walk is the same deficit round-robin over the active TXQs of one access category that the generic handler performs. A selection ends where the airtime queue limit binds, because ieee80211_tx_dequeue() applies the limit itself, and drains the station's queue where it does not, which is what the generic handler does today. mac80211 documents that a driver must not run concurrent scheduling rounds, and the next patch adds a second context that starts one. The round therefore takes a per-category lock rather than the hardware-wide one. ath10k and mt76 also drive the round from the driver; ath10k takes its per-category lock on the wake path alone, and mt76 serialises instead by running its rounds from one per-device tx worker. A custom .wake_tx_queue with a tx-completion driven push was proposed for ath11k once before [1]; the design was right and the measurement that justifies it is in the next patch. Link: https://lore.kernel.org/all/20230501130725.7171-1-quic_tamizhr@quicin= c.com/ [1] Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/core.h | 5 +++ drivers/net/wireless/ath/ath11k/mac.c | 44 ++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/= ath/ath11k/core.h index a0d725923ef2..40895d276de5 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -709,6 +709,11 @@ struct ath11k { */ spinlock_t data_lock; =20 + /* serialises one scheduling round per access category against the + * other contexts that drive it + */ + spinlock_t txq_lock[IEEE80211_NUM_ACS]; + struct list_head arvifs; /* should never be NULL; needed for regular htt rx */ struct ieee80211_channel *rx_channel; diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/a= th/ath11k/mac.c index 40a2b6d2f804..342b38308468 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -6546,6 +6546,43 @@ static void ath11k_mac_op_tx(struct ieee80211_hw *hw, } } =20 +static void ath11k_mac_tx_push_txq(struct ath11k *ar, struct ieee80211_txq= *txq) +{ + struct ieee80211_tx_control control =3D { .sta =3D txq->sta }; + struct sk_buff *skb; + + /* ieee80211_tx_dequeue() applies the airtime queue limit itself, so a + * selection ends where that limit binds, where the hardware queue is + * stopped, or when the queue empties, as the generic handler does + * today. + */ + while ((skb =3D ieee80211_tx_dequeue(ar->hw, txq))) + ath11k_mac_op_tx(ar->hw, &control, skb); +} + +static void ath11k_mac_schedule_txq(struct ath11k *ar, u8 ac) +{ + struct ieee80211_hw *hw =3D ar->hw; + struct ieee80211_txq *txq; + + spin_lock_bh(&ar->txq_lock[ac]); + + ieee80211_txq_schedule_start(hw, ac); + while ((txq =3D ieee80211_next_txq(hw, ac))) { + ath11k_mac_tx_push_txq(ar, txq); + ieee80211_return_txq(hw, txq, false); + } + ieee80211_txq_schedule_end(hw, ac); + + spin_unlock_bh(&ar->txq_lock[ac]); +} + +static void ath11k_mac_op_wake_tx_queue(struct ieee80211_hw *hw, + struct ieee80211_txq *txq) +{ + ath11k_mac_schedule_txq(hw->priv, txq->ac); +} + void ath11k_mac_drain_tx(struct ath11k *ar) { /* make sure rcu-protected mac80211 tx path itself is drained */ @@ -10067,7 +10104,7 @@ static int ath11k_mac_op_sta_state(struct ieee80211= _hw *hw, =20 static const struct ieee80211_ops ath11k_ops =3D { .tx =3D ath11k_mac_op_tx, - .wake_tx_queue =3D ieee80211_handle_wake_tx_queue, + .wake_tx_queue =3D ath11k_mac_op_wake_tx_queue, .start =3D ath11k_mac_op_start, .stop =3D ath11k_mac_op_stop, .reconfig_complete =3D ath11k_mac_op_reconfig_complete, @@ -10757,7 +10794,7 @@ int ath11k_mac_allocate(struct ath11k_base *ab) struct ath11k *ar; struct ath11k_pdev *pdev; int ret; - int i; + int i, j; =20 if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) return 0; @@ -10791,6 +10828,9 @@ int ath11k_mac_allocate(struct ath11k_base *ab) =20 pdev->ar =3D ar; spin_lock_init(&ar->data_lock); + + for (j =3D 0; j < IEEE80211_NUM_ACS; j++) + spin_lock_init(&ar->txq_lock[j]); INIT_LIST_HEAD(&ar->arvifs); INIT_LIST_HEAD(&ar->ppdu_stats_info); mutex_init(&ar->conf_mutex); --=20 2.53.0 From nobody Fri Sep 25 20:48:39 2026 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12B2F54EEAC for ; Tue, 8 Sep 2026 13:53:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875633; cv=none; b=h7ycULMy+DgNUq1SoN5h+OloQXohGWCeVnqXu0h+dsnnQWfLV0X7pRTpKA/i29dukSmgRfNaZgQGvXVcR/HAcfk/z0Bt7CZoiVb6q29lrt4T33sc3VRUDnCts7B6KGKxFI5o8rOCrI/2IwUHY5uw1FfEZK9I9MH7u6HZEN+3oMA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875633; c=relaxed/simple; bh=oxu2BrFXMHQ7tCtzImP6ujIrHiCOhiw6t/tTEFwjPQM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dB+XCCKUjCJfveIFKixwLjOBFbq0ZhBbno1skn4BW6NeSzXvStA/5EKWdRIz9zXp1iaF1K/V+BTZyJPBEzf1+K3TCprpGg/NR1uN2hJltISpgKz7ZgOnfOsXlQqWOFkSeezIpd5WuosHKt+9I850zi+x5Fxef95tKRkt5V/H6yU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b=XVtz0xtG; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b="XVtz0xtG" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-c263415982eso355788766b.0 for ; Tue, 08 Sep 2026 06:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1788875605; x=1789480405; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=RPdLShOxqlTto6fsSHI/vFszQMvhlliVKlymqNv97DI=; b=XVtz0xtGbzG3gzP1Ua/pJtpYhh+aNGUWKZtUaZddiqORYs5saqU0icjQwxrjLBd+ck ylX2R3xkm5UNAOglJgEOw9jLn74eVCFDhmD4est61jcUiqDHXMMbWlX0uqcxIvOp92sv dGCd4/tnvAkLDzDjUhcpT6vTHzrXvyf+hpGbPGOaLm+Y6kjCNlU23XRl9POUW1Qkt7Lc MhcYE25JjDT9/Y+ZL0DXhdBF4LskbrWPE4/tlXIpeGVVo2uxmEkb8/t8IpejSlFIaKzt QPZ7OukF4F1olviWf0N38eiBki2ffh3fpC4L1g+mxcJManFVcKTaGDByTA+TfnCbDcWE bxmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788875605; x=1789480405; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=RPdLShOxqlTto6fsSHI/vFszQMvhlliVKlymqNv97DI=; b=Vkk5AnbM4auZlhfld9dvLV8CTduxkNzkhU1emNxMHVYYFjM0q8Ah5SHRyMsiwl/h9c SYlW3pd5Yx3OpbuDHfiRL0299SGxz6+7UqopoOnxf1xk/mXTDq06k0l/HsKJVvD0KmQO TAVWq/7z8DW285tD0Q0QRb31MFPB+s3uQzaYcNHpPvCSPKBCAcDWIYtDnNIN/HOUKAmM SEplZrnZ6NJ77GTsaprFxlYSChT37RycWvlxmg469WJQBxDUEti6U+mOC/Uoqyw60oxG 4WLTJpxT5SPiawSK2WVsTpCHL6z1oCG7T7nMBeYQq8Z7EpdmrIH6h5HFP+NISXFoNx/n hHaQ== X-Forwarded-Encrypted: i=1; AKwUvByLqRrTYqqJMzs1bT+FowzQpY2yvyD/iBVGBBPefZbBYcv6dVoIHaF9wqzNNJVeZRCzja0lmv9l5gi0vUs=@vger.kernel.org X-Gm-Message-State: AFuF++nzoUHb0eHVJ22/v5fEiqiWoN7T6PVLDtBU5A3dTfjo0w2hC1JL r5E9Wq+ckeGNjJX3zT/fkVjrSP7ovzKOVI+R9fUvLHyYsuAXoCKqghoTmm3woG/dGMXbrkmvTkr hX52Kljh+cpE= X-Gm-Gg: AYBFou0LqRkmYNaRx3l5ZVT8NExNPIUychshNYn+YndTlTgY2gLAiyl8SHYbq3wwyHS ekggbZiWpd+V/g82K3fC/paNfmcchaIgvvC1r/wTH5NFdmnKwCSkC1ydVrlkkBOcqf3fViGCAmG ZLNvb9Q/1YaGeprH2RCGN1venCgJn+iWV8nY8KLOrA31TrbCxYNUuT80+tFxQtUjjj+CN7PNDhu 1wUjMHmOcRtKE5VD9lHj1NPVRa9XYZ4SeqhZpbmqHnmDOM/C2TaiYQcYL/M6v+rcTIR7kapsm9W fcuJP0wAFtNzFsnRjmXc2r6x3d5jW1qxu3AsbqX25nArC9tBHQ11ctFLkFoFSwCmB5bs7Od7Kvw 3RK16dttlFt70wEK/Mp76vw/WkFzkGMFK988uhTvToxA7AO+t89xgvzw4pXgwhIm/g47WCrM5vW 4c+XASxugvZ5HrS0l0+EPGp24T8ny02SKrW1OPa0sUTWRIUSE9wrHTrqgvKUlbhzcj2iziYmnZJ 04ptGY1iCh/i01GqeiHZqkXOJuTLgZq1ZL/xhgBj6ke92f1fpxfzwvfL5WruHXfY6if6vtZK6Ik mnmT0evXEtwxs86xS3jme3Nd2QUAwoYDqBPlh690YF/i6ifU+Uq4oICYE0uEgNGgcJIdtwiCMd3 /jOH7iBqrGT7Dr02CCpXoWc6J6DoHPQJTNRqtmhsYssqnDM2AFXJHz9CQHDswnmAr+kxZJZ9gIF fGWzTIN5IOFScX X-Received: by 2002:a17:906:7308:b0:c20:9447:bd5e with SMTP id a640c23a62f3a-c260c8e77fcmr2400016266b.9.1788875604992; Tue, 08 Sep 2026 06:53:24 -0700 (PDT) Received: from Desktop (pd951346e.dip0.t-ipconnect.de. [217.81.52.110]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c260d5cdf7asm647602666b.58.2026.09.08.06.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 06:53:24 -0700 (PDT) From: Julius Bairaktaris To: jjohnson@kernel.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, toke@toke.dk, sven@narfation.org, quic_vthiagar@quicinc.com, john@phrozen.org Subject: [PATCH ath-next v4 6/9] wifi: ath11k: run the TXQ scheduler on tx completion Date: Tue, 8 Sep 2026 15:53:15 +0200 Message-ID: <20260908135319.754140-7-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135319.754140-1-julius@bairaktaris.de> References: <20260908135319.754140-1-julius@bairaktaris.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A station whose airtime queue limit is reached stops being served by ieee80211_tx_dequeue(), and the airtime it is waiting on is only returned when the hardware completes the frames already charged to it. ath11k starts a scheduling round only where mac80211 calls the wake_tx_queue callback, so once the limit binds, the backlog moves again only when one of those events comes round: most often the next frame from the network stack. Under a saturated download the arrivals keep the round running; a flow that has just filled the intermediate queue, or one whose sender is waiting on the acknowledgements behind that queue, stalls for as long as it takes the next arrival to appear. Start a round for each access category a reaped completion belonged to, on that radio, at the point where the airtime has been returned. The airtime queue limit then bounds a queue that is refilled as it drains, rather than one that is refilled when the network stack happens to push. The access category is the queue mapping mac80211 stamped on the frame. Measured on an IPQ8074 AP with a TCP download forwarded from a wired host to one 1x1 VHT80 station, BE aql_txq_limit 500/1000 us, 20 s runs, three interleaved runs per arm, download rate and the RTT the sender's TCP sees on that flow, mean and maximum: Mbit/s RTT mean ms RTT max ms with this patch 100.8, 101.5, 100.6 27, 26, 26 32, 31, 32 without 93.0, 99.1, 76.2 26, 27, 94 66, 36, 347 Without it the download moves only when the network stack pushes, and a run in three stalls until the sender retransmits. At the default limit, which binds on this flow as well, this patch reads 101 Mbit/s at 48 to 55 ms and the arm without it 80.7 to 101.1 Mbit/s at 54 to 79 ms. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/dp_tx.c | 14 +++++++++++++- drivers/net/wireless/ath/ath11k/mac.c | 7 +++++++ drivers/net/wireless/ath/ath11k/mac.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless= /ath/ath11k/dp_tx.c index 52c4a9924a31..70d326fe6a1f 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.c +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c @@ -694,9 +694,10 @@ void ath11k_dp_tx_completion_handler(struct ath11k_bas= e *ab, int ring_id) struct sk_buff *msdu; struct hal_tx_status ts =3D {}; struct dp_tx_ring *tx_ring =3D &dp->tx_ring[ring_id]; + unsigned long push =3D 0; u32 *desc; u32 msdu_id; - u8 mac_id; + u8 mac_id, i; =20 spin_lock_bh(&status_ring->lock); =20 @@ -756,12 +757,23 @@ void ath11k_dp_tx_completion_handler(struct ath11k_ba= se *ab, int ring_id) spin_unlock(&tx_ring->tx_idr_lock); =20 ar =3D ab->pdevs[mac_id].ar; + __set_bit(mac_id * IEEE80211_NUM_ACS + skb_get_queue_mapping(msdu), + &push); =20 if (atomic_dec_and_test(&ar->dp.num_tx_pending)) wake_up(&ar->dp.tx_empty_waitq); =20 ath11k_dp_tx_complete_msdu(ar, msdu, &ts); } + + /* A completion returns the airtime the frame was charged, which is + * what an airtime-limited station in that access category is waiting + * on. The arrivals that would otherwise start a round are themselves + * queued behind that limit. + */ + for_each_set_bit(i, &push, ab->num_radios * IEEE80211_NUM_ACS) + ath11k_mac_tx_push_pending(ab->pdevs[i / IEEE80211_NUM_ACS].ar, + i % IEEE80211_NUM_ACS); } =20 int ath11k_dp_tx_send_reo_cmd(struct ath11k_base *ab, struct dp_rx_tid *rx= _tid, diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/a= th/ath11k/mac.c index 342b38308468..ffb6b865c2df 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -6583,6 +6583,13 @@ static void ath11k_mac_op_wake_tx_queue(struct ieee8= 0211_hw *hw, ath11k_mac_schedule_txq(hw->priv, txq->ac); } =20 +void ath11k_mac_tx_push_pending(struct ath11k *ar, u8 ac) +{ + rcu_read_lock(); + ath11k_mac_schedule_txq(ar, ac); + rcu_read_unlock(); +} + void ath11k_mac_drain_tx(struct ath11k *ar) { /* make sure rcu-protected mac80211 tx path itself is drained */ diff --git a/drivers/net/wireless/ath/ath11k/mac.h b/drivers/net/wireless/a= th/ath11k/mac.h index 59f83c7175fd..d577c5ca249c 100644 --- a/drivers/net/wireless/ath/ath11k/mac.h +++ b/drivers/net/wireless/ath/ath11k/mac.h @@ -161,6 +161,7 @@ struct ath11k *ath11k_mac_get_ar_by_vdev_id(struct ath1= 1k_base *ab, u32 vdev_id) struct ath11k *ath11k_mac_get_ar_by_pdev_id(struct ath11k_base *ab, u32 pd= ev_id); =20 void ath11k_mac_drain_tx(struct ath11k *ar); +void ath11k_mac_tx_push_pending(struct ath11k *ar, u8 ac); void ath11k_mac_peer_cleanup_all(struct ath11k *ar); int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx); u8 ath11k_mac_bw_to_mac80211_bw(u8 bw); --=20 2.53.0 From nobody Fri Sep 25 20:48:39 2026 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45AFF513552 for ; Tue, 8 Sep 2026 13:53:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875616; cv=none; b=saXcgJroPhWcrS263H4UEyy6RBOEj6cg4wRYM+txnUuwvJVENjTJvn0DZeWUcJh3PsZIbHDurqoyEHAyadFIYRfAKI+Zwci9wedg9Awyg6Ut/gIZ4LB4Z445DOqU64rfPTKXJfM1t3tNCgS4c/gDXtIKuq+rGH4pE333wykTkTM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875616; c=relaxed/simple; bh=7wIfSA7jIgn+YuODqH1Zm4TLzhQihyQIWfos5qWU4Lc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eyt8+aAsrwnhZcBlPAw4lMKQ8XH4JtG5V4OsnUfYyMdwC6mLCjjLsHX3FdPPl6i/aq4flu95xrvRef6QgvvSq83eSauJRl1/P636b7X2DMxTyBN5wFQNaspZ0HmiW9jXiP8F0PkW4Pp8CiMqXaCy8mcRUY8aznsmg9ZuBYhKFEY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b=atY7zy2H; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b="atY7zy2H" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-c2531f453eeso652532466b.3 for ; Tue, 08 Sep 2026 06:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1788875606; x=1789480406; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=onv4qoIcCtETFC209nIFagBVXouZZuhs1jFn7+5wWYM=; b=atY7zy2HI/b1aqOv0owoHGMS9WiEf9LpNAezUogtvunTG2lQ7Ww/KnS8ELzTU9dZan 2Zx7LYbfFVNf4EKMkwVukEdAtSW8mlNM5+k2ybOyyGU+clO7vTejW52Z6V+3TkF8lXGx ErwisnjHG7ydflVWd2Wl+2WyXWReXRMq36klStLLQKVJIdpUxGLi72k4pgZzmjKpi/Gl uG2wRhO1z0u5xDSXJwx2fF2ZcAT74fHh63xetzNk+AfC0SpLEXfhi2DohdOP/y6XaCcE 27iybP8HZtqKgpoPE/ItvlBg/tkZ7cNcOAAumfyu5Hvrh7FeXk7n5lRhyYy7WUZj/bDs +Q2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788875606; x=1789480406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=onv4qoIcCtETFC209nIFagBVXouZZuhs1jFn7+5wWYM=; b=b8a81O4H4do48TaSIdXM0krrn0AVvoM+KeocIldkt7exf43wrZgFva3g3XAcLg/jwy qk8PAXYAhJic3USILUYA1oBSDv2KmqU7nde0mkhOHuW80sy0w+6cqncckkm0/9JvG4nD ey9eCTtV7k0Nq2dqHNvxn1ayn6/ZKCRCesbxlMevub0ako+9LB+2aRX+FQ4GPQE6LU6N rlRLuP4HxNsP7grHWkeslmu/ZJvroi6KLFrNkRhdqVtx4grum6RgBVpMdhGe3WMlMhOX u1bQDUtCsbQcKchWhGD8oBXgFGJ6P8SozWeMmuW//o1d1WIn4nrfMRlkXCa8iHUjsS76 RuBw== X-Forwarded-Encrypted: i=1; AKwUvBwQqy47UR6jrsZad2SGf3iczHWIIWH6XZrr8W0aN7mypi8AhQ3Rnx3MsqQNlU3DPA2eYqqvURAjrTjfu1Y=@vger.kernel.org X-Gm-Message-State: AFuF++krffEMdeaf2hBb56zSBYDLv65dKrfvcdc2QwecgHz7o56T16yK ML2CV06GMOI/ZzjqneKqZ/sSNzhoayY+BI28Fs2Qxc3KMUUrSJmfSI2N+QzwjS32TVfZwXmZNkr wtf9ZQCgmPT4= X-Gm-Gg: AYBFou0/qzGjsND5TZRU0GRFKMJOK80PjNEN2xKl1nNDHBY6JlVaHp5GkzDfFi8Z8tV ku6P1UZb/Jb5nPFKGq5UFQHF0NgblDO9NTHRjhYZp0KlM54n768yTH9/O6DPWLS2wS1qE2R1yq1 5GniauTtMB9nNMKR8imdsLHc8VEbG4Kq8sHI6zyeOeEFa2uEJI6XtaTjRBrcF4rFd+3+UMM5STP dZj+NmaW1/QigJT8GYV8PpZN+fL7vyGQ7f18BRWIijBTwO6HlIthlMCTiNcc9rLd9zJUvrpOZxd wYZDshTRi8aV/K5u1VJmeCXZvS2nvuTMXTg+QKYxfosb4Hv00AVYf0vKZA+aafjWKi6HBfMYPIw mbEFLAqRqQdzk6bw/GFZuRExVBmS5OJtJJzhJDY0w4iX2FLR8f8nbS90VDsxptpxYHT7F6utDbc HKgnxa+hs8xswnGrShqpknvX0moXDZm9AW+tuSt8L2rOX0z4axyftyzTOoeQVppqQPoWkD75xNL Smpu7l4+uoNn7p9cPe+0JsCv4gUQyLo0yJ2fW+KC1G4QW/9f33if6waR9RySIpte9+vW3h7jv8H z0Huy++jCu3WO+e2BsLcKmRPqNrJ+tJYkrubvXnnAI7C9sNzSOC8ioRp4vEmafPhaJkVkf+6NXc rGyQENLqSRw63K71HsVN3g5iDmMNg8X5L8CXhn7I2CDCHcWD7oQAt65nnojPfkkxMwuGFI3RmKN zVNyut5iAdanHm X-Received: by 2002:a17:907:6ea2:b0:c25:8bcb:ea0b with SMTP id a640c23a62f3a-c260c6a0e93mr1982912066b.4.1788875605742; Tue, 08 Sep 2026 06:53:25 -0700 (PDT) Received: from Desktop (pd951346e.dip0.t-ipconnect.de. [217.81.52.110]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c260d5cdf7asm647602666b.58.2026.09.08.06.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 06:53:25 -0700 (PDT) From: Julius Bairaktaris To: jjohnson@kernel.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, toke@toke.dk, sven@narfation.org, quic_vthiagar@quicinc.com, john@phrozen.org Subject: [PATCH ath-next v4 7/9] wifi: ath11k: charge received airtime to the station deficit Date: Tue, 8 Sep 2026 15:53:16 +0200 Message-ID: <20260908135319.754140-8-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135319.754140-1-julius@bairaktaris.de> References: <20260908135319.754140-1-julius@bairaktaris.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" mac80211's airtime scheduler is configured to account both directions: local->airtime_flags is AIRTIME_USE_TX | AIRTIME_USE_RX, and ieee80211_sta_register_airtime() adds the received airtime to the same deficit the transmit side subtracts from. ath11k passes zero for it, so an access point serving a station that mostly uploads charges that station nothing for the medium it occupies, and the deficit that decides whose queue is served next describes half the traffic. Register the duration the hardware reports for each received PPDU. It arrives in the RXPCU PPDU end TLV on the monitor status ring, which is subscribed for every radio, and ath11k already accumulates it as the station's rx_duration. Charging it once per PPDU matches what the transmit side registers, whereas an estimate rebuilt per MSDU counts the preamble and the interframe space once for every subframe of an aggregate. The PPDU end user stats TLV that names the TID is not in the default monitor status filter, so the airtime is charged to best effort, the access category the deficit arbitrates the bulk of the traffic in. The call is made after ab->base_lock is dropped, under the rcu read lock the loop holds, as the tx completion path does; base_lock is contended by every tx completion. A PPDU from a peer with no station entry is not charged to anyone. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/dp_rx.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless= /ath/ath11k/dp_rx.c index 68472e1e748a..a7b9bb295728 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -5270,6 +5270,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_bas= e *ab, int mac_id, struct sk_buff_head skb_list; struct ath11k_peer *peer; struct ath11k_sta *arsta; + struct ieee80211_sta *sta; int num_buffs_reaped =3D 0; u32 rx_buf_sz; u16 log_type; @@ -5324,6 +5325,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_bas= e *ab, int mac_id, continue; } =20 + sta =3D NULL; rcu_read_lock(); spin_lock_bh(&ab->base_lock); peer =3D ath11k_peer_find_by_id(ab, ppdu_info->peer_id); @@ -5337,12 +5339,25 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_b= ase *ab, int mac_id, =20 arsta =3D ath11k_sta_to_arsta(peer->sta); ath11k_dp_rx_update_peer_stats(arsta, ppdu_info); + sta =3D peer->sta; =20 if (ath11k_debugfs_is_pktlog_peer_valid(ar, peer->addr)) trace_ath11k_htt_rxdesc(ar, skb->data, log_type, rx_buf_sz); =20 next_skb: spin_unlock_bh(&ab->base_lock); + + /* The airtime a station spends transmitting is taken from + * the others, so its deficit is charged for it too, with the + * duration the hardware measured for the whole PPDU, as on + * the transmit side. The TLV that names the TID is not in + * the default monitor status filter, so the charge goes to + * BE. Outside base_lock, which tx completion contends for; + * sta is held by the rcu read lock. + */ + if (sta && ppdu_info->rx_duration) + ieee80211_sta_register_airtime(sta, 0, 0, + ppdu_info->rx_duration); rcu_read_unlock(); =20 dev_kfree_skb_any(skb); --=20 2.53.0 From nobody Fri Sep 25 20:48:39 2026 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B8E554A7F3 for ; Tue, 8 Sep 2026 13:53:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875616; cv=none; b=s8k/q5WWIFWxbtnKco+eq87lXBo+CQ/equZQHCgZk/4X73ujM4xvpz8/hR8w2OzS/Ybw6GvPL+YjVztUSmhZHWaDL4cfoQU+BsbRZ2tUL6ndxyPB74WaS03pA7ureE2UAtKPz588dNUAqkKgsvQqrUDUF6i0o0i35FJZBLciG8o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875616; c=relaxed/simple; bh=Bi1cb3woDgCQH/9tomuCwCHWEJ1hy9AZu85Iv7PLKkw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eBUSGmBQGD/sWd6cbO4KjfHchpvJ8qcNbmA0Ik4Nlx5STcI3/0JQiCE8lcDqrvZxHGrFf0P4gNwx19sAMTRQ6otAmEaDpJsOc6CmPNyWTPkYNcu8QdYAzImjHhKrgYVoYa678Nkxs5JZcMVdNfC5/c73bTEyQI9NYAPRjFkN9vI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b=UuZK2aDT; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b="UuZK2aDT" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-c252e703fa3so717328166b.3 for ; Tue, 08 Sep 2026 06:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1788875607; x=1789480407; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6y/xU9e5Bzn6V96XBSS35d3RBrYr4Ir2RWo4uuGwhTc=; b=UuZK2aDTRtGmVuw2ov17H4rYrxOqC/P6eeNckBhkBzU/9IcvEnYlkrZaH6CSSQJ62h pmlSblLqVmwZMszu+UerWqrn1han9OysTkxdnTRKFWYmj0/VtiFnt+PSS2/cdAWjM96q dlGstfiHrQRtq95lOmE/bLkhZT0sBu5ZBG8mtwy4Oou6l1ZW/7WO8AujT1RHh+oE5Hfd rSsNFqJrH4Cx63nD1sY59tEKZkALcj4CGE4lGbcyQMz49KpPeRPpVMyQCoYyuq+jKaJk A/TmfYMA0D3uzt5QT3p/vULg6xYNXYAitfSdGn/P8DRsENdnqYCLYSBzRyG+CfRYeOFT TR+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788875607; x=1789480407; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=6y/xU9e5Bzn6V96XBSS35d3RBrYr4Ir2RWo4uuGwhTc=; b=XcHxw82Kzby0ARleRJunTiEt6kuiR4+gSGP+Jko+ZaYK4czaLb7AOMrT1gHhowcBDS EOL/iGjEPIxMPg2ELt8Fo9VAYajaPbWTm27lVaeufoPLL7aSiRLZP91Kpdsg0O3HmeQZ yY1gSm710AN1Y+6W+C2Pz+7DO75DKeDBVLsGgiUpTrDYD5WUW78NJ0FdYD4OZBjPfq0g nsa0sfopnHBv9e8qGxjzy7U+0DNGKLq3hc9t7cp6X7px/tZVwyR8hdS7ZOpNJNHiKFHR ujf2udAF8SwkdUg3HK5z/zsRFUL1dM9D1kQrsevJP0GQfOtmgM2ngj9Yc0JvV5AkKsTm Xstg== X-Forwarded-Encrypted: i=1; AKwUvBwXxTWdQw3RTq5d9bsGf/sBzGWimdbfKf/hU7Dh7JP5bTWbA7d5lznO1KuJS70Iri7EckNgILlMfvEo11M=@vger.kernel.org X-Gm-Message-State: AFuF++nur+RnRIx+A+6AucWTVe6oBV+5C2w8mOO1x7kXwTOy2y2rUJuV s6PFG3qm53RgIp6tjUckkgb2Pj2kFvv7wzRQRSL3LKJucn0kfLzXOkrnm7CnISOIDA== X-Gm-Gg: AYBFou1wdovbn/L5fkODJbBe5ZrU46XPpJZdu/cFlSxoD/6EgX5Xu4mJVDwcT5SqSBM hAeFD8HptnnsCDwZ6Om05SrQp9Sfbi5S4tG8Wl/WMpeNi07OdEA/mC+8+Wm+ozjUIoKt9XjJ3Bb P/zlfmnFw/BnZJSNYSvZgrWxdzc4K8+GRmKbhNkU2sbToL3pqmVwYQfjPpN71VtMYKLnq+OK7AO uWR29CyDAW5u8177OppceqGMhoCy1+5Ig6YmVXdpMBbYpepur15eUszx0XYTl5AQOOj4nsiEueH w0g3XnOe5oZLZByKl4qTjheRi/1ED+eiSDHP1GceacvN2vNF841xWQG/7fN4kVrLK2UoZRm1V5i Lrl8gmSx+KqHZFAJZZSGdJGSs/bpIWwH9OxbxaAvn3Rb+SLGd3euexgtgL550vpgbxifruN6nd8 4tVPx+/jO8aRGBgMPvmZzvMK0YKiEARMzWmq4i4GSJR5ftyF1krTIbRbSsE4+Qkg3i17Nlo31+r rICl23VbAjyJELJy9tOpa/m2E1HBEstyC1aIvPn8/2PHwgdZGbfuQ7d/ybDXI6DXSJFdBIrIJm2 uuKrz7ysHJUNibuPnpFxkkn/6KzZvZpS/3hmFG4M1twNr6LWeLsz9kd84RmBCwD9dT2rTFNZg5C voXoxWxPgkntUbuP3nC1VYz62410UQkBqIcSPZphCDOht+2eTyituhg23798CVAUwVf3yTf9zsh jds2hWM7wvgqjM3oEV7OZ1HX6l X-Received: by 2002:a17:907:9708:b0:c26:1648:a06a with SMTP id a640c23a62f3a-c261648b7afmr1033756066b.37.1788875606512; Tue, 08 Sep 2026 06:53:26 -0700 (PDT) Received: from Desktop (pd951346e.dip0.t-ipconnect.de. [217.81.52.110]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c260d5cdf7asm647602666b.58.2026.09.08.06.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 06:53:26 -0700 (PDT) From: Julius Bairaktaris To: jjohnson@kernel.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, toke@toke.dk, sven@narfation.org, quic_vthiagar@quicinc.com, john@phrozen.org Subject: [PATCH ath-next v4 8/9] wifi: ath11k: stop a scheduling round when the hardware refuses a frame Date: Tue, 8 Sep 2026 15:53:17 +0200 Message-ID: <20260908135319.754140-9-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135319.754140-1-julius@bairaktaris.de> References: <20260908135319.754140-1-julius@bairaktaris.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ath11k_dp_tx() returns -ENOSPC when the MSDU idr is exhausted and -ENOMEM when no TCL descriptor is free on any ring or a DMA mapping fails, and the caller answers both by freeing the frame. Inside a scheduling round that is a loop: the next iteration pulls the next frame out of the same flow queue and drops that one too, so a transient shortage costs the head of an FQ-CoDel queue rather than the tail of a hardware one. Return the error from the transmit path and end the round on it. The frame that met the shortage is freed as before; the ones behind it stay queued. The round-robin over the remaining stations stops as well, since a shortage that reaches this point is not specific to the station being served. ath11k_mac_mgmt_tx() returns -ENOSPC as well, for a full management queue, and that ends the round the same way; the next tx completion on the radio starts another. ath11k_dp_tx() also rejects a frame the hardware can never accept, with -EINVAL or -EOPNOTSUPP, and every frame with -ESHUTDOWN while a firmware crash is being flushed; those describe the frame or the device and not the ring, so the round continues past them. ath10k and mt76 check for room before they dequeue and never hold a frame at this point; ath11k learns of the shortage from ath11k_dp_tx() and cannot. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/mac.c | 41 ++++++++++++++++++++------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/a= th/ath11k/mac.c index ffb6b865c2df..12535926631b 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -6499,9 +6499,9 @@ static int ath11k_mac_mgmt_tx(struct ath11k *ar, stru= ct sk_buff *skb, return 0; } =20 -static void ath11k_mac_op_tx(struct ieee80211_hw *hw, - struct ieee80211_tx_control *control, - struct sk_buff *skb) +static int ath11k_mac_tx(struct ieee80211_hw *hw, + struct ieee80211_tx_control *control, + struct sk_buff *skb) { struct ath11k_skb_cb *skb_cb =3D ATH11K_SKB_CB(skb); struct ath11k *ar =3D hw->priv; @@ -6533,7 +6533,7 @@ static void ath11k_mac_op_tx(struct ieee80211_hw *hw, ret); ieee80211_free_txskb(ar->hw, skb); } - return; + return ret; } =20 if (control->sta) @@ -6544,20 +6544,36 @@ static void ath11k_mac_op_tx(struct ieee80211_hw *h= w, ath11k_warn(ar->ab, "failed to transmit frame %d\n", ret); ieee80211_free_txskb(ar->hw, skb); } + + return ret; +} + +static void ath11k_mac_op_tx(struct ieee80211_hw *hw, + struct ieee80211_tx_control *control, + struct sk_buff *skb) +{ + ath11k_mac_tx(hw, control, skb); } =20 -static void ath11k_mac_tx_push_txq(struct ath11k *ar, struct ieee80211_txq= *txq) +static int ath11k_mac_tx_push_txq(struct ath11k *ar, struct ieee80211_txq = *txq) { struct ieee80211_tx_control control =3D { .sta =3D txq->sta }; struct sk_buff *skb; + int ret; =20 /* ieee80211_tx_dequeue() applies the airtime queue limit itself, so a - * selection ends where that limit binds, where the hardware queue is - * stopped, or when the queue empties, as the generic handler does - * today. + * selection ends where the airtime queue limit binds, where the + * hardware queue is stopped, or when the queue empties, as the generic + * handler does today, and additionally when the hardware refuses a + * frame. */ - while ((skb =3D ieee80211_tx_dequeue(ar->hw, txq))) - ath11k_mac_op_tx(ar->hw, &control, skb); + while ((skb =3D ieee80211_tx_dequeue(ar->hw, txq))) { + ret =3D ath11k_mac_tx(ar->hw, &control, skb); + if (unlikely(ret =3D=3D -ENOSPC || ret =3D=3D -ENOMEM)) + return ret; + } + + return 0; } =20 static void ath11k_mac_schedule_txq(struct ath11k *ar, u8 ac) @@ -6569,8 +6585,11 @@ static void ath11k_mac_schedule_txq(struct ath11k *a= r, u8 ac) =20 ieee80211_txq_schedule_start(hw, ac); while ((txq =3D ieee80211_next_txq(hw, ac))) { - ath11k_mac_tx_push_txq(ar, txq); + int ret =3D ath11k_mac_tx_push_txq(ar, txq); + ieee80211_return_txq(hw, txq, false); + if (unlikely(ret)) + break; } ieee80211_txq_schedule_end(hw, ac); =20 --=20 2.53.0 From nobody Fri Sep 25 20:48:39 2026 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BBEF54EEA9 for ; Tue, 8 Sep 2026 13:53:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875615; cv=none; b=l93f+MNQaHYLsnbJgVx+lySKUH/lLHeyPMKCqmDfW6RA/V5BxyquF1aBWKG036ddyxYg6cfmXKSsqoWlErbPovtUEF4oyq7gaIKE2uU6DMwAdkFMN18AwvS6RK1LTq14D9bdx0IY4DYX2TOf3m5A6XsaiJbpKhxXH1WxYemSGrM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788875615; c=relaxed/simple; bh=fPPPO1UhrrdWqz2fqXxE88RQyxzcMWx9QsUwBY4Qv/g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e8ZVFXxD1FzQFuH5aK8Ze/p9o+sD+KhRoUsOesU5D8ERKcM+OHZZRjCav3NL0iQklRjrIIHkQBcj9oTjdZD44rsRoZ5qDL3IokgbYG5m+UnH10ySmvAcI41a2LKXOBVTxtsx0aH0JqgvnIm/CQHU3TySUMLK2ETAxP5Lh+MJ3yA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b=nd9WtYwc; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bairaktaris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bairaktaris.de header.i=@bairaktaris.de header.b="nd9WtYwc" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-c1c52d920b8so595025166b.2 for ; Tue, 08 Sep 2026 06:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1788875607; x=1789480407; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7N6u7JNFUy9B9KinNnYiVqxj1hXMMyS0WRxnAU9lCxc=; b=nd9WtYwce9z4kkVJEh33ostpsHreyDZW6H92tNvmasswElrYIHyhC7l7VHEinePVjm AxicEFf2h80buhVWUI/3m27PSEyL01oSsdfTyixViq5qDEwwKWW9rBiesWN14TEn8u/7 6ZQnHfDCWdvdwJpjg7nwdRd1Ud5r9HFOl3kKYilDwiHV9Y3TP3oFr3E7s4MP36NGAQh6 lKYvwmje8SVZaus6NOeOHjuvoWs4AFcPUHIx9tyzGVlNvVitYdfrxvJMAcsZLkhbe7q2 jSaSMAPPevsCdx3KmOOrTNRwigO8Bw4YDzWYW7CxMQW04cekDP5F9TnArH9ZHIHn+Yat x55w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788875607; x=1789480407; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=7N6u7JNFUy9B9KinNnYiVqxj1hXMMyS0WRxnAU9lCxc=; b=Ju7Q/FA1hWr+bbFHuDbufnEEKfZbQD4NVwp12FDcj6rvqulDmQj4yYnmPMQOMo4Xfj ogVmh2Wq3rDd4PRpAGH8ycPggK64AzqWKmNgBBML2lq6MumRltK5HGSX/Qj7DPQcDibc q7GqbpRoYN3IfzD+z4mIg4sq3OGqH5BCMmr2GEWMPlqXOPiNDHI0E+Rs8w5djaQ6gHEc 3eFHdvZ+S6AhbM53p50cCGEL9PCyCQxBmBvXrrtSloVzmL2GDiebmUCSabLGNIhWmKk5 O9OSekQxD9fGKJ96LSkO9bzEUdoOdNszkA9WSxUQGwROCGcDdtTpyhAVh3Z+NTjOP8Yl G54w== X-Forwarded-Encrypted: i=1; AKwUvBzWT6D4YnkGVpcau9J5goSumfoAHoQZqPfSqRVZYhxviCOhEzxl6R7jXe95gs5aQ7TCXcYvh4RfXvr8AXs=@vger.kernel.org X-Gm-Message-State: AFuF++kUGAFHb6EEiZdhno0W6FISrettyoHaP3gqjEFAgVzoMw9L+0ah DeQNjExsROHJ2v8nbDUDqalg+LwXRwEfSvYqn3B6Ptao+qoc0pwPZiST2ADr2KFl+Q== X-Gm-Gg: AYBFou3ILEzAPs5rzVFK2GPvBPYg2YACA10INUEeA+WmjJpnbQ+1uyPqVipwRydKstH IuQJWUuwuXOIlVt6Me7B+f9FMaZc6832Ij3Bh+JO1BBZZUt0zRYKggTQnSzXEKN2NgASsFlQMAU RMA/YB22dOkhaGiApWOIHf95GSgCMYNoW8VGyBNYqY3Q1/I+/AbPKn6KNxMzxtr7taGH/pQYM7m Img4kuabq4dW2CvAW4JhpGCDlU0/LEtsbWkMVw7j6bq6ecZ9rVm+u3BNTEUGYLQ18RJI5MVZxNR GBoyHeO56YgxRibRUNOzyXMFmwAhpM5MHGB1yN4tLZ91bs3tN7qK1v1eu/hsqWcEi/tCokVmyWj PeICZWk6sO1IQFDuFV2iT6GMVIqd/mlQKr7Z6C1uW4BmCdgKp9cnrEENop0jpqCZobU2XFvnAAd EBD0B6PhlcDR9SR907mlj1+AFEEVFhzhvbyi7xx0J3W0JPmLeS2E1w89fFLFSqtsbD6jbd+1siC 2E9Ns1d4RFMvFcnyGcJAzbj0XkY1WXWnt3U1QDbJ0gPpH8o/uNT7l2uRm0ByUptJuTn89RCfM1y EFgXQo0OYCeWenvPwJcIXeaYhJdwwft1zgiwXLzaKOR8F0ofxqtCYB53mMgHVw5TFASYr44tJTQ pqXaUj3wjCPObm+usvTHs+qKoAy+R7a4wV/6xpwE1hNHCKZGgQR0G3frb1F3UyoQAczpilLuOxE SjsaES0pvHfYMY X-Received: by 2002:a17:907:db01:b0:c16:26c7:6ba8 with SMTP id a640c23a62f3a-c260c8bfb07mr1133695366b.6.1788875607271; Tue, 08 Sep 2026 06:53:27 -0700 (PDT) Received: from Desktop (pd951346e.dip0.t-ipconnect.de. [217.81.52.110]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c260d5cdf7asm647602666b.58.2026.09.08.06.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 06:53:26 -0700 (PDT) From: Julius Bairaktaris To: jjohnson@kernel.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, toke@toke.dk, sven@narfation.org, quic_vthiagar@quicinc.com, john@phrozen.org Subject: [PATCH ath-next v4 9/9] wifi: ath11k: budget the tx completion handler Date: Tue, 8 Sep 2026 15:53:18 +0200 Message-ID: <20260908135319.754140-10-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135319.754140-1-julius@bairaktaris.de> References: <20260908135319.754140-1-julius@bairaktaris.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ath11k_dp_tx_completion_handler() reaps every completion the release ring holds before it returns, and ath11k_dp_service_srng() charges none of that work against the NAPI budget the poll was given, unlike every receive handler below it. With the scheduling round that now ends the handler, one poll that finds the ring full runs one round for all of it. Reap at most the budget's worth of completions per poll and return the count, so the poll ends and the round runs once per budget of completions rather than once per ring. The completions left in the FIFO are reaped by the next poll, which NAPI schedules at once when the budget was spent. Measured on an IPQ8074 AP with a TCP download forwarded from a wired host to one 1x1 VHT80 station, BE aql_txq_limit 500/1000 us, 20 s runs, three interleaved runs per arm, download rate and the RTT the sender's TCP sees on that flow, mean and maximum: Mbit/s RTT mean ms RTT max ms with this patch 100.8, 101.5, 100.6 27, 26, 26 32, 31, 32 without 74.7, 101.1, 100.6 120, 27, 26 1873, 31, 30 Without it a poll that finds the ring full reaps all of it before the round runs, and one run in three stalls for close to two seconds. At the default limit both arms read 101 Mbit/s at 47 to 55 ms. Two soaks on the series, a 91 s TCP soak at 1033 Mbit/s aggregate over five streams, about 86000 completions per second, and a 60 s soak of 200-byte UDP datagrams at 60906 packets per second, produced no status_fifo-is-full warning and no TCL ring-full failure. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/dp.c | 10 ++++++++-- drivers/net/wireless/ath/ath11k/dp_tx.c | 11 +++++++++-- drivers/net/wireless/ath/ath11k/dp_tx.h | 3 ++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/at= h/ath11k/dp.c index be65d73b904b..ddb434c513e0 100644 --- a/drivers/net/wireless/ath/ath11k/dp.c +++ b/drivers/net/wireless/ath/ath11k/dp.c @@ -783,8 +783,14 @@ int ath11k_dp_service_srng(struct ath11k_base *ab, =20 for (i =3D 0; i < ab->hw_params.hal_params->num_tx_rings; i++) { if (BIT(ab->hw_params.hal_params->tcl2wbm_rbm_map[i].wbm_ring_num) & - ab->hw_params.ring_mask->tx[grp_id]) - ath11k_dp_tx_completion_handler(ab, i); + ab->hw_params.ring_mask->tx[grp_id]) { + work_done =3D + ath11k_dp_tx_completion_handler(ab, i, budget); + budget -=3D work_done; + tot_work_done +=3D work_done; + if (budget <=3D 0) + goto done; + } } =20 if (ab->hw_params.ring_mask->rx_err[grp_id]) { diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless= /ath/ath11k/dp_tx.c index 70d326fe6a1f..3997bd336942 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.c +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c @@ -685,7 +685,8 @@ static inline void ath11k_dp_tx_status_parse(struct ath= 11k_base *ab, ts->rate_stats =3D 0; } =20 -void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id) +int ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id, + int budget) { struct ath11k *ar; struct ath11k_dp *dp =3D &ab->dp; @@ -695,6 +696,7 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base= *ab, int ring_id) struct hal_tx_status ts =3D {}; struct dp_tx_ring *tx_ring =3D &dp->tx_ring[ring_id]; unsigned long push =3D 0; + int done =3D 0; u32 *desc; u32 msdu_id; u8 mac_id, i; @@ -723,10 +725,13 @@ void ath11k_dp_tx_completion_handler(struct ath11k_ba= se *ab, int ring_id) =20 spin_unlock_bh(&status_ring->lock); =20 - while (ATH11K_TX_COMPL_NEXT(tx_ring->tx_status_tail) !=3D tx_ring->tx_sta= tus_head) { + while (done < budget && + ATH11K_TX_COMPL_NEXT(tx_ring->tx_status_tail) !=3D + tx_ring->tx_status_head) { struct hal_wbm_release_ring *tx_status; u32 desc_id; =20 + done++; tx_ring->tx_status_tail =3D ATH11K_TX_COMPL_NEXT(tx_ring->tx_status_tail); tx_status =3D &tx_ring->tx_status[tx_ring->tx_status_tail]; @@ -774,6 +779,8 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base= *ab, int ring_id) for_each_set_bit(i, &push, ab->num_radios * IEEE80211_NUM_ACS) ath11k_mac_tx_push_pending(ab->pdevs[i / IEEE80211_NUM_ACS].ar, i % IEEE80211_NUM_ACS); + + return done; } =20 int ath11k_dp_tx_send_reo_cmd(struct ath11k_base *ab, struct dp_rx_tid *rx= _tid, diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.h b/drivers/net/wireless= /ath/ath11k/dp_tx.h index 9303b5ba6e01..b5296cda73e3 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.h +++ b/drivers/net/wireless/ath/ath11k/dp_tx.h @@ -21,7 +21,8 @@ void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struc= t hal_tx_status *ts); int ath11k_dp_tx_htt_h2t_ver_req_msg(struct ath11k_base *ab); int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif, struct ath11k_sta *arsta, struct sk_buff *skb); -void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id); +int ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id, + int budget); int ath11k_dp_tx_send_reo_cmd(struct ath11k_base *ab, struct dp_rx_tid *rx= _tid, enum hal_reo_cmd_type type, struct ath11k_hal_reo_cmd *cmd, --=20 2.53.0