Changeset View
Changeset View
Standalone View
Standalone View
head/stand/efi/libefi/efinet.c
Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Lines | efinet_init(struct iodesc *desc, void *machdep_hint) | ||||
efi_env_net_params(desc); | efi_env_net_params(desc); | ||||
if (nif->nif_driver->netif_ifs[nif->nif_unit].dif_unit < 0) { | if (nif->nif_driver->netif_ifs[nif->nif_unit].dif_unit < 0) { | ||||
printf("Invalid network interface %d\n", nif->nif_unit); | printf("Invalid network interface %d\n", nif->nif_unit); | ||||
return; | return; | ||||
} | } | ||||
h = nif->nif_driver->netif_ifs[nif->nif_unit].dif_private; | h = nif->nif_driver->netif_ifs[nif->nif_unit].dif_private; | ||||
status = BS->HandleProtocol(h, &sn_guid, (VOID **)&nif->nif_devdata); | status = OpenProtocolByHandle(h, &sn_guid, (void **)&nif->nif_devdata); | ||||
if (status != EFI_SUCCESS) { | if (status != EFI_SUCCESS) { | ||||
printf("net%d: cannot fetch interface data (status=%lu)\n", | printf("net%d: cannot fetch interface data (status=%lu)\n", | ||||
nif->nif_unit, EFI_ERROR_CODE(status)); | nif->nif_unit, EFI_ERROR_CODE(status)); | ||||
return; | return; | ||||
} | } | ||||
net = nif->nif_devdata; | net = nif->nif_devdata; | ||||
if (net->Mode->State == EfiSimpleNetworkStopped) { | if (net->Mode->State == EfiSimpleNetworkStopped) { | ||||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |