From 4225f260e5071349eaf3512361197c4d456c461b Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 17 Sep 2018 23:31:40 +0200 Subject: header: Add NL_SET_BAD_ATTR This is used by the mac80211_hwsim driver. The code was copied from the mainline kernel. This was introduced in mainline kernel commit c3ab2b4ec8f7 ("net: ipv4: Add extack messages for route add failures") Signed-off-by: Hauke Mehrtens Signed-off-by: Johannes Berg --- backport/backport-include/linux/netlink.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h index 7da31aad..468a12d1 100644 --- a/backport/backport-include/linux/netlink.h +++ b/backport/backport-include/linux/netlink.h @@ -32,4 +32,11 @@ struct netlink_ext_ack { #define NETLINK_CB_PORTID(__skb) NETLINK_CB(__skb).portid #endif +#ifndef NL_SET_BAD_ATTR +#define NL_SET_BAD_ATTR(extack, attr) do { \ + if ((extack)) \ + (extack)->bad_attr = (attr); \ +} while (0) +#endif /* NL_SET_BAD_ATTR */ + #endif /* __BACKPORT_LINUX_NETLINK_H */ -- cgit v1.2.3