/** @file
Implementation of shuting down a network adapter.
Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed
and made available under the terms and conditions of the BSD License which
accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "Snp.h"
/**
Call UNDI to shut down the interface.
@param Snp Pointer to snp driver structure.
@retval EFI_SUCCESS UNDI is shut down successfully.
@retval EFI_DEVICE_ERROR UNDI could not be shut down.
**/
)
{
//
// Issue UNDI command and check result.
//
//
// UNDI could not be shutdown. Return UNDI error.
//
return EFI_DEVICE_ERROR;
}
//
// Free allocated memory.
//
);
}
Snp->TxRxBufferSize = 0;
return EFI_SUCCESS;
}
/**
Resets a network adapter and leaves it in a state that is safe for another
driver to initialize.
This function releases the memory buffers assigned in the Initialize() call.
Pending transmits and receives are lost, and interrupts are cleared and disabled.
After this call, only the Initialize() and Stop() calls may be used. If the
network interface was successfully shutdown, then EFI_SUCCESS will be returned.
If the driver has not been initialized, EFI_DEVICE_ERROR will be returned.
@param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
@retval EFI_SUCCESS The network interface was shutdown.
@retval EFI_NOT_STARTED The network interface has not been started.
@retval EFI_INVALID_PARAMETER This parameter was NULL or did not point to a valid
EFI_SIMPLE_NETWORK_PROTOCOL structure.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
**/
)
{
//
// Get pointer to SNP driver instance for *This.
//
return EFI_INVALID_PARAMETER;
}
//
// Return error if the SNP is not initialized.
//
break;
case EfiSimpleNetworkStopped:
goto ON_EXIT;
default:
goto ON_EXIT;
}
CopyMem (
sizeof (EFI_MAC_ADDRESS)
);
return Status;
}