View | Details | Raw Unified | Return to bug 187203 | Differences between
and this patch

Collapse All | Expand All

(-)sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c (+20 lines)
Lines 957-963 Link Here
957
957
958
	case SIOCSIFADDR:
958
	case SIOCSIFADDR:
959
	case SIOCGIFADDR:
959
	case SIOCGIFADDR:
960
#ifdef INET
961
		NV_LOCK(sc);
962
		if (ifa->ifa_addr->sa_family == AF_INET) {
963
			ifp->if_flags |= IFF_UP;
964
			if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
965
				ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
966
				if_link_state_change(ifp, LINK_STATE_DOWN);
967
				ifp->if_drv_flags |= IFF_DRV_RUNNING;
968
				ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
969
				if_link_state_change(ifp, LINK_STATE_UP);
970
			}
971
			NV_UNLOCK(sc);
972
		} else {
973
			NV_UNLOCK(sc);
974
#endif	
960
		error = ether_ioctl(ifp, cmd, data);
975
		error = ether_ioctl(ifp, cmd, data);
976
#ifdef INET
977
		}
978
#endif
961
		break;
979
		break;
962
	case SIOCSIFMTU:
980
	case SIOCSIFMTU:
963
		hn_dev = vmbus_get_devctx(sc->hn_dev);
981
		hn_dev = vmbus_get_devctx(sc->hn_dev);
Lines 1131-1136 Link Here
1131
		printf(" Closing Device ...\n");
1149
		printf(" Closing Device ...\n");
1132
1150
1133
	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
1151
	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
1152
	if_link_state_change(ifp, LINK_STATE_DOWN);
1134
	sc->hn_initdone = 0;
1153
	sc->hn_initdone = 0;
1135
1154
1136
	ret = hv_rf_on_close(device_ctx);
1155
	ret = hv_rf_on_close(device_ctx);
Lines 1180-1185 Link Here
1180
	}
1199
	}
1181
	ifp->if_drv_flags |= IFF_DRV_RUNNING;
1200
	ifp->if_drv_flags |= IFF_DRV_RUNNING;
1182
	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
1201
	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
1202
	if_link_state_change(ifp, LINK_STATE_UP);
1183
}
1203
}
1184
1204
1185
/*
1205
/*

Return to bug 187203