Skip to content

Commit

Permalink
r8152: fix build under kernel >= 4.19.10 or kernel >= 4.14.217 (cools…
Browse files Browse the repository at this point in the history
…nowwolf#6965)

Fixes: 1024f0e ("r8152: update to 2.15 (coolsnowwolf#6900)")
Fixes: coolsnowwolf#6946

Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 authored Jun 11, 2021
1 parent e253579 commit 7883a5d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package/lean/r8152/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=r8152
PKG_VERSION:=2.15
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/1715173329/realtek-r8152-linux/tar.gz/v$(PKG_VERSION)?
Expand All @@ -19,6 +19,8 @@ PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/realtek-$(PKG_NAME)-linux-$(PKG_VERSION)

PKG_MAINTAINER:=Tianling Shen <[email protected]>

PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define KernelPackage/usb-net-rtl8152-vendor
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From b61b90b9aea30b944fc51b891dab3ab5eb30980c Mon Sep 17 00:00:00 2001
From: Tianling Shen <[email protected]>
Date: Sat, 29 May 2021 00:46:25 +0800
Subject: [PATCH] compat: skb_mark_not_on_list was backported since kernel
4.14.217 and 4.19.10

Signed-off-by: Tianling Shen <[email protected]>
---
compatibility.h | 2 ++
1 file changed, 2 insertions(+)

--- a/compatibility.h
+++ b/compatibility.h
@@ -548,10 +548,12 @@
linkmode_clear_bit(nr, addr);
}

+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10)
static inline void skb_mark_not_on_list(struct sk_buff *skb)
{
skb->next = NULL;
}
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10) */
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) */
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0) */
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) */

0 comments on commit 7883a5d

Please sign in to comment.