aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcnet32.c
diff options
context:
space:
mode:
authorDon Fry <pcnet32@verizon.net>2007-03-06 13:55:00 -0500
committerJeff Garzik <jeff@garzik.org>2007-04-28 11:00:58 -0400
commit1e56a4b4029dd1cabf73f28970b5c11bcbae6bb7 (patch)
treecdd8de3d66ffcd32b9814ec3102d6dfe6eda58e9 /drivers/net/pcnet32.c
parent6ecb766710e5128e3b8f3c775f907dcb8fead8d1 (diff)
pcnet32: change to use netdev_priv
use netdev_priv() instead of dev->priv Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Don Fry <pcnet32@verizon.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/pcnet32.c')
-rw-r--r--drivers/net/pcnet32.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index cc35bf562f30..9c171a7390e2 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -653,7 +653,7 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev,
653 653
654static void pcnet32_purge_rx_ring(struct net_device *dev) 654static void pcnet32_purge_rx_ring(struct net_device *dev)
655{ 655{
656 struct pcnet32_private *lp = dev->priv; 656 struct pcnet32_private *lp = netdev_priv(dev);
657 int i; 657 int i;
658 658
659 /* free all allocated skbuffs */ 659 /* free all allocated skbuffs */
@@ -681,7 +681,7 @@ static void pcnet32_poll_controller(struct net_device *dev)
681 681
682static int pcnet32_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) 682static int pcnet32_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
683{ 683{
684 struct pcnet32_private *lp = dev->priv; 684 struct pcnet32_private *lp = netdev_priv(dev);
685 unsigned long flags; 685 unsigned long flags;
686 int r = -EOPNOTSUPP; 686 int r = -EOPNOTSUPP;
687 687
@@ -696,7 +696,7 @@ static int pcnet32_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
696 696
697static int pcnet32_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) 697static int pcnet32_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
698{ 698{
699 struct pcnet32_private *lp = dev->priv; 699 struct pcnet32_private *lp = netdev_priv(dev);
700 unsigned long flags; 700 unsigned long flags;
701 int r = -EOPNOTSUPP; 701 int r = -EOPNOTSUPP;
702 702
@@ -711,7 +711,7 @@ static int pcnet32_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
711static void pcnet32_get_drvinfo(struct net_device *dev, 711static void pcnet32_get_drvinfo(struct net_device *dev,
712 struct ethtool_drvinfo *info) 712 struct ethtool_drvinfo *info)
713{ 713{
714 struct pcnet32_private *lp = dev->priv; 714 struct pcnet32_private *lp = netdev_priv(dev);
715 715
716 strcpy(info->driver, DRV_NAME); 716 strcpy(info->driver, DRV_NAME);
717 strcpy(info->version, DRV_VERSION); 717 strcpy(info->version, DRV_VERSION);
@@ -723,7 +723,7 @@ static void pcnet32_get_drvinfo(struct net_device *dev,
723 723
724static u32 pcnet32_get_link(struct net_device *dev) 724static u32 pcnet32_get_link(struct net_device *dev)
725{ 725{
726 struct pcnet32_private *lp = dev->priv; 726 struct pcnet32_private *lp = netdev_priv(dev);
727 unsigned long flags; 727 unsigned long flags;
728 int r; 728 int r;
729 729
@@ -743,19 +743,19 @@ static u32 pcnet32_get_link(struct net_device *dev)
743 743
744static u32 pcnet32_get_msglevel(struct net_device *dev) 744static u32 pcnet32_get_msglevel(struct net_device *dev)
745{ 745{
746 struct pcnet32_private *lp = dev->priv; 746 struct pcnet32_private *lp = netdev_priv(dev);
747 return lp->msg_enable; 747 return lp->msg_enable;
748} 748}
749 749
750static void pcnet32_set_msglevel(struct net_device *dev, u32 value) 750static void pcnet32_set_msglevel(struct net_device *dev, u32 value)
751{ 751{
752 struct pcnet32_private *lp = dev->priv; 752 struct pcnet32_private *lp = netdev_priv(dev);
753 lp->msg_enable = value; 753 lp->msg_enable = value;
754} 754}
755 755
756static int pcnet32_nway_reset(struct net_device *dev) 756static int pcnet32_nway_reset(struct net_device *dev)
757{ 757{
758 struct pcnet32_private *lp = dev->priv; 758 struct pcnet32_private *lp = netdev_priv(dev);
759 unsigned long flags; 759 unsigned long flags;
760 int r = -EOPNOTSUPP; 760 int r = -EOPNOTSUPP;
761 761
@@ -770,7 +770,7 @@ static int pcnet32_nway_reset(struct net_device *dev)
770static void pcnet32_get_ringparam(struct net_device *dev, 770static void pcnet32_get_ringparam(struct net_device *dev,
771 struct ethtool_ringparam *ering) 771 struct ethtool_ringparam *ering)
772{ 772{
773 struct pcnet32_private *lp = dev->priv; 773 struct pcnet32_private *lp = netdev_priv(dev);
774 774
775 ering->tx_max_pending = TX_MAX_RING_SIZE; 775 ering->tx_max_pending = TX_MAX_RING_SIZE;
776 ering->tx_pending = lp->tx_ring_size; 776 ering->tx_pending = lp->tx_ring_size;
@@ -781,7 +781,7 @@ static void pcnet32_get_ringparam(struct net_device *dev,
781static int pcnet32_set_ringparam(struct net_device *dev, 781static int pcnet32_set_ringparam(struct net_device *dev,
782 struct ethtool_ringparam *ering) 782 struct ethtool_ringparam *ering)
783{ 783{
784 struct pcnet32_private *lp = dev->priv; 784 struct pcnet32_private *lp = netdev_priv(dev);
785 unsigned long flags; 785 unsigned long flags;
786 unsigned int size; 786 unsigned int size;
787 ulong ioaddr = dev->base_addr; 787 ulong ioaddr = dev->base_addr;
@@ -847,7 +847,7 @@ static int pcnet32_self_test_count(struct net_device *dev)
847static void pcnet32_ethtool_test(struct net_device *dev, 847static void pcnet32_ethtool_test(struct net_device *dev,
848 struct ethtool_test *test, u64 * data) 848 struct ethtool_test *test, u64 * data)
849{ 849{
850 struct pcnet32_private *lp = dev->priv; 850 struct pcnet32_private *lp = netdev_priv(dev);
851 int rc; 851 int rc;
852 852
853 if (test->flags == ETH_TEST_FL_OFFLINE) { 853 if (test->flags == ETH_TEST_FL_OFFLINE) {
@@ -868,7 +868,7 @@ static void pcnet32_ethtool_test(struct net_device *dev,
868 868
869static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1) 869static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
870{ 870{
871 struct pcnet32_private *lp = dev->priv; 871 struct pcnet32_private *lp = netdev_priv(dev);
872 struct pcnet32_access *a = &lp->a; /* access to registers */ 872 struct pcnet32_access *a = &lp->a; /* access to registers */
873 ulong ioaddr = dev->base_addr; /* card base I/O address */ 873 ulong ioaddr = dev->base_addr; /* card base I/O address */
874 struct sk_buff *skb; /* sk buff */ 874 struct sk_buff *skb; /* sk buff */
@@ -1047,7 +1047,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1)
1047 1047
1048static void pcnet32_led_blink_callback(struct net_device *dev) 1048static void pcnet32_led_blink_callback(struct net_device *dev)
1049{ 1049{
1050 struct pcnet32_private *lp = dev->priv; 1050 struct pcnet32_private *lp = netdev_priv(dev);
1051 struct pcnet32_access *a = &lp->a; 1051 struct pcnet32_access *a = &lp->a;
1052 ulong ioaddr = dev->base_addr; 1052 ulong ioaddr = dev->base_addr;
1053 unsigned long flags; 1053 unsigned long flags;
@@ -1064,7 +1064,7 @@ static void pcnet32_led_blink_callback(struct net_device *dev)
1064 1064
1065static int pcnet32_phys_id(struct net_device *dev, u32 data) 1065static int pcnet32_phys_id(struct net_device *dev, u32 data)
1066{ 1066{
1067 struct pcnet32_private *lp = dev->priv; 1067 struct pcnet32_private *lp = netdev_priv(dev);
1068 struct pcnet32_access *a = &lp->a; 1068 struct pcnet32_access *a = &lp->a;
1069 ulong ioaddr = dev->base_addr; 1069 ulong ioaddr = dev->base_addr;
1070 unsigned long flags; 1070 unsigned long flags;
@@ -1109,7 +1109,7 @@ static int pcnet32_suspend(struct net_device *dev, unsigned long *flags,
1109 int can_sleep) 1109 int can_sleep)
1110{ 1110{
1111 int csr5; 1111 int csr5;
1112 struct pcnet32_private *lp = dev->priv; 1112 struct pcnet32_private *lp = netdev_priv(dev);
1113 struct pcnet32_access *a = &lp->a; 1113 struct pcnet32_access *a = &lp->a;
1114 ulong ioaddr = dev->base_addr; 1114 ulong ioaddr = dev->base_addr;
1115 int ticks; 1115 int ticks;
@@ -1257,7 +1257,7 @@ static void pcnet32_rx_entry(struct net_device *dev,
1257 1257
1258static int pcnet32_rx(struct net_device *dev, int quota) 1258static int pcnet32_rx(struct net_device *dev, int quota)
1259{ 1259{
1260 struct pcnet32_private *lp = dev->priv; 1260 struct pcnet32_private *lp = netdev_priv(dev);
1261 int entry = lp->cur_rx & lp->rx_mod_mask; 1261 int entry = lp->cur_rx & lp->rx_mod_mask;
1262 struct pcnet32_rx_head *rxp = &lp->rx_ring[entry]; 1262 struct pcnet32_rx_head *rxp = &lp->rx_ring[entry];
1263 int npackets = 0; 1263 int npackets = 0;
@@ -1282,7 +1282,7 @@ static int pcnet32_rx(struct net_device *dev, int quota)
1282 1282
1283static int pcnet32_tx(struct net_device *dev) 1283static int pcnet32_tx(struct net_device *dev)
1284{ 1284{
1285 struct pcnet32_private *lp = dev->priv; 1285 struct pcnet32_private *lp = netdev_priv(dev);
1286 unsigned int dirty_tx = lp->dirty_tx; 1286 unsigned int dirty_tx = lp->dirty_tx;
1287 int delta; 1287 int delta;
1288 int must_restart = 0; 1288 int must_restart = 0;
@@ -1381,7 +1381,7 @@ static int pcnet32_tx(struct net_device *dev)
1381#ifdef CONFIG_PCNET32_NAPI 1381#ifdef CONFIG_PCNET32_NAPI
1382static int pcnet32_poll(struct net_device *dev, int *budget) 1382static int pcnet32_poll(struct net_device *dev, int *budget)
1383{ 1383{
1384 struct pcnet32_private *lp = dev->priv; 1384 struct pcnet32_private *lp = netdev_priv(dev);
1385 int quota = min(dev->quota, *budget); 1385 int quota = min(dev->quota, *budget);
1386 unsigned long ioaddr = dev->base_addr; 1386 unsigned long ioaddr = dev->base_addr;
1387 unsigned long flags; 1387 unsigned long flags;
@@ -1428,7 +1428,7 @@ static int pcnet32_poll(struct net_device *dev, int *budget)
1428#define PCNET32_MAX_PHYS 32 1428#define PCNET32_MAX_PHYS 32
1429static int pcnet32_get_regs_len(struct net_device *dev) 1429static int pcnet32_get_regs_len(struct net_device *dev)
1430{ 1430{
1431 struct pcnet32_private *lp = dev->priv; 1431 struct pcnet32_private *lp = netdev_priv(dev);
1432 int j = lp->phycount * PCNET32_REGS_PER_PHY; 1432 int j = lp->phycount * PCNET32_REGS_PER_PHY;
1433 1433
1434 return ((PCNET32_NUM_REGS + j) * sizeof(u16)); 1434 return ((PCNET32_NUM_REGS + j) * sizeof(u16));
@@ -1439,7 +1439,7 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
1439{ 1439{
1440 int i, csr0; 1440 int i, csr0;
1441 u16 *buff = ptr; 1441 u16 *buff = ptr;
1442 struct pcnet32_private *lp = dev->priv; 1442 struct pcnet32_private *lp = netdev_priv(dev);
1443 struct pcnet32_access *a = &lp->a; 1443 struct pcnet32_access *a = &lp->a;
1444 ulong ioaddr = dev->base_addr; 1444 ulong ioaddr = dev->base_addr;
1445 unsigned long flags; 1445 unsigned long flags;
@@ -1804,7 +1804,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1804 } 1804 }
1805 1805
1806 dev->base_addr = ioaddr; 1806 dev->base_addr = ioaddr;
1807 lp = dev->priv; 1807 lp = netdev_priv(dev);
1808 /* pci_alloc_consistent returns page-aligned memory, so we do not have to check the alignment */ 1808 /* pci_alloc_consistent returns page-aligned memory, so we do not have to check the alignment */
1809 if ((lp->init_block = 1809 if ((lp->init_block =
1810 pci_alloc_consistent(pdev, sizeof(*lp->init_block), &lp->init_dma_addr)) == NULL) { 1810 pci_alloc_consistent(pdev, sizeof(*lp->init_block), &lp->init_dma_addr)) == NULL) {
@@ -1998,7 +1998,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1998/* if any allocation fails, caller must also call pcnet32_free_ring */ 1998/* if any allocation fails, caller must also call pcnet32_free_ring */
1999static int pcnet32_alloc_ring(struct net_device *dev, char *name) 1999static int pcnet32_alloc_ring(struct net_device *dev, char *name)
2000{ 2000{
2001 struct pcnet32_private *lp = dev->priv; 2001 struct pcnet32_private *lp = netdev_priv(dev);
2002 2002
2003 lp->tx_ring = pci_alloc_consistent(lp->pci_dev, 2003 lp->tx_ring = pci_alloc_consistent(lp->pci_dev,
2004 sizeof(struct pcnet32_tx_head) * 2004 sizeof(struct pcnet32_tx_head) *
@@ -2065,7 +2065,7 @@ static int pcnet32_alloc_ring(struct net_device *dev, char *name)
2065 2065
2066static void pcnet32_free_ring(struct net_device *dev) 2066static void pcnet32_free_ring(struct net_device *dev)
2067{ 2067{
2068 struct pcnet32_private *lp = dev->priv; 2068 struct pcnet32_private *lp = netdev_priv(dev);
2069 2069
2070 kfree(lp->tx_skbuff); 2070 kfree(lp->tx_skbuff);
2071 lp->tx_skbuff = NULL; 2071 lp->tx_skbuff = NULL;
@@ -2098,7 +2098,7 @@ static void pcnet32_free_ring(struct net_device *dev)
2098 2098
2099static int pcnet32_open(struct net_device *dev) 2099static int pcnet32_open(struct net_device *dev)
2100{ 2100{
2101 struct pcnet32_private *lp = dev->priv; 2101 struct pcnet32_private *lp = netdev_priv(dev);
2102 unsigned long ioaddr = dev->base_addr; 2102 unsigned long ioaddr = dev->base_addr;
2103 u16 val; 2103 u16 val;
2104 int i; 2104 int i;
@@ -2344,7 +2344,7 @@ static int pcnet32_open(struct net_device *dev)
2344 2344
2345static void pcnet32_purge_tx_ring(struct net_device *dev) 2345static void pcnet32_purge_tx_ring(struct net_device *dev)
2346{ 2346{
2347 struct pcnet32_private *lp = dev->priv; 2347 struct pcnet32_private *lp = netdev_priv(dev);
2348 int i; 2348 int i;
2349 2349
2350 for (i = 0; i < lp->tx_ring_size; i++) { 2350 for (i = 0; i < lp->tx_ring_size; i++) {
@@ -2364,7 +2364,7 @@ static void pcnet32_purge_tx_ring(struct net_device *dev)
2364/* Initialize the PCNET32 Rx and Tx rings. */ 2364/* Initialize the PCNET32 Rx and Tx rings. */
2365static int pcnet32_init_ring(struct net_device *dev) 2365static int pcnet32_init_ring(struct net_device *dev)
2366{ 2366{
2367 struct pcnet32_private *lp = dev->priv; 2367 struct pcnet32_private *lp = netdev_priv(dev);
2368 int i; 2368 int i;
2369 2369
2370 lp->tx_full = 0; 2370 lp->tx_full = 0;
@@ -2422,7 +2422,7 @@ static int pcnet32_init_ring(struct net_device *dev)
2422 */ 2422 */
2423static void pcnet32_restart(struct net_device *dev, unsigned int csr0_bits) 2423static void pcnet32_restart(struct net_device *dev, unsigned int csr0_bits)
2424{ 2424{
2425 struct pcnet32_private *lp = dev->priv; 2425 struct pcnet32_private *lp = netdev_priv(dev);
2426 unsigned long ioaddr = dev->base_addr; 2426 unsigned long ioaddr = dev->base_addr;
2427 int i; 2427 int i;
2428 2428
@@ -2452,7 +2452,7 @@ static void pcnet32_restart(struct net_device *dev, unsigned int csr0_bits)
2452 2452
2453static void pcnet32_tx_timeout(struct net_device *dev) 2453static void pcnet32_tx_timeout(struct net_device *dev)
2454{ 2454{
2455 struct pcnet32_private *lp = dev->priv; 2455 struct pcnet32_private *lp = netdev_priv(dev);
2456 unsigned long ioaddr = dev->base_addr, flags; 2456 unsigned long ioaddr = dev->base_addr, flags;
2457 2457
2458 spin_lock_irqsave(&lp->lock, flags); 2458 spin_lock_irqsave(&lp->lock, flags);
@@ -2493,7 +2493,7 @@ static void pcnet32_tx_timeout(struct net_device *dev)
2493 2493
2494static int pcnet32_start_xmit(struct sk_buff *skb, struct net_device *dev) 2494static int pcnet32_start_xmit(struct sk_buff *skb, struct net_device *dev)
2495{ 2495{
2496 struct pcnet32_private *lp = dev->priv; 2496 struct pcnet32_private *lp = netdev_priv(dev);
2497 unsigned long ioaddr = dev->base_addr; 2497 unsigned long ioaddr = dev->base_addr;
2498 u16 status; 2498 u16 status;
2499 int entry; 2499 int entry;
@@ -2558,7 +2558,7 @@ pcnet32_interrupt(int irq, void *dev_id)
2558 int boguscnt = max_interrupt_work; 2558 int boguscnt = max_interrupt_work;
2559 2559
2560 ioaddr = dev->base_addr; 2560 ioaddr = dev->base_addr;
2561 lp = dev->priv; 2561 lp = netdev_priv(dev);
2562 2562
2563 spin_lock(&lp->lock); 2563 spin_lock(&lp->lock);
2564 2564
@@ -2640,7 +2640,7 @@ pcnet32_interrupt(int irq, void *dev_id)
2640static int pcnet32_close(struct net_device *dev) 2640static int pcnet32_close(struct net_device *dev)
2641{ 2641{
2642 unsigned long ioaddr = dev->base_addr; 2642 unsigned long ioaddr = dev->base_addr;
2643 struct pcnet32_private *lp = dev->priv; 2643 struct pcnet32_private *lp = netdev_priv(dev);
2644 unsigned long flags; 2644 unsigned long flags;
2645 2645
2646 del_timer_sync(&lp->watchdog_timer); 2646 del_timer_sync(&lp->watchdog_timer);
@@ -2681,7 +2681,7 @@ static int pcnet32_close(struct net_device *dev)
2681 2681
2682static struct net_device_stats *pcnet32_get_stats(struct net_device *dev) 2682static struct net_device_stats *pcnet32_get_stats(struct net_device *dev)
2683{ 2683{
2684 struct pcnet32_private *lp = dev->priv; 2684 struct pcnet32_private *lp = netdev_priv(dev);
2685 unsigned long ioaddr = dev->base_addr; 2685 unsigned long ioaddr = dev->base_addr;
2686 unsigned long flags; 2686 unsigned long flags;
2687 2687
@@ -2695,7 +2695,7 @@ static struct net_device_stats *pcnet32_get_stats(struct net_device *dev)
2695/* taken from the sunlance driver, which it took from the depca driver */ 2695/* taken from the sunlance driver, which it took from the depca driver */
2696static void pcnet32_load_multicast(struct net_device *dev) 2696static void pcnet32_load_multicast(struct net_device *dev)
2697{ 2697{
2698 struct pcnet32_private *lp = dev->priv; 2698 struct pcnet32_private *lp = netdev_priv(dev);
2699 volatile struct pcnet32_init_block *ib = lp->init_block; 2699 volatile struct pcnet32_init_block *ib = lp->init_block;
2700 volatile u16 *mcast_table = (u16 *) & ib->filter; 2700 volatile u16 *mcast_table = (u16 *) & ib->filter;
2701 struct dev_mc_list *dmi = dev->mc_list; 2701 struct dev_mc_list *dmi = dev->mc_list;
@@ -2745,7 +2745,7 @@ static void pcnet32_load_multicast(struct net_device *dev)
2745static void pcnet32_set_multicast_list(struct net_device *dev) 2745static void pcnet32_set_multicast_list(struct net_device *dev)
2746{ 2746{
2747 unsigned long ioaddr = dev->base_addr, flags; 2747 unsigned long ioaddr = dev->base_addr, flags;
2748 struct pcnet32_private *lp = dev->priv; 2748 struct pcnet32_private *lp = netdev_priv(dev);
2749 int csr15, suspended; 2749 int csr15, suspended;
2750 2750
2751 spin_lock_irqsave(&lp->lock, flags); 2751 spin_lock_irqsave(&lp->lock, flags);
@@ -2784,7 +2784,7 @@ static void pcnet32_set_multicast_list(struct net_device *dev)
2784/* This routine assumes that the lp->lock is held */ 2784/* This routine assumes that the lp->lock is held */
2785static int mdio_read(struct net_device *dev, int phy_id, int reg_num) 2785static int mdio_read(struct net_device *dev, int phy_id, int reg_num)
2786{ 2786{
2787 struct pcnet32_private *lp = dev->priv; 2787 struct pcnet32_private *lp = netdev_priv(dev);
2788 unsigned long ioaddr = dev->base_addr; 2788 unsigned long ioaddr = dev->base_addr;
2789 u16 val_out; 2789 u16 val_out;
2790 2790
@@ -2800,7 +2800,7 @@ static int mdio_read(struct net_device *dev, int phy_id, int reg_num)
2800/* This routine assumes that the lp->lock is held */ 2800/* This routine assumes that the lp->lock is held */
2801static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val) 2801static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val)
2802{ 2802{
2803 struct pcnet32_private *lp = dev->priv; 2803 struct pcnet32_private *lp = netdev_priv(dev);
2804 unsigned long ioaddr = dev->base_addr; 2804 unsigned long ioaddr = dev->base_addr;
2805 2805
2806 if (!lp->mii) 2806 if (!lp->mii)
@@ -2812,7 +2812,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val)
2812 2812
2813static int pcnet32_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 2813static int pcnet32_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2814{ 2814{
2815 struct pcnet32_private *lp = dev->priv; 2815 struct pcnet32_private *lp = netdev_priv(dev);
2816 int rc; 2816 int rc;
2817 unsigned long flags; 2817 unsigned long flags;
2818 2818
@@ -2830,7 +2830,7 @@ static int pcnet32_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2830 2830
2831static int pcnet32_check_otherphy(struct net_device *dev) 2831static int pcnet32_check_otherphy(struct net_device *dev)
2832{ 2832{
2833 struct pcnet32_private *lp = dev->priv; 2833 struct pcnet32_private *lp = netdev_priv(dev);
2834 struct mii_if_info mii = lp->mii_if; 2834 struct mii_if_info mii = lp->mii_if;
2835 u16 bmcr; 2835 u16 bmcr;
2836 int i; 2836 int i;
@@ -2877,7 +2877,7 @@ static int pcnet32_check_otherphy(struct net_device *dev)
2877 2877
2878static void pcnet32_check_media(struct net_device *dev, int verbose) 2878static void pcnet32_check_media(struct net_device *dev, int verbose)
2879{ 2879{
2880 struct pcnet32_private *lp = dev->priv; 2880 struct pcnet32_private *lp = netdev_priv(dev);
2881 int curr_link; 2881 int curr_link;
2882 int prev_link = netif_carrier_ok(dev) ? 1 : 0; 2882 int prev_link = netif_carrier_ok(dev) ? 1 : 0;
2883 u32 bcr9; 2883 u32 bcr9;
@@ -2933,7 +2933,7 @@ static void pcnet32_check_media(struct net_device *dev, int verbose)
2933 2933
2934static void pcnet32_watchdog(struct net_device *dev) 2934static void pcnet32_watchdog(struct net_device *dev)
2935{ 2935{
2936 struct pcnet32_private *lp = dev->priv; 2936 struct pcnet32_private *lp = netdev_priv(dev);
2937 unsigned long flags; 2937 unsigned long flags;
2938 2938
2939 /* Print the link status if it has changed */ 2939 /* Print the link status if it has changed */
@@ -2949,7 +2949,7 @@ static void __devexit pcnet32_remove_one(struct pci_dev *pdev)
2949 struct net_device *dev = pci_get_drvdata(pdev); 2949 struct net_device *dev = pci_get_drvdata(pdev);
2950 2950
2951 if (dev) { 2951 if (dev) {
2952 struct pcnet32_private *lp = dev->priv; 2952 struct pcnet32_private *lp = netdev_priv(dev);
2953 2953
2954 unregister_netdev(dev); 2954 unregister_netdev(dev);
2955 pcnet32_free_ring(dev); 2955 pcnet32_free_ring(dev);
@@ -3030,7 +3030,7 @@ static void __exit pcnet32_cleanup_module(void)
3030 struct net_device *next_dev; 3030 struct net_device *next_dev;
3031 3031
3032 while (pcnet32_dev) { 3032 while (pcnet32_dev) {
3033 struct pcnet32_private *lp = pcnet32_dev->priv; 3033 struct pcnet32_private *lp = netdev_priv(pcnet32_dev);
3034 next_dev = lp->next; 3034 next_dev = lp->next;
3035 unregister_netdev(pcnet32_dev); 3035 unregister_netdev(pcnet32_dev);
3036 pcnet32_free_ring(pcnet32_dev); 3036 pcnet32_free_ring(pcnet32_dev);