net: dsa: mv88e6xxx: specify ageing time limits
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Wed, 15 Mar 2017 19:53:50 +0000 (15:53 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Mar 2017 22:34:13 +0000 (15:34 -0700)
Now that DSA has ageing time limits, specify them when registering a
switch so that out-of-range values are handled correctly by the core.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reported-by: Jason Cobham <jcobham@questertangent.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c

index 3354f99df378f2e70e8ba70f475c140d6d1c8bf3..2bca297d9296356c5e158ca51137342036841b7d 100644 (file)
@@ -4253,6 +4253,8 @@ static int mv88e6xxx_register_switch(struct mv88e6xxx_chip *chip)
 
        ds->priv = chip;
        ds->ops = &mv88e6xxx_switch_ops;
+       ds->ageing_time_min = chip->info->age_time_coeff;
+       ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
 
        dev_set_drvdata(dev, ds);