From nobody Tue Nov 24 11:51:58 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.49 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795354950; b=cKNEqcvCtD6UiMXJwG/x3Y6TYnXINgftP7HMmkCoCEOcLYzwdk235Gg+CJNPWIN8bPHA Lfa2yFxYJ9+JdFKDnMYwpEqhmMf27jyMYX+kB3A618D4tHryLOYGHr5U6Hjf+tylXYHJ2 WoNfH2MHbFsky8QbBEtUzp7mN40u5yF3y7JNj7czIrhLOmdG5fNgrNBJgJMlaHk7PNK0/ QAvpwSnfTnto/jj/gXFZBjVmXWGV4oSiiE2WyL3wr/16gi1h3jAEN9agV3cFujA2VEBLw FdnSW3aEdTRmluCUoXx869//OaTfOEV8lV/qhFVwE9xnLA4VKImn/HGVUJTVPHvHLVg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795354950; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=0mrNNw5RU1jw35bxblvVtq/MtklTGf4DFTf79gjLB0E=; b=OkgZnF6Fa/dlWD8j9JsEBoBowCzGSG5QLvDrC2msQkaR4NGvvs9pWwy86llCrkqn7GUn +bi5HKKqKcs6TJJVFnxOLhW/C5AWIQi9/CbueadABCa/UDBNm60u5qS2kveTjJu7lNjVQ 7jEJWb2X0ZfigG8j3BLsHUwucJaGhSBXe6qyhlt3CpiQ939mV82t+SBYBc3OsMcGX/Yx5 kTgvZTzhpcDLiAR/Jd6rHR2WaXuuAoAYzKyUkwAN18psrojuOaZcQKmeYm5tlsqWJrA47 EB40zU9PY7tsmhoXLxP3vEXuBTHzc0L1NIYTivD7jLZBKIaPJyaq5B95V/g3CmVd0Bw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass header.d=bairaktaris.de header.i=@bairaktaris.de header.a=rsa-sha256 header.s=google header.b=RH2ztgDB; arc=none smtp.remote-ip=209.85.218.49 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83DC8606A339 for ; Sun, 22 Nov 2026 13:42:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 83DC8606A339 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.a=rsa-sha256 header.s=google header.b=RH2ztgDB Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-c51373ae637so367552766b.3 for ; Sun, 22 Nov 2026 05:42:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1795354949; x=1795959749; 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=0mrNNw5RU1jw35bxblvVtq/MtklTGf4DFTf79gjLB0E=; b=RH2ztgDBI+urZLZcKq8VYe/kFL91X/f45cDCHgn1Egf6hgkU4G1GVqtvS6Hbe9YeUT ubNB3JWsKeuADLOX18qjgEjN+FL98czqsiaFC+Iwc8murRKFlQ+Y5t75YQkHy+mjgjtD WAeiEhHACRM3Ms/KDgqf36sETyx58Te2P44B+GRIGcHHBY2vz35PeI9jd9ydbxkouPOy RiRLPBEvtvOK8orTrEfxsj0zoX9gatH4E1HVPF5sYo4R71WdekDOuIvcp4VMd/17+TrF 421b28QjECZ6alnYUT+ORvfjgT6sPHQTt/2cFY4BGGDQVEKBL31ZZ5IpBMd3X5Vwk7CW Pdyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795354949; x=1795959749; 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=0mrNNw5RU1jw35bxblvVtq/MtklTGf4DFTf79gjLB0E=; b=Xc2VhNdbzF6NBQU9tx56QZY/BqM3GL35pO/g30EJt2EahLmtbJxR0N7wYoHyaEIWmK 4VnrEUE8zd6Rzm7lZcjVv9zaxWE3K7IsBc5FVHkvkVyxbcBdvQxgLBdG7+Hsd2zD+pZ7 mKdXs8mp/LjjCehcaDv79LLZC7bHkPnhdvEJ+EGWsENnjnzTZtQSp6nHzf67cS/LnQ23 bAHd9EDNhjNHdJDExDgqW2GNXhZitciWBCLfyNS3ptRhhNRHF6v9I8JHhxD2FrLZgnQ0 JEVa18X+6vLEeenIfWhG8zTHoriHRUJXGjU+76Dp2yCV2l4SekeuPvB8HI3p8f6EPaJp cOVQ== X-Forwarded-Encrypted: i=1; AL+hErEBQZi23YkmzT9Kl5Lk6PNiuN4MlSTM7QAFt4XeDP67lYm97N1M7kJXtEYGar7qACKCiuQSXwbIL7TwJsc=@vger.kernel.org X-Gm-Message-State: APuU4Z+kXGYRfiR/jeQsmTXFgNdPhkie+yaRH3/fovdwSyaKHstg1vqm jah1rmRB3R33P/FPT8lphKnpZWx8q0wlCUUjp6P2a3aLrVLO5FXGBVRUMbmVNokwBg== X-Gm-Gg: AZFdTZfobjHpxaynS15j8b4b5awM4m3eINwfwKlUugCg9rKnNeipZBUMT1CCcb9XCvV WP98DWHaN/9veGECsgVJ3vIHVg3gCmcl46VfrdDBML9CrkWuH4l94FvgFyHaszGcpJWft3Eg1Ji K664je5F6EDcuMfgXEu9mKRiVD1SGJR2wif316p/Yq9unrQ5HEAwJDeXLeBOWjt5DNS3XkbPcZC zfGSojNZ1kbo2BjGPhZ7PC/HGYqcrnjlu7xt/+VCRunbfMPnzPZa9jMMyOo0gePvM3r3RsblF08 akO9Wfn1rqpquMlXVlkDjd1qQnWSy1lSiFZ57/ZumKEkkHg41SgUcHKTboWTqbEBNiqjda6b6SV A5sPIFS6gjxbdk7OD0J5x9/7cQOVokCGG4jRub2NI2NrkIadx1lIkYw2UCd/mG9EJUtdguzlxqn 7rJN6IB8h4/d7+wETeROcgrJTnO11IP0I8f0o6WLSynJz0Swtjy+FdAQbxLPP1nfYwiAeALU+ig Ld+B1qeqw71vYo6jbjYO58VJDCxmFkCoSst46C3fVfLws634Rjt49cUrMSAAWuxrysqyRICc3bf BFVWjBHCUExs02yALJuOmcpwGGRNGU52UYWvX7vOiRiMvMvEphaS2tGMslnpBlhFu0wXiB8/7fB iQGDpbwQWN7Oib4TEVH7zHWQI3zVd8wOPbR69yzGsKcKXGI+YopHSKrTznefI2g7fuIX+0buM93 AlfuDOcZqQI+SowIObWW2dP4FEHQFJsjbfuKE5Rznx1EXJrHpLpVOtwPezubKXkIwto+s/KQh/K Zd9hwocjiWZ7/SQd55XQEiHwoLYCg9ZPTmDOL/ehK2HoAPKw2tms1VJwsfiiYKVlq7dyf3rbW8Z nQaa41AZe1duEDwWzKt1Duet+6mEa0CaXTOUl2lzBMDZN0QPtE2yUY4= X-Received: by 2002:a17:907:bb48:b0:c2d:c98f:4824 with SMTP id a640c23a62f3a-c513a9af930mr640165866b.30.1795354948816; Sun, 22 Nov 2026 05:42:28 -0800 (PST) Received: from Desktop.tail070c67.ts.net (p200300f24712e3000000000000000a27.dip0.t-ipconnect.de. [2003:f2:4712:e300::a27]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ad010bcsm326020566b.1.2026.11.22.05.42.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Nov 2026 05:42:27 -0800 (PST) From: Julius Bairaktaris To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Jeff Johnson , Felix Fietkau , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH wireless-next 1/4] wifi: mac80211: advertise TSO and SG for encap offloaded frames Date: Sun, 22 Nov 2026 14:42:25 +0100 Message-ID: <20261122134228.956044-2-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261122134228.956044-1-julius@bairaktaris.de> References: <20261122134228.956044-1-julius@bairaktaris.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A driver whose hardware segments TCP frames and takes frames with fragments on its 802.3 encap path cannot say so. hw->netdev_features applies to every netdev of the hw, so a feature set there also reaches the frames that go out through the 802.11 path. Add hw->encap_netdev_features and hw->encap_gso_max_segs. mac80211 sets the features on the AP, AP_VLAN and station netdevs when the hw supports encap offload, and ieee80211_8023_xmit() passes them to ieee80211_tx_skb_fixup(), so a GSO frame reaches the driver whole. The 802.11 path keeps using the features of the vif, which do not include them, and segments such a frame in software as before. AQL charges a frame by tx_time_est, which ieee80211_info_set_tx_time_est() caps at 4095 us. A whole GSO frame to a slow station can take longer and would be charged less than its airtime. Segment such a frame in software instead. The tx statistics count a TCP GSO frame as gso_segs packets, with the headers of every segment in its length. Signed-off-by: Julius Bairaktaris --- include/net/mac80211.h | 15 ++++++++++++ net/mac80211/iface.c | 14 +++++++++++ net/mac80211/main.c | 3 ++- net/mac80211/tx.c | 53 ++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 82 insertions(+), 3 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index f768ef9184eb..8eac4d50d06c 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -3271,6 +3271,19 @@ enum ieee80211_hw_flags { * @netdev_features: netdev features to be set in each netdev created * from this HW. Note that not all features are usable with mac80211, * other features will be rejected during HW registration. + * @encap_netdev_features: netdev features, in addition to @netdev_feature= s, + * set in each AP, AP VLAN and station netdev created from this HW, for + * the frames that are sent with 802.3 encapsulation offload (see + * %IEEE80211_OFFLOAD_ENCAP_ENABLED). A driver sets scatter-gather and + * segmentation offload here when the hardware takes such frames whole. + * mac80211 hands a driver a frame with these features only with + * %IEEE80211_TX_CTL_HW_80211_ENCAP, and segments or linearizes it in + * software on every other path, and for a station when the airtime + * estimate of the whole frame is more than AQL can account to one frame. + * Such a frame starts with its 802.3 header; a GSO frame has at most + * @encap_gso_max_segs segments. + * @encap_gso_max_segs: the most segments of a GSO frame the driver takes + * whole, when @encap_netdev_features has a segmentation offload. * * @uapsd_queues: This bitmap is included in (re)association frame to indi= cate * for each access category if it is uAPSD trigger-enabled and delivery- @@ -3330,6 +3343,8 @@ struct ieee80211_hw { s16 accuracy; } radiotap_timestamp; netdev_features_t netdev_features; + netdev_features_t encap_netdev_features; + u16 encap_gso_max_segs; u8 uapsd_queues; u8 uapsd_max_sp_len; u8 max_nan_de_entries; diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index b6ed6541bc42..c3869dbfdab7 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -2407,6 +2407,20 @@ int ieee80211_if_add(struct ieee80211_local *local, = const char *name, sdata->u.mgd.use_4addr =3D params->use_4addr; =20 ndev->features |=3D local->hw.netdev_features; + /* Only the netdevs that can use the encap offload offer its + * features: every other path segments in software, with the + * features of the vif. + */ + if (ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD) && + local->hw.encap_netdev_features && + (type =3D=3D NL80211_IFTYPE_AP || + type =3D=3D NL80211_IFTYPE_AP_VLAN || + type =3D=3D NL80211_IFTYPE_STATION)) { + ndev->features |=3D local->hw.encap_netdev_features; + if (local->hw.encap_gso_max_segs) + netif_set_tso_max_segs(ndev, + local->hw.encap_gso_max_segs); + } ndev->priv_flags |=3D IFF_LIVE_ADDR_CHANGE; ndev->hw_features |=3D ndev->features & MAC80211_SUPPORTED_FEATURES_TX; diff --git a/net/mac80211/main.c b/net/mac80211/main.c index e03c2dbf4fb8..2a49fe7ed367 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -1243,7 +1243,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) } =20 /* Only HW csum features are currently compatible with mac80211 */ - if (WARN_ON(hw->netdev_features & ~MAC80211_SUPPORTED_FEATURES)) + if (WARN_ON((hw->netdev_features | hw->encap_netdev_features) & + ~MAC80211_SUPPORTED_FEATURES)) return -EINVAL; =20 if (hw->max_report_rates =3D=3D 0) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index cb9ecac25a9c..faf3e6b9e4f8 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -4797,6 +4798,35 @@ static bool ieee80211_tx_8023(struct ieee80211_sub_i= f_data *sdata, return ret; } =20 +/* A frame's airtime estimate has 10 bits, in units of 4 us. A GSO frame w= hose + * estimate would not fit is charged less than it takes and stays in the A= QL + * limits for as long as it takes, so it is segmented in software instead. + */ +#define IEEE80211_TX_GSO_AIRTIME_MAX 4092 + +static bool ieee80211_8023_gso_fits(struct ieee80211_sub_if_data *sdata, + struct sta_info *sta, struct sk_buff *skb, + u16 queue) +{ + struct ieee80211_local *local =3D sdata->local; + u32 airtime; + + if (!sta || !wiphy_ext_feature_isset(local->hw.wiphy, + NL80211_EXT_FEATURE_AQL)) + return true; + + /* AQL charges the vif of the AP, as ieee80211_tx_dequeue() does */ + if (sdata->vif.type =3D=3D NL80211_IFTYPE_AP_VLAN) + sdata =3D container_of(sdata->bss, struct ieee80211_sub_if_data, + u.ap); + + airtime =3D ieee80211_calc_expected_tx_airtime(&local->hw, &sdata->vif, + &sta->sta, skb->len, + queue !=3D IEEE80211_AC_VO); + + return airtime <=3D IEEE80211_TX_GSO_AIRTIME_MAX; +} + static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata, struct net_device *dev, struct sta_info *sta, struct ieee80211_key *key, struct sk_buff *skb) @@ -4807,6 +4837,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_= if_data *sdata, struct tid_ampdu_tx *tid_tx =3D NULL; struct sk_buff *seg, *next; unsigned int skbs =3D 0, len =3D 0; + netdev_features_t features; u16 queue; u8 tid; =20 @@ -4835,7 +4866,12 @@ static void ieee80211_8023_xmit(struct ieee80211_sub= _if_data *sdata, tid_tx->last_tx =3D jiffies; } =20 - skb =3D ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata= )); + features =3D ieee80211_sdata_netdev_features(sdata) | + local->hw.encap_netdev_features; + if (skb_is_gso(skb) && !ieee80211_8023_gso_fits(sdata, sta, skb, queue)) + features &=3D ~(NETIF_F_ALL_TSO | NETIF_F_SG); + + skb =3D ieee80211_tx_skb_fixup(skb, features); if (!skb) return; =20 @@ -4865,8 +4901,21 @@ static void ieee80211_8023_xmit(struct ieee80211_sub= _if_data *sdata, info->control.hw_key =3D &key->conf; =20 skb_list_walk_safe(skb, seg, next) { - skbs++; + unsigned int segs =3D 1; + len +=3D seg->len; + /* a GSO frame is one frame of the queues and of the airtime + * estimate, and as many packets of the counters as it has + * segments + */ + if (skb_is_gso(seg) && + (skb_shinfo(seg)->gso_type & + (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))) { + segs =3D max_t(unsigned int, skb_shinfo(seg)->gso_segs, 1); + len +=3D (segs - 1) * (skb_transport_offset(seg) + + tcp_hdrlen(seg)); + } + skbs +=3D segs; if (seg !=3D skb) memcpy(IEEE80211_SKB_CB(seg), info, sizeof(*info)); } --=20 2.53.0 From nobody Tue Nov 24 11:51:58 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795354951; b=0m/+AQ0rjV9xX0RcE9OPMroW2ZOwxwyyQZPzt3Kbnbbw33O5sPF9nByRCx1/2eUN5DHr uk3W1jjpfVNNoKcNSGduWZOfbmTBebOm32hJrOEnlUoFphvDtrTNR/Z0vOBkjRkqB5eu3 HJZdOdsaliHe3Ne/BHL7Fq+2k6C/JIFSfrZupIeqrpZ5omr1Q7c14aL6xI1gcM9NX0zOr vYhZb/vhlhJjq0N3S/ormOWV9WCpc6T1D/6iw2uOTfvwECFcWuve55JHE7ENd1SXZe78+ LLtEoEM61Rm0hGZlBFZM9Wcf9sJiIPsGJxbNNFPDP5x/Q6I0yuj05/8pKjeAI/oQBhA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795354951; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=nfBVe7oeliVCYRMEEI0YTZZ5kge0cS6jQivTz9dt6BY=; b=mF3NIC1x7LqRYyFsV8ReouKKa+JGJEK6fPclzHgQVZhzAj7ZL+fRKpiEIpQ7AqZ8s0Rc TUYRFN2uBsVGUGRclUKNoACY5n1zIYahEVlJVa+gcrx1MGqayPr/w+Bj8LmAmH1r0iVo3 drA4XniacvZeu6ZFfMOaUEhwH7GT6HICiafAJSYNOvUYQQG4m60VV+G2aNnAIW+EjhGrA sZlJ7Gubjxi0kzo4WK6/GYrUhAtsEBF7Ikw3sgy9fdawQG/nowk6FRpW/XIFbbKT4PzXn 7/fD6srMGKFJ9EnohEfDrPQRB3mMF9JtePPpfpyfE4qh4eQIFs22akVIUMgvc+kl6ow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass header.d=bairaktaris.de header.i=@bairaktaris.de header.a=rsa-sha256 header.s=google header.b="p/b++qCi"; arc=none smtp.remote-ip=209.85.218.43 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31629606A687 for ; Sun, 22 Nov 2026 13:42:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 31629606A687 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.a=rsa-sha256 header.s=google header.b=p/b++qCi Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-c4d21051042so404136966b.0 for ; Sun, 22 Nov 2026 05:42:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1795354949; x=1795959749; 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=nfBVe7oeliVCYRMEEI0YTZZ5kge0cS6jQivTz9dt6BY=; b=p/b++qCi0Doz41tIuveRiF91Kc9PFXgN+6ZOtxLSuSEA/7aDo7NLSFZtHVFtEMi96M jsbUv92aBIGMQuj3VJJJr5yPizDLEmerUmPXQDZirAMKoDISumIQ2hr55cv+RZNxGuUI wI+2L1enKdlXu8N8nSQwzWrbK51ljJ4Hg73v1LZ1Fp2aJYIDLPTvkS7tJDlx3yz1ydP7 sEzZ8gmuwuG0yJQeXHomPumRM7xm/SI3lbJwg63HHmXSvsYLYRfTywV9ZR3o+DVtohQM F1kRL5FJFWet41t44QaJ8AatZl/rRWTbVkOXSMV94bcuNlLKx3U5n2wTHc7W3cLNTG2f UY9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795354949; x=1795959749; 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=nfBVe7oeliVCYRMEEI0YTZZ5kge0cS6jQivTz9dt6BY=; b=xzfR554Olvvvd+paLRkKGQLgX6Uhu6oMpo1tp56rcGLpKTBSYWH3cgXKQekBPkWH6K rSKSlpPBHZ+y0wNKnLf4djobYWJo4wkoR9hoZy+wOWu+Ngn3IfDQX7/iq49P41KIG2S3 RyxMM9qCswJMJtDMMiVf4Gf8ItODjsAIdZJgQOf4SviZTqa0pU8mJ7euscNMmudcO0gI kHicD4F1Her4yOCy/e2bMv+wybWSqjOw3eZZCjkyRkd5dkwcCYQTWCCAh+gZjdZN9kCF CJgUq9JJd/3vHfva4Aza1ZoDoV/gVQNwMhUJIGzrelQGEb2npXUEypFsYObx7riTAmZR wmyw== X-Forwarded-Encrypted: i=1; AL+hErEsyQWPxpgSnlVz9ZSFq7eYajCskq/WL1bpFR+IJz93yYO8cxiTbkY2YeItUp2hpBB7BnasNz+2f1+KdZA=@vger.kernel.org X-Gm-Message-State: APuU4Z9LbfJN2Zs1gGxQThDJ2ROCwrH3Vios3M/naewVAbtMRVDM8OCQ vCAXxGdqYukEklSWOhelOLMfcOgPdW/wiQCyMBiKWoCDUmHEO7F/e/6FpZqEkoaLkw== X-Gm-Gg: AZFdTZc6DC75ZVe1bXW+xCjsGzFj43JgNV7S07153fRFbJftlN6TtT0J+osIwQtzwwO 5OLMCRWRj9eFbjFec+A6xKX18uCbJjuHQaVUxewyXTzdxIiYryuR9MMhGjVhiWSfHR+1JTN9I2T mOj7iBeQ7SLHpGxZkWgtzkIWz6f7rIGv20Vlr5AsBNQhI0RnNAjJ2VOYh2QHktU65e9Yy8mYHkb URy+hiSXIxODPdzOmHIa95wYSz6JtczfOKLxlfW87m0dufSGGJ7xGLA4fLcM0E3p3AD9ceHhSBn fzO5+gBpt0ropja62Ke95q/shAcvarC53lF39a2JSwrVY1HZC9Pfdz5SKMPyjZ67yQnwC2qXXSu VtIzPNuFQvU7THmKeXUyEoSpz88FPt1ByW4HG9wZfyRbAo+noB7TPzmRIPkL7mFjiPUr0xt7POU Wk4B29kg1zI1M9bFxdYappPcD4+pBNYZ35fNR4741FEDcD9PHH3rvWsf2/YKz8hFo36ooVhVPTa UC8yeQr8sNDs9zpafu9GAwF0+c2fxGOFlixXVQlotjnoOuR/osW0NTZiTzTo+ocDctXxjZ+7P2v wq2y6wDo3YE5SEjdOYnixoevwF6WbuXGN88vv7t7Kt9KtoSAzFP6M3MNMxfR9hXqDt6EjQT9GnS 3UDAg34pHoGLQH7OOr8PO98ZRvhhRYYBNhmNdjA+xaKN8iN061zS1MSbdaJfS2HSJPTKL9+arm7 UvFkcsPQJgO/OTs8YxlbzA0Rm1zQVKdKeG1eLjyapYeYwjYqKtT2a4x7k4g51Z782oAIi+qJcua VqNCf8wUP/qmTc4Cie9y5qq7SpCMWxIwfjZsDTzBgIIxo44Oa6u0yHQNGs1aMuxW0tqV5mC4ove m8CasKQ4WSu+sDbWO0fAi6ehe0GaQvvIqRvLH4JoOSjvDVW95s20xDY= X-Received: by 2002:a17:907:2d13:b0:c50:ca93:19a0 with SMTP id a640c23a62f3a-c513aab9bcemr746699366b.40.1795354949578; Sun, 22 Nov 2026 05:42:29 -0800 (PST) Received: from Desktop.tail070c67.ts.net (p200300f24712e3000000000000000a27.dip0.t-ipconnect.de. [2003:f2:4712:e300::a27]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ad010bcsm326020566b.1.2026.11.22.05.42.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Nov 2026 05:42:29 -0800 (PST) From: Julius Bairaktaris To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Jeff Johnson , Felix Fietkau , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH wireless-next 2/4] wifi: mac80211: take the TID of an 802.3 frame from the driver Date: Sun, 22 Nov 2026 14:42:26 +0100 Message-ID: <20261122134228.956044-3-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261122134228.956044-1-julius@bairaktaris.de> References: <20261122134228.956044-1-julius@bairaktaris.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" __ieee80211_rx_handle_8023() clears struct ieee80211_rx_data and never sets seqno_idx, so ieee80211_rx_8023() counts every frame received with RX_FLAG_8023 in rx_stats.msdu[0], whatever its TID. The native path takes the TID from the QoS header, which an 802.3 frame no longer has. Add a tid field to struct ieee80211_rx_status for the driver to fill, and use it as seqno_idx on the 802.3 path. A driver that does not set it leaves it 0, which counts the frame on TID 0 as before. Fixes: 80a915ec4427 ("mac80211: add rx decapsulation offload support") Signed-off-by: Julius Bairaktaris --- include/net/mac80211.h | 4 ++++ net/mac80211/rx.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8eac4d50d06c..d601070810fb 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1770,6 +1770,9 @@ enum mac80211_rx_encoding { * @ampdu_reference: A-MPDU reference number, must be a different value for * each A-MPDU but the same for each subframe within one A-MPDU * @zero_length_psdu_type: radiotap type of the 0-length PSDU + * @tid: the TID of a frame received in 802.3 format (%RX_FLAG_8023), or + * %IEEE80211_NUM_TIDS if it has none; counts the frame in the per-TID + * statistics of its station. Not read for other frames. * @link_id: id of the link used to receive the packet. Set and used by * mac80211 internally, it uses @freq set by the driver to identify the * correct link per vif. Set to %IEEE80211_LINK_UNSPECIFIED for non-MLD @@ -1813,6 +1816,7 @@ struct ieee80211_rx_status { u8 chains; s8 chain_signal[IEEE80211_MAX_CHAINS]; u8 zero_length_psdu_type; + u8 tid; u8 link_id:4; }; =20 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index a2356cd17691..9fabc9b5a976 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -5303,6 +5303,7 @@ static void __ieee80211_rx_handle_8023(struct ieee802= 11_hw *hw, struct sk_buff *skb, struct list_head *list) { + struct ieee80211_rx_status *status =3D IEEE80211_SKB_RXCB(skb); struct ieee80211_local *local =3D hw_to_local(hw); struct ieee80211_fast_rx *fast_rx; struct ieee80211_rx_data rx; @@ -5313,6 +5314,8 @@ static void __ieee80211_rx_handle_8023(struct ieee802= 11_hw *hw, rx.skb =3D skb; rx.local =3D local; rx.list =3D list; + /* the MSDU count of the station is kept per TID */ + rx.seqno_idx =3D min_t(u8, status->tid, IEEE80211_NUM_TIDS); =20 I802_DEBUG_INC(local->dot11ReceivedFragmentCount); =20 --=20 2.53.0 From nobody Tue Nov 24 11:51:58 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795354952; b=XTo8ucwN2TW2aRrhYDfKw6jDoeGwvFbOBPL/CGGY7vTmvH8cyDgOqOPyLcMAeeCxZjHe 45sd24RjM7Rit3lWMxS13Gja9MiPJbbqeDsBMKdI/W4SoE5KCyJSTeGwBHqr31rpt8EMs mhpMfdjchtwMzO+8JL/eWHzPnBNQfYphdHJ6Nz1WSv/MKnEKtjaQMHHfZVez9xl9KNxG5 ZC4Ys0lEzP7R3O0dPae9CjsS5XObqtL6CXMgHLpmGZ9ENVmjGezT2djVog3KbL0xrxeTo ySNuAumBhTESFHLaWUuOQLij+ZeqAmxZGo3/rhguGXdBJf0RDqU1rfVEAq4DK+4z8hw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795354952; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=q/EnDq0cYzj1Unoh1AP9SwyoUO1qaDu53CnMoUXDa1M=; b=aWm+XERUYnqvgZdJkOST42pqOQruDjuHxo4/F23hsspyJuwTY/LarUQkpPztG44RQWz2 TgUnUWlAoHYcI6hAWpWTrRM36OqEqYlQ8+2o41AY+Gh7BeCsLmnkoZmPoSfL0c1HgeEXc XMEfcRcS/ODtSfmq6TtqvHtPQNRIK+3gtRyf7m1vT5FLwnMy6xETADeweF6nJPPtX0ixv 7IgTef9TeOrD3W0ACkSLa5c15u1ZWnTVnFyPIl5T/x/pAwD6kn2XJnZPJALXJJbGHwn87 7uvhkvwUmKXg9heQ9AOWxA0eZpBsynWTApTdEEaLIgxp1q5jDatTJ2/75v2MtfgJINw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass header.d=bairaktaris.de header.i=@bairaktaris.de header.a=rsa-sha256 header.s=google header.b=XaTLOvXB; arc=none smtp.remote-ip=209.85.218.41 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 890E9606A32C for ; Sun, 22 Nov 2026 13:42:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 890E9606A32C 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.a=rsa-sha256 header.s=google header.b=XaTLOvXB Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-c4d427836e9so338219866b.1 for ; Sun, 22 Nov 2026 05:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1795354951; x=1795959751; 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=q/EnDq0cYzj1Unoh1AP9SwyoUO1qaDu53CnMoUXDa1M=; b=XaTLOvXBtGe1GTurJwUECWEVzZUrBl0CK75/PLgq1My59TyDTSJegqOOcVtsLZyr6s MT76FLj81pxsfp1xp1oAdKCJjzg/AoFsqr/gQ8wdkIsAj7Tn0vNCwQ3KtPKDce2GnkZg s745hSJ7NUxbifOxzQX8NA59mjgKdFjb0rO6OQJibtpr0vFVr72J7QwVuXDkSDJb7llx MqDSlDldSwN+CPLi3nILDJeCtljKjomqq1XrnoiYT7aWZx6E8usrt61AfYFrkSASZp9q nbRB3FnWLtvE/WGqz/znJ0Dk2hT8P59sd0doQdMHo+ez+SysRVAyr79/0UIT+FSit1cw H5bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795354951; x=1795959751; 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=q/EnDq0cYzj1Unoh1AP9SwyoUO1qaDu53CnMoUXDa1M=; b=zmOPocM2SFuqgEMb/miY5jKQ4Eo2LKPZZAOV/aZfCR4h5QUbPdqcIx3QkliicF7oNt iQ/s2oNtBH/SFbbiXWirh6gpgWnINA+5hst0AmIlaYr4jPpWIM2UKx78ruCOoP5iRseG JwBxDszA1dwCOPqQ1WGamuOHbASiwpsMOS15ih1rkSQZrDggX1/F2qkHxaeMa7P2ByMi 0a3B/uI2VelQ/XBTjn8crc4f46qGzsICUp7Y6X12KJtttNvXHzggjnEu+5Mc9bFC82rp 4ve58xRQudMq0yviguvfwpnvutNy8wLPvEZuyzM6XRjB4qZhbpnukzlxlukrrJN7E8tp +W3A== X-Forwarded-Encrypted: i=1; AL+hErGxdY2NODzVAfp92ODn6KDA9CFgtLSn5Hi8QRICkUcEPg300eV24gQjidvWGYICSW2pQsIfUyeK22ZYJF8=@vger.kernel.org X-Gm-Message-State: APuU4Z8AgYhu17o3T4FnzS1VPhqitbgLKBs3wl9i09RrxCvaZJcIHOmy q3Sk+uElCEMKABWFjSt6oU5bNAeZum+Lyopy4StiDA6MOwGOi3zbNshUthVUlI9h4bRsIBHf9/A w7Q0pp2dU X-Gm-Gg: AZFdTZeJVTcPf/rVZhEJ3DNJfLCdW0P5xcCu4ILRGU1JCfSDk6IR8P+K66Yk9XLE4vn CKM18JdLqk6zpwOYK8HzaWy/fLG8huQF059y11YEWbNpIssZ4S59xwbm+Zu56puFw0YEHDL1Vv9 4n/M1EybpCbbqxsaw6Eg0LjFEYB61EOXzRdxdI2UBlEosKIgEF/KJLvyFDJbAmG9/669galcrZ3 d1U9+Aclwl3rRWXLESniLQZd05I6OInzpOR8AjNsyWoJ5BAfG9vPhr+7d106pTXK2T3l9+sTubt tdWzsH3Nd+9JKYbUur/CTOCddP74kXgKNgYQl3yU8KYhvyEIriCi8ugkoEYAIewKJ4u4sJB/41F Cm8rgI3kp9kP2x8fHhGp5XLLQr7B1rZ8smntObp6JC+U749ky/9Z5AvZz0GmGm0sPSW4miT2cBh nxpYQjtHbtphSYwqV6tmnY/a3qIOIvFmvCqW+TZbl9Lbgc0fWyUh7m+OIiI5Us2c4NbEEPxZKi9 ZIZs1OAZMCuVz+Fn6vsvXHzvLgEwJPX8E5aMuXYDkJo+V6pIrMmBeQ9dD2I23+GQ8iGDF5AX8BB BEe2T7ujx5WU6N/jxd1XgXxiYl8pD6f9hhEBhAqgu7HL1cd6iTmXaRk8EXYdfcm579Lvch7ltIh mc8iJbkY+9zEyjolwP9QaaBhCAEXNHn0t5vmaUuVfHY2Dye4frz1nEHQ9ddlduFFxLKR1CYOUYd DvhVhNCwXQzGoRByJuYQkGTXwLx/0kf0R4gK+fNTFg3Ox4AWeXh6msNlbST5tno9bdK1TAROu/g w3Mm6skXwT+UINb0JSvC58Yo2YSDoGQ5PYMV+3tm2kvAyW17QMK+TvTl8YeASO6Pkpkagoiv7XL pFiZlhOhY32iuLvBkUrTCet2qEp7pwknq0RiW6s/v2+AVGSqjuhu1II= X-Received: by 2002:a17:907:3e1c:b0:c51:53bb:8d70 with SMTP id a640c23a62f3a-c5153bb8ed8mr418956066b.16.1795354950990; Sun, 22 Nov 2026 05:42:30 -0800 (PST) Received: from Desktop.tail070c67.ts.net (p200300f24712e3000000000000000a27.dip0.t-ipconnect.de. [2003:f2:4712:e300::a27]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ad010bcsm326020566b.1.2026.11.22.05.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Nov 2026 05:42:29 -0800 (PST) From: Julius Bairaktaris To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Jeff Johnson , Felix Fietkau , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH wireless-next 3/4] wifi: ath11k: pass the TID of a received 802.3 frame to mac80211 Date: Sun, 22 Nov 2026 14:42:27 +0100 Message-ID: <20261122134228.956044-4-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261122134228.956044-1-julius@bairaktaris.de> References: <20261122134228.956044-1-julius@bairaktaris.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ath11k_dp_rx_deliver_msdu() delivers frames with Ethernet decap as RX_FLAG_8023, and mac80211 counted all of them on TID 0. Pass the TID the driver already took from the REO or MPDU start descriptor into rxcb->tid. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.12-01460-QCAHKSWPL_SILICONZ-1 Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath11k/dp_rx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless= /ath/ath11k/dp_rx.c index 6d95f7b343a5..7235399c5b39 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -2493,6 +2493,7 @@ static void ath11k_dp_rx_deliver_msdu(struct ath11k *= ar, struct napi_struct *nap =20 rx_status =3D IEEE80211_SKB_RXCB(msdu); *rx_status =3D *status; + rx_status->tid =3D min_t(u8, rxcb->tid, IEEE80211_NUM_TIDS); =20 /* TODO: trace rx packet */ =20 --=20 2.53.0 From nobody Tue Nov 24 11:51:58 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795354953; b=fj4tl9jrWld6k22KN0v32uGoOAQ/okChLAMhn61Oi3jYqECR+JbPDG62A5DzcrRx49Hv DfYs3K8oXyA7UPdDZO/ePOWK1EWeVsyqbV260K9uDXTlFx2N8Ze941q85c0nW3DNVSumF 0wUk7WSVexiWj0K4Micvr+5uHqmJX1mDEzRXKZ/gh+orQZDDuWLu2vN0c6cRW+6QYWktk o3zrXUQHiR8+QZMtAnI+ykOxMu1AAQM1c2DjKdbRq4yigzfQIYPrRwr2EHHYB5EzGEqyf QVLKcE+q8/p+Ai4o8xqTiRmerD6TjQzCDdVG8Zw43avwxWu7ke3tLcLO2fcu46II/Ew== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795354953; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=gsbux4xB1cx2A5qfbVry4VrITyTzzyacDp3E10MmRsQ=; b=DRDYrBTe06wb5PLTAeM2Uj1VEvRidajVJHm/wpYMgd8fxWmYq6gM/kJZVe2CLLNbyC+O xeFNtQ+gBiUQ1eQM0qT2AWh8CpRLjW/BrIhTsbGDqS4lhA33Qe5LgcAUv9QdVydlbkiqk mF8RToUr9RBqunPupYWno3k63uXU9szrvfle/09NtxxyWyfRoyDNMrCniG3qRnaCQZcLq Aeu6HEwYs1Ubh5Fga/BNAuufYY3f3uxV3ffOu40NuvUsHDufOURKBlDI0OyyQyoN2VgAW 9gqbGuDoKWK3CksvV9dFIFHwfUc6sMo5UMKXAesO4bUKl1+olqkowLn4JdJ5TvKCsUw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bairaktaris.de; spf=pass smtp.mailfrom=bairaktaris.de; dkim=pass header.d=bairaktaris.de header.i=@bairaktaris.de header.a=rsa-sha256 header.s=google header.b=xuoFMD0s; arc=none smtp.remote-ip=209.85.208.44 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55CCB606A682 for ; Sun, 22 Nov 2026 13:42:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 55CCB606A682 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.a=rsa-sha256 header.s=google header.b=xuoFMD0s Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-6b167ffd132so3653953a12.1 for ; Sun, 22 Nov 2026 05:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bairaktaris.de; s=google; t=1795354952; x=1795959752; 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=gsbux4xB1cx2A5qfbVry4VrITyTzzyacDp3E10MmRsQ=; b=xuoFMD0s6RPjtA3eyT71Zkm+IFUP8NLNBiQQLa4ZjpoNtg3uWI6JA1FUQtVH4xOnrH o9SXWjXqg5xBKaDQ04/Kk0pDrSgkfPWrl7/wjpQneZ/L5YwtrX10kvRUHQd4wEo+0X/s 3PwxgvZjXch7Xv1MIIwxApBXoAGA/xcbTAr7bV0r9mxs7ZokeNilfVNCxcAPOxUJodz9 BGFDCm7bycovpS80QtDtrup9DZT9DBnLwHg9neiCbwmNn28vo+ya4F7WLk9YsO2dVZRY NWh8IbW+2LDnRxS+RDaoCY2eN89E8Q0yiLDyfkGA7hqh5GoxyWCBjHOAGvpt+sEGSRoR tAzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795354952; x=1795959752; 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=gsbux4xB1cx2A5qfbVry4VrITyTzzyacDp3E10MmRsQ=; b=IgCk/eF2GPkF9uZ4HcYljJTVqi5pk+jWdSJDhpqQHzTxeq3aiXHoxtzv4ntSwsUBnZ OLQKV2eC5kJmXUoE/2jGc5R0+pdnOY0ORxjWc7qBnIKrLASt+QnPUqGZFq4lSclvx9lj BW/wB0n/C1J8NwV68bFdijIOE8wDbV4aBzrujIODeYi5VHVWETJ2zwdpjeWS78ew0YHK pzMmrsIOIblegO4VjYpvIfu4YkdX6FWpBTnmuuID6vgzZ7MdkN2m6ZymEHQ+bU0Ieuf5 g4gRHgkWF0GlROnAg968Tn7gfEhtqEQftBxLdMhyadntN8SCLWEYA7jwdqvgDo048qmr Q8Tg== X-Forwarded-Encrypted: i=1; AL+hErHBeoVaAG9Vb1VHGV19szvixkU8xwecR3P0h/fkeT6O9T5r7z++PC99H2gHzK9TJCMFfgIshzoTvJiqFjM=@vger.kernel.org X-Gm-Message-State: APuU4Z/gdZVkvhC16zEaljvWxji7e8KaH29q8A2s2HIfUBf062Nc37yQ ZWrC1fgr0MShO0qOOtPBHhgzh5fj5IlmgN+Am77d/JD0SWDMSYBUbWZFs2enbQxoJw== X-Gm-Gg: AZFdTZc/26cc3EEGs/oAwbUuPIf2Az8Eb3B+wLD9vMFizTuftTTwVi1h0pYj97QvWUa 48bRMtRn1s3/JEh58yozCSmN09IiMS4ybxnH06q8Ld34HJeKXP+rTr3J2IwUU40iOYQsmpmO3LW 6v2bFikdT3YMwKsKkqa9QJL4OkrHnAWEnunCUDiOrj/XJzTsT90SlDr8tANdhD+f6gH5llr0W18 MaJS+2Ko2C5NRNsEBVIWhIdcSynAzForYHJTPMAabSi/mUr2yjDe8bnT434cOHmPQbOMk3yCBG9 xjj+JHAL4kGsKxudRogtmz/rsyqdGDhKJavfS5uUxyy4iJCYE8Mx2h/NR2+xl51OT1IKqvBr9/c yX6SLcyJM9lqUDzhue/n1K4HHlLL4psP7bqtZaDr63JB2glrc8Y7pJTBcykITGZYuvo9qBc1COK V44uDXqB8kZgdHYc4dA8g195yc9/gGvz0LI461fACKf01RgbOimc5oaL5jV3RjsdgYP43xw0V7d 7y6JtjteK7imwPhwUSEHS0KjfBL2Gbs6Tk9+OBC8mNa4JLzUnn43XHsM/g6JK+LjSTUCKFDBNMg wI4h7i7AsKCkafBUDbc0f+5MOAIl/3HDHS82WNNqY+XyUWQz2raopsNlGbr+Kj6STHo5vrNRroE XjN6enbbKvXG4opgn2A8FWSK44w3lxfXp+QI/Qqc7kgd38qIOQ4sEWBj/sw2UJffijjuTCsrv/0 JppAp2CCUUfpFlcm2IMgIQS8t8q7EkBWfbWI5pBKiOAqzWV2V/CSJkwZoDdQA91CA5ByzDF635E k/CqSRg4K2gwv9PIV5VnVjRQVIs5FEU9D/tRFEW6Qfkge1WYzwspkWMHAx4NnnUMRSFCQuxYMUO OV61etzNkF56MrNAC0vyeh7rgenmBJMCNFhYEsdUT9DzQBKwBnUOHYQ= X-Received: by 2002:a05:6402:2745:b0:6ba:9d0c:cca4 with SMTP id 4fb4d7f45d1cf-6ba9d0cced2mr898964a12.33.1795354951690; Sun, 22 Nov 2026 05:42:31 -0800 (PST) Received: from Desktop.tail070c67.ts.net (p200300f24712e3000000000000000a27.dip0.t-ipconnect.de. [2003:f2:4712:e300::a27]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ad010bcsm326020566b.1.2026.11.22.05.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Nov 2026 05:42:31 -0800 (PST) From: Julius Bairaktaris To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Jeff Johnson , Felix Fietkau , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , ath11k@lists.infradead.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH wireless-next 4/4] wifi: ath12k: pass the TID of a received 802.3 frame to mac80211 Date: Sun, 22 Nov 2026 14:42:28 +0100 Message-ID: <20261122134228.956044-5-julius@bairaktaris.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261122134228.956044-1-julius@bairaktaris.de> References: <20261122134228.956044-1-julius@bairaktaris.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ath12k_dp_rx_deliver_msdu() delivers frames with Ethernet decap as RX_FLAG_8023, and mac80211 counted all of them on TID 0. Pass the TID the driver already took from the receive descriptor into rxcb->tid. Signed-off-by: Julius Bairaktaris --- drivers/net/wireless/ath/ath12k/dp_rx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless= /ath/ath12k/dp_rx.c index 36be543b7c50..fc381945d163 100644 --- a/drivers/net/wireless/ath/ath12k/dp_rx.c +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c @@ -1413,6 +1413,7 @@ void ath12k_dp_rx_deliver_msdu(struct ath12k_pdev_dp = *dp_pdev, struct napi_struc =20 rx_status =3D IEEE80211_SKB_RXCB(msdu); *rx_status =3D *status; + rx_status->tid =3D min_t(u8, rxcb->tid, IEEE80211_NUM_TIDS); =20 /* TODO: trace rx packet */ =20 --=20 2.53.0