diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/80211/net80211.c | 1 | ||||
-rw-r--r-- | src/net/ethernet.c | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/net/80211/net80211.c b/src/net/80211/net80211.c index 1fc983a0..c3d9fc61 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 e8daf9f9..79ed1dc6 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, }; /** |