diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-19 18:33:04 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:24:41 -0400 |
commit | 98e399f82ab3a6d863d1d4a7ea48925cc91c830e (patch) | |
tree | 5f84043aeec1ec27c2e8e6cc25b5d2e6c3d07343 /arch/um/drivers | |
parent | 31713c333ddbb66d694829082620b69b71c4b09a (diff) |
[SK_BUFF]: Introduce skb_mac_header()
For the places where we need a pointer to the mac header, it is still legal to
touch skb->mac.raw directly if just adding to, subtracting from or setting it
to another layer header.
This one also converts some more cases to skb_reset_mac_header() that my
regex missed as it had no spaces before nor after '=', ugh.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/daemon_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/mcast_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/pcap_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/slip_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/slirp_kern.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/arch/um/drivers/daemon_kern.c b/arch/um/drivers/daemon_kern.c index 9c2e7a758f21..adeece11e596 100644 --- a/arch/um/drivers/daemon_kern.c +++ b/arch/um/drivers/daemon_kern.c | |||
@@ -46,7 +46,7 @@ static int daemon_read(int fd, struct sk_buff **skb, | |||
46 | { | 46 | { |
47 | *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); | 47 | *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); |
48 | if(*skb == NULL) return(-ENOMEM); | 48 | if(*skb == NULL) return(-ENOMEM); |
49 | return(net_recvfrom(fd, (*skb)->mac.raw, | 49 | return(net_recvfrom(fd, skb_mac_header(*skb), |
50 | (*skb)->dev->mtu + ETH_HEADER_OTHER)); | 50 | (*skb)->dev->mtu + ETH_HEADER_OTHER)); |
51 | } | 51 | } |
52 | 52 | ||
diff --git a/arch/um/drivers/mcast_kern.c b/arch/um/drivers/mcast_kern.c index 52ccb7b53cd2..e6b8e0dd72a8 100644 --- a/arch/um/drivers/mcast_kern.c +++ b/arch/um/drivers/mcast_kern.c | |||
@@ -50,7 +50,7 @@ static int mcast_read(int fd, struct sk_buff **skb, struct uml_net_private *lp) | |||
50 | { | 50 | { |
51 | *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); | 51 | *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); |
52 | if(*skb == NULL) return(-ENOMEM); | 52 | if(*skb == NULL) return(-ENOMEM); |
53 | return(net_recvfrom(fd, (*skb)->mac.raw, | 53 | return(net_recvfrom(fd, skb_mac_header(*skb), |
54 | (*skb)->dev->mtu + ETH_HEADER_OTHER)); | 54 | (*skb)->dev->mtu + ETH_HEADER_OTHER)); |
55 | } | 55 | } |
56 | 56 | ||
diff --git a/arch/um/drivers/pcap_kern.c b/arch/um/drivers/pcap_kern.c index e67362acf0e7..948849343ca4 100644 --- a/arch/um/drivers/pcap_kern.c +++ b/arch/um/drivers/pcap_kern.c | |||
@@ -36,7 +36,7 @@ static int pcap_read(int fd, struct sk_buff **skb, | |||
36 | { | 36 | { |
37 | *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); | 37 | *skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER); |
38 | if(*skb == NULL) return(-ENOMEM); | 38 | if(*skb == NULL) return(-ENOMEM); |
39 | return(pcap_user_read(fd, (*skb)->mac.raw, | 39 | return(pcap_user_read(fd, skb_mac_header(*skb), |
40 | (*skb)->dev->mtu + ETH_HEADER_OTHER, | 40 | (*skb)->dev->mtu + ETH_HEADER_OTHER, |
41 | (struct pcap_data *) &lp->user)); | 41 | (struct pcap_data *) &lp->user)); |
42 | } | 42 | } |
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c index 25634bd1f585..125c44f77638 100644 --- a/arch/um/drivers/slip_kern.c +++ b/arch/um/drivers/slip_kern.c | |||
@@ -49,7 +49,7 @@ static unsigned short slip_protocol(struct sk_buff *skbuff) | |||
49 | static int slip_read(int fd, struct sk_buff **skb, | 49 | static int slip_read(int fd, struct sk_buff **skb, |
50 | struct uml_net_private *lp) | 50 | struct uml_net_private *lp) |
51 | { | 51 | { |
52 | return(slip_user_read(fd, (*skb)->mac.raw, (*skb)->dev->mtu, | 52 | return(slip_user_read(fd, skb_mac_header(*skb), (*skb)->dev->mtu, |
53 | (struct slip_data *) &lp->user)); | 53 | (struct slip_data *) &lp->user)); |
54 | } | 54 | } |
55 | 55 | ||
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c index b3ed8fb874ab..0a0324a6d290 100644 --- a/arch/um/drivers/slirp_kern.c +++ b/arch/um/drivers/slirp_kern.c | |||
@@ -53,7 +53,7 @@ static unsigned short slirp_protocol(struct sk_buff *skbuff) | |||
53 | static int slirp_read(int fd, struct sk_buff **skb, | 53 | static int slirp_read(int fd, struct sk_buff **skb, |
54 | struct uml_net_private *lp) | 54 | struct uml_net_private *lp) |
55 | { | 55 | { |
56 | return(slirp_user_read(fd, (*skb)->mac.raw, (*skb)->dev->mtu, | 56 | return(slirp_user_read(fd, skb_mac_header(*skb), (*skb)->dev->mtu, |
57 | (struct slirp_data *) &lp->user)); | 57 | (struct slirp_data *) &lp->user)); |
58 | } | 58 | } |
59 | 59 | ||