Browse Source

[802.11] Support multicast hashing

802.11 multicast hashing is the same as standard Ethernet hashing, so
just expose and use eth_mc_hash().

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
tags/v0.9.8
Michael Brown 15 years ago
parent
commit
a7290a970c
3 changed files with 4 additions and 22 deletions
  1. 2
    0
      src/include/gpxe/ethernet.h
  2. 1
    20
      src/net/80211/net80211.c
  3. 1
    2
      src/net/ethernet.c

+ 2
- 0
src/include/gpxe/ethernet.h View File

@@ -13,6 +13,8 @@ FILE_LICENCE ( GPL2_OR_LATER );
13 13
 
14 14
 extern void eth_init_addr ( const void *hw_addr, void *ll_addr );
15 15
 extern const char * eth_ntoa ( const void *ll_addr );
16
+extern int eth_mc_hash ( unsigned int af, const void *net_addr,
17
+			 void *ll_addr );
16 18
 extern struct net_device * alloc_etherdev ( size_t priv_size );
17 19
 
18 20
 #endif /* _GPXE_ETHERNET_H */

+ 1
- 20
src/net/80211/net80211.c View File

@@ -160,8 +160,6 @@ static int net80211_ll_push ( struct net_device *netdev,
160 160
 static int net80211_ll_pull ( struct net_device *netdev,
161 161
 			      struct io_buffer *iobuf, const void **ll_dest,
162 162
 			      const void **ll_source, uint16_t * net_proto );
163
-static int net80211_ll_mc_hash ( unsigned int af, const void *net_addr,
164
-				 void *ll_addr );
165 163
 /** @} */
166 164
 
167 165
 /**
@@ -580,23 +578,6 @@ static int net80211_ll_pull ( struct net_device *netdev __unused,
580 578
 	return 0;
581 579
 }
582 580
 
583
-/**
584
- * Hash 802.11 multicast address
585
- *
586
- * @v af	Address family
587
- * @v net_addr	Network-layer address
588
- * @ret ll_addr	Filled link-layer address
589
- * @ret rc	Return status code
590
- *
591
- * Currently unimplemented.
592
- */
593
-static int net80211_ll_mc_hash ( unsigned int af __unused,
594
-				 const void *net_addr __unused,
595
-				 void *ll_addr __unused )
596
-{
597
-	return -ENOTSUP;
598
-}
599
-
600 581
 /** 802.11 link-layer protocol */
601 582
 static struct ll_protocol net80211_ll_protocol __ll_protocol = {
602 583
 	.name = "802.11",
@@ -604,7 +585,7 @@ static struct ll_protocol net80211_ll_protocol __ll_protocol = {
604 585
 	.pull = net80211_ll_pull,
605 586
 	.init_addr = eth_init_addr,
606 587
 	.ntoa = eth_ntoa,
607
-	.mc_hash = net80211_ll_mc_hash,
588
+	.mc_hash = eth_mc_hash,
608 589
 	.ll_proto = htons ( ARPHRD_ETHER ),	/* "encapsulated Ethernet" */
609 590
 	.hw_addr_len = ETH_ALEN,
610 591
 	.ll_addr_len = ETH_ALEN,

+ 1
- 2
src/net/ethernet.c View File

@@ -130,8 +130,7 @@ const char * eth_ntoa ( const void *ll_addr ) {
130 130
  * @v ll_addr		Link-layer address to fill in
131 131
  * @ret rc		Return status code
132 132
  */
133
-static int eth_mc_hash ( unsigned int af, const void *net_addr,
134
-			 void *ll_addr ) {
133
+int eth_mc_hash ( unsigned int af, const void *net_addr, void *ll_addr ) {
135 134
 	const uint8_t *net_addr_bytes = net_addr;
136 135
 	uint8_t *ll_addr_bytes = ll_addr;
137 136
 

Loading…
Cancel
Save