diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-12 23:28:12 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-13 02:29:59 -0700 |
commit | e69dd336ee3a05a589629b505b18ba5e7a5b4c54 (patch) | |
tree | ce221d370029164d5ea498ab0da50672d03a5b0e /drivers | |
parent | 3769cffb1c48f64640ffab7ce3bffe867342c0f0 (diff) | |
download | kernel_goldelico_gta04-e69dd336ee3a05a589629b505b18ba5e7a5b4c54.zip kernel_goldelico_gta04-e69dd336ee3a05a589629b505b18ba5e7a5b4c54.tar.gz kernel_goldelico_gta04-e69dd336ee3a05a589629b505b18ba5e7a5b4c54.tar.bz2 |
net: Push protocol type directly down to header_ops->cache()
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firewire/net.c | 6 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_net.c | 5 | ||||
-rw-r--r-- | drivers/net/plip.c | 6 |
3 files changed, 9 insertions, 8 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index b9762d0..eced1c2 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -261,16 +261,16 @@ static int fwnet_header_rebuild(struct sk_buff *skb) } static int fwnet_header_cache(const struct neighbour *neigh, - struct hh_cache *hh) + struct hh_cache *hh, __be16 type) { struct net_device *net; struct fwnet_header *h; - if (hh->hh_type == cpu_to_be16(ETH_P_802_3)) + if (type == cpu_to_be16(ETH_P_802_3)) return -1; net = neigh->dev; h = (struct fwnet_header *)((u8 *)hh->hh_data + 16 - sizeof(*h)); - h->h_proto = hh->hh_type; + h->h_proto = type; memcpy(h->h_dest, neigh->ha, net->addr_len); hh->hh_len = FWNET_HLEN; diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 9798811..48e9cc0 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c @@ -1983,13 +1983,14 @@ isdn_net_rebuild_header(struct sk_buff *skb) return ret; } -static int isdn_header_cache(const struct neighbour *neigh, struct hh_cache *hh) +static int isdn_header_cache(const struct neighbour *neigh, struct hh_cache *hh, + __be16 type) { const struct net_device *dev = neigh->dev; isdn_net_local *lp = netdev_priv(dev); if (lp->p_encap == ISDN_NET_ENCAP_ETHER) - return eth_header_cache(neigh, hh); + return eth_header_cache(neigh, hh, type); return -1; } diff --git a/drivers/net/plip.c b/drivers/net/plip.c index ca4df7f..a9e9ca8 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c @@ -152,7 +152,7 @@ static int plip_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned len); static int plip_hard_header_cache(const struct neighbour *neigh, - struct hh_cache *hh); + struct hh_cache *hh, __be16 type); static int plip_open(struct net_device *dev); static int plip_close(struct net_device *dev); static int plip_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); @@ -1026,11 +1026,11 @@ plip_hard_header(struct sk_buff *skb, struct net_device *dev, } static int plip_hard_header_cache(const struct neighbour *neigh, - struct hh_cache *hh) + struct hh_cache *hh, __be16 type) { int ret; - ret = eth_header_cache(neigh, hh); + ret = eth_header_cache(neigh, hh, type); if (ret == 0) { struct ethhdr *eth; |