b26a6bc3898849a7a7b4fe48cce68faa843ba753
[openwrt/staging/thess.git] / package / kernel / mac80211 / patches / subsys / 070-backports-add-netif_receive_skb_list.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 14 Aug 2020 16:13:45 +0200
3 Subject: [PATCH] backports: add netif_receive_skb_list
4
5 It will be needed by pending mac80211 changes
6
7 Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 ---
9
10 --- a/backport-include/linux/netdevice.h
11 +++ b/backport-include/linux/netdevice.h
12 @@ -372,6 +372,18 @@ static inline int _bp_netdev_upper_dev_l
13 macro_dispatcher(netdev_upper_dev_link, __VA_ARGS__)(__VA_ARGS__)
14 #endif
15
16 +#if LINUX_VERSION_IS_LESS(4,19,0)
17 +static inline void netif_receive_skb_list(struct list_head *head)
18 +{
19 + struct sk_buff *skb, *next;
20 +
21 + list_for_each_entry_safe(skb, next, head, list) {
22 + skb_list_del_init(skb);
23 + netif_receive_skb(skb);
24 + }
25 +}
26 +#endif
27 +
28 #if LINUX_VERSION_IS_LESS(5,0,0)
29 static inline int backport_dev_open(struct net_device *dev, struct netlink_ext_ack *extack)
30 {