diff options
author | Joshua Oreman | 2009-06-15 20:37:43 +0200 |
---|---|---|
committer | Michael Brown | 2009-06-23 11:41:57 +0200 |
commit | eb3ca2a36f0c613aea5c2f02762bc608d5ec785c (patch) | |
tree | 9e0e6b07713bce905f580fc8384711c04290725a /src/interface | |
parent | [nvs] Add init function for Atmel 93C66 EEPROM (diff) | |
download | ipxe-eb3ca2a36f0c613aea5c2f02762bc608d5ec785c.tar.gz ipxe-eb3ca2a36f0c613aea5c2f02762bc608d5ec785c.tar.xz ipxe-eb3ca2a36f0c613aea5c2f02762bc608d5ec785c.zip |
[netdevice] Add netdev argument to link-layer push and pull handlers
In order to construct outgoing link-layer frames or parse incoming
ones properly, some protocols (such as 802.11) need more state than is
available in the existing variables passed to the link-layer protocol
handlers. To remedy this, add struct net_device *netdev as the first
argument to each of these functions, so that more information can be
fetched from the link layer-private part of the network device.
Updated all three call sites (netdevice.c, efi_snp.c, pxe_undi.c) and
both implementations (ethernet.c, ipoib.c) of ll_protocol to use the
new argument.
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Diffstat (limited to 'src/interface')
-rw-r--r-- | src/interface/efi/efi_snp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c index e4b3546e..4bdb7806 100644 --- a/src/interface/efi/efi_snp.c +++ b/src/interface/efi/efi_snp.c @@ -594,7 +594,8 @@ efi_snp_transmit ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, /* Create link-layer header, if specified */ if ( ll_header_len ) { iob_pull ( iobuf, ll_header_len ); - if ( ( rc = ll_protocol->push ( iobuf, ll_dest, ll_src, + if ( ( rc = ll_protocol->push ( snpdev->netdev, + iobuf, ll_dest, ll_src, htons ( *net_proto ) )) != 0 ){ DBGC ( snpdev, "SNPDEV %p TX could not construct " "header: %s\n", snpdev, strerror ( rc ) ); @@ -672,8 +673,8 @@ efi_snp_receive ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, *len = iob_len ( iobuf ); /* Attempt to decode link-layer header */ - if ( ( rc = ll_protocol->pull ( iobuf, &iob_ll_dest, &iob_ll_src, - &iob_net_proto ) ) != 0 ) { + if ( ( rc = ll_protocol->pull ( snpdev->netdev, iobuf, &iob_ll_dest, + &iob_ll_src, &iob_net_proto ) ) != 0 ){ DBGC ( snpdev, "SNPDEV %p could not parse header: %s\n", snpdev, strerror ( rc ) ); efirc = RC_TO_EFIRC ( rc ); |