]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: phylink: pass phylink and pcs into phylink_pcs_neg_mode()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 3 Dec 2024 15:30:47 +0000 (15:30 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Dec 2024 03:19:06 +0000 (19:19 -0800)
commit17ed1911f9c8d4f9af8e13b2c95103ee06dadc0f
tree8cdb9968fd4ffd17d1fa90cf5733d7eb4183ebd7
parent4485043a9bf83d1a03a62b460ef9d6eec643b0ad
net: phylink: pass phylink and pcs into phylink_pcs_neg_mode()

Move the call to phylink_pcs_neg_mode() in phylink_major_config() after
we have selected the appropriate PCS to allow the PCS to be passed in.

Add struct phylink and struct phylink_pcs pointers to
phylink_pcs_neg_mode() and pass in the appropriate structures. Set
pl->pcs_neg_mode before returning, and remove the return value.

This will allow the capabilities of the PCS and any PHY to be used when
deciding which pcs_neg_mode should be used.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tIUrP-006ITh-6u@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phylink.c