summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/ipoib.c
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/drivers/net/ipoib.c
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/drivers/net/ipoib.c')
-rw-r--r--src/drivers/net/ipoib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index cb56458e..bb8757b4 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -238,13 +238,15 @@ ipoib_cache_peer ( const struct ib_gid *gid, unsigned long qpn ) {
/**
* Add IPoIB link-layer header
*
+ * @v netdev Network device
* @v iobuf I/O buffer
* @v ll_dest Link-layer destination address
* @v ll_source Source link-layer address
* @v net_proto Network-layer protocol, in network-byte order
* @ret rc Return status code
*/
-static int ipoib_push ( struct io_buffer *iobuf, const void *ll_dest,
+static int ipoib_push ( struct net_device *netdev __unused,
+ struct io_buffer *iobuf, const void *ll_dest,
const void *ll_source __unused, uint16_t net_proto ) {
struct ipoib_hdr *ipoib_hdr =
iob_push ( iobuf, sizeof ( *ipoib_hdr ) );
@@ -268,13 +270,15 @@ static int ipoib_push ( struct io_buffer *iobuf, const void *ll_dest,
/**
* Remove IPoIB link-layer header
*
+ * @v netdev Network device
* @v iobuf I/O buffer
* @ret ll_dest Link-layer destination address
* @ret ll_source Source link-layer address
* @ret net_proto Network-layer protocol, in network-byte order
* @ret rc Return status code
*/
-static int ipoib_pull ( struct io_buffer *iobuf, const void **ll_dest,
+static int ipoib_pull ( struct net_device *netdev __unused,
+ struct io_buffer *iobuf, const void **ll_dest,
const void **ll_source, uint16_t *net_proto ) {
struct ipoib_hdr *ipoib_hdr = iobuf->data;
struct ipoib_peer *dest;