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 b3f52d2f56d7..8efe85070131 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
@@ -6173,6 +6173,11 @@ static int dev_cpu_callback(struct notifier_block *nfb,
6173 oldsd->output_queue = NULL; 6173 oldsd->output_queue = NULL;
6174 oldsd->output_queue_tailp = &oldsd->output_queue; 6174 oldsd->output_queue_tailp = &oldsd->output_queue;
6175 } 6175 }
6176 /* Append NAPI poll list from offline CPU. */
6177 if (!list_empty(&oldsd->poll_list)) {
6178 list_splice_init(&oldsd->poll_list, &sd->poll_list);
6179 raise_softirq_irqoff(NET_RX_SOFTIRQ);
6180 }
6176 6181
6177 raise_softirq_irqoff(NET_TX_SOFTIRQ); 6182 raise_softirq_irqoff(NET_TX_SOFTIRQ);
6178 local_irq_enable(); 6183 local_irq_enable();
@@ -6259,29 +6264,23 @@ err_name:
6259/** 6264/**
6260 * netdev_drivername - network driver for the device 6265 * netdev_drivername - network driver for the device
6261 * @dev: network device 6266 * @dev: network device
6262 * @buffer: buffer for resulting name
6263 * @len: size of buffer
6264 * 6267 *
6265 * Determine network driver for device. 6268 * Determine network driver for device.
6266 */ 6269 */
6267char *netdev_drivername(const struct net_device *dev, char *buffer, int len) 6270const char *netdev_drivername(const struct net_device *dev)
6268{ 6271{
6269 const struct device_driver *driver; 6272 const struct device_driver *driver;
6270 const struct device *parent; 6273 const struct device *parent;
6271 6274 const char *empty = "";
6272 if (len <= 0 || !buffer)
6273 return buffer;
6274 buffer[0] = 0;
6275 6275
6276 parent = dev->dev.parent; 6276 parent = dev->dev.parent;
6277
6278 if (!parent) 6277 if (!parent)
6279 return buffer; 6278 return empty;
6280 6279
6281 driver = parent->driver; 6280 driver = parent->driver;
6282 if (driver && driver->name) 6281 if (driver && driver->name)
6283 strlcpy(buffer, driver->name, len); 6282 return driver->name;
6284 return buffer; 6283 return empty;
6285} 6284}
6286 6285
6287static int __netdev_printk(const char *level, const struct net_device *dev, 6286static int __netdev_printk(const char *level, const struct net_device *dev,