Home | History | Annotate | Download | only in VirtioNetDxe
      1 /** @file
      2 
      3   Empty implementation of the SNP methods that dependent protocols don't
      4   absolutely need and the UEFI-2.3.1+errC specification allows us not to
      5   support.
      6 
      7   Copyright (C) 2013, Red Hat, Inc.
      8   Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
      9 
     10   This program and the accompanying materials are licensed and made available
     11   under the terms and conditions of the BSD License which accompanies this
     12   distribution. The full text of the license may be found at
     13   http://opensource.org/licenses/bsd-license.php
     14 
     15   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
     16   WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     17 
     18 **/
     19 
     20 #include "VirtioNet.h"
     21 
     22 /**
     23   Resets a network adapter and re-initializes it with the parameters that were
     24   provided in the previous call to Initialize().
     25 
     26   @param  This                 The protocol instance pointer.
     27   @param  ExtendedVerification Indicates that the driver may perform a more
     28                                exhaustive verification operation of the device
     29                                during reset.
     30 
     31   @retval EFI_SUCCESS           The network interface was reset.
     32   @retval EFI_NOT_STARTED       The network interface has not been started.
     33   @retval EFI_INVALID_PARAMETER One or more of the parameters has an
     34                                 unsupported value.
     35   @retval EFI_DEVICE_ERROR      The command could not be sent to the network
     36                                 interface.
     37   @retval EFI_UNSUPPORTED       This function is not supported by the network
     38                                 interface.
     39 
     40 **/
     41 
     42 EFI_STATUS
     43 EFIAPI
     44 VirtioNetReset (
     45   IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
     46   IN BOOLEAN                     ExtendedVerification
     47   )
     48 {
     49   return EFI_UNSUPPORTED;
     50 }
     51 
     52 
     53 /**
     54   Modifies or resets the current station address, if supported.
     55 
     56   @param  This  The protocol instance pointer.
     57   @param  Reset Flag used to reset the station address to the network
     58                 interfaces permanent address.
     59   @param  New   The new station address to be used for the network interface.
     60 
     61   @retval EFI_SUCCESS           The network interfaces station address was
     62                                 updated.
     63   @retval EFI_NOT_STARTED       The network interface has not been started.
     64   @retval EFI_INVALID_PARAMETER One or more of the parameters has an
     65                                 unsupported value.
     66   @retval EFI_DEVICE_ERROR      The command could not be sent to the network
     67                                 interface.
     68   @retval EFI_UNSUPPORTED       This function is not supported by the network
     69                                 interface.
     70 
     71 **/
     72 
     73 EFI_STATUS
     74 EFIAPI
     75 VirtioNetStationAddress (
     76   IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
     77   IN BOOLEAN                     Reset,
     78   IN EFI_MAC_ADDRESS             *New OPTIONAL
     79   )
     80 {
     81   return EFI_UNSUPPORTED;
     82 }
     83 
     84 
     85 /**
     86   Resets or collects the statistics on a network interface.
     87 
     88   @param  This            Protocol instance pointer.
     89   @param  Reset           Set to TRUE to reset the statistics for the network
     90                           interface.
     91   @param  StatisticsSize  On input the size, in bytes, of StatisticsTable. On
     92                           output the size, in bytes, of the resulting table of
     93                           statistics.
     94   @param  StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure
     95                           that contains the statistics.
     96 
     97   @retval EFI_SUCCESS           The statistics were collected from the network
     98                                 interface.
     99   @retval EFI_NOT_STARTED       The network interface has not been started.
    100   @retval EFI_BUFFER_TOO_SMALL  The Statistics buffer was too small. The
    101                                 current buffer size needed to hold the
    102                                 statistics is returned in StatisticsSize.
    103   @retval EFI_INVALID_PARAMETER One or more of the parameters has an
    104                                 unsupported value.
    105   @retval EFI_DEVICE_ERROR      The command could not be sent to the network
    106                                 interface.
    107   @retval EFI_UNSUPPORTED       This function is not supported by the network
    108                                 interface.
    109 
    110 **/
    111 
    112 EFI_STATUS
    113 EFIAPI
    114 VirtioNetStatistics (
    115   IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
    116   IN BOOLEAN                     Reset,
    117   IN OUT UINTN                   *StatisticsSize   OPTIONAL,
    118   OUT EFI_NETWORK_STATISTICS     *StatisticsTable  OPTIONAL
    119   )
    120 {
    121   return EFI_UNSUPPORTED;
    122 }
    123 
    124 
    125 /**
    126   Performs read and write operations on the NVRAM device attached to a  network
    127   interface.
    128 
    129   @param  This       The protocol instance pointer.
    130   @param  ReadWrite  TRUE for read operations, FALSE for write operations.
    131   @param  Offset     Byte offset in the NVRAM device at which to start the read
    132                      or write operation. This must be a multiple of
    133                      NvRamAccessSize and less than NvRamSize.
    134   @param  BufferSize The number of bytes to read or write from the NVRAM
    135                      device. This must also be a multiple of NvramAccessSize.
    136   @param  Buffer     A pointer to the data buffer.
    137 
    138   @retval EFI_SUCCESS           The NVRAM access was performed.
    139   @retval EFI_NOT_STARTED       The network interface has not been started.
    140   @retval EFI_INVALID_PARAMETER One or more of the parameters has an
    141                                 unsupported value.
    142   @retval EFI_DEVICE_ERROR      The command could not be sent to the network
    143                                 interface.
    144   @retval EFI_UNSUPPORTED       This function is not supported by the network
    145                                 interface.
    146 
    147 **/
    148 
    149 EFI_STATUS
    150 EFIAPI
    151 VirtioNetNvData (
    152   IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
    153   IN BOOLEAN                     ReadWrite,
    154   IN UINTN                       Offset,
    155   IN UINTN                       BufferSize,
    156   IN OUT VOID                    *Buffer
    157   )
    158 {
    159   return EFI_UNSUPPORTED;
    160 }
    161