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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user