rpms/gpxe/devel gpxe-0.9.9-20091018.patch,NONE,1.1

Matt Domsch mdomsch at fedoraproject.org
Tue Oct 27 22:40:26 UTC 2009


Author: mdomsch

Update of /cvs/extras/rpms/gpxe/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12288

Added Files:
	gpxe-0.9.9-20091018.patch 
Log Message:
really add patch

gpxe-0.9.9-20091018.patch:
 b/src/Makefile                          |    3 -
 b/src/arch/i386/interface/pcbios/ibft.c |    4 +-
 b/src/drivers/net/atl1e.c               |   18 +++++-----
 b/src/drivers/net/ipoib.c               |   57 ++++++++++++++++++++++++++++++++
 b/src/drivers/net/sis190.c              |    5 +-
 b/src/drivers/net/sis190.h              |    4 +-
 b/src/include/gpxe/ethernet.h           |    1 
 b/src/include/gpxe/netdevice.h          |   19 +++++++---
 b/src/include/gpxe/pci.h                |    8 +++-
 b/src/net/80211/net80211.c              |    1 
 b/src/net/ethernet.c                    |   13 ++++++-
 b/src/net/udp/dhcp.c                    |    5 +-
 src/arch/i386/interface/pcbios/ibft.c   |   13 ++++---
 src/drivers/net/sis190.c                |    6 +--
 14 files changed, 119 insertions(+), 38 deletions(-)

--- NEW FILE gpxe-0.9.9-20091018.patch ---
>From 2549f586944b177a20da5fc1432aad3fb26ba487 Mon Sep 17 00:00:00 2001
From: Marty Connor <mdc at etherboot.org>
Date: Wed, 21 Oct 2009 15:09:11 -0400
Subject: [PATCH] [release] Update version to 0.9.9+ post release

---
 src/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index d49b292..16759ca 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -130,7 +130,7 @@ install :
 VERSION_MAJOR	= 0
 VERSION_MINOR	= 9
 VERSION_PATCH	= 9
-EXTRAVERSION	=
+EXTRAVERSION	= +
 MM_VERSION	= $(VERSION_MAJOR).$(VERSION_MINOR)
 VERSION		= $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
 CFLAGS		+= -DVERSION_MAJOR=$(VERSION_MAJOR) \
-- 
1.6.0.6

>From d000c6b8c73211dbbf4388758e7ccd98564ed110 Mon Sep 17 00:00:00 2001
From: Michael Brown <mcb30 at etherboot.org>
Date: Fri, 23 Oct 2009 21:33:48 +0100
Subject: [PATCH] [iscsi] Fix printing of non-existent strings in iBFT debug messages

---
 src/arch/i386/interface/pcbios/ibft.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/arch/i386/interface/pcbios/ibft.c b/src/arch/i386/interface/pcbios/ibft.c
index 718b759..e0baaa2 100644
--- a/src/arch/i386/interface/pcbios/ibft.c
+++ b/src/arch/i386/interface/pcbios/ibft.c
@@ -236,7 +236,8 @@ static int ibft_set_string_option ( struct ibft_string_block *strings,
  */
 static const char * ibft_string ( struct ibft_string_block *strings,
 				  struct ibft_string *string ) {
-	return ( ( ( char * ) strings->table ) + string->offset );
+	return ( string->offset ?
+		 ( ( ( char * ) strings->table ) + string->offset ) : NULL );
 }
 
 /**
-- 
1.6.0.6

>From 1b1e63d54d7697c1fd156dcf365e74c7836d4d37 Mon Sep 17 00:00:00 2001
From: Michael Brown <mcb30 at etherboot.org>
Date: Fri, 23 Oct 2009 22:14:05 +0100
Subject: [PATCH] [netdevice] Add the concept of an "Ethernet-compatible" MAC address

The iBFT is Ethernet-centric in providing only six bytes for a MAC
address.  This is most probably an indirect consequence of a similar
design flaw in the Windows NDIS stack.  (The WinOF IPoIB stack
performs all sorts of contortions in order to pretend to the NDIS
layer that it is dealing with six-byte MAC addresses.)

There is no sensible way in which to extend the iBFT without breaking
compatibility with programs that expect to parse it.  Add the notion
of an "Ethernet-compatible" MAC address to our link layer abstraction,
so that link layers can provide their own workarounds for this
limitation.
---
 src/drivers/net/ipoib.c      |   57 ++++++++++++++++++++++++++++++++++++++++++
 src/include/gpxe/ethernet.h  |    1 +
 src/include/gpxe/netdevice.h |   19 +++++++++----
 src/net/80211/net80211.c     |    1 +
 src/net/ethernet.c           |   12 +++++++++
 5 files changed, 84 insertions(+), 6 deletions(-)

diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index dde4ee5..260d2d0 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -296,6 +296,62 @@ static int ipoib_mc_hash ( unsigned int af __unused,
 	return -ENOTSUP;
 }
 
+/**
+ * Generate Mellanox Ethernet-compatible compressed link-layer address
+ *
+ * @v ll_addr		Link-layer address
+ * @v eth_addr		Ethernet-compatible address to fill in
+ */
+static int ipoib_mlx_eth_addr ( const struct ib_gid_half *guid,
+				uint8_t *eth_addr ) {
+	eth_addr[0] = ( ( guid->u.bytes[3] == 2 ) ? 0x00 : 0x02 );
+	eth_addr[1] = guid->u.bytes[1];
+	eth_addr[2] = guid->u.bytes[2];
+	eth_addr[3] = guid->u.bytes[5];
+	eth_addr[4] = guid->u.bytes[6];
+	eth_addr[5] = guid->u.bytes[7];
+	return 0;
+}
+
+/** An IPoIB Ethernet-compatible compressed link-layer address generator */
+struct ipoib_eth_addr_handler {
+	/** GUID byte 1 */
+	uint8_t byte1;
+	/** GUID byte 2 */
+	uint8_t byte2;
+	/** Handler */
+	int ( * eth_addr ) ( const struct ib_gid_half *guid,
+			     uint8_t *eth_addr );
+};
+
+/** IPoIB Ethernet-compatible compressed link-layer address generators */
+static struct ipoib_eth_addr_handler ipoib_eth_addr_handlers[] = {
+	{ 0x02, 0xc9, ipoib_mlx_eth_addr },
+};
+
+/**
+ * Generate Ethernet-compatible compressed link-layer address
+ *
+ * @v ll_addr		Link-layer address
+ * @v eth_addr		Ethernet-compatible address to fill in
+ */
+static int ipoib_eth_addr ( const void *ll_addr, void *eth_addr ) {
+	const struct ipoib_mac *ipoib_addr = ll_addr;
+	const struct ib_gid_half *guid = &ipoib_addr->gid.u.half[1];
+	struct ipoib_eth_addr_handler *handler;
+	unsigned int i;
+
+	for ( i = 0 ; i < ( sizeof ( ipoib_eth_addr_handlers ) /
+			    sizeof ( ipoib_eth_addr_handlers[0] ) ) ; i++ ) {
+		handler = &ipoib_eth_addr_handlers[i];
+		if ( ( handler->byte1 == guid->u.bytes[1] ) &&
+		     ( handler->byte2 == guid->u.bytes[2] ) ) {
+			return handler->eth_addr ( guid, eth_addr );
+		}
+	}
+	return -ENOTSUP;
+}
+
 /** IPoIB protocol */
 struct ll_protocol ipoib_protocol __ll_protocol = {
 	.name		= "IPoIB",
@@ -308,6 +364,7 @@ struct ll_protocol ipoib_protocol __ll_protocol = {
 	.init_addr	= ipoib_init_addr,
 	.ntoa		= ipoib_ntoa,
 	.mc_hash	= ipoib_mc_hash,
+	.eth_addr	= ipoib_eth_addr,
 };
 
 /**
diff --git a/src/include/gpxe/ethernet.h b/src/include/gpxe/ethernet.h
index 8cf6b1b..4dfc24d 100644
--- a/src/include/gpxe/ethernet.h
+++ b/src/include/gpxe/ethernet.h
@@ -15,6 +15,7 @@ extern void eth_init_addr ( const void *hw_addr, void *ll_addr );
 extern const char * eth_ntoa ( const void *ll_addr );
 extern int eth_mc_hash ( unsigned int af, const void *net_addr,
 			 void *ll_addr );
+extern int eth_eth_addr ( const void *ll_addr, void *eth_addr );
 extern struct net_device * alloc_etherdev ( size_t priv_size );
 
 #endif /* _GPXE_ETHERNET_H */
diff --git a/src/include/gpxe/netdevice.h b/src/include/gpxe/netdevice.h
index fd77d89..858d8e9 100644
--- a/src/include/gpxe/netdevice.h
+++ b/src/include/gpxe/netdevice.h
@@ -128,8 +128,8 @@ struct ll_protocol {
 	/**
 	 * Transcribe link-layer address
 	 *
-	 * @v ll_addr	Link-layer address
-	 * @ret string	Human-readable transcription of address
+	 * @v ll_addr		Link-layer address
+	 * @ret string		Human-readable transcription of address
 	 *
 	 * This method should convert the link-layer address into a
 	 * human-readable format.
@@ -141,13 +141,20 @@ struct ll_protocol {
 	/**
 	 * Hash multicast address
 	 *
-	 * @v af	Address family
-	 * @v net_addr	Network-layer address
-	 * @v ll_addr	Link-layer address to fill in
-	 * @ret rc	Return status code
+	 * @v af		Address family
+	 * @v net_addr		Network-layer address
+	 * @v ll_addr		Link-layer address to fill in
+	 * @ret rc		Return status code
 	 */
 	int ( * mc_hash ) ( unsigned int af, const void *net_addr,
 			    void *ll_addr );
+	/**
+	 * Generate Ethernet-compatible compressed link-layer address
+	 *
+	 * @v ll_addr		Link-layer address
+	 * @v eth_addr		Ethernet-compatible address to fill in
+	 */
+	int ( * eth_addr ) ( const void *ll_addr, void *eth_addr );
 	/** Link-layer protocol
 	 *
 	 * This is an ARPHRD_XXX constant, in network byte order.
diff --git a/src/net/80211/net80211.c b/src/net/80211/net80211.c
index 1fc983a..c3d9fc6 100644
--- a/src/net/80211/net80211.c
+++ b/src/net/80211/net80211.c
@@ -586,6 +586,7 @@ static struct ll_protocol net80211_ll_protocol __ll_protocol = {
 	.init_addr = eth_init_addr,
 	.ntoa = eth_ntoa,
 	.mc_hash = eth_mc_hash,
+	.eth_addr = eth_eth_addr,
 	.ll_proto = htons ( ARPHRD_ETHER ),	/* "encapsulated Ethernet" */
 	.hw_addr_len = ETH_ALEN,
 	.ll_addr_len = ETH_ALEN,
diff --git a/src/net/ethernet.c b/src/net/ethernet.c
index e8daf9f..79ed1dc 100644
--- a/src/net/ethernet.c
+++ b/src/net/ethernet.c
@@ -148,6 +148,17 @@ int eth_mc_hash ( unsigned int af, const void *net_addr, void *ll_addr ) {
 	}
 }
 
+/**
+ * Generate Ethernet-compatible compressed link-layer address
+ *
+ * @v ll_addr		Link-layer address
+ * @v eth_addr		Ethernet-compatible address to fill in
+ */
+int eth_eth_addr ( const void *ll_addr, void *eth_addr ) {
+	memcpy ( eth_addr, ll_addr, ETH_ALEN );
+	return 0;
+}
+
 /** Ethernet protocol */
 struct ll_protocol ethernet_protocol __ll_protocol = {
 	.name		= "Ethernet",
@@ -160,6 +171,7 @@ struct ll_protocol ethernet_protocol __ll_protocol = {
 	.init_addr	= eth_init_addr,
 	.ntoa		= eth_ntoa,
 	.mc_hash	= eth_mc_hash,
+	.eth_addr	= eth_eth_addr,
 };
 
 /**
-- 
1.6.0.6

>From 45044acea7422d976ff338ef3b82dda805c20bc5 Mon Sep 17 00:00:00 2001
From: Michael Brown <mcb30 at etherboot.org>
Date: Fri, 23 Oct 2009 22:18:04 +0100
Subject: [PATCH] [iscsi] Use the "Ethernet-compatible" MAC address in the iBFT

---
 src/arch/i386/interface/pcbios/ibft.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/arch/i386/interface/pcbios/ibft.c b/src/arch/i386/interface/pcbios/ibft.c
index e0baaa2..adf8e6b 100644
--- a/src/arch/i386/interface/pcbios/ibft.c
+++ b/src/arch/i386/interface/pcbios/ibft.c
@@ -37,6 +37,7 @@ FILE_LICENCE ( BSD2 );
 #include <gpxe/acpi.h>
 #include <gpxe/in.h>
 #include <gpxe/netdevice.h>
+#include <gpxe/ethernet.h>
 #include <gpxe/dhcp.h>
 #include <gpxe/iscsi.h>
 #include <gpxe/ibft.h>
@@ -251,6 +252,7 @@ static const char * ibft_string ( struct ibft_string_block *strings,
 static int ibft_fill_nic ( struct ibft_nic *nic,
 			   struct ibft_string_block *strings,
 			   struct net_device *netdev ) {
+	struct ll_protocol *ll_protocol = netdev->ll_protocol;
 	struct in_addr netmask_addr = { 0 };
 	unsigned int netmask_count = 0;
 	int rc;
@@ -279,10 +281,12 @@ static int ibft_fill_nic ( struct ibft_nic *nic,
 	DBG ( "iBFT NIC subnet = /%d\n", nic->subnet_mask_prefix );
 
 	/* Extract values from net-device configuration */
-	memcpy ( nic->mac_address, netdev->ll_addr,
-		 sizeof ( nic->mac_address ) );
-	DBG ( "iBFT NIC MAC = %s\n",
-	      netdev->ll_protocol->ntoa ( nic->mac_address ) );
+	if ( ( rc = ll_protocol->eth_addr ( netdev->ll_addr,
+					    nic->mac_address ) ) != 0 ) {
+		DBG ( "Could not determine iBFT MAC: %s\n", strerror ( rc ) );
+		return rc;
+	}
+	DBG ( "iBFT NIC MAC = %s\n", eth_ntoa ( nic->mac_address ) );
 	nic->pci_bus_dev_func = netdev->dev->desc.location;
 	DBG ( "iBFT NIC PCI = %04x\n", nic->pci_bus_dev_func );
 
-- 
1.6.0.6

>From 107d641bd50080c52d7c0a97f6741fbac8979248 Mon Sep 17 00:00:00 2001
From: Thomas Miletich <thomas.miletich at gmail.com>
Date: Fri, 23 Oct 2009 16:54:59 +0200
Subject: [PATCH] [sis190] Make 'make allroms' happy.

Remove spaces in 3rd PCI_ROM field.

Debugged-by: Marty Connor <mdc at etherboot.org>
Reported-by: Giandomenico  De Tullio <ghisha at email.it>
Signed-off-by: Michael Brown <mcb30 at etherboot.org>
---
 src/drivers/net/sis190.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/drivers/net/sis190.c b/src/drivers/net/sis190.c
index c312034..b38aaa1 100644
--- a/src/drivers/net/sis190.c
+++ b/src/drivers/net/sis190.c
@@ -26,8 +26,8 @@ FILE_LICENCE ( GPL_ANY );
 #include "sis190.h"
 
 static struct pci_device_id sis190_pci_tbl[] = {
-	PCI_ROM (0x1039, 0x0190, "SiS 190", "SiS 190", 0),
-	PCI_ROM (0x1039, 0x0191, "SiS 191", "SiS 191", 0),
+	PCI_ROM (0x1039, 0x0190, "sis190", "sis190", 0),
+	PCI_ROM (0x1039, 0x0191, "sis191", "sis191", 0),
 };
 
 /******************************************************************************
-- 
1.6.0.6

>From cd647b7cf38f9d60f51c3b387505bf5d7b9bf765 Mon Sep 17 00:00:00 2001
From: Thomas Miletich <thomas.miletich at gmail.com>
Date: Sat, 24 Oct 2009 10:57:58 +0200
Subject: [PATCH] [sis190] Insert forgotten FILE_LICENCE() to sis190.h

Signed-off-by: Michael Brown <mcb30 at etherboot.org>
Modified-by: Michael Brown <mcb30 at etherboot.org>
---
 src/drivers/net/sis190.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/drivers/net/sis190.h b/src/drivers/net/sis190.h
index 2a80a8f..c6dac5b 100644
--- a/src/drivers/net/sis190.h
+++ b/src/drivers/net/sis190.h
@@ -1,7 +1,8 @@
-
 #ifndef __SIS190_H__
 #define __SIS190_H__
 
+FILE_LICENCE ( GPL_ANY );
+
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-- 
1.6.0.6

>From 8912e24fdc6b74c59f420c4e345730a974708d2f Mon Sep 17 00:00:00 2001
From: Thomas Miletich <thomas.miletich at gmail.com>
Date: Fri, 23 Oct 2009 17:00:25 +0200
Subject: [PATCH] [sis190] Hide the ISA bridge's PCI IDs from parserom.pl

Signed-off-by: Michael Brown <mcb30 at etherboot.org>
Modified-by: Michael Brown <mcb30 at etherboot.org>
---
 src/drivers/net/sis190.c |    6 +++---
 src/include/gpxe/pci.h   |    7 ++++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/drivers/net/sis190.c b/src/drivers/net/sis190.c
index b38aaa1..5d0145a 100644
--- a/src/drivers/net/sis190.c
+++ b/src/drivers/net/sis190.c
@@ -42,9 +42,9 @@ static struct pci_device_id sis190_pci_tbl[] = {
  */
 
 static struct pci_device_id sis190_isa_bridge_tbl[] = {
-	PCI_ROM (0x1039, 0x0965, "", "", 0),
-	PCI_ROM (0x1039, 0x0966, "", "", 0),
-	PCI_ROM (0x1039, 0x0968, "", "", 0),
+	PCI_ID (0x1039, 0x0965, "", "", 0),
+	PCI_ID (0x1039, 0x0966, "", "", 0),
+	PCI_ID (0x1039, 0x0968, "", "", 0),
 };
 
 static int sis190_isa_bridge_probe(struct pci_device *pdev __unused,
diff --git a/src/include/gpxe/pci.h b/src/include/gpxe/pci.h
index da33eda..9ce894b 100644
--- a/src/include/gpxe/pci.h
+++ b/src/include/gpxe/pci.h
@@ -359,13 +359,18 @@ struct pci_driver {
  * PCI_ROM is used to build up entries in a struct pci_id array.  It
  * is also parsed by parserom.pl to generate Makefile rules and files
  * for rom-o-matic.
+ *
+ * PCI_ID can be used to generate entries without creating a
+ * corresponding ROM in the build process.
  */
-#define PCI_ROM( _vendor, _device, _name, _description, _data ) {	\
+#define PCI_ID( _vendor, _device, _name, _description, _data ) {	\
 	.vendor = _vendor,						\
 	.device = _device,						\
 	.name = _name,							\
 	.driver_data = _data						\
 }
+#define PCI_ROM( _vendor, _device, _name, _description, _data ) \
+	PCI_ID( _vendor, _device, _name, _description, _data )
 
 extern void adjust_pci_device ( struct pci_device *pci );
 extern unsigned long pci_bar_start ( struct pci_device *pci,
-- 
1.6.0.6

>From 858b5fd253b50ad662ab34ec5be86c3ee004ec2d Mon Sep 17 00:00:00 2001
From: Joshua Oreman <oremanj at rwcr.net>
Date: Fri, 23 Oct 2009 17:04:38 +0200
Subject: [PATCH] [atl1e] Fix compilation on gcc-4.4.1-2.fc11.i586.

Error message was:

[BUILD] bin/atl1e.oncc1: warnings being treated as errors
drivers/net/atl1e.c: In function 'atl1e_get_permanent_address':
drivers/net/atl1e.c:1326: error: dereferencing type-punned pointer will break strict-aliasing rules
make: *** [bin/atl1e.o] Error 1

Reported-by: Giandomenico  De Tullio <ghisha at email.it>
Signed-off-by: Michael Brown <mcb30 at etherboot.org>
Modified-by: Michael Brown <mcb30 at etherboot.org>
---
 src/drivers/net/atl1e.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/drivers/net/atl1e.c b/src/drivers/net/atl1e.c
index 664eba0..6c0b050 100644
--- a/src/drivers/net/atl1e.c
+++ b/src/drivers/net/atl1e.c
@@ -1296,14 +1296,14 @@ void atl1e_hw_set_mac_addr(struct atl1e_hw *hw)
  */
 static int atl1e_get_permanent_address(struct atl1e_hw *hw)
 {
-	u32 addr[2];
+	union {
+		u32 dword[2];
+		u8 byte[8];
+	} hw_addr;
 	u32 i;
 	u32 twsi_ctrl_data;
 	u8  eth_addr[ETH_ALEN];
 
-	/* init */
-	addr[0] = addr[1] = 0;
-
 	if (!atl1e_check_eeprom_exist(hw)) {
 		/* eeprom exist */
 		twsi_ctrl_data = AT_READ_REG(hw, REG_TWSI_CTRL);
@@ -1320,10 +1320,11 @@ static int atl1e_get_permanent_address(struct atl1e_hw *hw)
 	}
 
 	/* maybe MAC-address is from BIOS */
-	addr[0] = AT_READ_REG(hw, REG_MAC_STA_ADDR);
-	addr[1] = AT_READ_REG(hw, REG_MAC_STA_ADDR + 4);
-	*(u32 *) &eth_addr[2] = swap32(addr[0]);
-	*(u16 *) &eth_addr[0] = swap16(*(u16 *)&addr[1]);
+	hw_addr.dword[0] = AT_READ_REG(hw, REG_MAC_STA_ADDR);
+	hw_addr.dword[1] = AT_READ_REG(hw, REG_MAC_STA_ADDR + 4);
+	for (i = 0; i < ETH_ALEN; i++) {
+		eth_addr[ETH_ALEN - i - 1] = hw_addr.byte[i];
+	}
 
 	memcpy(hw->perm_mac_addr, eth_addr, ETH_ALEN);
 	return 0;
-- 
1.6.0.6

>From 67015d10116d259d835f3be4611a8cba2f069e96 Mon Sep 17 00:00:00 2001
From: Joshua Oreman <oremanj at rwcr.net>
Date: Sun, 18 Oct 2009 18:59:19 -0400
Subject: [PATCH] [pxebs] Correct endianness of PXE type

The PXE type field is canonically little-endian, but the pxebs command
treats it as big-endian in converting the type number passed on the
command line to a field value to search against. Fix, to prevent the
necessity of incantations like "pxebs net0 1536" to select menu item #6.

Signed-off-by: Michael Brown <mcb30 at etherboot.org>
Modified-by: Michael Brown <mcb30 at etherboot.org>
---
 src/net/udp/dhcp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 5f74137..2483ec2 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -693,7 +693,7 @@ static int dhcp_pxebs_tx ( struct dhcp_session *dhcp,
 
 	DBGC ( dhcp, "DHCP %p PXEBS REQUEST to %s:%d for type %d\n",
 	       dhcp, inet_ntoa ( peer->sin_addr ), ntohs ( peer->sin_port ),
-	       ntohs ( dhcp->pxe_type ) );
+	       le16_to_cpu ( dhcp->pxe_type ) );
 
 	/* Set boot menu item */
 	menu_item.type = dhcp->pxe_type;
@@ -1363,7 +1363,7 @@ int start_pxebs ( struct job_interface *job, struct net_device *netdev,
 	fetch_ipv4_setting ( netdev_settings ( netdev ), &ip_setting,
 			     &dhcp->local.sin_addr );
 	dhcp->local.sin_port = htons ( BOOTPC_PORT );
-	dhcp->pxe_type = htons ( pxe_type );
+	dhcp->pxe_type = cpu_to_le16 ( pxe_type );
 	dhcp->timer.expired = dhcp_timer_expired;
 
 	/* Construct PXE boot server IP address lists */
-- 
1.6.0.6





More information about the fedora-extras-commits mailing list