summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-01-26 17:15:53 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2019-01-26 20:56:42 +0100
commit531599ccd0729e0baf9b8243d2483ee9253f838a (patch)
tree6dc4b86c4bbc7040191d8290ca7c5660ffc55b07
parent75a3d2f7d183ba0dd9edc29002f4f85591fb3e15 (diff)
backports: Add nl_set_extack_cookie_u64()
This was introduced in Linux commit 801f87469ee8 ("netlink: add nl_set_extack_cookie_u64()") and is used by the wireless subsystem. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/netlink.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h
index f956a769..0fb8e0f3 100644
--- a/backport/backport-include/linux/netlink.h
+++ b/backport/backport-include/linux/netlink.h
@@ -58,4 +58,15 @@ struct netlink_ext_ack {
} while (0)
#endif /* NL_SET_BAD_ATTR */
+#if LINUX_VERSION_IS_LESS(5,0,0)
+static inline void nl_set_extack_cookie_u64(struct netlink_ext_ack *extack,
+ u64 cookie)
+{
+ u64 __cookie = cookie;
+
+ memcpy(extack->cookie, &__cookie, sizeof(__cookie));
+ extack->cookie_len = sizeof(__cookie);
+}
+#endif
+
#endif /* __BACKPORT_LINUX_NETLINK_H */