|
TianoCore EDK2 master
|
#include "UsbRndis.h"Go to the source code of this file.
Variables | |
| EFI_DRIVER_BINDING_PROTOCOL | gUsbRndisDriverBinding |
This file contains code for USB Remote Network Driver Interface Spec. Driver Binding
Copyright (c) 2023, American Megatrends International LLC. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file UsbRndis.c.
| EFI_STATUS EFIAPI CheckandStopRndisDevice | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
| IN EFI_HANDLE | ControllerHandle | ||
| ) |
CheckandStopRndisDevice
| [in] | This | Protocol instance pointer. |
| [in] | ControllerHandle | Handle of device to bind driver to. |
| EFI_SUCCESS | This driver is added to ControllerHandle |
| EFI_DEVICE_ERROR | This driver could not be started due to a device error |
| other | This driver does not support this device |
Definition at line 746 of file UsbRndis.c.
| VOID FindMatchingCdcData | ( | IN USB_RNDIS_DEVICE * | UsbRndisDevice | ) |
For the given Rndis Device, find a matching CDC device already exists or not. If found update the handle and UsbIO protocol.
| [in] | UsbRndisDevice | A pointer to the USB_RNDIS_DEVICE data. |
Definition at line 297 of file UsbRndis.c.
| EFI_STATUS EFIAPI FindMatchingRndisDev | ( | IN EFI_HANDLE | CdcHandle, |
| OUT EFI_USB_IO_PROTOCOL ** | CdcUsbIo, | ||
| OUT EFI_HANDLE * | RndisHandle | ||
| ) |
For the given UsbIo CdcData, find a matching RNDIS device already exists or not.
| [in] | CdcHandle | A pointer to the EFI_HANDLE for USB CDC Data. |
| [out] | CdcUsbIo | A pointer for retrieve the EFI_USB_IO_PROTOCOL instance. |
| [out] | RndisHandle | A pointer for retrieve the handle of RNDIS device. |
| EFI_SUCCESS | The USB_RNDIS_DEVICE matching this CDC Data is found. |
| EFI_NOT_FOUND | The USB_RNDIS_DEVICE matching this CDC Data is not found. |
Definition at line 382 of file UsbRndis.c.
| BOOLEAN IsRndisInterface | ( | IN EFI_USB_IO_PROTOCOL * | UsbIo | ) |
Check if this interface is USB Rndis SubType but not CDC Data interface
| [in] | UsbIo | A pointer to the EFI_USB_IO_PROTOCOL instance. |
| TRUE | USB Rndis SubType. |
| FALSE | Not USB Rndis SubType. |
Definition at line 69 of file UsbRndis.c.
| EFI_STATUS IsSameDevice | ( | IN EFI_DEVICE_PATH_PROTOCOL * | UsbRndisDataPath, |
| IN EFI_DEVICE_PATH_PROTOCOL * | UsbCdcDataPath | ||
| ) |
Check if the USB RNDIS and USB CDC Data interfaces are from the same device.
| [in] | UsbRndisDataPath | A pointer to the EFI_DEVICE_PATH_PROTOCOL instance. |
| [in] | UsbCdcDataPath | A pointer to the EFI_DEVICE_PATH_PROTOCOL instance. |
| EFI_SUCCESS | Is the same device. |
| EFI_UNSUPPORTED | Is not the same device. |
Definition at line 107 of file UsbRndis.c.
| BOOLEAN IsSupportedDevice | ( | IN EFI_USB_IO_PROTOCOL * | UsbIo | ) |
Check if this interface is USB Rndis SubType
| [in] | UsbIo | A pointer to the EFI_USB_IO_PROTOCOL instance. |
| TRUE | USB Rndis SubType. |
| FALSE | Not USB Rndis SubType. |
Definition at line 30 of file UsbRndis.c.
| BOOLEAN IsUsbCdcData | ( | IN EFI_USB_IO_PROTOCOL * | UsbIo | ) |
Check if the USB CDC Data(UsbIo) installed and return USB CDC Data Handle.
| [in] | UsbIo | A pointer to the EFI_USB_IO_PROTOCOL instance. |
| TRUE | USB CDC Data(UsbIo) installed. |
| FALSE | USB CDC Data(UsbIo) did not installed. |
Definition at line 145 of file UsbRndis.c.
| BOOLEAN IsUsbRndis | ( | IN EFI_USB_IO_PROTOCOL * | UsbIo | ) |
Check if the USB Rndis(UsbIo) installed
| [in] | UsbIo | A pointer to the EFI_USB_IO_PROTOCOL instance. |
| TRUE | USB Rndis(UsbIo) installed. |
| FALSE | USB Rndis(UsbIo) did not installed. |
Definition at line 178 of file UsbRndis.c.
| EFI_STATUS UpdateRndisDevice | ( | IN EFI_DEVICE_PATH_PROTOCOL * | UsbCdcDataPath, |
| OUT USB_RNDIS_DEVICE ** | UsbRndisDevice | ||
| ) |
Control comes here when a CDC device is found.Check if a RNDIS interface is already found for this device or not. For one device two USBIO will be installed each for CDC and RNDIS interface.
| [in] | UsbCdcDataPath | A pointer to the EFI_DEVICE_PATH_PROTOCOL instance. |
| [out] | UsbRndisDevice | A pointer to the USB_RNDIS_DEVICE Data. |
| EFI_SUCCESS | The USB_RNDIS_DEVICE matching this CDC Data is found. |
| EFI_NOT_FOUND | The USB_RNDIS_DEVICE matching this CDC Data is not found. |
Definition at line 213 of file UsbRndis.c.
| EFI_STATUS EFIAPI UsbRndisDriverStart | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
| IN EFI_HANDLE | ControllerHandle, | ||
| IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
| ) |
USB RNDIS Driver Binding Start.
| [in] | This | Protocol instance pointer. |
| [in] | ControllerHandle | Handle of device to bind driver to. |
| [in] | RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
| EFI_SUCCESS | This driver is added to ControllerHandle |
| EFI_DEVICE_ERROR | This driver could not be started due to a device error |
| EFI_OUT_OF_RESOURCES | The driver could not install successfully due to a lack of resources. |
| other | This driver does not support this device |
Definition at line 518 of file UsbRndis.c.
| EFI_STATUS EFIAPI UsbRndisDriverStop | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
| IN EFI_HANDLE | ControllerHandle, | ||
| IN UINTN | NumberOfChildren, | ||
| IN EFI_HANDLE * | ChildHandleBuffer | ||
| ) |
USB Rndis Driver Binding Stop.
| [in] | This | Protocol instance pointer. |
| [in] | ControllerHandle | Handle of device to stop driver on |
| [in] | NumberOfChildren | Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. |
| [in] | ChildHandleBuffer | List of Child Handles to Stop. |
| EFI_SUCCESS | This driver is removed ControllerHandle |
| other | This driver was not removed from this device |
Definition at line 795 of file UsbRndis.c.
| EFI_STATUS EFIAPI UsbRndisDriverSupported | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
| IN EFI_HANDLE | ControllerHandle, | ||
| IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
| ) |
USB Rndis Driver Binding Support.
| [in] | This | Protocol instance pointer. |
| [in] | ControllerHandle | Handle of device to test. |
| [in] | RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
| EFI_SUCCESS | This driver supports this device. |
| EFI_ALREADY_STARTED | This driver is already running on this device. |
| other | This driver does not support this device. |
Definition at line 470 of file UsbRndis.c.
| EFI_STATUS EFIAPI UsbRndisEntry | ( | IN EFI_HANDLE | ImageHandle, |
| IN EFI_SYSTEM_TABLE * | SystemTable | ||
| ) |
Entrypoint of RNDIS Driver.
This function is the entrypoint of RNDIS Driver. It installs Driver Binding Protocols together with Component Name Protocols.
| [in] | ImageHandle | The firmware allocated handle for the EFI image. |
| [in] | SystemTable | A pointer to the EFI System Table. |
| EFI_SUCCESS | The entry point is executed successfully. |
Definition at line 870 of file UsbRndis.c.
| EFI_DRIVER_BINDING_PROTOCOL gUsbRndisDriverBinding |
Definition at line 11 of file UsbRndis.c.