[netdevice] Pass both link-layer addresses in net_tx() and net_rx()

FCoE requires the use of fabric-provided MAC addresses, which breaks
the assumption that the net device's MAC address is implicitly the
source address for net_tx() and the (unicast) destination address for
net_rx().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2010-10-07 16:03:16 +01:00
parent d57d49942a
commit 88dd921e24
13 changed files with 60 additions and 31 deletions
+5 -2
View File
@@ -174,7 +174,8 @@ static int eth_slow_lacp_rx ( struct io_buffer *iobuf,
/* Send response */
eth_slow_lacp_dump ( iobuf, netdev, "TX" );
return net_tx ( iobuf, netdev, &eth_slow_protocol, eth_slow_address );
return net_tx ( iobuf, netdev, &eth_slow_protocol, eth_slow_address,
netdev->ll_addr );
}
/**
@@ -218,7 +219,7 @@ static int eth_slow_marker_rx ( struct io_buffer *iobuf,
marker->marker.tlv.type = ETH_SLOW_TLV_MARKER_RESPONSE;
eth_slow_marker_dump ( iobuf, netdev, "TX" );
return net_tx ( iobuf, netdev, &eth_slow_protocol,
eth_slow_address );
eth_slow_address, netdev->ll_addr );
} else {
/* Discard all other marker packets */
free_iob ( iobuf );
@@ -231,11 +232,13 @@ static int eth_slow_marker_rx ( struct io_buffer *iobuf,
*
* @v iobuf I/O buffer
* @v netdev Network device
* @v ll_dest Link-layer destination address
* @v ll_source Link-layer source address
* @ret rc Return status code
*/
static int eth_slow_rx ( struct io_buffer *iobuf,
struct net_device *netdev,
const void *ll_dest __unused,
const void *ll_source __unused ) {
union eth_slow_packet *eth_slow = iobuf->data;