summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_3ad.c
diff options
context:
space:
mode:
authorHolger Eitzenberger <holger@eitzenberger.org>2008-12-26 13:41:53 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-26 13:41:53 -0800
commite727149e26b08550269a7786fda977aed65578f6 (patch)
treeb73d6246806b01e2384d84d273cfdb48c6d74891 /drivers/net/bonding/bond_3ad.c
parente4ac43200fd6b8b8de3b487e74e74d3742f70d79 (diff)
802.3ad: use standard ethhdr instead of ad_header
802.3ad has its own ethhdr-like structure in the form of an ad_header, which is at the start of both the LACPDU and marker PDU. Both are the same from the struct values, both are packed as well. It's therefore perfectly fine to replace the ad_header by the ethhdr and to remove its definition. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r--drivers/net/bonding/bond_3ad.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index fb32b29751e..8c2e5ab51f0 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -840,13 +840,11 @@ static int ad_lacpdu_send(struct port *port)
lacpdu_header = (struct lacpdu_header *)skb_put(skb, length);
- memcpy(lacpdu_header->ad_header.destination_address.mac_addr_value,
- lacpdu_mcast_addr, ETH_ALEN);
+ memcpy(lacpdu_header->hdr.h_dest, lacpdu_mcast_addr, ETH_ALEN);
/* Note: source addres is set to be the member's PERMANENT address,
because we use it to identify loopback lacpdus in receive. */
- memcpy(lacpdu_header->ad_header.source_address.mac_addr_value,
- slave->perm_hwaddr, ETH_ALEN);
- lacpdu_header->ad_header.length_type = PKT_TYPE_LACPDU;
+ memcpy(lacpdu_header->hdr.h_source, slave->perm_hwaddr, ETH_ALEN);
+ lacpdu_header->hdr.h_proto = PKT_TYPE_LACPDU;
lacpdu_header->lacpdu = port->lacpdu; // struct copy
@@ -884,13 +882,11 @@ static int ad_marker_send(struct port *port, struct bond_marker *marker)
marker_header = (struct bond_marker_header *)skb_put(skb, length);
- memcpy(marker_header->ad_header.destination_address.mac_addr_value,
- lacpdu_mcast_addr, ETH_ALEN);
+ memcpy(marker_header->hdr.h_dest, lacpdu_mcast_addr, ETH_ALEN);
/* Note: source addres is set to be the member's PERMANENT address,
because we use it to identify loopback MARKERs in receive. */
- memcpy(marker_header->ad_header.source_address.mac_addr_value,
- slave->perm_hwaddr, ETH_ALEN);
- marker_header->ad_header.length_type = PKT_TYPE_LACPDU;
+ memcpy(marker_header->hdr.h_source, slave->perm_hwaddr, ETH_ALEN);
+ marker_header->hdr.h_proto = PKT_TYPE_LACPDU;
marker_header->marker = *marker; // struct copy