mirror of
https://github.com/ipxe/ipxe
synced 2026-05-11 21:02:14 +03:00
[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:
+5
-2
@@ -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, ð_slow_protocol, eth_slow_address );
|
||||
return net_tx ( iobuf, netdev, ð_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, ð_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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user