Merge pull request #11351 from yuwata/ethtool-port-table

ethtool: cleanups for port_table
This commit is contained in:
Yu Watanabe 2019-01-08 12:23:11 +09:00 committed by GitHub
commit bca3222cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -31,18 +31,18 @@ static const char* const wol_table[_WOL_MAX] = {
[WOL_ARP] = "arp",
[WOL_MAGIC] = "magic",
[WOL_MAGICSECURE] = "secureon",
[WOL_OFF] = "off"
[WOL_OFF] = "off",
};
DEFINE_STRING_TABLE_LOOKUP(wol, WakeOnLan);
DEFINE_CONFIG_PARSE_ENUM(config_parse_wol, wol, WakeOnLan, "Failed to parse WakeOnLan setting");
static const char* const port_table[_NET_DEV_PORT_MAX] = {
static const char* const port_table[] = {
[NET_DEV_PORT_TP] = "tp",
[NET_DEV_PORT_AUI] = "aui",
[NET_DEV_PORT_MII] = "mii",
[NET_DEV_PORT_FIBRE] = "fibre",
[NET_DEV_PORT_BNC] = "bnc"
[NET_DEV_PORT_BNC] = "bnc",
};
DEFINE_STRING_TABLE_LOOKUP(port, NetDevPort);

View File

@ -42,14 +42,14 @@ typedef enum NetDevFeature {
} NetDevFeature;
typedef enum NetDevPort {
NET_DEV_PORT_TP = 0x00,
NET_DEV_PORT_AUI = 0x01,
NET_DEV_PORT_MII = 0x02,
NET_DEV_PORT_FIBRE = 0x03,
NET_DEV_PORT_BNC = 0x04,
NET_DEV_PORT_DA = 0x05,
NET_DEV_PORT_NONE = 0xef,
NET_DEV_PORT_OTHER = 0xff,
NET_DEV_PORT_TP = PORT_TP,
NET_DEV_PORT_AUI = PORT_AUI,
NET_DEV_PORT_MII = PORT_MII,
NET_DEV_PORT_FIBRE = PORT_FIBRE,
NET_DEV_PORT_BNC = PORT_BNC,
NET_DEV_PORT_DA = PORT_DA,
NET_DEV_PORT_NONE = PORT_NONE,
NET_DEV_PORT_OTHER = PORT_OTHER,
_NET_DEV_PORT_MAX,
_NET_DEV_PORT_INVALID = -1
} NetDevPort;