From 6092d130981a0a0e93b0b61fe360fbb3dd22e193 Mon Sep 17 00:00:00 2001 From: Bjarne von Horn Date: Wed, 7 Feb 2024 15:24:21 +0100 Subject: [PATCH] further ccat fixes for leap 15.5 --- devices/ccat/netdev.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/devices/ccat/netdev.c b/devices/ccat/netdev.c index 44e7f669..b122b790 100644 --- a/devices/ccat/netdev.c +++ b/devices/ccat/netdev.c @@ -31,6 +31,17 @@ #define request_dma(X, Y) ((int)(-EINVAL)) #endif +#ifdef CONFIG_SUSE_KERNEL +#include +#else +# ifndef SUSE_VERSION +# define SUSE_VERSION 0 +# endif +# ifndef SUSE_PATCHLEVEL +# define SUSE_PATCHLEVEL 0 +# endif +#endif + #include "module.h" /** @@ -897,7 +908,7 @@ static int ccat_eth_init_netdev(struct ccat_eth_priv *priv) /* init netdev with MAC and stack callbacks */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) || (SUSE_VERSION == 15 && SUSE_PATCHLEVEL == 5) u8 mac_addr[ETH_ALEN]; if (priv->netdev->addr_len != ETH_ALEN)