From nobody Thu Feb 23 19:34:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PN3BK1qGwz3sfBT; Thu, 23 Feb 2023 19:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PN3BK17qJz45Lc; Thu, 23 Feb 2023 19:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677180873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5b+hLgDWdPoT2GzhojTVGVLZX6rI7n053yfjUtfK0LA=; b=i1gtEUAddSP35MUKv2mGd6uStjhJOQONlSDztDw74byLtXPRH2RXc7NqMLg6fWt1cbspsb 7FIvfpZCisc1qqdjhYJP8Uk0QMtWpENDbZhiRSbERi4QDulLiPLddolSLLT6PYHthyu5QS emu9zmsw2/spud0HUz5uTCIpyhsV2zC0xkXxDtfLXOt5uBL5u06CKNkpaS/diD53VKu2w2 LdbH+z5iFiTi+UZDWIc6s4GztWfdz3C4nOa5/QJSpHbq3fp+eFNIL/ZImzyvu1IZPPKdOg LgpBG37iZ3eRkeq9oJPF5YIIq+x6LGvAhLAmUk2trA2TL35tcwejsC9bOzdOgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677180873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5b+hLgDWdPoT2GzhojTVGVLZX6rI7n053yfjUtfK0LA=; b=NjJYzqsBuUpRF9ic0lsDouAYwJbCG7BCY2QiA1td7z1BQBky8JTtQVs7J6CBfBCE7JzLSH 1zDkR+5xX3C0kSaMrzdxOd1OZObW3J6c9yLUkbkbPBPROW8dYi9ooGG5hmAL0aEz4iT3b+ eWFN5QK+s/oLgQVEvWmVjzo5iiUAmdGdeFLNv0zN3EonkkC17Six3+SA2XRUP74GAPR+wY TC1kuoNMZKsUJQjh3pJ7T+1yC1kJRKLiseNWA2zVo5UQPRCnyV4q3FMVf+oBJRZTHVyRO+ YpOkOVvN24avXKmOxH5jRAWj+B29Wll/Bho25tKyA+3WgcyZn4hlurqUz8IQ8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677180873; a=rsa-sha256; cv=none; b=ljlvma8zLjtVm1/bNuvaulUY1+l8YX2kqEegfZxZFSGbcE+c18ehotbRV0CdXIhNfua35q +MnQU/lj3d90vtwMi3h12zrW4n/YoCXBpwSQJVeHTyXqw+x3bYqXn+ImvQ864oJjL1H7sX OajHSbRGIQ2Lw1DndRIfMOcBO9EocP2bob3atxDGwRuFtAbWe3RpzeHiXqedQeDgW89i0T 640Mvva/8NfHOS47q6FpReF4wdvxG6NY+14wj871L+Z88ojySIQAXPrLshcLfLy4aZ/OEP 43JeivMXBYfC7oloGW/IobD1bHA1FR5xjzlWrQOfptYkqXjLxYAyPAfshYCtwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PN3BK06GLzts7; Thu, 23 Feb 2023 19:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31NJYWKe020311; Thu, 23 Feb 2023 19:34:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31NJYW3r020310; Thu, 23 Feb 2023 19:34:32 GMT (envelope-from git) Date: Thu, 23 Feb 2023 19:34:32 GMT Message-Id: <202302231934.31NJYW3r020310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 47ff90e57ef3 - releng/13.2 - LinuxKPI: 802.11: implement ieee80211_tx_status_ext() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 47ff90e57ef3a2e9ad39133d558064ef490e42c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=47ff90e57ef3a2e9ad39133d558064ef490e42c0 commit 47ff90e57ef3a2e9ad39133d558064ef490e42c0 Author: Bjoern A. Zeeb AuthorDate: 2023-01-31 15:35:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-02-23 19:32:34 +0000 LinuxKPI: 802.11: implement ieee80211_tx_status_ext() Add an implementation of ieee80211_tx_status_ext() extending the internal linuxkpi_ieee80211_tx_status() implementation. Sponsored by: The FreeBSD Foundation Approved by: re (cperciva) (cherry picked from commit a839757109891573123d8777b539fafa2d2198bb) (cherry picked from commit df109ed24233e367ef7060a25ab1b55e2afcddc8) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 31 +++++++++-------- sys/compat/linuxkpi/common/src/linux_80211.c | 41 +++++++++++++++++++---- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fee8b88d8feb..2b3f6b8e3ab1 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1028,6 +1028,8 @@ void linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *); struct sk_buff *linuxkpi_ieee80211_probereq_get(struct ieee80211_hw *, uint8_t *, uint8_t *, size_t, size_t); void linuxkpi_ieee80211_tx_status(struct ieee80211_hw *, struct sk_buff *); +void linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *, + struct ieee80211_tx_status *); /* -------------------------------------------------------------------------- */ @@ -1988,13 +1990,6 @@ ieee80211_sta_set_buffered(struct ieee80211_sta *sta, uint8_t tid, bool t) TODO(); } -static __inline void -ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) -{ - - linuxkpi_ieee80211_tx_status(hw, skb); -} - static __inline void ieee80211_get_key_rx_seq(struct ieee80211_key_conf *keyconf, uint8_t tid, struct ieee80211_key_seq *seq) @@ -2130,6 +2125,13 @@ ieee80211_wake_queue(struct ieee80211_hw *hw, uint16_t q) TODO(); } +static __inline void +ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) +{ + + linuxkpi_ieee80211_tx_status(hw, skb); +} + static __inline void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb) { @@ -2144,6 +2146,14 @@ ieee80211_tx_status_ni(struct ieee80211_hw *hw, struct sk_buff *skb) ieee80211_tx_status(hw, skb); } +static __inline void +ieee80211_tx_status_ext(struct ieee80211_hw *hw, + struct ieee80211_tx_status *txstat) +{ + + linuxkpi_ieee80211_tx_status_ext(hw, txstat); +} + static __inline void ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) { @@ -2355,13 +2365,6 @@ ieee80211_get_tx_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta, TODO(); } -static __inline void -ieee80211_tx_status_ext(struct ieee80211_hw *hw, - struct ieee80211_tx_status *txstat) -{ - TODO(); -} - static __inline void ieee80211_color_change_finish(struct ieee80211_vif *vif) { diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e0457e0e5fa0..57dd174b62a1 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4280,8 +4280,8 @@ linuxkpi_ieee80211_txq_get_depth(struct ieee80211_txq *txq, * passed back from the driver. rawx_mit() saves the ni on the m and the * m on the skb for us to be able to give feedback to net80211. */ -void -linuxkpi_ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb, +static void +_lkpi_ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb, int status) { struct ieee80211_node *ni; @@ -4296,20 +4296,28 @@ linuxkpi_ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb, ieee80211_tx_complete(ni, m, status); /* ni & mbuf were consumed. */ } +} +void +linuxkpi_ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb, + int status) +{ + + _lkpi_ieee80211_free_txskb(hw, skb, status); kfree_skb(skb); } void -linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) +linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *hw, + struct ieee80211_tx_status *txstat) { + struct sk_buff *skb; struct ieee80211_tx_info *info; struct ieee80211_ratectl_tx_status txs; struct ieee80211_node *ni; int status; - info = IEEE80211_SKB_CB(skb); - + skb = txstat->skb; if (skb->m != NULL) { struct mbuf *m; @@ -4320,6 +4328,7 @@ linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) ni = NULL; } + info = txstat->info; if (info->flags & IEEE80211_TX_STAT_ACK) { status = 0; /* No error. */ txs.status = IEEE80211_RATECTL_TX_SUCCESS; @@ -4342,7 +4351,7 @@ linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) txs.flags |= IEEE80211_RATECTL_STATUS_LONG_RETRY; } #if 0 /* Unused in net80211 currently. */ - /* XXX-BZ conver;t check .flags for MCS/VHT/.. */ + /* XXX-BZ convert check .flags for MCS/VHT/.. */ txs.final_rate = info->status.rates[0].idx; txs.flags |= IEEE80211_RATECTL_STATUS_FINAL_RATE; #endif @@ -4390,7 +4399,25 @@ linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) info->status.status_driver_data[1]); #endif - linuxkpi_ieee80211_free_txskb(hw, skb, status); + if (txstat->free_list) { + _lkpi_ieee80211_free_txskb(hw, skb, status); + list_add_tail(&skb->list, txstat->free_list); + } else { + linuxkpi_ieee80211_free_txskb(hw, skb, status); + } +} + +void +linuxkpi_ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) +{ + struct ieee80211_tx_status status; + + memset(&status, 0, sizeof(status)); + status.info = IEEE80211_SKB_CB(skb); + status.skb = skb; + /* sta, n_rates, rates, free_list? */ + + ieee80211_tx_status_ext(hw, &status); } /*