swconfig: support receiving SWITCH_TYPE_LINK from kernel
When using cli, print link state the same way kernel used to do it. This will allow kernel switching PORT_LINK from SWITCH_TYPE_STRING. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 47998
This commit is contained in:
@@ -105,11 +105,16 @@ enum swlib_port_flags {
|
||||
SWLIB_PORT_FLAG_TAGGED = (1 << 0),
|
||||
};
|
||||
|
||||
enum swlib_link_flags {
|
||||
SWLIB_LINK_FLAG_EEE_100BASET = (1 << 0),
|
||||
SWLIB_LINK_FLAG_EEE_1000BASET = (1 << 1),
|
||||
};
|
||||
|
||||
struct switch_dev;
|
||||
struct switch_attr;
|
||||
struct switch_port;
|
||||
struct switch_port_map;
|
||||
struct switch_port_link;
|
||||
struct switch_val;
|
||||
struct uci_package;
|
||||
|
||||
@@ -138,6 +143,7 @@ struct switch_val {
|
||||
char *s;
|
||||
int i;
|
||||
struct switch_port *ports;
|
||||
struct switch_port_link *link;
|
||||
} value;
|
||||
};
|
||||
|
||||
@@ -161,6 +167,17 @@ struct switch_portmap {
|
||||
char *segment;
|
||||
};
|
||||
|
||||
struct switch_port_link {
|
||||
int link:1;
|
||||
int duplex:1;
|
||||
int aneg:1;
|
||||
int tx_flow:1;
|
||||
int rx_flow:1;
|
||||
int speed;
|
||||
/* in ethtool adv_t format */
|
||||
uint32_t eee;
|
||||
};
|
||||
|
||||
/**
|
||||
* swlib_list: list all switches
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user