summaryrefslogtreecommitdiffstats
path: root/sys/dev/dc
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2011-02-18 23:08:05 +0000
committeryongari <yongari@FreeBSD.org>2011-02-18 23:08:05 +0000
commitd469e7db2e02d188fdf4727618e1a47fb319c248 (patch)
treef112995764a337ee9f1e48038010ae3b2b16c7aa /sys/dev/dc
parent252c518851075d360594f57f0c596526e26b3020 (diff)
downloadFreeBSD-src-d469e7db2e02d188fdf4727618e1a47fb319c248.zip
FreeBSD-src-d469e7db2e02d188fdf4727618e1a47fb319c248.tar.gz
There is no need to execute filter configuration when driver is not
running. Remove wrong driver state change in dc_setfilt_xircom(). While I'm here nuke unnecessary assignments.
Diffstat (limited to 'sys/dev/dc')
-rw-r--r--sys/dev/dc/if_dc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 0bb173b..52e4d71 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -1334,7 +1334,6 @@ dc_setfilt_xircom(struct dc_softc *sc)
DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON);
DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON);
- ifp->if_drv_flags |= IFF_DRV_RUNNING;
sframe->dc_status = htole32(DC_TXSTAT_OWN);
CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF);
@@ -3696,14 +3695,13 @@ dc_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
sc->dc_if_flags = ifp->if_flags;
DC_UNLOCK(sc);
- error = 0;
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
DC_LOCK(sc);
- dc_setfilt(sc);
+ if (ifp->if_drv_flags & IFF_DRV_RUNNING)
+ dc_setfilt(sc);
DC_UNLOCK(sc);
- error = 0;
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
OpenPOWER on IntegriCloud