summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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