#include "Snp.h"\r
\r
/**\r
- this routine calls undi to receive a packet and fills in the data in the\r
- input pointers!\r
-\r
- @param Snp pointer to snp driver structure\r
- @param Buffer pointer to the memory for the received data\r
- @param BufferSize is a pointer to the length of the buffer on entry and\r
- contains the length of the received data on return\r
- @param HeaderSize pointer to the header portion of the data received.\r
- @param SrcAddr optional parameter, is a pointer to contain the\r
- source ethernet address on return\r
- @param DestAddr optional parameter, is a pointer to contain the\r
- destination ethernet address on return\r
- @param Protocol optional parameter, is a pointer to contain the\r
- protocol type from the ethernet header on return\r
+ Call UNDI to receive a packet and fills in the data in the input pointers.\r
\r
+ @param Snp Pointer to snp driver structure\r
+ @param Buffer Pointer to the memory for the received data\r
+ @param BufferSize Pointer to the length of the buffer on entry and contains\r
+ the length of the received data on return\r
+ @param HeaderSize Pointer to the header portion of the data received.\r
+ @param SrcAddr Pointer to contain the source ethernet address on return \r
+ @param DestAddr Pointer to contain the destination ethernet address on \r
+ return\r
+ @param Protocol Pointer to contain the protocol type from the ethernet \r
+ header on return\r
+\r
+\r
+ @retval EFI_SUCCESS The received data was stored in Buffer, and \r
+ BufferSize has been updated to the number of \r
+ bytes received.\r
+ @retval EFI_DEVICE_ERROR Fail to execute UNDI command. \r
+ @retval EFI_NOT_READY No packets have been received on the network \r
+ interface.\r
+ @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the received \r
+ packets. BufferSize has been updated to the\r
+ required size.\r
\r
**/\r
EFI_STATUS\r
//\r
// Issue UNDI command and check result.\r
//\r
- DEBUG ((EFI_D_NET, "\nsnp->undi.receive () "));\r
+ DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.receive () "));\r
\r
(*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
\r
\r
case PXE_STATCODE_NO_DATA:\r
DEBUG (\r
- (EFI_D_NET,\r
+ (EFI_D_ERROR | EFI_D_NET,\r
"\nsnp->undi.receive () %xh:%xh\n",\r
Snp->Cdb.StatFlags,\r
Snp->Cdb.StatCode)\r
\r
default:\r
DEBUG (\r
- (EFI_D_ERROR,\r
+ (EFI_D_ERROR | EFI_D_NET,\r
"\nsnp->undi.receive() %xh:%xh\n",\r
Snp->Cdb.StatFlags,\r
Snp->Cdb.StatCode)\r
}\r
\r
if (Protocol != NULL) {\r
- *Protocol = (UINT16) PXE_SWAP_UINT16 (Db->Protocol); /* we need to do the byte swapping */\r
+ //\r
+ // We need to do the byte swapping\r
+ //\r
+ *Protocol = (UINT16) PXE_SWAP_UINT16 (Db->Protocol);\r
}\r
\r
return (*BufferSize <= BuffSize) ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL;\r