File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1651,20 +1651,21 @@ static void phylink_link_down(struct phylink *pl)
1651
1651
phylink_info (pl , "Link is Down\n" );
1652
1652
}
1653
1653
1654
+ static bool phylink_link_is_up (struct phylink * pl )
1655
+ {
1656
+ return pl -> netdev ? netif_carrier_ok (pl -> netdev ) : pl -> old_link_state ;
1657
+ }
1658
+
1654
1659
static void phylink_resolve (struct work_struct * w )
1655
1660
{
1656
1661
struct phylink * pl = container_of (w , struct phylink , resolve );
1657
1662
struct phylink_link_state link_state ;
1658
- struct net_device * ndev = pl -> netdev ;
1659
1663
bool mac_config = false;
1660
1664
bool retrigger = false;
1661
1665
bool cur_link_state ;
1662
1666
1663
1667
mutex_lock (& pl -> state_mutex );
1664
- if (pl -> netdev )
1665
- cur_link_state = netif_carrier_ok (ndev );
1666
- else
1667
- cur_link_state = pl -> old_link_state ;
1668
+ cur_link_state = phylink_link_is_up (pl );
1668
1669
1669
1670
if (pl -> phylink_disable_state ) {
1670
1671
pl -> link_failed = false;
You can’t perform that action at this time.
0 commit comments