diff options
author | Oleg Ilyasov <olegi@ami.com> | 2024-10-16 14:27:11 -0400 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-10-22 05:40:04 +0000 |
commit | 7b3969c95160a35255743c6220572401b64c6eb7 (patch) | |
tree | 0915c7e170fda4380e1a35960f17de0e2c60aa98 /MdeModulePkg | |
parent | e2ab098e6599afaa2d4212a3ee007718b4df4869 (diff) | |
download | edk2-7b3969c95160a35255743c6220572401b64c6eb7.tar.gz edk2-7b3969c95160a35255743c6220572401b64c6eb7.tar.bz2 edk2-7b3969c95160a35255743c6220572401b64c6eb7.zip |
MdeModulePkg UsbNetwork: Use USB class definition from MdePkg
- Class specific types for interface and endpoint are generic
- Definitions are in IndustryStandard/Usb.h
- Remove type redefinitions
- Update references to the descriptor types
Signed-off-by: Oleg Ilyasov <olegi@ami.com>
Diffstat (limited to 'MdeModulePkg')
4 files changed, 3 insertions, 7 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcEcm/UsbEcmFunction.c b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcEcm/UsbEcmFunction.c index 0c1f252b85..dc78466e0d 100644 --- a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcEcm/UsbEcmFunction.c +++ b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcEcm/UsbEcmFunction.c @@ -111,7 +111,7 @@ GetFunctionalDescriptor ( for (Offset = 0; NextDescriptor (Config, &Offset);) {
Interface = (EFI_USB_INTERFACE_DESCRIPTOR *)((UINT8 *)Config + Offset);
- if (Interface->DescriptorType == CS_INTERFACE) {
+ if (Interface->DescriptorType == USB_DESC_TYPE_CS_INTERFACE) {
if (((USB_HEADER_FUN_DESCRIPTOR *)Interface)->DescriptorSubtype == FunDescriptorType) {
switch (FunDescriptorType) {
case HEADER_FUN_DESCRIPTOR:
diff --git a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcNcm/UsbNcmFunction.c b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcNcm/UsbNcmFunction.c index ef01a6f545..4b6e0d2547 100644 --- a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcNcm/UsbNcmFunction.c +++ b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbCdcNcm/UsbNcmFunction.c @@ -111,7 +111,7 @@ GetFunctionalDescriptor ( for (Offset = 0; NextDescriptor (Config, &Offset);) {
Interface = (EFI_USB_INTERFACE_DESCRIPTOR *)((UINT8 *)Config + Offset);
- if (Interface->DescriptorType == CS_INTERFACE) {
+ if (Interface->DescriptorType == USB_DESC_TYPE_CS_INTERFACE) {
if (((USB_HEADER_FUN_DESCRIPTOR *)Interface)->DescriptorSubtype == FunDescriptorType) {
switch (FunDescriptorType) {
case HEADER_FUN_DESCRIPTOR:
diff --git a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbRndis/UsbRndisFunction.c b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbRndis/UsbRndisFunction.c index 6d45a1b775..8723a8221f 100644 --- a/MdeModulePkg/Bus/Usb/UsbNetwork/UsbRndis/UsbRndisFunction.c +++ b/MdeModulePkg/Bus/Usb/UsbNetwork/UsbRndis/UsbRndisFunction.c @@ -123,7 +123,7 @@ GetFunctionalDescriptor ( for (Offset = 0; NextDescriptor (Config, &Offset);) {
Interface = (EFI_USB_INTERFACE_DESCRIPTOR *)((UINT8 *)Config + Offset);
- if (Interface->DescriptorType == CS_INTERFACE) {
+ if (Interface->DescriptorType == USB_DESC_TYPE_CS_INTERFACE) {
if (((USB_HEADER_FUN_DESCRIPTOR *)Interface)->DescriptorSubtype == FunDescriptorType) {
switch (FunDescriptorType) {
case HEADER_FUN_DESCRIPTOR:
diff --git a/MdeModulePkg/Include/Protocol/UsbEthernetProtocol.h b/MdeModulePkg/Include/Protocol/UsbEthernetProtocol.h index 250de0b591..43ccca398f 100644 --- a/MdeModulePkg/Include/Protocol/UsbEthernetProtocol.h +++ b/MdeModulePkg/Include/Protocol/UsbEthernetProtocol.h @@ -28,10 +28,6 @@ typedef struct _EDKII_USB_ETHERNET_PROTOCOL EDKII_USB_ETHERNET_PROTOCOL; #define USB_RNDIS_SUBCLASS 0x04
#define USB_RNDIS_ETHERNET_PROTOCOL 0x01
-// Type Values for the DescriptorType Field
-#define CS_INTERFACE 0x24
-#define CS_ENDPOINT 0x25
-
// Descriptor SubType in Functional Descriptors
#define HEADER_FUN_DESCRIPTOR 0x00
#define UNION_FUN_DESCRIPTOR 0x06
|