Is there a newer Napatech 3GD Driver than 3.29.35.118 for Linux 5.15+ and 6.x kernels?
I was able to build by patching the source, but I don’t want to be patching myself.
## Problem
Kernel Compatibility Issue – Napatech 3GD Driver v3.29.35.118 driver fails to compile on Linux kernels 5.15+ and 6.x with this error:
“`
nt3gd_netdev.c:315:43: error: passing argument 2 of ‘dev_set_mac_address’ from incompatible pointer type
expected ‘struct __kernel_sockaddr_storage *’ but argument is of type ‘struct sockaddr *’
“`
**Root Cause:** Linux kernel changed `dev_set_mac_address()` API in kernel 5.15.0 (October 2021) to require `struct sockaddr_storage *` instead of `struct sockaddr *`. The driver checks for kernel >= 5.0.0 but uses the old API signature.
## Solution
Update the kernel version check and add `sockaddr_storage` conversion for kernels 5.15+.
**File:** `driver/src/driver/os/linux_netdev/nt3gd_netdev.c`
**Lines:** 311-327
### Change Required
**Before:**
“`c
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) || …
ret = dev_set_mac_address(ntnet->dev, &ifr.ifr_hwaddr, NULL);
“`
**After:**
“`c
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) || …
{
struct sockaddr_storage ss;
memset(&ss, 0, sizeof(ss));
memcpy(&ss, &ifr.ifr_hwaddr, sizeof(ifr.ifr_hwaddr));
ret = dev_set_mac_address(ntnet->dev, &ss, NULL);
}
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) || …
ret = dev_set_mac_address(ntnet->dev, &ifr.ifr_hwaddr, NULL);
“`
