mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
kmod-switch-bcm53xx: fixes build on kernel 5.4
This commit is contained in:
parent
5859fc60a4
commit
8c14a219b1
@ -506,9 +506,15 @@ static int b53_configure_ports_of(struct b53_device *dev)
|
||||
if (fixed_link) {
|
||||
u32 spd;
|
||||
u8 po = GMII_PO_LINK;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
|
||||
phy_interface_t mode;
|
||||
#else
|
||||
int mode = of_get_phy_mode(pn);
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
|
||||
of_get_phy_mode(pn, &mode);
|
||||
#endif
|
||||
|
||||
if (!of_property_read_u32(fixed_link, "speed", &spd)) {
|
||||
switch (spd) {
|
||||
|
Loading…
Reference in New Issue
Block a user