File ipxe.1cbb1581f16e235fafc963c906ad02b38d5457bd.patch of Package xen
From: Michael Brown <mcb30@ipxe.org>
Date: Thu, 30 Aug 2012 15:58:58 +0100
Subject: 1cbb1581f16e235fafc963c906ad02b38d5457bd
[ethernet] Expose eth_broadcast as a global constant
Signed-off-by: Michael Brown <mcb30@ipxe.org>
---
src/include/ipxe/ethernet.h | 1 +
src/net/80211/net80211.c | 7 ++-----
src/net/ethernet.c | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
--- a/src/include/ipxe/ethernet.h
+++ b/src/include/ipxe/ethernet.h
@@ -77,6 +77,7 @@ static inline int is_valid_ether_addr ( const void *addr ) {
( ! is_zero_ether_addr ( addr ) ) );
}
+extern uint8_t eth_broadcast[];
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,
--- a/src/net/80211/net80211.c
+++ b/src/net/80211/net80211.c
@@ -386,9 +386,6 @@ static struct net_device_operations net80211_netdev_ops = {
/* ---------- 802.11 link-layer protocol ---------- */
-/** 802.11 broadcast MAC address */
-static u8 net80211_ll_broadcast[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-
/**
* Determine whether a transmission rate uses ERP/OFDM
*
@@ -762,7 +759,7 @@ struct net80211_device * net80211_alloc ( size_t priv_size )
return NULL;
netdev->ll_protocol = &net80211_ll_protocol;
- netdev->ll_broadcast = net80211_ll_broadcast;
+ netdev->ll_broadcast = eth_broadcast;
netdev->max_pkt_len = IEEE80211_MAX_DATA_LEN;
netdev_init ( netdev, &net80211_netdev_ops );
@@ -1398,7 +1395,7 @@ int net80211_probe_step ( struct net80211_probe_ctx *ctx )
ctx->probe = iob;
rc = net80211_tx_mgmt ( dev, IEEE80211_STYPE_PROBE_REQ,
- net80211_ll_broadcast,
+ eth_broadcast,
iob_disown ( siob ) );
if ( rc ) {
DBGC ( dev, "802.11 %p send probe failed: "
--- a/src/net/ethernet.c
+++ b/src/net/ethernet.c
@@ -38,7 +38,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
*/
/** Ethernet broadcast MAC address */
-static uint8_t eth_broadcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+uint8_t eth_broadcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
/**
* Add Ethernet link-layer header