diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-17 16:34:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-18 02:11:17 -0400 |
commit | 8f40b161de4f27402b4c0659ad2ae83fad5a0cdd (patch) | |
tree | 9e2dbd4ba8a66916c690b0e5791ac25ea0958c26 /net/decnet/dn_neigh.c | |
parent | 69ecca86da4890c13a5e29c51b4ac76a1a8a62c9 (diff) |
neigh: Pass neighbour entry to output ops.
This will get us closer to being able to do "neigh stuff"
completely independent of the underlying dst_entry for
protocols (ipv4/ipv6) that wish to do so.
We will also be able to make dst entries neigh-less.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_neigh.c')
-rw-r--r-- | net/decnet/dn_neigh.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 84fee8a4f89d..5d61e8965b66 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
@@ -51,9 +51,9 @@ | |||
51 | static int dn_neigh_construct(struct neighbour *); | 51 | static int dn_neigh_construct(struct neighbour *); |
52 | static void dn_long_error_report(struct neighbour *, struct sk_buff *); | 52 | static void dn_long_error_report(struct neighbour *, struct sk_buff *); |
53 | static void dn_short_error_report(struct neighbour *, struct sk_buff *); | 53 | static void dn_short_error_report(struct neighbour *, struct sk_buff *); |
54 | static int dn_long_output(struct sk_buff *); | 54 | static int dn_long_output(struct neighbour *, struct sk_buff *); |
55 | static int dn_short_output(struct sk_buff *); | 55 | static int dn_short_output(struct neighbour *, struct sk_buff *); |
56 | static int dn_phase3_output(struct sk_buff *); | 56 | static int dn_phase3_output(struct neighbour *, struct sk_buff *); |
57 | 57 | ||
58 | 58 | ||
59 | /* | 59 | /* |
@@ -218,10 +218,8 @@ static int dn_neigh_output_packet(struct sk_buff *skb) | |||
218 | return -EINVAL; | 218 | return -EINVAL; |
219 | } | 219 | } |
220 | 220 | ||
221 | static int dn_long_output(struct sk_buff *skb) | 221 | static int dn_long_output(struct neighbour *neigh, struct sk_buff *skb) |
222 | { | 222 | { |
223 | struct dst_entry *dst = skb_dst(skb); | ||
224 | struct neighbour *neigh = dst->neighbour; | ||
225 | struct net_device *dev = neigh->dev; | 223 | struct net_device *dev = neigh->dev; |
226 | int headroom = dev->hard_header_len + sizeof(struct dn_long_packet) + 3; | 224 | int headroom = dev->hard_header_len + sizeof(struct dn_long_packet) + 3; |
227 | unsigned char *data; | 225 | unsigned char *data; |
@@ -265,10 +263,8 @@ static int dn_long_output(struct sk_buff *skb) | |||
265 | neigh->dev, dn_neigh_output_packet); | 263 | neigh->dev, dn_neigh_output_packet); |
266 | } | 264 | } |
267 | 265 | ||
268 | static int dn_short_output(struct sk_buff *skb) | 266 | static int dn_short_output(struct neighbour *neigh, struct sk_buff *skb) |
269 | { | 267 | { |
270 | struct dst_entry *dst = skb_dst(skb); | ||
271 | struct neighbour *neigh = dst->neighbour; | ||
272 | struct net_device *dev = neigh->dev; | 268 | struct net_device *dev = neigh->dev; |
273 | int headroom = dev->hard_header_len + sizeof(struct dn_short_packet) + 2; | 269 | int headroom = dev->hard_header_len + sizeof(struct dn_short_packet) + 2; |
274 | struct dn_short_packet *sp; | 270 | struct dn_short_packet *sp; |
@@ -309,10 +305,8 @@ static int dn_short_output(struct sk_buff *skb) | |||
309 | * Phase 3 output is the same is short output, execpt that | 305 | * Phase 3 output is the same is short output, execpt that |
310 | * it clears the area bits before transmission. | 306 | * it clears the area bits before transmission. |
311 | */ | 307 | */ |
312 | static int dn_phase3_output(struct sk_buff *skb) | 308 | static int dn_phase3_output(struct neighbour *neigh, struct sk_buff *skb) |
313 | { | 309 | { |
314 | struct dst_entry *dst = skb_dst(skb); | ||
315 | struct neighbour *neigh = dst->neighbour; | ||
316 | struct net_device *dev = neigh->dev; | 310 | struct net_device *dev = neigh->dev; |
317 | int headroom = dev->hard_header_len + sizeof(struct dn_short_packet) + 2; | 311 | int headroom = dev->hard_header_len + sizeof(struct dn_short_packet) + 2; |
318 | struct dn_short_packet *sp; | 312 | struct dn_short_packet *sp; |