Author: marek Date: 2010-08-03 21:02:27 +0200 (Tue, 03 Aug 2010) New Revision: 1756
Modified: trunk/batman-adv/compat.h Log: batman-adv: eth_type_trans() in older kernels does not set the outgoing device
Signed-off-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
Modified: trunk/batman-adv/compat.h =================================================================== --- trunk/batman-adv/compat.h 2010-08-01 18:31:29 UTC (rev 1755) +++ trunk/batman-adv/compat.h 2010-08-03 19:02:27 UTC (rev 1756) @@ -49,6 +49,17 @@ #define skb_mac_header(_skb) \ ((_skb)->mac.raw)
+#include <linux/etherdevice.h> +static inline __be16 bat_eth_type_trans(struct sk_buff *skb, + struct net_device *dev) +{ + skb->dev = dev; + return eth_type_trans(skb, dev); +} + +#define eth_type_trans(_skb, _dev) \ + bat_eth_type_trans(_skb, _dev); + #endif /* < KERNEL_VERSION(2,6,22) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)