net: dsa: sja1105: Don't check state->link in phylink_mac_config
authorVladimir Oltean <olteanv@gmail.com>
Thu, 27 Jun 2019 21:46:35 +0000 (00:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:31:31 +0000 (09:31 -0700)
commita979a0ab3687f701ef3a8223cbb56ce993a767fb
treef8cfa74e5a0fb8a1b249e9ef37e5286096df2bc0
parentf7110b753b77b0639d831ad822aad557b2cf000e
net: dsa: sja1105: Don't check state->link in phylink_mac_config

It has been pointed out that PHYLINK can call mac_config only to update
the phy_interface_type and without knowing what the AN results are.

Experimentally, when this was observed to happen, state->link was also
unset, and therefore was used as a proxy to ignore this call. However it
is also suggested that state->link is undefined for this callback and
should not be relied upon.

So let the previously-dead codepath for SPEED_UNKNOWN be called, and
update the comment to make sure the MAC's behavior is sane.

Cc: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_main.c