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
6a31b4a279
commit
2404e7a9b6
7 files changed
+88
-90
No files matched your search
@@ -16,6 +16,8 @@
|
||||
#define TICKS_DUE(last, period) ((uint8_t)((uint8_t)ticks - (last)) >= (period))
|
||||
|
||||
#define CPU_PORT 9
|
||||
#define MAC_ADDR_LEN 6
|
||||
#define PORT_BIT(p) ((uint16_t)1 << (p))
|
||||
#define NUL '\0'
|
||||
|
||||
// Define Port-masks for 9-port devices and 6-port devices
|
||||
|
||||
Reference in new issue
Block a user