TianoCore EDK2 master
Loading...
Searching...
No Matches
SnpStart.c
Go to the documentation of this file.
1
13
14#include "VirtioNet.h"
15
32EFIAPI
35 )
36{
37 VNET_DEV *Dev;
38 EFI_TPL OldTpl;
39 EFI_STATUS Status;
40
41 if (This == NULL) {
42 return EFI_INVALID_PARAMETER;
43 }
44
45 Dev = VIRTIO_NET_FROM_SNP (This);
46 OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
47 if (Dev->Snm.State != EfiSimpleNetworkStopped) {
48 Status = EFI_ALREADY_STARTED;
49 } else {
50 Dev->Snm.State = EfiSimpleNetworkStarted;
51 Status = EFI_SUCCESS;
52 }
53
54 gBS->RestoreTPL (OldTpl);
55 return Status;
56}
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
EFI_STATUS EFIAPI VirtioNetStart(IN EFI_SIMPLE_NETWORK_PROTOCOL *This)
Definition: SnpStart.c:33
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
UINTN EFI_TPL
Definition: UefiBaseType.h:41
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS