diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/usb/cdc_eem.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/usb/cdc_eem.c')
-rw-r--r-- | drivers/net/usb/cdc_eem.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index 23300656c266..5f3b97668e63 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/crc32.h> | 30 | #include <linux/crc32.h> |
31 | #include <linux/usb/cdc.h> | 31 | #include <linux/usb/cdc.h> |
32 | #include <linux/usb/usbnet.h> | 32 | #include <linux/usb/usbnet.h> |
33 | #include <linux/gfp.h> | ||
33 | 34 | ||
34 | 35 | ||
35 | /* | 36 | /* |
@@ -73,7 +74,7 @@ static void eem_linkcmd(struct usbnet *dev, struct sk_buff *skb) | |||
73 | usb_free_urb(urb); | 74 | usb_free_urb(urb); |
74 | fail: | 75 | fail: |
75 | dev_kfree_skb(skb); | 76 | dev_kfree_skb(skb); |
76 | devwarn(dev, "link cmd failure\n"); | 77 | netdev_warn(dev->net, "link cmd failure\n"); |
77 | return; | 78 | return; |
78 | } | 79 | } |
79 | } | 80 | } |
@@ -121,8 +122,8 @@ static struct sk_buff *eem_tx_fixup(struct usbnet *dev, struct sk_buff *skb, | |||
121 | int headroom = skb_headroom(skb); | 122 | int headroom = skb_headroom(skb); |
122 | int tailroom = skb_tailroom(skb); | 123 | int tailroom = skb_tailroom(skb); |
123 | 124 | ||
124 | if ((tailroom >= ETH_FCS_LEN + padlen) | 125 | if ((tailroom >= ETH_FCS_LEN + padlen) && |
125 | && (headroom >= EEM_HEAD)) | 126 | (headroom >= EEM_HEAD)) |
126 | goto done; | 127 | goto done; |
127 | 128 | ||
128 | if ((headroom + tailroom) | 129 | if ((headroom + tailroom) |
@@ -212,7 +213,8 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
212 | * b15: 1 (EEM command) | 213 | * b15: 1 (EEM command) |
213 | */ | 214 | */ |
214 | if (header & BIT(14)) { | 215 | if (header & BIT(14)) { |
215 | devdbg(dev, "reserved command %04x\n", header); | 216 | netdev_dbg(dev->net, "reserved command %04x\n", |
217 | header); | ||
216 | continue; | 218 | continue; |
217 | } | 219 | } |
218 | 220 | ||
@@ -255,8 +257,9 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
255 | case 1: /* Echo response */ | 257 | case 1: /* Echo response */ |
256 | case 5: /* Tickle */ | 258 | case 5: /* Tickle */ |
257 | default: /* reserved */ | 259 | default: /* reserved */ |
258 | devwarn(dev, "unexpected link command %d\n", | 260 | netdev_warn(dev->net, |
259 | bmEEMCmd); | 261 | "unexpected link command %d\n", |
262 | bmEEMCmd); | ||
260 | continue; | 263 | continue; |
261 | } | 264 | } |
262 | 265 | ||