Received: with ECARTIS (v1.0.0; list netdev); Sun, 30 Jan 2005 13:44:30 -0800 (PST) Received: from mail.linux-mips.net (alg138.algor.co.uk [62.254.210.138] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j0ULiOxY013219 for ; Sun, 30 Jan 2005 13:44:25 -0800 Received: from dea.linux-mips.net (localhost.localdomain [127.0.0.1]) by mail.linux-mips.net (8.13.1/8.13.1) with ESMTP id j0ULeclT006992 for ; Sun, 30 Jan 2005 21:40:38 GMT Received: (from ralf@localhost) by dea.linux-mips.net (8.13.1/8.13.1/Submit) id j0ULecjx006991 for netdev@oss.sgi.com; Sun, 30 Jan 2005 21:40:38 GMT Resent-Message-Id: <200501302140.j0ULecjx006991@dea.linux-mips.net> Date: Sun, 30 Jan 2005 21:21:47 +0000 From: Ralf Baechle DL5RB To: linux-hams@vger.kernel.org Cc: netdev@oss.sgi.com Subject: [PATCH 1/9] Use netdev_priv in NETROM and ROSE Message-ID: <20050130212147.GA6399@linux-mips.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Resent-From: ralf@linux-mips.org Resent-Date: Sun, 30 Jan 2005 21:40:38 +0000 Resent-To: netdev@oss.sgi.com X-Virus-Scanned: ClamAV 0.80/650/Sun Jan 2 19:00:02 2005 clamav-milter version 0.80j on 127.0.0.1 X-Virus-Status: Clean X-archive-position: 1021 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ralf@linux-mips.org Precedence: bulk X-list: netdev Content-Length: 2419 Lines: 78 Convert the NETROM and ROSE protocol stacks to use netdev_priv(). netrom/nr_dev.c | 8 ++++---- rose/rose_dev.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) Index: bk-afu/net/netrom/nr_dev.c =================================================================== --- bk-afu.orig/net/netrom/nr_dev.c +++ bk-afu/net/netrom/nr_dev.c @@ -46,7 +46,7 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); if (!netif_running(dev)) { stats->rx_errors++; @@ -73,7 +73,7 @@ static int nr_rebuild_header(struct sk_buff *skb) { struct net_device *dev = skb->dev; - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); struct sk_buff *skbn; unsigned char *bp = skb->data; int len; @@ -186,7 +186,7 @@ static int nr_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); dev_kfree_skb(skb); stats->tx_errors++; return 0; @@ -194,7 +194,7 @@ static struct net_device_stats *nr_get_stats(struct net_device *dev) { - return (struct net_device_stats *)dev->priv; + return netdev_priv(dev); } void nr_setup(struct net_device *dev) Index: bk-afu/net/rose/rose_dev.c =================================================================== --- bk-afu.orig/net/rose/rose_dev.c +++ bk-afu/net/rose/rose_dev.c @@ -57,7 +57,7 @@ static int rose_rebuild_header(struct sk_buff *skb) { struct net_device *dev = skb->dev; - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); unsigned char *bp = (unsigned char *)skb->data; struct sk_buff *skbn; @@ -117,7 +117,7 @@ static int rose_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = (struct net_device_stats *)dev->priv; + struct net_device_stats *stats = netdev_priv(dev); if (!netif_running(dev)) { printk(KERN_ERR "ROSE: rose_xmit - called when iface is down\n"); @@ -130,7 +130,7 @@ static struct net_device_stats *rose_get_stats(struct net_device *dev) { - return (struct net_device_stats *)dev->priv; + return netdev_priv(dev); } void rose_setup(struct net_device *dev)