浏览代码

net: dsa: mv88e6xxx: specify ageing time limits

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>
Vivien Didelot 8 年之前
父节点
当前提交
9ff74f249d
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/net/dsa/mv88e6xxx/chip.c

+ 2 - 0
drivers/net/dsa/mv88e6xxx/chip.c

@@ -4253,6 +4253,8 @@ static int mv88e6xxx_register_switch(struct mv88e6xxx_chip *chip)
 
 
 	ds->priv = chip;
 	ds->priv = chip;
 	ds->ops = &mv88e6xxx_switch_ops;
 	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);
 	dev_set_drvdata(dev, ds);