From 1c89d6b9cdda93e7f9b1f4f491c9d64f0067eb7a Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 3 Oct 2023 14:23:21 +0100 Subject: [PATCH] net: r8168: Fix build for Linux v6.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The r8168 driver fails to build with Linux v6.5 because the skb_gso_segment() is not found ... drivers/net/ethernet/realtek/r8168_n.c:29231:24: error: implicit declaration of function ‘skb_gso_segment’; did you mean ‘skb_gso_reset’? [-Werror=implicit-function-declaration] segs = skb_gso_segment(skb, features); ^~~~~~~~~~~~~~~ Commit d457a0e329b0 ("net: move gso declarations and functions to their own files") moved the definition to a new file 'net/gso.h'. Fix this by updating the conftest Makefile to check for the presence of this header file and use the definition generated by conftest accordingly in the r8168 driver. Bug 4221847 Change-Id: I6ad83a06602ef0679a76ff1a6e5ddabbcb1bfe00 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990521 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/net/ethernet/realtek/r8168_n.c | 4 ++++ scripts/conftest/Makefile | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8168_n.c b/drivers/net/ethernet/realtek/r8168_n.c index b09334fb..36123786 100644 --- a/drivers/net/ethernet/realtek/r8168_n.c +++ b/drivers/net/ethernet/realtek/r8168_n.c @@ -97,6 +97,10 @@ #include #endif +#if defined(NV_NET_GSO_H_PRESENT) +#include +#endif + #define FIRMWARE_8168D_1 "rtl_nic/rtl8168d-1.fw" #define FIRMWARE_8168D_2 "rtl_nic/rtl8168d-2.fw" #define FIRMWARE_8168E_1 "rtl_nic/rtl8168e-1.fw" diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index 5004d1bb..aa29dfa2 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -135,7 +135,8 @@ NV_HEADER_PRESENCE_TESTS = \ drm/drm_dp_aux_bus.h \ generated/autoconf.h \ linux/kconfig.h \ - linux/iosys-map.h + linux/iosys-map.h \ + net/gso.h # Filename to store the define for the header in $(1); this is only consumed by # the rule below that concatenates all of these together.