aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/files
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2020-04-27 12:18:07 +0200
committerDavid Bauer <mail@david-bauer.net>2020-04-27 12:20:41 +0200
commit5358d8b995f7aa52e16dd45cef082fc9983c8b39 (patch)
treea177e6508f71b4c67e198f6f133ad718c50f3f26 /target/linux/ath79/files
parent3f5997fb2874fe5c752f3f54de12d20081c2be1b (diff)
downloadupstream-5358d8b995f7aa52e16dd45cef082fc9983c8b39.tar.gz
upstream-5358d8b995f7aa52e16dd45cef082fc9983c8b39.tar.bz2
upstream-5358d8b995f7aa52e16dd45cef082fc9983c8b39.zip
ath79: ag71xx: remove code for legacy kernels
ath79 does not support kernels prior to 4.19 anymore. Remove legacy code for those kernels from the ag71xx driver. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/ath79/files')
-rw-r--r--target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index edb026544c..0db11a6785 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -1080,16 +1080,9 @@ static int ag71xx_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return -EOPNOTSUPP;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0))
-static void ag71xx_oom_timer_handler(unsigned long data)
-{
- struct net_device *dev = (struct net_device *) data;
- struct ag71xx *ag = netdev_priv(dev);
-#else
static void ag71xx_oom_timer_handler(struct timer_list *t)
{
struct ag71xx *ag = from_timer(ag, t, oom_timer);
-#endif
napi_schedule(&ag->napi);
}
@@ -1214,22 +1207,14 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
unsigned int offset = ag->rx_buf_offset;
int ring_mask = BIT(ring->order) - 1;
int ring_size = BIT(ring->order);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
struct list_head rx_list;
struct sk_buff *next;
-#else
- struct sk_buff_head queue;
-#endif
struct sk_buff *skb;
int done = 0;
DBG("%s: rx packets, limit=%d, curr=%u, dirty=%u\n",
dev->name, limit, ring->curr, ring->dirty);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
INIT_LIST_HEAD(&rx_list);
-#else
- skb_queue_head_init(&queue);
-#endif
while (done < limit) {
unsigned int i = ring->curr & ring_mask;
@@ -1271,11 +1256,7 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
} else {
skb->dev = dev;
skb->ip_summed = CHECKSUM_NONE;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
list_add_tail(&skb->list, &rx_list);
-#else
- __skb_queue_tail(&queue, skb);
-#endif
}
next:
@@ -1287,16 +1268,9 @@ next:
ag71xx_ring_rx_refill(ag);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
list_for_each_entry_safe(skb, next, &rx_list, list)
skb->protocol = eth_type_trans(skb, dev);
netif_receive_skb_list(&rx_list);
-#else
- while ((skb = __skb_dequeue(&queue)) != NULL) {
- skb->protocol = eth_type_trans(skb, dev);
- netif_receive_skb(skb);
- }
-#endif
DBG("%s: rx finish, curr=%u, dirty=%u, done=%d\n",
dev->name, ring->curr, ring->dirty, done);
@@ -1520,13 +1494,7 @@ static int ag71xx_probe(struct platform_device *pdev)
INIT_DELAYED_WORK(&ag->restart_work, ag71xx_restart_work_func);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0))
- init_timer(&ag->oom_timer);
- ag->oom_timer.data = (unsigned long) dev;
- ag->oom_timer.function = ag71xx_oom_timer_handler;
-#else
timer_setup(&ag->oom_timer, ag71xx_oom_timer_handler, 0);
-#endif
tx_size = AG71XX_TX_RING_SIZE_DEFAULT;
ag->rx_ring.order = ag71xx_ring_size_order(AG71XX_RX_RING_SIZE_DEFAULT);