diff options
author | Joshua Oreman <oremanj@rwcr.net> | 2009-06-15 11:37:43 -0700 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-06-23 10:41:57 +0100 |
commit | eb3ca2a36f0c613aea5c2f02762bc608d5ec785c (patch) | |
tree | 9e0e6b07713bce905f580fc8384711c04290725a /src/net/netdevice.c | |
parent | 743ebc2f4b056673efb26f294ab39a661d77d1a8 (diff) | |
download | ipxe-eb3ca2a36f0c613aea5c2f02762bc608d5ec785c.tar.gz |
[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/net/netdevice.c')
-rw-r--r-- | src/net/netdevice.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c index 77edbcd3..c3551ea4 100644 --- a/src/net/netdevice.c +++ b/src/net/netdevice.c @@ -509,7 +509,7 @@ int net_tx ( struct io_buffer *iobuf, struct net_device *netdev, netdev_poll ( netdev ); /* Add link-layer header */ - if ( ( rc = ll_protocol->push ( iobuf, ll_dest, netdev->ll_addr, + if ( ( rc = ll_protocol->push ( netdev, iobuf, ll_dest, netdev->ll_addr, net_protocol->net_proto ) ) != 0 ) { free_iob ( iobuf ); return rc; @@ -581,8 +581,8 @@ static void net_step ( struct process *process __unused ) { /* Remove link-layer header */ ll_protocol = netdev->ll_protocol; - if ( ( rc = ll_protocol->pull ( iobuf, &ll_dest, - &ll_source, + if ( ( rc = ll_protocol->pull ( netdev, iobuf, + &ll_dest, &ll_source, &net_proto ) ) != 0 ) { free_iob ( iobuf ); continue; |