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:11:55 +0000 (13:11 +0100)
commita19b996dd7a7048ee25c942692f2acde339b5205
treee058f7b4d4ebb36b3ebd6c186c3029d1e88f8dbf
parent65cafef48c93573b45ef8d4c7b703a07cd40a4b6
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