summaryrefslogtreecommitdiffstats
path: root/net/hsr/hsr_main.c
diff options
context:
space:
mode:
authorArvid Brodin <arvid.brodin@alten.se>2014-07-04 23:36:40 +0200
committerDavid S. Miller <davem@davemloft.net>2014-07-08 11:35:30 -0700
commite9aae56ea43ef4a32527b9d86c1f6b5eebfbd223 (patch)
tree9d98af0ddd4feed4266745d7a2b5fcc45445e65c /net/hsr/hsr_main.c
parentabff7162765cd66ab109c97fd433ef1f39299120 (diff)
net/hsr: Operstate handling cleanup.
Signed-off-by: Arvid Brodin <arvid.brodin@alten.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_main.c')
-rw-r--r--net/hsr/hsr_main.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/hsr/hsr_main.c b/net/hsr/hsr_main.c
index 5f9cd7fdbd9..431b528c244 100644
--- a/net/hsr/hsr_main.c
+++ b/net/hsr/hsr_main.c
@@ -91,7 +91,6 @@ static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event,
{
struct net_device *slave, *other_slave;
struct hsr_priv *hsr;
- int old_operstate;
int mtu_max;
int res;
struct net_device *dev;
@@ -115,13 +114,7 @@ static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event,
case NETDEV_UP: /* Administrative state DOWN */
case NETDEV_DOWN: /* Administrative state UP */
case NETDEV_CHANGE: /* Link (carrier) state changes */
- old_operstate = hsr->dev->operstate;
- hsr_set_carrier(hsr->dev, slave, other_slave);
- /* netif_stacked_transfer_operstate() cannot be used here since
- * it doesn't set IF_OPER_LOWERLAYERDOWN (?)
- */
- hsr_set_operstate(hsr->dev, slave, other_slave);
- hsr_check_announce(hsr->dev, old_operstate);
+ hsr_check_carrier_and_operstate(hsr);
break;
case NETDEV_CHANGEADDR: