提交 f48127b6 编写于 作者: H Holger Eitzenberger 提交者: David S. Miller

802.3ad: turn ports is_enabled into a bool

Turn ports is_enabled into a bool.  There is no functional change.
Signed-off-by: NHolger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d238d458
...@@ -1679,7 +1679,7 @@ static void ad_initialize_port(struct port *port, int lacp_fast) ...@@ -1679,7 +1679,7 @@ static void ad_initialize_port(struct port *port, int lacp_fast)
memcpy(&port->partner_admin, &tmpl, sizeof(tmpl)); memcpy(&port->partner_admin, &tmpl, sizeof(tmpl));
memcpy(&port->partner_oper, &tmpl, sizeof(tmpl)); memcpy(&port->partner_oper, &tmpl, sizeof(tmpl));
port->is_enabled = 1; port->is_enabled = true;
// ****** private parameters ****** // ****** private parameters ******
port->sm_vars = 0x3; port->sm_vars = 0x3;
port->sm_rx_state = 0; port->sm_rx_state = 0;
...@@ -2308,14 +2308,14 @@ void bond_3ad_handle_link_change(struct slave *slave, char link) ...@@ -2308,14 +2308,14 @@ void bond_3ad_handle_link_change(struct slave *slave, char link)
// on link down we are zeroing duplex and speed since some of the adaptors(ce1000.lan) report full duplex/speed instead of N/A(duplex) / 0(speed) // on link down we are zeroing duplex and speed since some of the adaptors(ce1000.lan) report full duplex/speed instead of N/A(duplex) / 0(speed)
// on link up we are forcing recheck on the duplex and speed since some of he adaptors(ce1000.lan) report // on link up we are forcing recheck on the duplex and speed since some of he adaptors(ce1000.lan) report
if (link == BOND_LINK_UP) { if (link == BOND_LINK_UP) {
port->is_enabled = 1; port->is_enabled = true;
port->actor_admin_port_key &= ~AD_DUPLEX_KEY_BITS; port->actor_admin_port_key &= ~AD_DUPLEX_KEY_BITS;
port->actor_oper_port_key=port->actor_admin_port_key |= __get_duplex(port); port->actor_oper_port_key=port->actor_admin_port_key |= __get_duplex(port);
port->actor_admin_port_key &= ~AD_SPEED_KEY_BITS; port->actor_admin_port_key &= ~AD_SPEED_KEY_BITS;
port->actor_oper_port_key=port->actor_admin_port_key |= (__get_link_speed(port) << 1); port->actor_oper_port_key=port->actor_admin_port_key |= (__get_link_speed(port) << 1);
} else { } else {
/* link has failed */ /* link has failed */
port->is_enabled = 0; port->is_enabled = false;
port->actor_admin_port_key &= ~AD_DUPLEX_KEY_BITS; port->actor_admin_port_key &= ~AD_DUPLEX_KEY_BITS;
port->actor_oper_port_key= (port->actor_admin_port_key &= ~AD_SPEED_KEY_BITS); port->actor_oper_port_key= (port->actor_admin_port_key &= ~AD_SPEED_KEY_BITS);
} }
......
...@@ -224,7 +224,8 @@ typedef struct port { ...@@ -224,7 +224,8 @@ typedef struct port {
struct port_params partner_admin; struct port_params partner_admin;
struct port_params partner_oper; struct port_params partner_oper;
u16 is_enabled; // BOOLEAN bool is_enabled;
// ****** PRIVATE PARAMETERS ****** // ****** PRIVATE PARAMETERS ******
u16 sm_vars; // all state machines variables for this port u16 sm_vars; // all state machines variables for this port
rx_states_t sm_rx_state; // state machine rx state rx_states_t sm_rx_state; // state machine rx state
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册