ath79: fix link mode support list on UniFi AC
[openwrt/staging/stintel.git] / target / linux / generic / pending-5.10 / 736-net-phy-at803x-add-at8031-features.patch
1 Add back explicit PHY feature flags for the AR8031 and
2 AR8033 PHY instead of reading them from the PHY.
3
4 The Botloader for Ubiquiti UniFi AC boards (and possibly more)
5 leave fiber page selected, thus we will end up reading the PHY
6 capabilities of the SGMII side (which does not offer 10 Mbit/s).
7
8 We already have a hack in place, which switches back to the copper
9 page, however this happens after capabilities are read.
10
11 The original conversation about 735-net-phy-at803x-fix-at8033-sgmii-mode
12 back in 2015 explicitly mention the UniFi AC Lite. The issue however is
13 not missing autonegotiation on the Fiber side, but the fact the PHY
14 is never switched to the copper side. So half of this patch is superfluous.
15
16 A fix is currently being upstreamed. Once this is mainlined and available to us,
17 these patches can be dropped:
18
19 735-net-phy-at803x-fix-at8033-sgmii-mode.patch
20 736-net-phy-at803x-add-at8031-features.patch
21
22 This was tested on a UniFi AC Lite.
23
24 See https://patchwork.kernel.org/project/netdevbpf/list/?series=467341
25
26 --- a/drivers/net/phy/at803x.c
27 +++ b/drivers/net/phy/at803x.c
28 @@ -1119,7 +1119,7 @@ static struct phy_driver at803x_driver[]
29 .get_wol = at803x_get_wol,
30 .suspend = at803x_suspend,
31 .resume = at803x_resume,
32 - /* PHY_GBIT_FEATURES */
33 + .features = PHY_GBIT_FEATURES,
34 .read_status = at803x_read_status,
35 .aneg_done = at803x_aneg_done,
36 .ack_interrupt = &at803x_ack_interrupt,