Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/efi/libefi/efinet.c
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | if (net == NULL) | ||||
return (-1); | return (-1); | ||||
status = net->Transmit(net, 0, len, pkt, 0, 0, 0); | status = net->Transmit(net, 0, len, pkt, 0, 0, 0); | ||||
if (status != EFI_SUCCESS) | if (status != EFI_SUCCESS) | ||||
return (-1); | return (-1); | ||||
/* Wait for the buffer to be transmitted */ | /* Wait for the buffer to be transmitted */ | ||||
do { | do { | ||||
buf = 0; /* XXX Is this needed? */ | buf = NULL; /* XXX Is this needed? */ | ||||
status = net->GetStatus(net, 0, &buf); | status = net->GetStatus(net, 0, &buf); | ||||
/* | /* | ||||
* XXX EFI1.1 and the E1000 card returns a different | * XXX EFI1.1 and the E1000 card returns a different | ||||
* address than we gave. Sigh. | * address than we gave. Sigh. | ||||
*/ | */ | ||||
} while (status == EFI_SUCCESS && buf == 0); | } while (status == EFI_SUCCESS && buf == NULL); | ||||
/* XXX How do we deal with status != EFI_SUCCESS now? */ | /* XXX How do we deal with status != EFI_SUCCESS now? */ | ||||
return ((status == EFI_SUCCESS) ? len : -1); | return ((status == EFI_SUCCESS) ? len : -1); | ||||
} | } | ||||
static int | static int | ||||
efinet_get(struct iodesc *desc, void *pkt, size_t len, time_t timeout) | efinet_get(struct iodesc *desc, void *pkt, size_t len, time_t timeout) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 236 Lines • Show Last 20 Lines |