net: dsa: sja1105: convert to phylink_generic_validate()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 25 Feb 2022 11:56:23 +0000 (11:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Feb 2022 12:47:19 +0000 (12:47 +0000)
commit9c318be13ca051ca7fa567765a0f92b00dcdd75c
tree0f00f46c3384f06f8b15617348b00e0d68320190
parent2d1d548ec14478fc9705d8e1e5a8fe35933e54f0
net: dsa: sja1105: convert to phylink_generic_validate()

Populate the MAC capabilities for the SJA1105 DSA switch using the same
decision making which sja1105_phylink_validate() uses. Remove the now
obsolete sja1105_phylink_validate() implementation to allow DSA to use
phylink_generic_validate() for this switch driver.

As noted by Vladimir, this fixes an inconsequential bug which allowed
gigabit and lower interface modes to be indicated when operating in
2500base-X mode.

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