summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2019-01-18 14:30:21 +0200
committerDavid S. Miller <davem@davemloft.net>2019-01-22 12:04:14 -0800
commitdadeb61dcc9acf6a6cafde3ff4931ef88d2e6677 (patch)
treebb3ccc5690de363579f24b8cbe77116739e284a5 /drivers/net/bonding
parent3d021715d994766b59ce724843c6add030d9de6a (diff)
downloadlinux-dadeb61dcc9acf6a6cafde3ff4931ef88d2e6677.tar.bz2
bonding: 3ad: remove bond_3ad_rx_indication's length argument
Since the received lacpdu is accessed via skb_header_pointer() in bond_3ad_lacpdu_recv() we no longer need to check for skb->len's length. If the returned lacpdu pointer is not null that should be enough. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_3ad.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index cdc43eebef9d..d8ef2350c68d 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2348,22 +2348,17 @@ re_arm:
* bond_3ad_rx_indication - handle a received frame
* @lacpdu: received lacpdu
* @slave: slave struct to work on
- * @length: length of the data received
*
* It is assumed that frames that were sent on this NIC don't returned as new
* received frames (loopback). Since only the payload is given to this
* function, it check for loopback.
*/
-static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave,
- u16 length)
+static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave)
{
int ret = RX_HANDLER_ANOTHER;
struct bond_marker *marker;
struct port *port;
- if (length < sizeof(struct lacpdu))
- return ret;
-
port = &(SLAVE_AD_INFO(slave)->port);
if (!port->slave) {
net_warn_ratelimited("%s: Warning: port of slave %s is uninitialized\n",
@@ -2643,7 +2638,7 @@ int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
if (!lacpdu)
return RX_HANDLER_ANOTHER;
- return bond_3ad_rx_indication(lacpdu, slave, skb->len);
+ return bond_3ad_rx_indication(lacpdu, slave);
}
/**