From e52ac3398c3d772d372b9b62ab408fd5eec96840 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 16 Jan 2012 12:38:59 +0000 Subject: net: Use device model to get driver name in skb_gso_segment() ethtool operations generally require the caller to hold RTNL and are not safe to call in atomic context. The device model provides this information for most devices; we'll only lose it for some old ISA drivers. Signed-off-by: Ben Hutchings Acked-by: Herbert Xu Signed-off-by: David S. Miller --- net/core/dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'net') diff --git a/net/core/dev.c b/net/core/dev.c index f494675471a9..7e6b7dcaacde 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1962,13 +1962,13 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) { struct net_device *dev = skb->dev; - struct ethtool_drvinfo info = {}; + const char *driver = ""; - if (dev && dev->ethtool_ops && dev->ethtool_ops->get_drvinfo) - dev->ethtool_ops->get_drvinfo(dev, &info); + if (dev && dev->dev.parent) + driver = dev_driver_string(dev->dev.parent); WARN(1, "%s: caps=(%pNF, %pNF) len=%d data_len=%d ip_summed=%d\n", - info.driver, dev ? &dev->features : NULL, + driver, dev ? &dev->features : NULL, skb->sk ? &skb->sk->sk_route_caps : NULL, skb->len, skb->data_len, skb->ip_summed); -- cgit v1.2.3