From nobody Tue Jan 31 15:37:41 2023 X-Original-To: dev-commits-src-main@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 4P5q1d6n9kz3bKPm; Tue, 31 Jan 2023 15:37:41 +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 4P5q1d60Wvz3wR8; Tue, 31 Jan 2023 15:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675179461; 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=L9ZKnxROA2oRRGWBFdyCM/g9exona3h6qWQgN3pWOrI=; b=oJnNJ/YDxO+rb7+u14iHHSQaKR5Pxg0RLDvQtdLZ7s/FR1rc3yKXxMVgOoHSVCETKse0/X 4ZTR9gDHhM5pRiDlZHGnqF2pOoE/Z51i5qACtplE5FXBm2J1/VVrZFhlSGHZcU0GOSonof TMUnJrFNifGpqgBGQat0KpU9bjEXpA8187Rauv9Qol6H3Pgy/UXerSwOPJtnvpAcK+Wht5 LTcEfPiBwQSOCdGd/NNKZSwbJH4jomWoEPA8QpGQfQtqfjNexFuaolehAF9fgG9ZcycJi2 UAdRpLTXrVjMDELA2apoWeo+5yohOOoUYuubPBg+PGbnq/0NxipjBCA4uubnqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675179461; 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=L9ZKnxROA2oRRGWBFdyCM/g9exona3h6qWQgN3pWOrI=; b=qBCFDT7twYOjXqNRLt9ZdLzdupmvXeD/klFQO/EaBDYl8AnsBKMgw80PT6fgPVlQ3zNOP4 tHP9U+m5maMHfBTktR1/JoMIYuowe1nzzGteOCrILLA0YBEBNi/FEEznfkh4l3/8v/Z5MV KjhS/F1V5DLpqL1ssbeRL9cSNDdbsTPaYZoNMpkjgfcEc+6MKzGdDYxXbq00XHzOT+v5UQ X/T0M9gQ5Wfcd2+YwYTTZ6ReV3KFjP/libumYwxcRq0WaEO4C+DBtnkm59T5aadsww5O2i xgcgo6z6nI7zmn4ZOLC4050d8TL5M0b7ecHNV7OsUZ/HDdGjQpHpYjxNHjHGWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675179461; a=rsa-sha256; cv=none; b=hULBv3yXUMgPAvcXW1MeYeIMV80cEDjDWHaq3ZJ4iIIbjBxqzN4EFO5tGJSVaQvUhZCPmA wYKZhrbrbHatO3Vwo6cnzU5FJzmyW9mXgGm7bRblMEu5A1F0U94OhuFY88UeZcGz6umd5w BMHTixkuZcRsOsvpqnh1rbKqV/8Zf15PfNe3eKfiGMGv4D3SPcvTYC1lwBmN8rOP1JygCJ yoK/gX0NYq8bVi9ZBHiFpgeJC3wYjmDNEsqOzTxAu813ar33U2k2TbQnoqx1t4BtO5XzW3 hxU5UcM0qK5gpIX2Jq23WoemaF6iHzqWv1vruwulMlc2wRnAWiRjNjnOUvL+DA== 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 4P5q1d52mkztkn; Tue, 31 Jan 2023 15:37:41 +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 30VFbfv7039508; Tue, 31 Jan 2023 15:37:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30VFbffe039507; Tue, 31 Jan 2023 15:37:41 GMT (envelope-from git) Date: Tue, 31 Jan 2023 15:37:41 GMT Message-Id: <202301311537.30VFbffe039507@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a83975710989 - main - LinuxKPI: 802.11: implement ieee80211_tx_status_ext() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: a839757109891573123d8777b539fafa2d2198bb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a839757109891573123d8777b539fafa2d2198bb commit a839757109891573123d8777b539fafa2d2198bb Author: Bjoern A. Zeeb AuthorDate: 2023-01-31 15:35:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-01-31 15:35:59 +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 MFC after: 3 days --- 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 977cfb5e6bc7..3aff01baef2c 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); } /*