aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2023-01-31 15:05:30 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2023-02-23 19:32:28 +0000
commit422d97dd1be339e9c7cdd48cff0b625e5b8f4013 (patch)
tree7da03e9a7046fb74674203383a7c1f30e3324bb8
parent3473f9920c8988cf24490b34c5c4d8448cef7df4 (diff)
downloadsrc-422d97dd1be339e9c7cdd48cff0b625e5b8f4013.tar.gz
src-422d97dd1be339e9c7cdd48cff0b625e5b8f4013.zip
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 Approved by: re (cperciva) (cherry picked from commit e30e05d3ab3979a148068235298e1a6f73b675f0) (cherry picked from commit e420c65378a04c5b9cde34013cab78188bc5a4c2)
-rw-r--r--sys/compat/linuxkpi/common/include/net/mac80211.h25
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.c15
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);
}
/* -------------------------------------------------------------------------- */
@@ -2348,13 +2356,6 @@ ieee80211_get_tx_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta,
}
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 ee4b58e60f4d..e0457e0e5fa0 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);