/** @file\r
Implementation of Managed Network Protocol public services.\r
\r
-Copyright (c) 2005 - 2009, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions\r
-of the BSD License which accompanies this distribution. The full\r
-text of the license may be found at<BR>\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
EFI_SIMPLE_NETWORK_PROTOCOL *Snp;\r
EFI_TPL OldTpl;\r
EFI_STATUS Status;\r
+ UINT32 InterruptStatus;\r
\r
if (This == NULL) {\r
return EFI_INVALID_PARAMETER;\r
// Copy the underlayer Snp mode data.\r
//\r
Snp = Instance->MnpServiceData->MnpDeviceData->Snp;\r
+\r
+ //\r
+ // Upon successful return of GetStatus(), the Snp->Mode->MediaPresent\r
+ // will be updated to reflect any change of media status\r
+ //\r
+ Snp->GetStatus (Snp, &InterruptStatus, NULL);\r
CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData));\r
}\r
\r
//\r
// Build the tx packet\r
//\r
- MnpBuildTxPacket (MnpServiceData, Token->Packet.TxData, &PktBuf, &PktLen);\r
+ Status = MnpBuildTxPacket (MnpServiceData, Token->Packet.TxData, &PktBuf, &PktLen);\r
+ if (EFI_ERROR (Status)) {\r
+ goto ON_EXIT;\r
+ }\r
\r
//\r
// OK, send the packet synchronously.\r