Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/cxgbe/t4_main.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 1,630 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
struct sbuf *sb; | struct sbuf *sb; | ||||
vi->xact_addr_filt = -1; | vi->xact_addr_filt = -1; | ||||
callout_init(&vi->tick, 1); | callout_init(&vi->tick, 1); | ||||
/* Allocate an ifnet and set it up */ | /* Allocate an ifnet and set it up */ | ||||
ifp = if_alloc(IFT_ETHER); | ifp = if_alloc_dev(IFT_ETHER, dev); | ||||
if (ifp == NULL) { | if (ifp == NULL) { | ||||
device_printf(dev, "Cannot allocate ifnet\n"); | device_printf(dev, "Cannot allocate ifnet\n"); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} | } | ||||
vi->ifp = ifp; | vi->ifp = ifp; | ||||
ifp->if_softc = vi; | ifp->if_softc = vi; | ||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev)); | if_initname(ifp, device_get_name(dev), device_get_unit(dev)); | ||||
▲ Show 20 Lines • Show All 9,203 Lines • Show Last 20 Lines |