aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-07-13 02:28:12 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-13 05:29:59 -0400
commite69dd336ee3a05a589629b505b18ba5e7a5b4c54 (patch)
treece221d370029164d5ea498ab0da50672d03a5b0e /drivers
parent3769cffb1c48f64640ffab7ce3bffe867342c0f0 (diff)
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.c6
-rw-r--r--drivers/isdn/i4l/isdn_net.c5
-rw-r--r--drivers/net/plip.c6
3 files changed, 9 insertions, 8 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index b9762d07198d..eced1c25bf58 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -261,16 +261,16 @@ static int fwnet_header_rebuild(struct sk_buff *skb)
261} 261}
262 262
263static int fwnet_header_cache(const struct neighbour *neigh, 263static int fwnet_header_cache(const struct neighbour *neigh,
264 struct hh_cache *hh) 264 struct hh_cache *hh, __be16 type)
265{ 265{
266 struct net_device *net; 266 struct net_device *net;
267 struct fwnet_header *h; 267 struct fwnet_header *h;
268 268
269 if (hh->hh_type == cpu_to_be16(ETH_P_802_3)) 269 if (type == cpu_to_be16(ETH_P_802_3))
270 return -1; 270 return -1;
271 net = neigh->dev; 271 net = neigh->dev;
272 h = (struct fwnet_header *)((u8 *)hh->hh_data + 16 - sizeof(*h)); 272 h = (struct fwnet_header *)((u8 *)hh->hh_data + 16 - sizeof(*h));
273 h->h_proto = hh->hh_type; 273 h->h_proto = type;
274 memcpy(h->h_dest, neigh->ha, net->addr_len); 274 memcpy(h->h_dest, neigh->ha, net->addr_len);
275 hh->hh_len = FWNET_HLEN; 275 hh->hh_len = FWNET_HLEN;
276 276
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index 97988111e45a..48e9cc0369b1 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)
1983 return ret; 1983 return ret;
1984} 1984}
1985 1985
1986static int isdn_header_cache(const struct neighbour *neigh, struct hh_cache *hh) 1986static int isdn_header_cache(const struct neighbour *neigh, struct hh_cache *hh,
1987 __be16 type)
1987{ 1988{
1988 const struct net_device *dev = neigh->dev; 1989 const struct net_device *dev = neigh->dev;
1989 isdn_net_local *lp = netdev_priv(dev); 1990 isdn_net_local *lp = netdev_priv(dev);
1990 1991
1991 if (lp->p_encap == ISDN_NET_ENCAP_ETHER) 1992 if (lp->p_encap == ISDN_NET_ENCAP_ETHER)
1992 return eth_header_cache(neigh, hh); 1993 return eth_header_cache(neigh, hh, type);
1993 return -1; 1994 return -1;
1994} 1995}
1995 1996
diff --git a/drivers/net/plip.c b/drivers/net/plip.c
index ca4df7f4cf21..a9e9ca8a86ed 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,
152 unsigned short type, const void *daddr, 152 unsigned short type, const void *daddr,
153 const void *saddr, unsigned len); 153 const void *saddr, unsigned len);
154static int plip_hard_header_cache(const struct neighbour *neigh, 154static int plip_hard_header_cache(const struct neighbour *neigh,
155 struct hh_cache *hh); 155 struct hh_cache *hh, __be16 type);
156static int plip_open(struct net_device *dev); 156static int plip_open(struct net_device *dev);
157static int plip_close(struct net_device *dev); 157static int plip_close(struct net_device *dev);
158static int plip_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); 158static 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,
1026} 1026}
1027 1027
1028static int plip_hard_header_cache(const struct neighbour *neigh, 1028static int plip_hard_header_cache(const struct neighbour *neigh,
1029 struct hh_cache *hh) 1029 struct hh_cache *hh, __be16 type)
1030{ 1030{
1031 int ret; 1031 int ret;
1032 1032
1033 ret = eth_header_cache(neigh, hh); 1033 ret = eth_header_cache(neigh, hh, type);
1034 if (ret == 0) { 1034 if (ret == 0) {
1035 struct ethhdr *eth; 1035 struct ethhdr *eth;
1036 1036