diff options
| author | Zhenlei Huang <zlei@FreeBSD.org> | 2026-02-06 17:52:54 +0000 |
|---|---|---|
| committer | Zhenlei Huang <zlei@FreeBSD.org> | 2026-02-06 17:54:15 +0000 |
| commit | 4012b63889e40bb877bc0e4c8da1792bce472c08 (patch) | |
| tree | 5f93517f19faf186ac09829f3c411aefb7892b87 | |
| parent | c10e6bc0f0079e90cb484323ad71d437f1882422 (diff) | |
qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl
Since the change [1], the init routine qlnx_init() works as intended.
Let ether_ioctl() handle SIOCSIFADDR to simplify the code.
Combined with the change [1], this shall be a better fix for PR 287445.
[1] c10e6bc0f007 qlnxe: Avoid reinitializing the interface when it is already initialized
PR: 287445
Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54888
| -rw-r--r-- | sys/dev/qlnx/qlnxe/qlnx_os.c | 25 | ||||
| -rw-r--r-- | sys/modules/qlnx/qlnxe/Makefile | 1 |
2 files changed, 0 insertions, 26 deletions
diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index bc0282e3c22b..8a12d45512ac 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -30,8 +30,6 @@ * Author : David C Somayajulu, Cavium, Inc., San Jose, CA 95131. */ -#include "opt_inet.h" - #include <sys/cdefs.h> #include "qlnx_os.h" #include "bcm_osal.h" @@ -2622,34 +2620,11 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data) int ret = 0, mask; int flags; struct ifreq *ifr = (struct ifreq *)data; -#ifdef INET - struct ifaddr *ifa = (struct ifaddr *)data; -#endif qlnx_host_t *ha; ha = (qlnx_host_t *)if_getsoftc(ifp); switch (cmd) { - case SIOCSIFADDR: - QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd); - -#ifdef INET - if (ifa->ifa_addr->sa_family == AF_INET) { - if_setflagbits(ifp, IFF_UP, 0); - QLNX_LOCK(ha); - if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) - qlnx_init_locked(ha); - QLNX_UNLOCK(ha); - QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", - cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); - - arp_ifinit(ifp, ifa); - break; - } -#endif - ether_ioctl(ifp, cmd, data); - break; - case SIOCSIFMTU: QL_DPRINT4(ha, "SIOCSIFMTU (0x%lx)\n", cmd); diff --git a/sys/modules/qlnx/qlnxe/Makefile b/sys/modules/qlnx/qlnxe/Makefile index 2a44ae6ddde5..3d8415cf0e57 100644 --- a/sys/modules/qlnx/qlnxe/Makefile +++ b/sys/modules/qlnx/qlnxe/Makefile @@ -58,7 +58,6 @@ SRCS+=qlnx_rdma.c SRCS+=qlnx_ioctl.c SRCS+=qlnx_os.c -SRCS+=opt_inet.h SRCS+= ${LINUXKPI_GENSRCS} |
