summaryrefslogtreecommitdiffstats
path: root/sys/dev/msk/if_msk.c
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2011-05-23 21:56:04 +0000
committeryongari <yongari@FreeBSD.org>2011-05-23 21:56:04 +0000
commitb19607cc53e9de5f1fcf081ab995ef5a32cf2d78 (patch)
treec49150e8efffae2072904d445073a819bced4c55 /sys/dev/msk/if_msk.c
parent11e70b7227e685ac5ece2c8af153914a696ab5c6 (diff)
downloadFreeBSD-src-b19607cc53e9de5f1fcf081ab995ef5a32cf2d78.zip
FreeBSD-src-b19607cc53e9de5f1fcf081ab995ef5a32cf2d78.tar.gz
When MTU is changed, check whether driver should be reinitialized or
not. If reinitialized is required, clear driver running flag.
Diffstat (limited to 'sys/dev/msk/if_msk.c')
-rw-r--r--sys/dev/msk/if_msk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c
index 74264da..2adbf1c 100644
--- a/sys/dev/msk/if_msk.c
+++ b/sys/dev/msk/if_msk.c
@@ -1034,7 +1034,10 @@ msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
}
ifp->if_mtu = ifr->ifr_mtu;
- msk_init_locked(sc_if);
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+ msk_init_locked(sc_if);
+ }
}
MSK_IF_UNLOCK(sc_if);
break;
OpenPOWER on IntegriCloud