1 From 383ffadd33f484ab4aaeb14fa109b61143d27d58 Mon Sep 17 00:00:00 2001
2 From: Christian Gromm <christian.gromm@microchip.com>
3 Date: Thu, 7 Jun 2018 12:15:38 +0200
4 Subject: [PATCH] most: aim-network: backport Kernel API
6 This patch replaces the function calls skb_put_data with memcpy. It is
7 needed to have the module compiled for kernels prior to 4.13.
9 Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
11 aim-network/networking.c | 8 ++++----
12 1 file changed, 4 insertions(+), 4 deletions(-)
14 diff --git a/aim-network/networking.c b/aim-network/networking.c
15 index 936f013..4c259c2 100644
16 --- a/aim-network/networking.c
17 +++ b/aim-network/networking.c
18 @@ -470,11 +470,11 @@ static int aim_rx_data(struct mbo *mbo)
19 ether_addr_copy(skb_put(skb, ETH_ALEN), dev->dev_addr);
22 - skb_put_data(skb, &zero, 4);
23 - skb_put_data(skb, buf + 5, 2);
24 + memcpy(skb_put(skb, 4), &zero, 4);
25 + memcpy(skb_put(skb, 2), buf + 5, 2);
28 - skb_put_data(skb, buf + 10, 2);
29 + memcpy(skb_put(skb, 2), buf + 10, 2);
33 @@ -483,7 +483,7 @@ static int aim_rx_data(struct mbo *mbo)
37 - skb_put_data(skb, buf, len);
38 + memcpy(skb_put(skb, len), buf, len);
39 skb->protocol = eth_type_trans(skb, dev);
41 if (netif_rx(skb) == NET_RX_SUCCESS) {