kernel: add missing config symbols for 4.9
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 005-backport_skb_get_hash_perturb.patch
1 --- a/backport-include/linux/skbuff.h
2 +++ b/backport-include/linux/skbuff.h
3 @@ -305,6 +305,19 @@ static inline void skb_free_frag(void *d
4 {
5 put_page(virt_to_head_page(data));
6 }
7 +
8 +#include <net/flow_keys.h>
9 +#include <linux/jhash.h>
10 +
11 +static inline u32 skb_get_hash_perturb(struct sk_buff *skb, u32 key)
12 +{
13 + struct flow_keys keys;
14 +
15 + skb_flow_dissect(skb, &keys);
16 + return jhash_3words((__force u32)keys.dst,
17 + (__force u32)keys.src ^ keys.ip_proto,
18 + (__force u32)keys.ports, key);
19 +}
20 #endif
21
22 #endif /* __BACKPORT_SKBUFF_H */