summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2018-03-17 03:29:38 -0300
committerLuiz Souza <luiz@netgate.com>2018-03-16 22:38:20 -0500
commit25f6658b3310f47d3569f9c3aeb7126ee64d6e45 (patch)
treee39284245f7a186b3984cc817727bb6a53f2975a
parentc6f5eeeab1ecff7eedd9e04fd9a6f4516648a51c (diff)
downloadFreeBSD-src-25f6658b3310f47d3569f9c3aeb7126ee64d6e45.zip
FreeBSD-src-25f6658b3310f47d3569f9c3aeb7126ee64d6e45.tar.gz
Rename es_lag_valid -> es_lagg_valid to keep the consistency.
(cherry picked from commit 5cbe82445395df2ab9d48df1a5fb52f78057ea02)
-rw-r--r--sbin/etherswitchcfg/etherswitchcfg.c2
-rw-r--r--sys/dev/etherswitch/e6000sw/e6000sw.c6
-rw-r--r--sys/dev/etherswitch/etherswitch.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/sbin/etherswitchcfg/etherswitchcfg.c b/sbin/etherswitchcfg/etherswitchcfg.c
index 007f87d..18c1bd1 100644
--- a/sbin/etherswitchcfg/etherswitchcfg.c
+++ b/sbin/etherswitchcfg/etherswitchcfg.c
@@ -549,7 +549,7 @@ print_laggroup(struct cfg *cfg, int laggroup)
lag.es_laggroup = laggroup;
if (ioctl(cfg->fd, IOETHERSWITCHGETLAGGROUP, &lag) != 0)
err(EX_OSERR, "ioctl(IOETHERSWITCHGETLAGGROUP)");
- if (lag.es_lag_valid == 0)
+ if (lag.es_lagg_valid == 0)
return;
printf("laggroup%d:\n", laggroup);
printf("\tmembers ");
diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c
index 4020a3c..f13471f 100644
--- a/sys/dev/etherswitch/e6000sw/e6000sw.c
+++ b/sys/dev/etherswitch/e6000sw/e6000sw.c
@@ -1536,6 +1536,8 @@ e6000sw_setlaggroup(device_t dev, etherswitch_laggroup_t *lag)
reg |= laggports | LAG_UPDATE;
e6000sw_writereg(sc, REG_GLOBAL2, LAG_MAPPING, reg);
+ lag->es_lagg_valid = 1;
+
return (e6000sw_setlaggmask(sc));
}
@@ -1613,7 +1615,7 @@ e6000sw_getlaggroup(device_t dev, etherswitch_laggroup_t *lag)
sc = device_get_softc(dev);
E6000SW_LOCK_ASSERT(sc, SA_XLOCKED);
- lag->es_lag_valid = 0;
+ lag->es_lagg_valid = 0;
lag->es_member_ports = lag->es_untagged_ports = 0;
/* Read the LAGG ports. */
laggid = lag->es_laggroup & PORT_CONTROL1_LAG_ID_MASK;
@@ -1624,7 +1626,7 @@ e6000sw_getlaggroup(device_t dev, etherswitch_laggroup_t *lag)
/* Is this LAG group in use ? */
if (lag->es_untagged_ports != 0)
- lag->es_lag_valid = 1;
+ lag->es_lagg_valid = 1;
return (0);
}
diff --git a/sys/dev/etherswitch/etherswitch.h b/sys/dev/etherswitch/etherswitch.h
index 4f78763..c047c72 100644
--- a/sys/dev/etherswitch/etherswitch.h
+++ b/sys/dev/etherswitch/etherswitch.h
@@ -113,7 +113,7 @@ struct etherswitch_port {
typedef struct etherswitch_port etherswitch_port_t;
struct etherswitch_laggroup {
- int es_lag_valid;
+ int es_lagg_valid;
int es_laggroup;
int es_member_ports;
int es_untagged_ports;
OpenPOWER on IntegriCloud