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