diff mbox series

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

Message ID 20211019214320.2035704-14-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 5.15-rc6 | expand

Commit Message

Hauke Mehrtens Oct. 19, 2021, 9:42 p.m. UTC
Use the sk_buff_head instead of the skb->rx_list on older kernel in
mt7601u driver too.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0097-skb-list/mt7601u.patch | 30 +++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 patches/0097-skb-list/mt7601u.patch
diff mbox series

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;