Procházet zdrojové kódy

[ethernet] Expose eth_broadcast as a global constant

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown před 12 roky
rodič
revize
1cbb1581f1
3 změnil soubory, kde provedl 4 přidání a 6 odebrání
  1. 1
    0
      src/include/ipxe/ethernet.h
  2. 2
    5
      src/net/80211/net80211.c
  3. 1
    1
      src/net/ethernet.c

+ 1
- 0
src/include/ipxe/ethernet.h Zobrazit soubor

@@ -79,6 +79,7 @@ static inline int is_valid_ether_addr ( const void *addr ) {
79 79
 		 ( ! is_zero_ether_addr ( addr ) ) );
80 80
 }
81 81
 
82
+extern uint8_t eth_broadcast[];
82 83
 extern int eth_push ( struct net_device *netdev, struct io_buffer *iobuf,
83 84
 		      const void *ll_dest, const void *ll_source,
84 85
 		      uint16_t net_proto );

+ 2
- 5
src/net/80211/net80211.c Zobrazit soubor

@@ -387,9 +387,6 @@ static struct net_device_operations net80211_netdev_ops = {
387 387
 
388 388
 /* ---------- 802.11 link-layer protocol ---------- */
389 389
 
390
-/** 802.11 broadcast MAC address */
391
-static u8 net80211_ll_broadcast[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
392
-
393 390
 /**
394 391
  * Determine whether a transmission rate uses ERP/OFDM
395 392
  *
@@ -763,7 +760,7 @@ struct net80211_device * net80211_alloc ( size_t priv_size )
763 760
 		return NULL;
764 761
 
765 762
 	netdev->ll_protocol = &net80211_ll_protocol;
766
-	netdev->ll_broadcast = net80211_ll_broadcast;
763
+	netdev->ll_broadcast = eth_broadcast;
767 764
 	netdev->max_pkt_len = IEEE80211_MAX_DATA_LEN;
768 765
 	netdev_init ( netdev, &net80211_netdev_ops );
769 766
 
@@ -1399,7 +1396,7 @@ int net80211_probe_step ( struct net80211_probe_ctx *ctx )
1399 1396
 
1400 1397
 			ctx->probe = iob;
1401 1398
 			rc = net80211_tx_mgmt ( dev, IEEE80211_STYPE_PROBE_REQ,
1402
-						net80211_ll_broadcast,
1399
+						eth_broadcast,
1403 1400
 						iob_disown ( siob ) );
1404 1401
 			if ( rc ) {
1405 1402
 				DBGC ( dev, "802.11 %p send probe failed: "

+ 1
- 1
src/net/ethernet.c Zobrazit soubor

@@ -39,7 +39,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
39 39
  */
40 40
 
41 41
 /** Ethernet broadcast MAC address */
42
-static uint8_t eth_broadcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
42
+uint8_t eth_broadcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
43 43
 
44 44
 /**
45 45
  * Add Ethernet link-layer header

Načítá se…
Zrušit
Uložit