Sfoglia il codice sorgente

[pxe] Fix interoperability with the Intel DOS UNDI driver

The Intel DOS UNDI driver fails when run on top of gPXE because we do
not fill in the ServiceFlags field in PXENV_UNDI_GET_IFACE_INFO.

Fix by filling in the ServiceFlags field with reasonable values
indicating our approximate feature capabilities.
tags/v0.9.8
Michael Brown 15 anni fa
parent
commit
0b922595fe
2 ha cambiato i file con 23 aggiunte e 1 eliminazioni
  1. 19
    0
      src/arch/i386/include/pxe_api.h
  2. 4
    1
      src/arch/i386/interface/pxe/pxe_undi.c

+ 19
- 0
src/arch/i386/include/pxe_api.h Vedi File

@@ -1417,6 +1417,25 @@ extern PXENV_EXIT_t pxenv_undi_get_nic_type (
1417 1417
 /** PXE API function code for pxenv_undi_get_iface_info() */
1418 1418
 #define	PXENV_UNDI_GET_IFACE_INFO	0x0013
1419 1419
 
1420
+/** Broadcast supported */
1421
+#define SUPPORTED_BROADCAST		0x0001
1422
+/** Multicast supported */
1423
+#define SUPPORTED_MULTICAST		0x0002
1424
+/** Functional/group addressing supported */
1425
+#define SUPPORTED_GROUP			0x0004
1426
+/** Promiscuous mode supported */
1427
+#define SUPPORTED_PROMISCUOUS		0x0008
1428
+/** Software settable station address */
1429
+#define SUPPORTED_SET_STATION_ADDRESS	0x0010
1430
+/** InitiateDiagnostics supported */
1431
+#define SUPPORTED_DIAGNOSTICS		0x0040
1432
+/** Reset MAC supported */
1433
+#define SUPPORTED_RESET			0x0400
1434
+/** Open / Close Adapter supported */
1435
+#define SUPPORTED_OPEN_CLOSE		0x0800
1436
+/** Interrupt Request supported */
1437
+#define SUPPORTED_IRQ			0x1000
1438
+
1420 1439
 /** Parameter block for pxenv_undi_get_iface_info() */
1421 1440
 struct s_PXENV_UNDI_GET_IFACE_INFO {
1422 1441
 	PXENV_STATUS_t	Status;		/**< PXE status code */

+ 4
- 1
src/arch/i386/interface/pxe/pxe_undi.c Vedi File

@@ -534,7 +534,10 @@ PXENV_EXIT_t pxenv_undi_get_iface_info ( struct s_PXENV_UNDI_GET_IFACE_INFO
534 534
 	snprintf ( ( char * ) undi_get_iface_info->IfaceType,
535 535
 		   sizeof ( undi_get_iface_info->IfaceType ), "gPXE" );
536 536
 	undi_get_iface_info->LinkSpeed = 10000000; /* 10 Mbps */
537
-	undi_get_iface_info->ServiceFlags = 0;
537
+	undi_get_iface_info->ServiceFlags =
538
+		( SUPPORTED_BROADCAST | SUPPORTED_MULTICAST |
539
+		  SUPPORTED_SET_STATION_ADDRESS | SUPPORTED_RESET |
540
+		  SUPPORTED_OPEN_CLOSE | SUPPORTED_IRQ );
538 541
 	memset ( undi_get_iface_info->Reserved, 0,
539 542
 		 sizeof(undi_get_iface_info->Reserved) );
540 543
 

Loading…
Annulla
Salva