[ethernet] Expose eth_broadcast as a global constant
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
5e73677a01
commit
1cbb1581f1
|
@ -79,6 +79,7 @@ static inline int is_valid_ether_addr ( const void *addr ) {
|
||||||
( ! is_zero_ether_addr ( addr ) ) );
|
( ! is_zero_ether_addr ( addr ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern uint8_t eth_broadcast[];
|
||||||
extern int eth_push ( struct net_device *netdev, struct io_buffer *iobuf,
|
extern int eth_push ( struct net_device *netdev, struct io_buffer *iobuf,
|
||||||
const void *ll_dest, const void *ll_source,
|
const void *ll_dest, const void *ll_source,
|
||||||
uint16_t net_proto );
|
uint16_t net_proto );
|
||||||
|
|
|
@ -387,9 +387,6 @@ static struct net_device_operations net80211_netdev_ops = {
|
||||||
|
|
||||||
/* ---------- 802.11 link-layer protocol ---------- */
|
/* ---------- 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
|
* Determine whether a transmission rate uses ERP/OFDM
|
||||||
*
|
*
|
||||||
|
@ -763,7 +760,7 @@ struct net80211_device * net80211_alloc ( size_t priv_size )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
netdev->ll_protocol = &net80211_ll_protocol;
|
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->max_pkt_len = IEEE80211_MAX_DATA_LEN;
|
||||||
netdev_init ( netdev, &net80211_netdev_ops );
|
netdev_init ( netdev, &net80211_netdev_ops );
|
||||||
|
|
||||||
|
@ -1399,7 +1396,7 @@ int net80211_probe_step ( struct net80211_probe_ctx *ctx )
|
||||||
|
|
||||||
ctx->probe = iob;
|
ctx->probe = iob;
|
||||||
rc = net80211_tx_mgmt ( dev, IEEE80211_STYPE_PROBE_REQ,
|
rc = net80211_tx_mgmt ( dev, IEEE80211_STYPE_PROBE_REQ,
|
||||||
net80211_ll_broadcast,
|
eth_broadcast,
|
||||||
iob_disown ( siob ) );
|
iob_disown ( siob ) );
|
||||||
if ( rc ) {
|
if ( rc ) {
|
||||||
DBGC ( dev, "802.11 %p send probe failed: "
|
DBGC ( dev, "802.11 %p send probe failed: "
|
||||||
|
|
|
@ -39,7 +39,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** Ethernet broadcast MAC address */
|
/** 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
|
* Add Ethernet link-layer header
|
||||||
|
|
Reference in New Issue