aboutsummaryrefslogtreecommitdiffstats
path: root/net/can
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2013-12-04 13:52:36 -0500
committerMarc Kleine-Budde <mkl@pengutronix.de>2013-12-21 08:56:21 -0500
commitc0ebbdd6b57949775d428f00b8696a4078f86ac4 (patch)
tree8af4fe6cc50bef0f182043821ce17119c3f59ccc /net/can
parentac7686b9698038cdf5148c9904db907448dceca4 (diff)
can: gw: remove obsolete checks
In commit be286bafe1f4069094865264f29805854c5788bf ("can: gw: add a variable limit for CAN frame routings") the detection of the frame routing has been changed. The former solution required dev->header_ops to be unused (== NULL). I missed to remove the obsolete checks in the original commit - so here it is. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/can')
-rw-r--r--net/can/gw.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/can/gw.c b/net/can/gw.c
index 3f9b0f3a2818..88c8a39c173d 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -844,8 +844,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh)
844 if (!gwj->src.dev) 844 if (!gwj->src.dev)
845 goto out; 845 goto out;
846 846
847 /* check for CAN netdev not using header_ops - see gw_rcv() */ 847 if (gwj->src.dev->type != ARPHRD_CAN)
848 if (gwj->src.dev->type != ARPHRD_CAN || gwj->src.dev->header_ops)
849 goto put_src_out; 848 goto put_src_out;
850 849
851 gwj->dst.dev = dev_get_by_index(&init_net, gwj->ccgw.dst_idx); 850 gwj->dst.dev = dev_get_by_index(&init_net, gwj->ccgw.dst_idx);
@@ -853,8 +852,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh)
853 if (!gwj->dst.dev) 852 if (!gwj->dst.dev)
854 goto put_src_out; 853 goto put_src_out;
855 854
856 /* check for CAN netdev not using header_ops - see gw_rcv() */ 855 if (gwj->dst.dev->type != ARPHRD_CAN)
857 if (gwj->dst.dev->type != ARPHRD_CAN || gwj->dst.dev->header_ops)
858 goto put_src_dst_out; 856 goto put_src_dst_out;
859 857
860 gwj->limit_hops = limhops; 858 gwj->limit_hops = limhops;