]> git.baikalelectronics.ru Git - kernel.git/commit
net: phylink: fix PHY validation with rate adaption
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 24 Nov 2022 09:06:48 +0000 (09:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2022 11:12:39 +0000 (11:12 +0000)
commit04ceaf649b5ca98dc14c9c362694582e9b049de4
tree6b8720d29e1a0894f90ce2a5a82690493f572d72
parent5e3eb438c4a4345c8a48546c78a78d07a301f345
net: phylink: fix PHY validation with rate adaption

Tim Harvey reports that link modes which he does not expect to be
supported are being advertised, and this is because of the workaround
we have for PHYs that switch interface modes.

Fix this up by checking whether rate matching will be used for the
requested interface mode, and if rate matching will be used, perform
validation only with the requested interface mode, rather than invoking
this workaround.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c