On 05/01/2015 10:59 AM, Dirk Neukirchen wrote:
> On 28.04.2015 23:08, Álvaro Fernández Rojas wrote:
>> Boot tested: http://pastebin.com/L6aAb9xj
>>
>> Signed-off-by: Álvaro Fernández Rojas <[email protected]>
> 
> Great work !
> 

> 2. any(?) mac80211 does not built
> 
> Error: include/net/cfg80211.h:3249:25: error: 'struct wiphy' has no member 
> named '_net'
>   return read_pnet(&wiphy->_net);
> 
> I did try to use the v4.1-rc1 Backports package as drop-in (only some OpenWrt 
> specific driver series patches were not applied) 
> since it should deal with that error, (
> 
> but I get compile errors with that too:
> include/net/cfg80211.h:3253:2: error: implicit declaration of function 
> 'possible_write_pnet'
> include/net/cfg80211.h:3248:2: error: implicit declaration of function 
> 'possible_read_pnet'
> (introduced by 
> https://git.kernel.org/cgit/linux/kernel/git/backports/backports.git/tree/patches/collateral-evolutions/network/0053-possible_net_t.patch
>  )
> 

Hi,

This looks like a bug in backports, I haven't tested this image against
kernel 4.1. Please try the attached patch.

Hauke
From 750bc46cfbd5f97558a5f89c5b7ed1b041412ab4 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <[email protected]>
Date: Fri, 1 May 2015 11:17:24 +0200
Subject: [PATCH] header: add possible_{write,read}_pnet() on kernel >= 4.1

backports only adds the possible_{write,read}_pnet() functions for
kernel < 4.1. This results in a compile error on kernel 4.1. This patch
make it use the original functions on these kernel versions. This fixes
a problem introduced in 3d418885971.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
 backport/backport-include/net/net_namespace.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/backport/backport-include/net/net_namespace.h b/backport/backport-include/net/net_namespace.h
index 90c044f..b202120 100644
--- a/backport/backport-include/net/net_namespace.h
+++ b/backport/backport-include/net/net_namespace.h
@@ -57,6 +57,9 @@ static inline struct net *possible_read_pnet(const possible_net_t *pnet)
 	return &init_net;
 #endif
 }
+#else
+#define possible_write_pnet(pnet, net) write_pnet(pnet, net)
+#define possible_read_pnet(pnet) write_pnet(pnet)
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
 
 #endif	/* _COMPAT_NET_NET_NAMESPACE_H */
-- 
1.9.1

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to