Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2023 15:07:49 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e30e05d3ab39 - main - LinuxKPI: 802.11: extend linuxkpi_ieee80211_rx()
Message-ID:  <202301311507.30VF7n9B097670@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=e30e05d3ab3979a148068235298e1a6f73b675f0

commit e30e05d3ab3979a148068235298e1a6f73b675f0
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-01-31 15:05:30 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-01-31 15:05:30 +0000

    LinuxKPI: 802.11: extend linuxkpi_ieee80211_rx()
    
    Extend linuxkpi_ieee80211_rx() by another argument for
    the ieee80211_rx_list() implementation (even though the argument
    is currently ignored).
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
---
 sys/compat/linuxkpi/common/include/net/mac80211.h | 25 ++++++++++++-----------
 sys/compat/linuxkpi/common/src/linux_80211.c      | 15 +++++++++++++-
 2 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index caf9be89281e..fee8b88d8feb 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -1001,7 +1001,7 @@ void linuxkpi_ieee80211_iterate_stations_atomic(struct ieee80211_hw *,
 void linuxkpi_ieee80211_scan_completed(struct ieee80211_hw *,
     struct cfg80211_scan_info *);
 void linuxkpi_ieee80211_rx(struct ieee80211_hw *, struct sk_buff *,
-    struct ieee80211_sta *, struct napi_struct *);
+    struct ieee80211_sta *, struct napi_struct *, struct list_head *);
 uint8_t linuxkpi_ieee80211_get_tid(struct ieee80211_hdr *, bool);
 struct ieee80211_sta *linuxkpi_ieee80211_find_sta(struct ieee80211_vif *,
     const u8 *);
@@ -1468,28 +1468,36 @@ ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
     struct sk_buff *skb, struct napi_struct *napi)
 {
 
-	linuxkpi_ieee80211_rx(hw, skb, sta, napi);
+	linuxkpi_ieee80211_rx(hw, skb, sta, napi, NULL);
+}
+
+static __inline void
+ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
+    struct sk_buff *skb, struct list_head *list)
+{
+
+	linuxkpi_ieee80211_rx(hw, skb, sta, NULL, list);
 }
 
 static __inline void
 ieee80211_rx_ni(struct ieee80211_hw *hw, struct sk_buff *skb)
 {
 
-	linuxkpi_ieee80211_rx(hw, skb, NULL, NULL);
+	linuxkpi_ieee80211_rx(hw, skb, NULL, NULL, NULL);
 }
 
 static __inline void
 ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb)
 {
 
-	linuxkpi_ieee80211_rx(hw, skb, NULL, NULL);
+	linuxkpi_ieee80211_rx(hw, skb, NULL, NULL, NULL);
 }
 
 static __inline void
 ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
 {
 
-	linuxkpi_ieee80211_rx(hw, skb, NULL, NULL);
+	linuxkpi_ieee80211_rx(hw, skb, NULL, NULL, NULL);
 }
 
 /* -------------------------------------------------------------------------- */
@@ -2347,13 +2355,6 @@ ieee80211_get_tx_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta,
 	TODO();
 }
 
-static __inline void
-ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
-    struct sk_buff *skb, struct list_head *list)
-{
-	TODO();
-}
-
 static __inline void
 ieee80211_tx_status_ext(struct ieee80211_hw *hw,
     struct ieee80211_tx_status *txstat)
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index d93eba6cece8..977cfb5e6bc7 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -3840,9 +3840,11 @@ linuxkpi_ieee80211_scan_completed(struct ieee80211_hw *hw,
 	return;
 }
 
+/* For %list see comment towards the end of the function. */
 void
 linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
-    struct ieee80211_sta *sta, struct napi_struct *napi __unused)
+    struct ieee80211_sta *sta, struct napi_struct *napi __unused,
+    struct list_head *list __unused)
 {
 	struct epoch_tracker et;
 	struct lkpi_hw *lhw;
@@ -4050,6 +4052,17 @@ skip_device_ts:
 	if (ieee80211_hw_check(hw, RX_INCLUDES_FCS))
 		m_adj(m, -IEEE80211_CRC_LEN);
 
+#if 0
+	if (list != NULL) {
+		/*
+		* Normally this would be queued up and delivered by
+		* netif_receive_skb_list(), napi_gro_receive(), or the like.
+		* See mt76::mac80211.c as only current possible consumer.
+		*/
+		IMPROVE("we simply pass the packet to net80211 to deal with.");
+	}
+#endif
+
 	NET_EPOCH_ENTER(et);
 	if (ni != NULL) {
 		ok = ieee80211_input_mimo(ni, m);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301311507.30VF7n9B097670>