diff options
Diffstat (limited to 'net/dsa/dsa2.c')
-rw-r--r-- | net/dsa/dsa2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 9f8cc26be9ea..1c546b6621ee 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c | |||
@@ -294,6 +294,10 @@ static int dsa_ds_apply(struct dsa_switch_tree *dst, struct dsa_switch *ds) | |||
294 | if (err < 0) | 294 | if (err < 0) |
295 | return err; | 295 | return err; |
296 | 296 | ||
297 | err = dsa_switch_register_notifier(ds); | ||
298 | if (err) | ||
299 | return err; | ||
300 | |||
297 | if (ds->ops->set_addr) { | 301 | if (ds->ops->set_addr) { |
298 | err = ds->ops->set_addr(ds, dst->master_netdev->dev_addr); | 302 | err = ds->ops->set_addr(ds, dst->master_netdev->dev_addr); |
299 | if (err < 0) | 303 | if (err < 0) |
@@ -364,6 +368,8 @@ static void dsa_ds_unapply(struct dsa_switch_tree *dst, struct dsa_switch *ds) | |||
364 | 368 | ||
365 | if (ds->slave_mii_bus && ds->ops->phy_read) | 369 | if (ds->slave_mii_bus && ds->ops->phy_read) |
366 | mdiobus_unregister(ds->slave_mii_bus); | 370 | mdiobus_unregister(ds->slave_mii_bus); |
371 | |||
372 | dsa_switch_unregister_notifier(ds); | ||
367 | } | 373 | } |
368 | 374 | ||
369 | static int dsa_dst_apply(struct dsa_switch_tree *dst) | 375 | static int dsa_dst_apply(struct dsa_switch_tree *dst) |