mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
lacp: tidy up after review
Move port_bit() to rtl837x_common.h as PORT_BIT(), a uint16_t shift, and MAC_ADDR_LEN from rtl837x_lldp.h next to it, and use MAC_ADDR_LEN for every address in the LACP code instead of a literal 6. Define lacp_mux_update() before its first caller and drop the forward declaration, declare variables at the top of their blocks, put the operator at the end of a continued line, drop the field value comments of the LACPDU struct, and leave lacp_port_lag to lacp_init() instead of initialising it in the test environment.
This commit is contained in:
1 parent
d525229b42
commit
2481810906
7 files changed
+88
-90
No files matched your search
+3
-6
@@ -130,13 +130,10 @@ uint8_t lacpEnabled;
|
||||
uint8_t lacp_actor_state[10];
|
||||
uint8_t lacp_partner_state[10];
|
||||
uint8_t lacp_rx_state[10];
|
||||
uint8_t lacp_partner_sys[10][6];
|
||||
uint8_t lacp_partner_sys[10][MAC_ADDR_LEN];
|
||||
uint16_t lacp_rx_count[10];
|
||||
uint8_t lacp_port_lag[10] = {
|
||||
LACP_LAG_NONE, LACP_LAG_NONE, LACP_LAG_NONE, LACP_LAG_NONE, LACP_LAG_NONE,
|
||||
LACP_LAG_NONE, LACP_LAG_NONE, LACP_LAG_NONE, LACP_LAG_NONE, LACP_LAG_NONE,
|
||||
};
|
||||
uint8_t lacp_port_lag[10];
|
||||
uint16_t lacp_lag_ports[LACP_NUM_LAGS];
|
||||
uint8_t lacp_agg_sys[LACP_NUM_LAGS][6];
|
||||
uint8_t lacp_agg_sys[LACP_NUM_LAGS][MAC_ADDR_LEN];
|
||||
uint8_t lacp_agg_valid[LACP_NUM_LAGS];
|
||||
uint16_t lacp_members_last[LACP_NUM_LAGS];
|
||||
Reference in new issue
Block a user