aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 939307891e71..9c58c1ec41a9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3114,7 +3114,7 @@ static int __netif_receive_skb(struct sk_buff *skb)
3114 3114
3115 skb_reset_network_header(skb); 3115 skb_reset_network_header(skb);
3116 skb_reset_transport_header(skb); 3116 skb_reset_transport_header(skb);
3117 skb->mac_len = skb->network_header - skb->mac_header; 3117 skb_reset_mac_len(skb);
3118 3118
3119 pt_prev = NULL; 3119 pt_prev = NULL;
3120 3120
@@ -6178,6 +6178,11 @@ static int dev_cpu_callback(struct notifier_block *nfb,
6178 oldsd->output_queue = NULL; 6178 oldsd->output_queue = NULL;
6179 oldsd->output_queue_tailp = &oldsd->output_queue; 6179 oldsd->output_queue_tailp = &oldsd->output_queue;
6180 } 6180 }
6181 /* Append NAPI poll list from offline CPU. */
6182 if (!list_empty(&oldsd->poll_list)) {
6183 list_splice_init(&oldsd->poll_list, &sd->poll_list);
6184 raise_softirq_irqoff(NET_RX_SOFTIRQ);
6185 }
6181 6186
6182 raise_softirq_irqoff(NET_TX_SOFTIRQ); 6187 raise_softirq_irqoff(NET_TX_SOFTIRQ);
6183 local_irq_enable(); 6188 local_irq_enable();
@@ -6264,29 +6269,23 @@ err_name:
6264/** 6269/**
6265 * netdev_drivername - network driver for the device 6270 * netdev_drivername - network driver for the device
6266 * @dev: network device 6271 * @dev: network device
6267 * @buffer: buffer for resulting name
6268 * @len: size of buffer
6269 * 6272 *
6270 * Determine network driver for device. 6273 * Determine network driver for device.
6271 */ 6274 */
6272char *netdev_drivername(const struct net_device *dev, char *buffer, int len) 6275const char *netdev_drivername(const struct net_device *dev)
6273{ 6276{
6274 const struct device_driver *driver; 6277 const struct device_driver *driver;
6275 const struct device *parent; 6278 const struct device *parent;
6276 6279 const char *empty = "";
6277 if (len <= 0 || !buffer)
6278 return buffer;
6279 buffer[0] = 0;
6280 6280
6281 parent = dev->dev.parent; 6281 parent = dev->dev.parent;
6282
6283 if (!parent) 6282 if (!parent)
6284 return buffer; 6283 return empty;
6285 6284
6286 driver = parent->driver; 6285 driver = parent->driver;
6287 if (driver && driver->name) 6286 if (driver && driver->name)
6288 strlcpy(buffer, driver->name, len); 6287 return driver->name;
6289 return buffer; 6288 return empty;
6290} 6289}
6291 6290
6292static int __netdev_printk(const char *level, const struct net_device *dev, 6291static int __netdev_printk(const char *level, const struct net_device *dev,