summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-07-17 00:45:02 (GMT)
committerDavid S. Miller <davem@davemloft.net>2011-07-17 00:45:02 (GMT)
commitb23b5455b6458920179a1f27513ce42e70d11f37 (patch)
treed7bd2c13199485c2504d6b315d451cebba6978ae /include
parent47ec132a40d788d45e2f088545dea68798034dab (diff)
downloadlinux-b23b5455b6458920179a1f27513ce42e70d11f37.tar.xz
neigh: Kill hh_cache->hh_output
It's just taking on one of two possible values, either neigh_ops->output or dev_queue_xmit(). And this is purely depending upon whether nud_state has NUD_CONNECTED set or not. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--include/net/neighbour.h4
2 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f84dfd2..52c4e38 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -254,7 +254,6 @@ struct netdev_hw_addr_list {
struct hh_cache {
u16 hh_len;
u16 __pad;
- int (*hh_output)(struct sk_buff *skb);
seqlock_t hh_lock;
/* cached hardware header; allow for machine alignment needs. */
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 97990dd..60bac81 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -340,13 +340,13 @@ static inline int neigh_hh_output(struct hh_cache *hh, struct sk_buff *skb)
} while (read_seqretry(&hh->hh_lock, seq));
skb_push(skb, hh_len);
- return hh->hh_output(skb);
+ return dev_queue_xmit(skb);
}
static inline int neigh_output(struct neighbour *n, struct sk_buff *skb)
{
struct hh_cache *hh = &n->hh;
- if (hh->hh_len)
+ if ((n->nud_state & NUD_CONNECTED) && hh->hh_len)
return neigh_hh_output(hh, skb);
else
return n->output(skb);