[NOUPSTREAM] backports: add dummy skb_get_hash_perturb() backport
authorLuca Coelho <luciano.coelho@intel.com>
Tue, 16 Aug 2016 08:30:29 +0000 (11:30 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 6 Feb 2017 14:00:43 +0000 (15:00 +0100)
In kernels < 4.2, we don't have skb_get_hash_perturb(), which is
needed by the new fq code.  We don't need it in stack-dev, so just add
a dummy function that returns 0.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
backport/backport-include/linux/skbuff.h

index 6fd42497bed013e23fa7ef2d98781c1c4fa89019..cd10b427c09721914337affaaf14c54179230b31 100644 (file)
@@ -305,6 +305,14 @@ static inline void skb_free_frag(void *data)
 {
        put_page(virt_to_head_page(data));
 }
+
+/* iwlwifi doesn't need this function, so it's safe to just return 0 */
+static inline
+__u32 skb_get_hash_perturb(const struct sk_buff *skb, u32 perturb)
+{
+       return 0;
+}
+
 #endif
 
 #endif /* __BACKPORT_SKBUFF_H */