team: use operstate consistently for linkup
authorGeorge Wilkie <gwilkie@vyatta.att-mail.com>
Wed, 20 Feb 2019 08:19:11 +0000 (08:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Mar 2019 12:12:40 +0000 (13:12 +0100)
commite5c31b5a685441786592edb18272caa47b4fb3d7
tree46b2fb38b1be589d6f2f8a4808afb486b5c7b3a8
parentb9d0cb758145600de19b54e99fa3a8a75f10ea8b
team: use operstate consistently for linkup

[ Upstream commit 8c7a77267eec81dd81af8412f29e50c0b1082548 ]

When a port is added to a team, its initial state is derived
from netif_carrier_ok rather than netif_oper_up.
If it is carrier up but operationally down at the time of being
added, the port state.linkup will be set prematurely.
port state.linkup should be set consistently using
netif_oper_up rather than netif_carrier_ok.

Fixes: f1d22a1e0595 ("team: account for oper state")
Signed-off-by: George Wilkie <gwilkie@vyatta.att-mail.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/team/team.c