mac80211: fix build with linux kernel 6.6
[openwrt/staging/stintel.git] / package / kernel / mac80211 / patches / build / 230-backport_genl_info_userhdr.patch
1 --- a/backport-include/net/genetlink.h
2 +++ b/backport-include/net/genetlink.h
3 @@ -3,6 +3,7 @@
4 #include_next <net/genetlink.h>
5 #include <linux/version.h>
6
7 +#if LINUX_VERSION_IS_LESS(4,12,0)
8 static inline void __bp_genl_info_userhdr_set(struct genl_info *info,
9 void *userhdr)
10 {
11 @@ -14,7 +15,6 @@ static inline void *__bp_genl_info_userh
12 return info->userhdr;
13 }
14
15 -#if LINUX_VERSION_IS_LESS(4,12,0)
16 #define GENL_SET_ERR_MSG(info, msg) NL_SET_ERR_MSG(genl_info_extack(info), msg)
17
18 static inline int genl_err_attr(struct genl_info *info, int err,
19 @@ -44,11 +44,13 @@ static inline struct netlink_ext_ack *ge
20 #endif
21 }
22
23 +#if LINUX_VERSION_IS_LESS(6,6,0)
24 /* this gets put in place of info->userhdr, since we use that above */
25 static inline void *genl_info_userhdr(struct genl_info *info)
26 {
27 return (u8 *)info->genlhdr + GENL_HDRLEN;
28 }
29 +#endif
30
31 #if LINUX_VERSION_IS_LESS(4,10,0)
32 #define __genl_ro_after_init