summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorJoshua Oreman2009-06-15 20:37:43 +0200
committerMichael Brown2009-06-23 11:41:57 +0200
commiteb3ca2a36f0c613aea5c2f02762bc608d5ec785c (patch)
tree9e0e6b07713bce905f580fc8384711c04290725a /src/arch
parent[nvs] Add init function for Atmel 93C66 EEPROM (diff)
downloadipxe-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/arch')
-rw-r--r--src/arch/i386/interface/pxe/pxe_undi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/i386/interface/pxe/pxe_undi.c b/src/arch/i386/interface/pxe/pxe_undi.c
index fe124d63..fd2d688c 100644
--- a/src/arch/i386/interface/pxe/pxe_undi.c
+++ b/src/arch/i386/interface/pxe/pxe_undi.c
@@ -270,7 +270,7 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
}
/* Add link-layer header */
- if ( ( rc = ll_protocol->push ( iobuf, ll_dest,
+ if ( ( rc = ll_protocol->push ( pxe_netdev, iobuf, ll_dest,
pxe_netdev->ll_addr,
net_protocol->net_proto ))!=0){
free_iob ( iobuf );
@@ -630,8 +630,8 @@ PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) {
/* Strip link-layer header */
ll_protocol = pxe_netdev->ll_protocol;
- if ( ( rc = ll_protocol->pull ( iobuf, &ll_dest, &ll_source,
- &net_proto ) ) != 0 ) {
+ if ( ( rc = ll_protocol->pull ( pxe_netdev, iobuf, &ll_dest,
+ &ll_source, &net_proto )) !=0){
/* Assume unknown net_proto and no ll_source */
net_proto = 0;
ll_source = NULL;