Skip to content

Commit 32e25cb

Browse files
Veaceslav Falicodavem330
authored andcommitted
bonding: remove dead code from 3ad
That code has been around for ages without being used. CC: Jay Vosburgh <[email protected]> CC: Andy Gospodarek <[email protected]> Signed-off-by: Veaceslav Falico <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ed3587f commit 32e25cb

File tree

1 file changed

+0
-78
lines changed

1 file changed

+0
-78
lines changed

drivers/net/bonding/bond_3ad.c

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -593,40 +593,6 @@ static void __update_ntt(struct lacpdu *lacpdu, struct port *port)
593593
}
594594
}
595595

596-
/**
597-
* __attach_bond_to_agg
598-
* @port: the port we're looking at
599-
*
600-
* Handle the attaching of the port's control parser/multiplexer and the
601-
* aggregator. This function does nothing since the parser/multiplexer of the
602-
* receive and the parser/multiplexer of the aggregator are already combined.
603-
*/
604-
static void __attach_bond_to_agg(struct port *port)
605-
{
606-
port = NULL; /* just to satisfy the compiler */
607-
/* This function does nothing since the parser/multiplexer of the
608-
* receive and the parser/multiplexer of the aggregator are already
609-
* combined.
610-
*/
611-
}
612-
613-
/**
614-
* __detach_bond_from_agg
615-
* @port: the port we're looking at
616-
*
617-
* Handle the detaching of the port's control parser/multiplexer from the
618-
* aggregator. This function does nothing since the parser/multiplexer of the
619-
* receive and the parser/multiplexer of the aggregator are already combined.
620-
*/
621-
static void __detach_bond_from_agg(struct port *port)
622-
{
623-
port = NULL; /* just to satisfy the compiler */
624-
/* This function does nothing since the parser/multiplexer of the
625-
* receive and the parser/multiplexer of the aggregator are already
626-
* combined
627-
*/
628-
}
629-
630596
/**
631597
* __agg_ports_are_ready - check if all ports in an aggregator are ready
632598
* @aggregator: the aggregator we're looking at
@@ -964,7 +930,6 @@ static void ad_mux_machine(struct port *port)
964930
port->sm_mux_state);
965931
switch (port->sm_mux_state) {
966932
case AD_MUX_DETACHED:
967-
__detach_bond_from_agg(port);
968933
port->actor_oper_port_state &= ~AD_STATE_SYNCHRONIZATION;
969934
ad_disable_collecting_distributing(port);
970935
port->actor_oper_port_state &= ~AD_STATE_COLLECTING;
@@ -975,7 +940,6 @@ static void ad_mux_machine(struct port *port)
975940
port->sm_mux_timer_counter = __ad_timer_to_ticks(AD_WAIT_WHILE_TIMER, 0);
976941
break;
977942
case AD_MUX_ATTACHED:
978-
__attach_bond_to_agg(port);
979943
port->actor_oper_port_state |= AD_STATE_SYNCHRONIZATION;
980944
port->actor_oper_port_state &= ~AD_STATE_COLLECTING;
981945
port->actor_oper_port_state &= ~AD_STATE_DISTRIBUTING;
@@ -1774,48 +1738,6 @@ static void ad_disable_collecting_distributing(struct port *port)
17741738
}
17751739
}
17761740

1777-
#if 0
1778-
/**
1779-
* ad_marker_info_send - send a marker information frame
1780-
* @port: the port we're looking at
1781-
*
1782-
* This function does nothing since we decided not to implement send and handle
1783-
* response for marker PDU's, in this stage, but only to respond to marker
1784-
* information.
1785-
*/
1786-
static void ad_marker_info_send(struct port *port)
1787-
{
1788-
struct bond_marker marker;
1789-
u16 index;
1790-
1791-
// fill the marker PDU with the appropriate values
1792-
marker.subtype = 0x02;
1793-
marker.version_number = 0x01;
1794-
marker.tlv_type = AD_MARKER_INFORMATION_SUBTYPE;
1795-
marker.marker_length = 0x16;
1796-
// convert requester_port to Big Endian
1797-
marker.requester_port = (((port->actor_port_number & 0xFF) << 8) |((u16)(port->actor_port_number & 0xFF00) >> 8));
1798-
marker.requester_system = port->actor_system;
1799-
// convert requester_port(u32) to Big Endian
1800-
marker.requester_transaction_id =
1801-
(((++port->transaction_id & 0xFF) << 24)
1802-
| ((port->transaction_id & 0xFF00) << 8)
1803-
| ((port->transaction_id & 0xFF0000) >> 8)
1804-
| ((port->transaction_id & 0xFF000000) >> 24));
1805-
marker.pad = 0;
1806-
marker.tlv_type_terminator = 0x00;
1807-
marker.terminator_length = 0x00;
1808-
for (index = 0; index < 90; index++)
1809-
marker.reserved_90[index] = 0;
1810-
1811-
// send the marker information
1812-
if (ad_marker_send(port, &marker) >= 0) {
1813-
pr_debug("Sent Marker Information on port %d\n",
1814-
port->actor_port_number);
1815-
}
1816-
}
1817-
#endif
1818-
18191741
/**
18201742
* ad_marker_info_received - handle receive of a Marker information frame
18211743
* @marker_info: Marker info received

0 commit comments

Comments
 (0)