aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/net
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-25 20:40:23 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:30 -0400
commit4c13eb6657fe9ef7b4dc8f1a405c902e9e5234e0 (patch)
treed338fad7a61824d8c14c079c0be437ea4ad83f01 /drivers/usb/net
parent029720f15dcd3c6c16824177cfc486083b229411 (diff)
[ETH]: Make eth_type_trans set skb->dev like the other *_type_trans
One less thing for drivers writers to worry about. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/usb/net')
-rw-r--r--drivers/usb/net/catc.c1
-rw-r--r--drivers/usb/net/kaweth.c2
-rw-r--r--drivers/usb/net/pegasus.c5
-rw-r--r--drivers/usb/net/rtl8150.c1
-rw-r--r--drivers/usb/net/usbnet.c1
5 files changed, 3 insertions, 7 deletions
diff --git a/drivers/usb/net/catc.c b/drivers/usb/net/catc.c
index 4852012735f6..d82022dd7f2e 100644
--- a/drivers/usb/net/catc.c
+++ b/drivers/usb/net/catc.c
@@ -255,7 +255,6 @@ static void catc_rx_done(struct urb *urb)
255 if (!(skb = dev_alloc_skb(pkt_len))) 255 if (!(skb = dev_alloc_skb(pkt_len)))
256 return; 256 return;
257 257
258 skb->dev = catc->netdev;
259 eth_copy_and_sum(skb, pkt_start + pkt_offset, pkt_len, 0); 258 eth_copy_and_sum(skb, pkt_start + pkt_offset, pkt_len, 0);
260 skb_put(skb, pkt_len); 259 skb_put(skb, pkt_len);
261 260
diff --git a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c
index de95268ae4b8..a0cc05d21a6a 100644
--- a/drivers/usb/net/kaweth.c
+++ b/drivers/usb/net/kaweth.c
@@ -636,8 +636,6 @@ static void kaweth_usb_receive(struct urb *urb)
636 636
637 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 637 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
638 638
639 skb->dev = net;
640
641 eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0); 639 eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0);
642 640
643 skb_put(skb, pkt_len); 641 skb_put(skb, pkt_len);
diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
index 6d12961cf9f9..13f70e09ea40 100644
--- a/drivers/usb/net/pegasus.c
+++ b/drivers/usb/net/pegasus.c
@@ -575,7 +575,6 @@ static void fill_skb_pool(pegasus_t * pegasus)
575 */ 575 */
576 if (pegasus->rx_pool[i] == NULL) 576 if (pegasus->rx_pool[i] == NULL)
577 return; 577 return;
578 pegasus->rx_pool[i]->dev = pegasus->net;
579 skb_reserve(pegasus->rx_pool[i], 2); 578 skb_reserve(pegasus->rx_pool[i], 2);
580 } 579 }
581} 580}
@@ -1415,8 +1414,10 @@ static void pegasus_disconnect(struct usb_interface *intf)
1415 unlink_all_urbs(pegasus); 1414 unlink_all_urbs(pegasus);
1416 free_all_urbs(pegasus); 1415 free_all_urbs(pegasus);
1417 free_skb_pool(pegasus); 1416 free_skb_pool(pegasus);
1418 if (pegasus->rx_skb) 1417 if (pegasus->rx_skb != NULL) {
1419 dev_kfree_skb(pegasus->rx_skb); 1418 dev_kfree_skb(pegasus->rx_skb);
1419 pegasus->rx_skb = NULL;
1420 }
1420 free_netdev(pegasus->net); 1421 free_netdev(pegasus->net);
1421} 1422}
1422 1423
diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
index ea153dc9b0ac..fa598f0340cf 100644
--- a/drivers/usb/net/rtl8150.c
+++ b/drivers/usb/net/rtl8150.c
@@ -646,7 +646,6 @@ static void fill_skb_pool(rtl8150_t *dev)
646 if (!skb) { 646 if (!skb) {
647 return; 647 return;
648 } 648 }
649 skb->dev = dev->netdev;
650 skb_reserve(skb, 2); 649 skb_reserve(skb, 2);
651 dev->rx_skb_pool[i] = skb; 650 dev->rx_skb_pool[i] = skb;
652 } 651 }
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index de69b183bd2f..0c5465a7909b 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -203,7 +203,6 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
203{ 203{
204 int status; 204 int status;
205 205
206 skb->dev = dev->net;
207 skb->protocol = eth_type_trans (skb, dev->net); 206 skb->protocol = eth_type_trans (skb, dev->net);
208 dev->stats.rx_packets++; 207 dev->stats.rx_packets++;
209 dev->stats.rx_bytes += skb->len; 208 dev->stats.rx_bytes += skb->len;