backports: fix genetlink backport
authorJohannes Berg <johannes.berg@intel.com>
Fri, 22 Nov 2013 19:21:42 +0000 (20:21 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 23 Nov 2013 12:25:19 +0000 (13:25 +0100)
On kernels that already have pre_doit/post_doit, we don't
fake them by re-assigning all ops and their doit, but then
we clearly need to copy the pointers. Fix that oversight.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backport/compat/backport-3.13.c

index 77eefef910f20d0060630bc142058de2f2779a12..d5b70293709049e304b09a82f29022cb812a026e 100644 (file)
@@ -159,6 +159,10 @@ int __backport_genl_register_family(struct genl_family *family)
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
        __copy(netnsok);
 #endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
+       __copy(pre_doit);
+       __copy(post_doit);
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
        __copy(parallel_ops);
 #endif