[PATCH 13/47] patches: Do not use rx_list in mt7601u driver on older kernel versions.

Hauke Mehrtens <[email protected]>
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
Use the sk_buff_head instead of the skb->rx_list on older kernel in
mt7601u driver too.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
 patches/0097-skb-list/mt7601u.patch | 30 +++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 patches/0097-skb-list/mt7601u.patch

diff --git a/patches/0097-skb-list/mt7601u.patch b/patches/0097-skb-list/mt7601u.patch
new file mode 100644
index 00000000..97d78aff
--- /dev/null
+++ b/patches/0097-skb-list/mt7601u.patch
@@ -0,0 +1,30 @@
+--- a/drivers/net/wireless/mediatek/mt7601u/dma.c
++++ b/drivers/net/wireless/mediatek/mt7601u/dma.c
+@@ -75,7 +75,11 @@ bad_frame:
+ 
+ static void mt7601u_rx_process_seg(struct mt7601u_dev *dev, u8 *data,
+ 				   u32 seg_len, struct page *p,
++#if LINUX_VERSION_IS_GEQ(4,19,0)
+ 				   struct list_head *list)
++#else
++				   struct sk_buff_head *list)
++#endif
+ {
+ 	struct sk_buff *skb;
+ 	struct mt7601u_rxwi *rxwi;
+@@ -135,8 +139,14 @@ mt7601u_rx_process_entry(struct mt7601u_
+ 	u32 seg_len, data_len = e->urb->actual_length;
+ 	u8 *data = page_address(e->p);
+ 	struct page *new_p = NULL;
+-	LIST_HEAD(list);
+ 	int cnt = 0;
++#if LINUX_VERSION_IS_GEQ(4,19,0)
++	LIST_HEAD(list);
++#else
++	struct sk_buff_head list;
++
++	__skb_queue_head_init(&list);
++#endif
+ 
+ 	if (!test_bit(MT7601U_STATE_INITIALIZED, &dev->state))
+ 		return;
-- 
2.30.2

--
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.