* [B.A.T.M.A.N.] [PATCH] batman-adv: fix NET_ADDR_RANDOM usage for pre-3.9 kernel
@ 2013-01-08 14:23 Simon Wunderlich
2013-01-09 7:24 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Simon Wunderlich @ 2013-01-08 14:23 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Simon Wunderlich
Kernel before 3.9 have the NET_ADDR_RANDOM flag which needs to be set.
This patch adds the necessary compat change for older kernel.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
---
compat.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/compat.h b/compat.h
index 3d03a2f..e21b310 100644
--- a/compat.h
+++ b/compat.h
@@ -198,6 +198,19 @@ static inline void eth_hw_addr_random(struct net_device *dev)
#define prandom_u32() random32()
+#define batadv_interface_set_mac_addr(x, y) \
+__batadv_interface_set_mac_addr(struct net_device *dev, void *p);\
+static int batadv_interface_set_mac_addr(struct net_device *dev, void *p) \
+{\
+ int ret;\
+\
+ ret = __batadv_interface_set_mac_addr(dev, p);\
+ if (!ret) \
+ dev->addr_assign_type &= ~NET_ADDR_RANDOM;\
+ return ret;\
+}\
+static int __batadv_interface_set_mac_addr(x, y)
+
#endif /* < KERNEL_VERSION(3, 9, 0) */
#endif /* _NET_BATMAN_ADV_COMPAT_H_ */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix NET_ADDR_RANDOM usage for pre-3.9 kernel
2013-01-08 14:23 [B.A.T.M.A.N.] [PATCH] batman-adv: fix NET_ADDR_RANDOM usage for pre-3.9 kernel Simon Wunderlich
@ 2013-01-09 7:24 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2013-01-09 7:24 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Simon Wunderlich
On Tuesday, January 08, 2013 22:23:04 Simon Wunderlich wrote:
> Kernel before 3.9 have the NET_ADDR_RANDOM flag which needs to be set.
> This patch adds the necessary compat change for older kernel.
>
> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
> ---
> compat.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
Applied in revision dfb4649.
Thanks,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-09 7:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 14:23 [B.A.T.M.A.N.] [PATCH] batman-adv: fix NET_ADDR_RANDOM usage for pre-3.9 kernel Simon Wunderlich
2013-01-09 7:24 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox