Do not reinitialize controller whenever promiscuous mode or
allmulti is toggled. Controller does not require reinitialization. This removes unnecessary controller reinitialization whenever tcpdump is used. While I'm here remove unnecessary variable reinitialization.
This commit is contained in:
parent
481f78e425
commit
7e669b1d63
@ -2185,10 +2185,19 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
case SIOCSIFFLAGS:
|
||||
SIS_LOCK(sc);
|
||||
if (ifp->if_flags & IFF_UP) {
|
||||
sis_initl(sc);
|
||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 &&
|
||||
((ifp->if_flags ^ sc->sis_if_flags) &
|
||||
(IFF_PROMISC | IFF_ALLMULTI)) != 0) {
|
||||
if (sc->sis_type == SIS_TYPE_83815)
|
||||
sis_setmulti_ns(sc);
|
||||
else
|
||||
sis_setmulti_sis(sc);
|
||||
} else
|
||||
sis_initl(sc);
|
||||
} else if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
|
||||
sis_stop(sc);
|
||||
}
|
||||
sc->sis_if_flags = ifp->if_flags;
|
||||
SIS_UNLOCK(sc);
|
||||
error = 0;
|
||||
break;
|
||||
@ -2200,7 +2209,6 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
else
|
||||
sis_setmulti_sis(sc);
|
||||
SIS_UNLOCK(sc);
|
||||
error = 0;
|
||||
break;
|
||||
case SIOCGIFMEDIA:
|
||||
case SIOCSIFMEDIA:
|
||||
|
@ -471,6 +471,7 @@ struct sis_softc {
|
||||
bus_addr_t sis_tx_paddr;
|
||||
struct callout sis_stat_ch;
|
||||
int sis_watchdog_timer;
|
||||
int sis_if_flags;
|
||||
#ifdef DEVICE_POLLING
|
||||
int rxcycles;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user