dcwifi: Add Dual Channel Wi-Fi component packages
[feed/packages.git] / net / dcwifi / macremapper / patches / 01_fix_nf_hooks.patch
1 --- a/kernelmod/main.c
2 +++ b/kernelmod/main.c
3 @@ -91,8 +91,11 @@ modinit( void ) {
4
5 rv = mrm_rcdb_init();
6 if (rv != 0) return rv;
7 -
8 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)
9 nf_register_hook(&_hops);
10 +#else
11 + nf_register_net_hook(&init_net, &_hops);
12 +#endif
13 mrm_init_ctlfile(); /* XXX not checking for failure! */
14
15 printk(KERN_INFO "MRM The MAC Address Re-Mapper is now in the kernel\n");
16 @@ -103,7 +106,11 @@ modinit( void ) {
17 static void __exit
18 modexit( void ) {
19 mrm_destroy_ctlfile();
20 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)
21 nf_unregister_hook(&_hops);
22 +#else
23 + nf_unregister_net_hook(&init_net, &_hops);
24 +#endif
25 mrm_rcdb_destroy(); /* imperative that this happens last */
26 printk(KERN_INFO "MRM The MAC Address Re-Mapper gone bye-bye\n");
27 }