]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c
1). Fix the debug level for DEBUG macro
[mirror_edk2.git] / MdeModulePkg / Universal / Network / SnpDxe / Receive_filters.c
index db116330cd15207fcc04e61b727e6c5105bff3a3..24e89c5b484786ce5a6d40aaf33cb5827aa8931f 100644 (file)
@@ -1,21 +1,16 @@
 /** @file\r
-Copyright (c) 2004 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
+    Implementation of managing the multicast receive filters of a network\r
+    interface.\r
+\r
+Copyright (c) 2004 - 2007, Intel Corporation.<BR> All rights reserved. This \r
+program and the accompanying materials are licensed and made available under the \r
+terms and conditions of the BSD License which accompanies this distribution. The \r
+full text of the license may be found at \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
 \r
-Module name:\r
-  receive_filters.c\r
-\r
-Abstract:\r
-\r
-Revision history:\r
-  2000-Feb-17 M(f)J   Genesis.\r
-\r
 **/\r
 \r
 \r
@@ -23,14 +18,18 @@ Revision history:
 #include "Snp.h"\r
 \r
 /**\r
-  this routine calls undi to enable the receive filters.\r
-\r
-  @param  Snp                pointer to snp driver structure\r
-  @param  EnableFlags        bit mask for enabling the receive filters\r
-  @param  MCastAddressCount  multicast address count for a new multicast address\r
-                             list\r
-  @param  MCastAddressList   list of new multicast addresses\r
+  Call undi to enable the receive filters.\r
 \r
+  @param  Snp                Pointer to snp driver structure.\r
+  @param  EnableFlags        Bit mask for enabling the receive filters.\r
+  @param  MCastAddressCount  Multicast address count for a new multicast address\r
+                             list.\r
+  @param  MCastAddressList   List of new multicast addresses. \r
+   \r
+  @retval EFI_SUCCESS           The multicast receive filter list was updated.\r
+  @retval EFI_INVALID_PARAMETER Invalid UNDI command.\r
+  @retval EFI_UNSUPPORTED       Command is not supported by UNDI.\r
+  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -80,7 +79,7 @@ PxeRecvFilterEnable (
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -112,14 +111,17 @@ PxeRecvFilterEnable (
 }\r
 \r
 /**\r
-  this routine calls undi to disable the receive filters.\r
+  Call undi to disable the receive filters.\r
 \r
-  @param  Snp                pointer to snp driver structure\r
-  @param  DisableFlags       bit mask for disabling the receive filters\r
-  @param  ResetMCastList     boolean flag to reset/delete the multicast filter list\r
+  @param  Snp             Pointer to snp driver structure\r
+  @param  DisableFlags    Bit mask for disabling the receive filters\r
+  @param  ResetMCastList  Boolean flag to reset/delete the multicast filter \r
+                          list.\r
 \r
-\r
-**/\r
+  @retval EFI_SUCCESS           The multicast receive filter list was updated.\r
+  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command.\r
+   \r
+**/ \r
 EFI_STATUS\r
 PxeRecvFilterDisable (\r
   SNP_DRIVER *Snp,\r
@@ -165,7 +167,7 @@ PxeRecvFilterDisable (
   //\r
   // Issue UNDI command and check result.\r
   //\r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r
@@ -174,7 +176,7 @@ PxeRecvFilterDisable (
     // UNDI command failed.  Return UNDI status to caller.\r
     //\r
     DEBUG (\r
-      (EFI_D_ERROR,\r
+      (EFI_D_ERROR | EFI_D_NET,\r
       "\nsnp->undi.receive_filters()  %xh:%xh\n",\r
       Snp->Cdb.StatFlags,\r
       Snp->Cdb.StatCode)\r
@@ -187,11 +189,13 @@ PxeRecvFilterDisable (
 }\r
 \r
 /**\r
-  this routine calls undi to read the receive filters.\r
-\r
-  @param  Snp                pointer to snp driver structure\r
+  Call undi to read the receive filters.\r
 \r
+  @param  Snp                Pointer to snp driver structure.\r
 \r
+  @retval EFI_SUCCESS           The receive filter was read.\r
+  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command. \r
+   \r
 **/\r
 EFI_STATUS\r
 PxeRecvFilterRead (\r
@@ -215,7 +219,7 @@ PxeRecvFilterRead (
   Snp->Cdb.IFnum      = Snp->IfNum;\r
   Snp->Cdb.Control    = PXE_CONTROL_LAST_CDB_IN_LIST;\r
 \r
-  DEBUG ((EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
+  DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.receive_filters()  "));\r
 \r
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
 \r