aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-09 04:40:57 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:52 -0400
commit3b04ddde02cf1b6f14f2697da5c20eca5715017f (patch)
tree9da1341a5a399a507b5ea6bf5a3047506b8d8f8f /net/ipv6/ndisc.c
parentb95cce3576813ac3f86bafa6b5daaaaf7574b0fe (diff)
[NET]: Move hardware header operations out of netdevice.
Since hardware header operations are part of the protocol class not the device instance, make them into a separate object and save memory. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 7ea5a502ca08..b761dbed8cec 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -354,7 +354,7 @@ static int ndisc_constructor(struct neighbour *neigh)
354 rcu_read_unlock(); 354 rcu_read_unlock();
355 355
356 neigh->type = is_multicast ? RTN_MULTICAST : RTN_UNICAST; 356 neigh->type = is_multicast ? RTN_MULTICAST : RTN_UNICAST;
357 if (dev->hard_header == NULL) { 357 if (!dev->header_ops) {
358 neigh->nud_state = NUD_NOARP; 358 neigh->nud_state = NUD_NOARP;
359 neigh->ops = &ndisc_direct_ops; 359 neigh->ops = &ndisc_direct_ops;
360 neigh->output = neigh->ops->queue_xmit; 360 neigh->output = neigh->ops->queue_xmit;
@@ -371,7 +371,7 @@ static int ndisc_constructor(struct neighbour *neigh)
371 neigh->nud_state = NUD_NOARP; 371 neigh->nud_state = NUD_NOARP;
372 memcpy(neigh->ha, dev->broadcast, dev->addr_len); 372 memcpy(neigh->ha, dev->broadcast, dev->addr_len);
373 } 373 }
374 if (dev->hard_header_cache) 374 if (dev->header_ops->cache)
375 neigh->ops = &ndisc_hh_ops; 375 neigh->ops = &ndisc_hh_ops;
376 else 376 else
377 neigh->ops = &ndisc_generic_ops; 377 neigh->ops = &ndisc_generic_ops;
@@ -807,7 +807,7 @@ static void ndisc_recv_ns(struct sk_buff *skb)
807 neigh_update(neigh, lladdr, NUD_STALE, 807 neigh_update(neigh, lladdr, NUD_STALE,
808 NEIGH_UPDATE_F_WEAK_OVERRIDE| 808 NEIGH_UPDATE_F_WEAK_OVERRIDE|
809 NEIGH_UPDATE_F_OVERRIDE); 809 NEIGH_UPDATE_F_OVERRIDE);
810 if (neigh || !dev->hard_header) { 810 if (neigh || !dev->header_ops) {
811 ndisc_send_na(dev, neigh, saddr, &msg->target, 811 ndisc_send_na(dev, neigh, saddr, &msg->target,
812 is_router, 812 is_router,
813 1, (ifp != NULL && inc), inc); 813 1, (ifp != NULL && inc), inc);