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/int51x1.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/int51x1.c')
-rw-r--r-- | drivers/net/usb/int51x1.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/usb/int51x1.c b/drivers/net/usb/int51x1.c index 55cf7081de10..be02a25da71a 100644 --- a/drivers/net/usb/int51x1.c +++ b/drivers/net/usb/int51x1.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
30 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
31 | #include <linux/ethtool.h> | 31 | #include <linux/ethtool.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/mii.h> | 33 | #include <linux/mii.h> |
33 | #include <linux/usb.h> | 34 | #include <linux/usb.h> |
34 | #include <linux/usb/usbnet.h> | 35 | #include <linux/usb/usbnet.h> |
@@ -51,7 +52,7 @@ static int int51x1_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
51 | int len; | 52 | int len; |
52 | 53 | ||
53 | if (!(pskb_may_pull(skb, INT51X1_HEADER_SIZE))) { | 54 | if (!(pskb_may_pull(skb, INT51X1_HEADER_SIZE))) { |
54 | deverr(dev, "unexpected tiny rx frame"); | 55 | netdev_err(dev->net, "unexpected tiny rx frame\n"); |
55 | return 0; | 56 | return 0; |
56 | } | 57 | } |
57 | 58 | ||
@@ -138,25 +139,25 @@ static void int51x1_set_multicast(struct net_device *netdev) | |||
138 | if (netdev->flags & IFF_PROMISC) { | 139 | if (netdev->flags & IFF_PROMISC) { |
139 | /* do not expect to see traffic of other PLCs */ | 140 | /* do not expect to see traffic of other PLCs */ |
140 | filter |= PACKET_TYPE_PROMISCUOUS; | 141 | filter |= PACKET_TYPE_PROMISCUOUS; |
141 | devinfo(dev, "promiscuous mode enabled"); | 142 | netdev_info(dev->net, "promiscuous mode enabled\n"); |
142 | } else if (netdev->mc_count || | 143 | } else if (!netdev_mc_empty(netdev) || |
143 | (netdev->flags & IFF_ALLMULTI)) { | 144 | (netdev->flags & IFF_ALLMULTI)) { |
144 | filter |= PACKET_TYPE_ALL_MULTICAST; | 145 | filter |= PACKET_TYPE_ALL_MULTICAST; |
145 | devdbg(dev, "receive all multicast enabled"); | 146 | netdev_dbg(dev->net, "receive all multicast enabled\n"); |
146 | } else { | 147 | } else { |
147 | /* ~PROMISCUOUS, ~MULTICAST */ | 148 | /* ~PROMISCUOUS, ~MULTICAST */ |
148 | devdbg(dev, "receive own packets only"); | 149 | netdev_dbg(dev->net, "receive own packets only\n"); |
149 | } | 150 | } |
150 | 151 | ||
151 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 152 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
152 | if (!urb) { | 153 | if (!urb) { |
153 | devwarn(dev, "Error allocating URB"); | 154 | netdev_warn(dev->net, "Error allocating URB\n"); |
154 | return; | 155 | return; |
155 | } | 156 | } |
156 | 157 | ||
157 | req = kmalloc(sizeof(*req), GFP_ATOMIC); | 158 | req = kmalloc(sizeof(*req), GFP_ATOMIC); |
158 | if (!req) { | 159 | if (!req) { |
159 | devwarn(dev, "Error allocating control msg"); | 160 | netdev_warn(dev->net, "Error allocating control msg\n"); |
160 | goto out; | 161 | goto out; |
161 | } | 162 | } |
162 | 163 | ||
@@ -173,7 +174,8 @@ static void int51x1_set_multicast(struct net_device *netdev) | |||
173 | 174 | ||
174 | status = usb_submit_urb(urb, GFP_ATOMIC); | 175 | status = usb_submit_urb(urb, GFP_ATOMIC); |
175 | if (status < 0) { | 176 | if (status < 0) { |
176 | devwarn(dev, "Error submitting control msg, sts=%d", status); | 177 | netdev_warn(dev->net, "Error submitting control msg, sts=%d\n", |
178 | status); | ||
177 | goto out1; | 179 | goto out1; |
178 | } | 180 | } |
179 | return; | 181 | return; |