2
0
forked from Ivasoft/openwrt

ath79: remove pre-5.10 specific kernel code

With Kernel 5.4 support removed, we can get rid of this legacy code.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer
2021-12-21 22:00:06 +01:00
parent 00b194871c
commit 79a81d36ae
5 changed files with 2 additions and 65 deletions

View File

@@ -178,11 +178,7 @@ struct ag71xx {
struct phy_device *phy_dev;
void *phy_priv;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0)
phy_interface_t phy_if_mode;
#else
int phy_if_mode;
#endif
unsigned int link;
unsigned int speed;

View File

@@ -1198,11 +1198,7 @@ static void ag71xx_oom_timer_handler(struct timer_list *t)
napi_schedule(&ag->napi);
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
static void ag71xx_tx_timeout(struct net_device *dev, unsigned int txqueue)
#else
static void ag71xx_tx_timeout(struct net_device *dev)
#endif
{
struct ag71xx *ag = netdev_priv(dev);
@@ -1679,13 +1675,8 @@ static int ag71xx_probe(struct platform_device *pdev)
eth_random_addr(dev->dev_addr);
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0)
err = of_get_phy_mode(np, &ag->phy_if_mode);
if (err < 0) {
#else
ag->phy_if_mode = of_get_phy_mode(np);
if (ag->phy_if_mode < 0) {
#endif
dev_err(&pdev->dev, "missing phy-mode property in DT\n");
return ag->phy_if_mode;
}