TianoCore EDK2 master
|
#include "UsbCdcNcm.h"
Go to the source code of this file.
Functions | |
BOOLEAN | IsSupportedDevice (IN EFI_USB_IO_PROTOCOL *UsbIo) |
EFI_STATUS EFIAPI | UsbNcmDriverSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath) |
EFI_STATUS | IsSameDevice (IN EFI_DEVICE_PATH_PROTOCOL *UsbEthPath, IN EFI_DEVICE_PATH_PROTOCOL *UsbCdcDataPath) |
BOOLEAN | IsUsbCdcData (IN EFI_DEVICE_PATH_PROTOCOL *UsbEthPath, IN OUT EFI_HANDLE *UsbCdcDataHandle) |
VOID EFIAPI | CallbackFunction (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | UsbNcmDriverStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath) |
EFI_STATUS EFIAPI | UsbNcmDriverStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer) |
EFI_STATUS EFIAPI | UsbNcmEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
EFI_DRIVER_BINDING_PROTOCOL | gUsbNcmDriverBinding |
This file contains code for USB Network Control Model binding driver
Copyright (c) 2023, American Megatrends International LLC. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file UsbCdcNcm.c.
Call Back Function.
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | The pointer to the notification function's context, which is implementation-dependent. |
Definition at line 231 of file UsbCdcNcm.c.
EFI_STATUS IsSameDevice | ( | IN EFI_DEVICE_PATH_PROTOCOL * | UsbEthPath, |
IN EFI_DEVICE_PATH_PROTOCOL * | UsbCdcDataPath | ||
) |
Check if the USB NCM and USB CDC Data interfaces are from the same device.
[in] | UsbEthPath | 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_NOT_FOUND | Is not the same device. |
Definition at line 110 of file UsbCdcNcm.c.
BOOLEAN IsSupportedDevice | ( | IN EFI_USB_IO_PROTOCOL * | UsbIo | ) |
Check if this interface is USB NCM SubType
[in] | UsbIo | A pointer to the EFI_USB_IO_PROTOCOL instance. |
TRUE | USB NCM SubType. |
FALSE | Not USB NCM SubType. |
Definition at line 30 of file UsbCdcNcm.c.
BOOLEAN IsUsbCdcData | ( | IN EFI_DEVICE_PATH_PROTOCOL * | UsbEthPath, |
IN OUT EFI_HANDLE * | UsbCdcDataHandle | ||
) |
Check if the USB CDC Data(UsbIo) installed and return USB CDC Data Handle.
[in] | UsbEthPath | A pointer to the EFI_DEVICE_PATH_PROTOCOL instance. |
[in,out] | UsbCdcDataHandle | A pointer to the EFI_HANDLE for USB CDC Data. |
TRUE | USB CDC Data(UsbIo) installed. |
FALSE | USB CDC Data(UsbIo) did not installed. |
Definition at line 160 of file UsbCdcNcm.c.
EFI_STATUS EFIAPI UsbNcmDriverStart | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | ControllerHandle, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
USB NCM 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 293 of file UsbCdcNcm.c.
EFI_STATUS EFIAPI UsbNcmDriverStop | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | ControllerHandle, | ||
IN UINTN | NumberOfChildren, | ||
IN EFI_HANDLE * | ChildHandleBuffer | ||
) |
USB NCM 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 430 of file UsbCdcNcm.c.
EFI_STATUS EFIAPI UsbNcmDriverSupported | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | ControllerHandle, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
USB NCM 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 67 of file UsbCdcNcm.c.
EFI_STATUS EFIAPI UsbNcmEntry | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entrypoint of NCM Driver.
This function is the entrypoint of NCM 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 490 of file UsbCdcNcm.c.
EFI_DRIVER_BINDING_PROTOCOL gUsbNcmDriverBinding |
Definition at line 11 of file UsbCdcNcm.c.