summaryrefslogtreecommitdiffstats
path: root/net/can/gw.c
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2013-01-28 08:33:33 +0000
committerDavid S. Miller <davem@davemloft.net>2013-01-28 18:17:25 -0500
commit2bf3440d7b8755f2627232e6a4c37efbbe053685 (patch)
tree07e31649ec6a5d58649f6b3c9f8cd1a76e76b24f /net/can/gw.c
parentcef401de7be8c4e155c6746bfccf721a4fa5fab9 (diff)
downloadlinux-2bf3440d7b8755f2627232e6a4c37efbbe053685.tar.gz
linux-2bf3440d7b8755f2627232e6a4c37efbbe053685.tar.bz2
linux-2bf3440d7b8755f2627232e6a4c37efbbe053685.zip
can: rework skb reserved data handling
Added accessor and skb_reserve helpers for struct can_skb_priv. Removed pointless skb_headroom() check. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> CC: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/can/gw.c')
-rw-r--r--net/can/gw.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/can/gw.c b/net/can/gw.c
index acdd4656cc3b..c185fcd5e828 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -381,9 +381,7 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
/* is sending the skb back to the incoming interface not allowed? */
if (!(gwj->flags & CGW_FLAGS_CAN_IIF_TX_OK) &&
- skb_headroom(skb) == sizeof(struct can_skb_priv) &&
- (((struct can_skb_priv *)(skb->head))->ifindex ==
- gwj->dst.dev->ifindex))
+ can_skb_prv(skb)->ifindex == gwj->dst.dev->ifindex)
return;
/*