[PATCH 05/15] backports: Do not access rx_count and rx_list attributes

Johannes Berg <[email protected]>
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
From: Hauke Mehrtens <[email protected]>

The rx_count and rx_list attributes were only added in kernel 5.4 in
commit 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs")

Signed-off-by: Hauke Mehrtens <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
---
 patches/0092-listified-rx/iwlwifi.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 patches/0092-listified-rx/iwlwifi.patch

diff --git a/patches/0092-listified-rx/iwlwifi.patch b/patches/0092-listified-rx/iwlwifi.patch
new file mode 100644
index 000000000000..925010fd5a5c
--- /dev/null
+++ b/patches/0092-listified-rx/iwlwifi.patch
@@ -0,0 +1,19 @@
+The rx_count and rx_list attributes were only added in kernel 5.4 in
+commit 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs")
+
+--- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
++++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
+@@ -1531,11 +1531,13 @@ out:
+ 	if (napi->poll) {
+ 		napi_gro_flush(napi, false);
+ 
++#if LINUX_VERSION_IS_GEQ(5,4,0)
+ 		if (napi->rx_count) {
+ 			netif_receive_skb_list(&napi->rx_list);
+ 			INIT_LIST_HEAD(&napi->rx_list);
+ 			napi->rx_count = 0;
+ 		}
++#endif
+ 	}
+ 
+ 	iwl_pcie_rxq_restock(trans, rxq);
-- 
2.24.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.