mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
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>
This commit is contained in:
parent
e2ab098e65
commit
7b3969c951
@ -111,7 +111,7 @@ GetFunctionalDescriptor (
|
|||||||
|
|
||||||
for (Offset = 0; NextDescriptor (Config, &Offset);) {
|
for (Offset = 0; NextDescriptor (Config, &Offset);) {
|
||||||
Interface = (EFI_USB_INTERFACE_DESCRIPTOR *)((UINT8 *)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) {
|
if (((USB_HEADER_FUN_DESCRIPTOR *)Interface)->DescriptorSubtype == FunDescriptorType) {
|
||||||
switch (FunDescriptorType) {
|
switch (FunDescriptorType) {
|
||||||
case HEADER_FUN_DESCRIPTOR:
|
case HEADER_FUN_DESCRIPTOR:
|
||||||
|
@ -111,7 +111,7 @@ GetFunctionalDescriptor (
|
|||||||
|
|
||||||
for (Offset = 0; NextDescriptor (Config, &Offset);) {
|
for (Offset = 0; NextDescriptor (Config, &Offset);) {
|
||||||
Interface = (EFI_USB_INTERFACE_DESCRIPTOR *)((UINT8 *)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) {
|
if (((USB_HEADER_FUN_DESCRIPTOR *)Interface)->DescriptorSubtype == FunDescriptorType) {
|
||||||
switch (FunDescriptorType) {
|
switch (FunDescriptorType) {
|
||||||
case HEADER_FUN_DESCRIPTOR:
|
case HEADER_FUN_DESCRIPTOR:
|
||||||
|
@ -123,7 +123,7 @@ GetFunctionalDescriptor (
|
|||||||
|
|
||||||
for (Offset = 0; NextDescriptor (Config, &Offset);) {
|
for (Offset = 0; NextDescriptor (Config, &Offset);) {
|
||||||
Interface = (EFI_USB_INTERFACE_DESCRIPTOR *)((UINT8 *)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) {
|
if (((USB_HEADER_FUN_DESCRIPTOR *)Interface)->DescriptorSubtype == FunDescriptorType) {
|
||||||
switch (FunDescriptorType) {
|
switch (FunDescriptorType) {
|
||||||
case HEADER_FUN_DESCRIPTOR:
|
case HEADER_FUN_DESCRIPTOR:
|
||||||
|
@ -28,10 +28,6 @@ typedef struct _EDKII_USB_ETHERNET_PROTOCOL EDKII_USB_ETHERNET_PROTOCOL;
|
|||||||
#define USB_RNDIS_SUBCLASS 0x04
|
#define USB_RNDIS_SUBCLASS 0x04
|
||||||
#define USB_RNDIS_ETHERNET_PROTOCOL 0x01
|
#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
|
// Descriptor SubType in Functional Descriptors
|
||||||
#define HEADER_FUN_DESCRIPTOR 0x00
|
#define HEADER_FUN_DESCRIPTOR 0x00
|
||||||
#define UNION_FUN_DESCRIPTOR 0x06
|
#define UNION_FUN_DESCRIPTOR 0x06
|
||||||
|
Loading…
x
Reference in New Issue
Block a user