[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

View File

@@ -36,13 +36,13 @@ FILE_LICENCE ( GPL2_OR_LATER );
*
* @v iob I/O buffer
* @v netdev Network device
* @v ll_dest Link-layer destination address
* @v ll_source Link-layer source address
*
* This function takes ownership of the I/O buffer passed to it.
*/
static int eapol_rx ( struct io_buffer *iob, struct net_device *netdev,
const void *ll_source )
{
const void *ll_dest, const void *ll_source ) {
struct eapol_frame *eapol = iob->data;
struct eapol_handler *handler;
@@ -54,7 +54,7 @@ static int eapol_rx ( struct io_buffer *iob, struct net_device *netdev,
for_each_table_entry ( handler, EAPOL_HANDLERS ) {
if ( handler->type == eapol->type ) {
iob_pull ( iob, EAPOL_HDR_LEN );
return handler->rx ( iob, netdev, ll_source );
return handler->rx ( iob, netdev, ll_dest, ll_source );
}
}