mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
13cdc8955c
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.80 Manually rebased: generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch[1] All other patches automatically rebased. 1. Acknowledgement to @heheb and @DragonBluep. Upstream commit for ref: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.80&id=9c5662e95a8dcc232c3ef4deb21033badcd260f6 Build system: x86/64 Build-tested: x86/64/AMD Cezanne, ramips/tplink_archer-a6-v3 Run-tested: x86/64/AMD Cezanne, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
29 lines
886 B
Diff
29 lines
886 B
Diff
From 929bb4d3cfbc7878326c0771a01a636d49c54b40 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
|
Date: Sat, 22 Apr 2023 01:25:39 +0100
|
|
Subject: [PATCH 3/3] net: phy: realtek: check validity of 10GbE link-partner
|
|
advertisement
|
|
|
|
Only use link-partner advertisement bits for 10GbE modes if they are
|
|
actually valid. Check LOCALOK and REMOTEOK bits and clear 10GbE modes
|
|
unless both of them are set.
|
|
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
---
|
|
drivers/net/phy/realtek.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/drivers/net/phy/realtek.c
|
|
+++ b/drivers/net/phy/realtek.c
|
|
@@ -708,6 +708,10 @@ static int rtl822x_read_status(struct ph
|
|
if (lpadv < 0)
|
|
return lpadv;
|
|
|
|
+ if (!(lpadv & MDIO_AN_10GBT_STAT_REMOK) ||
|
|
+ !(lpadv & MDIO_AN_10GBT_STAT_LOCOK))
|
|
+ lpadv = 0;
|
|
+
|
|
mii_10gbt_stat_mod_linkmode_lpa_t(phydev->lp_advertising, lpadv);
|
|
}
|
|
|