| 1250 | } |
| 1251 | |
| 1252 | static void |
| 1253 | lagg_init(void *xsc) |
| 1254 | { |
| 1255 | struct lagg_softc *sc = (struct lagg_softc *)xsc; |
| 1256 | struct ifnet *ifp = sc->sc_ifp; |
| 1257 | struct lagg_port *lp; |
| 1258 | |
| 1259 | LAGG_XLOCK(sc); |
| 1260 | if (ifp->if_drv_flags & IFF_DRV_RUNNING) { |
| 1261 | LAGG_XUNLOCK(sc); |
| 1262 | return; |
| 1263 | } |
| 1264 | |
| 1265 | ifp->if_drv_flags |= IFF_DRV_RUNNING; |
| 1266 | |
| 1267 | /* |
| 1268 | * Update the port lladdrs if needed. |
| 1269 | * This might be if_setlladdr() notification |
| 1270 | * that lladdr has been changed. |
| 1271 | */ |
| 1272 | CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { |
| 1273 | if (memcmp(IF_LLADDR(ifp), IF_LLADDR(lp->lp_ifp), |
| 1274 | ifp->if_addrlen) != 0) |
| 1275 | if_setlladdr(lp->lp_ifp, IF_LLADDR(ifp), ifp->if_addrlen); |
| 1276 | } |
| 1277 | |
| 1278 | lagg_proto_init(sc); |
| 1279 | |
| 1280 | if (ifp->if_type == IFT_INFINIBAND) { |
| 1281 | mtx_lock(&sc->sc_mtx); |
| 1282 | lagg_watchdog_infiniband(sc); |
| 1283 | mtx_unlock(&sc->sc_mtx); |
| 1284 | } |
| 1285 | |
| 1286 | LAGG_XUNLOCK(sc); |
| 1287 | } |
| 1288 | |
| 1289 | static void |
| 1290 | lagg_stop(struct lagg_softc *sc) |
nothing calls this directly
no test coverage detected