aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@comstyle.com>2026-03-25 01:22:52 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2026-03-25 01:22:52 +0000
commitf7fd4e79fa0943446aa5900147f737a70c73d9e3 (patch)
tree8cd7c0e60e5092730650a1a5c93ee99a5b222bfe /sys/dev
parent41474e78c493184f023723d1f86539e07bb01b92 (diff)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/rge/if_rge.c21
-rw-r--r--sys/dev/rge/if_rgevar.h2
2 files changed, 10 insertions, 13 deletions
diff --git a/sys/dev/rge/if_rge.c b/sys/dev/rge/if_rge.c
index e5297edfefbe..5ae0b98f95a1 100644
--- a/sys/dev/rge/if_rge.c
+++ b/sys/dev/rge/if_rge.c
@@ -959,29 +959,24 @@ rge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSIFFLAGS:
RGE_LOCK(sc);
if ((if_getflags(ifp) & IFF_UP) != 0) {
- if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) {
- /*
- * TODO: handle promisc/iffmulti changing
- * without reprogramming everything.
- */
+ if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) {
+ if (((if_getflags(ifp) ^ sc->rge_if_flags)
+ & (IFF_PROMISC | IFF_ALLMULTI)) != 0)
+ rge_iff_locked(sc);
+ } else
rge_init_locked(sc);
- } else {
- /* Reinit promisc/multi just in case */
- rge_iff_locked(sc);
- }
} else {
- if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) {
+ if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0)
rge_stop_locked(sc);
- }
}
+ sc->rge_if_flags = if_getflags(ifp);
RGE_UNLOCK(sc);
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
RGE_LOCK(sc);
- if ((if_getflags(ifp) & IFF_DRV_RUNNING) != 0) {
+ if ((if_getflags(ifp) & IFF_DRV_RUNNING) != 0)
rge_iff_locked(sc);
- }
RGE_UNLOCK(sc);
break;
case SIOCGIFMEDIA:
diff --git a/sys/dev/rge/if_rgevar.h b/sys/dev/rge/if_rgevar.h
index 6228f9ff229e..d516537e6524 100644
--- a/sys/dev/rge/if_rgevar.h
+++ b/sys/dev/rge/if_rgevar.h
@@ -200,6 +200,8 @@ struct rge_softc {
#define RGE_IMTYPE_SIM 1
int sc_watchdog;
+ int rge_if_flags;
+
uint32_t sc_debug;
struct rge_drv_stats sc_drv_stats;