]> 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)
commit17310dfb7f8e85812ec26b09df086e8ae31afe3e
tree6b8720d29e1a0894f90ce2a5a82690493f572d72
parent792b54b999acb8ad37c5afb09d8f35f1d61287e3
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