aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r--drivers/net/tokenring/3c359.c58
-rw-r--r--drivers/net/tokenring/ibmtr.c38
-rw-r--r--drivers/net/tokenring/lanstreamer.c32
-rw-r--r--drivers/net/tokenring/madgemc.c4
-rw-r--r--drivers/net/tokenring/olympic.c36
-rw-r--r--drivers/net/tokenring/tmspci.c4
6 files changed, 86 insertions, 86 deletions
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index 9f1b6ab9c228..6612db8ec215 100644
--- a/drivers/net/tokenring/3c359.c
+++ b/drivers/net/tokenring/3c359.c
@@ -156,7 +156,7 @@ static void print_rx_state(struct net_device *dev) ;
156static void print_tx_state(struct net_device *dev) 156static void print_tx_state(struct net_device *dev)
157{ 157{
158 158
159 struct xl_private *xl_priv = (struct xl_private *)dev->priv ; 159 struct xl_private *xl_priv = netdev_priv(dev);
160 struct xl_tx_desc *txd ; 160 struct xl_tx_desc *txd ;
161 u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 161 u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
162 int i ; 162 int i ;
@@ -179,7 +179,7 @@ static void print_tx_state(struct net_device *dev)
179static void print_rx_state(struct net_device *dev) 179static void print_rx_state(struct net_device *dev)
180{ 180{
181 181
182 struct xl_private *xl_priv = (struct xl_private *)dev->priv ; 182 struct xl_private *xl_priv = netdev_priv(dev);
183 struct xl_rx_desc *rxd ; 183 struct xl_rx_desc *rxd ;
184 u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 184 u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
185 int i ; 185 int i ;
@@ -213,7 +213,7 @@ static void print_rx_state(struct net_device *dev)
213 213
214static u16 xl_ee_read(struct net_device *dev, int ee_addr) 214static u16 xl_ee_read(struct net_device *dev, int ee_addr)
215{ 215{
216 struct xl_private *xl_priv = (struct xl_private *)dev->priv ; 216 struct xl_private *xl_priv = netdev_priv(dev);
217 u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 217 u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
218 218
219 /* Wait for EEProm to not be busy */ 219 /* Wait for EEProm to not be busy */
@@ -245,7 +245,7 @@ static u16 xl_ee_read(struct net_device *dev, int ee_addr)
245 245
246static void xl_ee_write(struct net_device *dev, int ee_addr, u16 ee_value) 246static void xl_ee_write(struct net_device *dev, int ee_addr, u16 ee_value)
247{ 247{
248 struct xl_private *xl_priv = (struct xl_private *)dev->priv ; 248 struct xl_private *xl_priv = netdev_priv(dev);
249 u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 249 u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
250 250
251 /* Wait for EEProm to not be busy */ 251 /* Wait for EEProm to not be busy */
@@ -305,11 +305,11 @@ static int __devinit xl_probe(struct pci_dev *pdev,
305 pci_release_regions(pdev) ; 305 pci_release_regions(pdev) ;
306 return -ENOMEM ; 306 return -ENOMEM ;
307 } 307 }
308 xl_priv = dev->priv ; 308 xl_priv = netdev_priv(dev);
309 309
310#if XL_DEBUG 310#if XL_DEBUG
311 printk("pci_device: %p, dev:%p, dev->priv: %p, ba[0]: %10x, ba[1]:%10x\n", 311 printk("pci_device: %p, dev:%p, dev->priv: %p, ba[0]: %10x, ba[1]:%10x\n",
312 pdev, dev, dev->priv, (unsigned int)pdev->resource[0].start, (unsigned int)pdev->resource[1].start) ; 312 pdev, dev, netdev_priv(dev), (unsigned int)pdev->resource[0].start, (unsigned int)pdev->resource[1].start);
313#endif 313#endif
314 314
315 dev->irq=pdev->irq; 315 dev->irq=pdev->irq;
@@ -365,7 +365,7 @@ static int __devinit xl_probe(struct pci_dev *pdev,
365 365
366static int __devinit xl_init(struct net_device *dev) 366static int __devinit xl_init(struct net_device *dev)
367{ 367{
368 struct xl_private *xl_priv = (struct xl_private *)dev->priv ; 368 struct xl_private *xl_priv = netdev_priv(dev);
369 369
370 printk(KERN_INFO "%s \n", version); 370 printk(KERN_INFO "%s \n", version);
371 printk(KERN_INFO "%s: I/O at %hx, MMIO at %p, using irq %d\n", 371 printk(KERN_INFO "%s: I/O at %hx, MMIO at %p, using irq %d\n",
@@ -385,7 +385,7 @@ static int __devinit xl_init(struct net_device *dev)
385 385
386static int xl_hw_reset(struct net_device *dev) 386static int xl_hw_reset(struct net_device *dev)
387{ 387{
388 struct xl_private *xl_priv = (struct xl_private *)dev->priv ; 388 struct xl_private *xl_priv = netdev_priv(dev);
389 u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 389 u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
390 unsigned long t ; 390 unsigned long t ;
391 u16 i ; 391 u16 i ;
@@ -568,7 +568,7 @@ static int xl_hw_reset(struct net_device *dev)
568 568
569static int xl_open(struct net_device *dev) 569static int xl_open(struct net_device *dev)
570{ 570{
571 struct xl_private *xl_priv=(struct xl_private *)dev->priv; 571 struct xl_private *xl_priv=netdev_priv(dev);
572 u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 572 u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
573 u8 i ; 573 u8 i ;
574 u16 hwaddr[3] ; /* Should be u8[6] but we get word return values */ 574 u16 hwaddr[3] ; /* Should be u8[6] but we get word return values */
@@ -726,7 +726,7 @@ static int xl_open(struct net_device *dev)
726 726
727static int xl_open_hw(struct net_device *dev) 727static int xl_open_hw(struct net_device *dev)
728{ 728{
729 struct xl_private *xl_priv=(struct xl_private *)dev->priv; 729 struct xl_private *xl_priv=netdev_priv(dev);
730 u8 __iomem *xl_mmio = xl_priv->xl_mmio ; 730 u8 __iomem *xl_mmio = xl_priv->xl_mmio ;
731 u16 vsoff ; 731 u16 vsoff ;
732 char ver_str[33]; 732 char ver_str[33];
@@ -875,7 +875,7 @@ static int xl_open_hw(struct net_device *dev)
875 875
876static void adv_rx_ring(struct net_device *dev) /* Advance rx_ring, cut down on bloat in xl_rx */ 876static void adv_rx_ring(struct net_device *dev) /* Advance rx_ring, cut down on bloat in xl_rx */
877{ 877{
878 struct xl_private *xl_priv=(struct xl_private *)dev->priv; 878 struct xl_private *xl_priv=netdev_priv(dev);
879 int prev_ring_loc ; 879 int prev_ring_loc ;
880 880
881 prev_ring_loc = (xl_priv->rx_ring_tail + XL_RX_RING_SIZE - 1) & (XL_RX_RING_SIZE - 1); 881 prev_ring_loc = (xl_priv->rx_ring_tail + XL_RX_RING_SIZE - 1) & (XL_RX_RING_SIZE - 1);
@@ -890,7 +890,7 @@ static void adv_rx_ring(struct net_device *dev) /* Advance rx_ring, cut down on
890 890
891static void xl_rx(struct net_device *dev) 891static void xl_rx(struct net_device *dev)
892{ 892{
893 struct xl_private *xl_priv=(struct xl_private *)dev->priv; 893 struct xl_private *xl_priv=netdev_priv(dev);
894 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 894 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
895 struct sk_buff *skb, *skb2 ; 895 struct sk_buff *skb, *skb2 ;
896 int frame_length = 0, copy_len = 0 ; 896 int frame_length = 0, copy_len = 0 ;
@@ -997,7 +997,7 @@ static void xl_rx(struct net_device *dev)
997 997
998static void xl_reset(struct net_device *dev) 998static void xl_reset(struct net_device *dev)
999{ 999{
1000 struct xl_private *xl_priv=(struct xl_private *)dev->priv; 1000 struct xl_private *xl_priv=netdev_priv(dev);
1001 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1001 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1002 unsigned long t; 1002 unsigned long t;
1003 1003
@@ -1020,7 +1020,7 @@ static void xl_reset(struct net_device *dev)
1020 1020
1021static void xl_freemem(struct net_device *dev) 1021static void xl_freemem(struct net_device *dev)
1022{ 1022{
1023 struct xl_private *xl_priv=(struct xl_private *)dev->priv ; 1023 struct xl_private *xl_priv=netdev_priv(dev);
1024 int i ; 1024 int i ;
1025 1025
1026 for (i=0;i<XL_RX_RING_SIZE;i++) { 1026 for (i=0;i<XL_RX_RING_SIZE;i++) {
@@ -1044,7 +1044,7 @@ static void xl_freemem(struct net_device *dev)
1044static irqreturn_t xl_interrupt(int irq, void *dev_id) 1044static irqreturn_t xl_interrupt(int irq, void *dev_id)
1045{ 1045{
1046 struct net_device *dev = (struct net_device *)dev_id; 1046 struct net_device *dev = (struct net_device *)dev_id;
1047 struct xl_private *xl_priv =(struct xl_private *)dev->priv; 1047 struct xl_private *xl_priv =netdev_priv(dev);
1048 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1048 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1049 u16 intstatus, macstatus ; 1049 u16 intstatus, macstatus ;
1050 1050
@@ -1171,7 +1171,7 @@ static irqreturn_t xl_interrupt(int irq, void *dev_id)
1171 1171
1172static int xl_xmit(struct sk_buff *skb, struct net_device *dev) 1172static int xl_xmit(struct sk_buff *skb, struct net_device *dev)
1173{ 1173{
1174 struct xl_private *xl_priv=(struct xl_private *)dev->priv; 1174 struct xl_private *xl_priv=netdev_priv(dev);
1175 struct xl_tx_desc *txd ; 1175 struct xl_tx_desc *txd ;
1176 int tx_head, tx_tail, tx_prev ; 1176 int tx_head, tx_tail, tx_prev ;
1177 unsigned long flags ; 1177 unsigned long flags ;
@@ -1232,7 +1232,7 @@ static int xl_xmit(struct sk_buff *skb, struct net_device *dev)
1232 1232
1233static void xl_dn_comp(struct net_device *dev) 1233static void xl_dn_comp(struct net_device *dev)
1234{ 1234{
1235 struct xl_private *xl_priv=(struct xl_private *)dev->priv; 1235 struct xl_private *xl_priv=netdev_priv(dev);
1236 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1236 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1237 struct xl_tx_desc *txd ; 1237 struct xl_tx_desc *txd ;
1238 1238
@@ -1268,7 +1268,7 @@ static void xl_dn_comp(struct net_device *dev)
1268 1268
1269static int xl_close(struct net_device *dev) 1269static int xl_close(struct net_device *dev)
1270{ 1270{
1271 struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 1271 struct xl_private *xl_priv = netdev_priv(dev);
1272 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1272 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1273 unsigned long t ; 1273 unsigned long t ;
1274 1274
@@ -1366,7 +1366,7 @@ static int xl_close(struct net_device *dev)
1366 1366
1367static void xl_set_rx_mode(struct net_device *dev) 1367static void xl_set_rx_mode(struct net_device *dev)
1368{ 1368{
1369 struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 1369 struct xl_private *xl_priv = netdev_priv(dev);
1370 struct dev_mc_list *dmi ; 1370 struct dev_mc_list *dmi ;
1371 unsigned char dev_mc_address[4] ; 1371 unsigned char dev_mc_address[4] ;
1372 u16 options ; 1372 u16 options ;
@@ -1407,7 +1407,7 @@ static void xl_set_rx_mode(struct net_device *dev)
1407 1407
1408static void xl_srb_bh(struct net_device *dev) 1408static void xl_srb_bh(struct net_device *dev)
1409{ 1409{
1410 struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 1410 struct xl_private *xl_priv = netdev_priv(dev);
1411 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1411 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1412 u8 srb_cmd, ret_code ; 1412 u8 srb_cmd, ret_code ;
1413 int i ; 1413 int i ;
@@ -1476,14 +1476,14 @@ static void xl_srb_bh(struct net_device *dev)
1476 1476
1477static struct net_device_stats * xl_get_stats(struct net_device *dev) 1477static struct net_device_stats * xl_get_stats(struct net_device *dev)
1478{ 1478{
1479 struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 1479 struct xl_private *xl_priv = netdev_priv(dev);
1480 return (struct net_device_stats *) &xl_priv->xl_stats; 1480 return (struct net_device_stats *) &xl_priv->xl_stats;
1481} 1481}
1482 1482
1483static int xl_set_mac_address (struct net_device *dev, void *addr) 1483static int xl_set_mac_address (struct net_device *dev, void *addr)
1484{ 1484{
1485 struct sockaddr *saddr = addr ; 1485 struct sockaddr *saddr = addr ;
1486 struct xl_private *xl_priv = (struct xl_private *)dev->priv ; 1486 struct xl_private *xl_priv = netdev_priv(dev);
1487 1487
1488 if (netif_running(dev)) { 1488 if (netif_running(dev)) {
1489 printk(KERN_WARNING "%s: Cannot set mac/laa address while card is open\n", dev->name) ; 1489 printk(KERN_WARNING "%s: Cannot set mac/laa address while card is open\n", dev->name) ;
@@ -1504,7 +1504,7 @@ static int xl_set_mac_address (struct net_device *dev, void *addr)
1504 1504
1505static void xl_arb_cmd(struct net_device *dev) 1505static void xl_arb_cmd(struct net_device *dev)
1506{ 1506{
1507 struct xl_private *xl_priv = (struct xl_private *) dev->priv; 1507 struct xl_private *xl_priv = netdev_priv(dev);
1508 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1508 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1509 u8 arb_cmd ; 1509 u8 arb_cmd ;
1510 u16 lan_status, lan_status_diff ; 1510 u16 lan_status, lan_status_diff ;
@@ -1632,7 +1632,7 @@ static void xl_arb_cmd(struct net_device *dev)
1632 1632
1633static void xl_asb_cmd(struct net_device *dev) 1633static void xl_asb_cmd(struct net_device *dev)
1634{ 1634{
1635 struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 1635 struct xl_private *xl_priv = netdev_priv(dev);
1636 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1636 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1637 1637
1638 if (xl_priv->asb_queued == 1) 1638 if (xl_priv->asb_queued == 1)
@@ -1663,7 +1663,7 @@ static void xl_asb_cmd(struct net_device *dev)
1663 */ 1663 */
1664static void xl_asb_bh(struct net_device *dev) 1664static void xl_asb_bh(struct net_device *dev)
1665{ 1665{
1666 struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 1666 struct xl_private *xl_priv = netdev_priv(dev);
1667 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1667 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1668 u8 ret_code ; 1668 u8 ret_code ;
1669 1669
@@ -1691,7 +1691,7 @@ static void xl_asb_bh(struct net_device *dev)
1691 1691
1692static void xl_srb_cmd(struct net_device *dev, int srb_cmd) 1692static void xl_srb_cmd(struct net_device *dev, int srb_cmd)
1693{ 1693{
1694 struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 1694 struct xl_private *xl_priv = netdev_priv(dev);
1695 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1695 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1696 1696
1697 switch (srb_cmd) { 1697 switch (srb_cmd) {
@@ -1748,7 +1748,7 @@ static void xl_srb_cmd(struct net_device *dev, int srb_cmd)
1748 1748
1749static void xl_wait_misr_flags(struct net_device *dev) 1749static void xl_wait_misr_flags(struct net_device *dev)
1750{ 1750{
1751 struct xl_private *xl_priv = (struct xl_private *) dev->priv ; 1751 struct xl_private *xl_priv = netdev_priv(dev);
1752 u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 1752 u8 __iomem * xl_mmio = xl_priv->xl_mmio ;
1753 1753
1754 int i ; 1754 int i ;
@@ -1773,7 +1773,7 @@ static void xl_wait_misr_flags(struct net_device *dev)
1773 1773
1774static int xl_change_mtu(struct net_device *dev, int mtu) 1774static int xl_change_mtu(struct net_device *dev, int mtu)
1775{ 1775{
1776 struct xl_private *xl_priv = (struct xl_private *) dev->priv; 1776 struct xl_private *xl_priv = netdev_priv(dev);
1777 u16 max_mtu ; 1777 u16 max_mtu ;
1778 1778
1779 if (xl_priv->xl_ring_speed == 4) 1779 if (xl_priv->xl_ring_speed == 4)
@@ -1795,7 +1795,7 @@ static int xl_change_mtu(struct net_device *dev, int mtu)
1795static void __devexit xl_remove_one (struct pci_dev *pdev) 1795static void __devexit xl_remove_one (struct pci_dev *pdev)
1796{ 1796{
1797 struct net_device *dev = pci_get_drvdata(pdev); 1797 struct net_device *dev = pci_get_drvdata(pdev);
1798 struct xl_private *xl_priv=(struct xl_private *)dev->priv; 1798 struct xl_private *xl_priv=netdev_priv(dev);
1799 1799
1800 unregister_netdev(dev); 1800 unregister_netdev(dev);
1801 iounmap(xl_priv->xl_mmio) ; 1801 iounmap(xl_priv->xl_mmio) ;
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
index 1e8958ee2d0a..51409698fe25 100644
--- a/drivers/net/tokenring/ibmtr.c
+++ b/drivers/net/tokenring/ibmtr.c
@@ -327,7 +327,7 @@ static void ibmtr_cleanup_card(struct net_device *dev)
327 release_region(dev->base_addr, IBMTR_IO_EXTENT); 327 release_region(dev->base_addr, IBMTR_IO_EXTENT);
328 328
329 { 329 {
330 struct tok_info *ti = (struct tok_info *) dev->priv; 330 struct tok_info *ti = netdev_priv(dev);
331 iounmap(ti->mmio); 331 iounmap(ti->mmio);
332 iounmap(ti->sram_virt); 332 iounmap(ti->sram_virt);
333 } 333 }
@@ -384,7 +384,7 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
384 384
385 unsigned char segment, intr=0, irq=0, i, j, cardpresent=NOTOK, temp=0; 385 unsigned char segment, intr=0, irq=0, i, j, cardpresent=NOTOK, temp=0;
386 void __iomem * t_mmio = NULL; 386 void __iomem * t_mmio = NULL;
387 struct tok_info *ti = dev->priv; 387 struct tok_info *ti = netdev_priv(dev);
388 void __iomem *cd_chanid; 388 void __iomem *cd_chanid;
389 unsigned char *tchanid, ctemp; 389 unsigned char *tchanid, ctemp;
390#ifndef PCMCIA 390#ifndef PCMCIA
@@ -823,7 +823,7 @@ static unsigned char __devinit get_sram_size(struct tok_info *adapt_info)
823 823
824static int __devinit trdev_init(struct net_device *dev) 824static int __devinit trdev_init(struct net_device *dev)
825{ 825{
826 struct tok_info *ti = (struct tok_info *) dev->priv; 826 struct tok_info *ti = netdev_priv(dev);
827 827
828 SET_PAGE(ti->srb_page); 828 SET_PAGE(ti->srb_page);
829 ti->open_failure = NO ; 829 ti->open_failure = NO ;
@@ -846,7 +846,7 @@ static int tok_init_card(struct net_device *dev)
846 unsigned long i; 846 unsigned long i;
847 847
848 PIOaddr = dev->base_addr; 848 PIOaddr = dev->base_addr;
849 ti = (struct tok_info *) dev->priv; 849 ti = netdev_priv(dev);
850 /* Special processing for first interrupt after reset */ 850 /* Special processing for first interrupt after reset */
851 ti->do_tok_int = FIRST_INT; 851 ti->do_tok_int = FIRST_INT;
852 /* Reset adapter */ 852 /* Reset adapter */
@@ -868,7 +868,7 @@ static int tok_init_card(struct net_device *dev)
868/*****************************************************************************/ 868/*****************************************************************************/
869static int tok_open(struct net_device *dev) 869static int tok_open(struct net_device *dev)
870{ 870{
871 struct tok_info *ti = (struct tok_info *) dev->priv; 871 struct tok_info *ti = netdev_priv(dev);
872 int i; 872 int i;
873 873
874 /*the case we were left in a failure state during a previous open */ 874 /*the case we were left in a failure state during a previous open */
@@ -927,7 +927,7 @@ static void tok_open_adapter(unsigned long dev_addr)
927 struct tok_info *ti; 927 struct tok_info *ti;
928 int i; 928 int i;
929 929
930 ti = (struct tok_info *) dev->priv; 930 ti = netdev_priv(dev);
931 SET_PAGE(ti->init_srb_page); 931 SET_PAGE(ti->init_srb_page);
932 writeb(~SRB_RESP_INT, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_ODD); 932 writeb(~SRB_RESP_INT, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_ODD);
933 for (i = 0; i < sizeof(struct dir_open_adapter); i++) 933 for (i = 0; i < sizeof(struct dir_open_adapter); i++)
@@ -962,7 +962,7 @@ static void tok_open_adapter(unsigned long dev_addr)
962static void open_sap(unsigned char type, struct net_device *dev) 962static void open_sap(unsigned char type, struct net_device *dev)
963{ 963{
964 int i; 964 int i;
965 struct tok_info *ti = (struct tok_info *) dev->priv; 965 struct tok_info *ti = netdev_priv(dev);
966 966
967 SET_PAGE(ti->srb_page); 967 SET_PAGE(ti->srb_page);
968 for (i = 0; i < sizeof(struct dlc_open_sap); i++) 968 for (i = 0; i < sizeof(struct dlc_open_sap); i++)
@@ -986,7 +986,7 @@ static void open_sap(unsigned char type, struct net_device *dev)
986 986
987static void tok_set_multicast_list(struct net_device *dev) 987static void tok_set_multicast_list(struct net_device *dev)
988{ 988{
989 struct tok_info *ti = (struct tok_info *) dev->priv; 989 struct tok_info *ti = netdev_priv(dev);
990 struct dev_mc_list *mclist; 990 struct dev_mc_list *mclist;
991 unsigned char address[4]; 991 unsigned char address[4];
992 992
@@ -1029,7 +1029,7 @@ static int tok_send_packet(struct sk_buff *skb, struct net_device *dev)
1029{ 1029{
1030 struct tok_info *ti; 1030 struct tok_info *ti;
1031 unsigned long flags; 1031 unsigned long flags;
1032 ti = (struct tok_info *) dev->priv; 1032 ti = netdev_priv(dev);
1033 1033
1034 netif_stop_queue(dev); 1034 netif_stop_queue(dev);
1035 1035
@@ -1051,7 +1051,7 @@ static int tok_send_packet(struct sk_buff *skb, struct net_device *dev)
1051 1051
1052static int tok_close(struct net_device *dev) 1052static int tok_close(struct net_device *dev)
1053{ 1053{
1054 struct tok_info *ti = (struct tok_info *) dev->priv; 1054 struct tok_info *ti = netdev_priv(dev);
1055 1055
1056 /* Important for PCMCIA hot unplug, otherwise, we'll pull the card, */ 1056 /* Important for PCMCIA hot unplug, otherwise, we'll pull the card, */
1057 /* unloading the module from memory, and then if a timer pops, ouch */ 1057 /* unloading the module from memory, and then if a timer pops, ouch */
@@ -1094,7 +1094,7 @@ static void __iomem *map_address(struct tok_info *ti, unsigned index, __u8 *page
1094 1094
1095static void dir_open_adapter (struct net_device *dev) 1095static void dir_open_adapter (struct net_device *dev)
1096{ 1096{
1097 struct tok_info *ti = (struct tok_info *) dev->priv; 1097 struct tok_info *ti = netdev_priv(dev);
1098 unsigned char ret_code; 1098 unsigned char ret_code;
1099 __u16 err; 1099 __u16 err;
1100 1100
@@ -1179,7 +1179,7 @@ static irqreturn_t tok_interrupt(int irq, void *dev_id)
1179#if TR_VERBOSE 1179#if TR_VERBOSE
1180 DPRINTK("Int from tok_driver, dev : %p irq%d\n", dev,irq); 1180 DPRINTK("Int from tok_driver, dev : %p irq%d\n", dev,irq);
1181#endif 1181#endif
1182 ti = (struct tok_info *) dev->priv; 1182 ti = netdev_priv(dev);
1183 if (ti->sram_phys & 1) 1183 if (ti->sram_phys & 1)
1184 return IRQ_NONE; /* PCMCIA card extraction flag */ 1184 return IRQ_NONE; /* PCMCIA card extraction flag */
1185 spin_lock(&(ti->lock)); 1185 spin_lock(&(ti->lock));
@@ -1498,7 +1498,7 @@ static void initial_tok_int(struct net_device *dev)
1498 struct tok_info *ti; 1498 struct tok_info *ti;
1499 unsigned char init_status; /*BMS 12/2000*/ 1499 unsigned char init_status; /*BMS 12/2000*/
1500 1500
1501 ti = (struct tok_info *) dev->priv; 1501 ti = netdev_priv(dev);
1502 1502
1503 ti->do_tok_int = NOT_FIRST; 1503 ti->do_tok_int = NOT_FIRST;
1504 1504
@@ -1560,7 +1560,7 @@ static void initial_tok_int(struct net_device *dev)
1560 1560
1561static void tr_tx(struct net_device *dev) 1561static void tr_tx(struct net_device *dev)
1562{ 1562{
1563 struct tok_info *ti = (struct tok_info *) dev->priv; 1563 struct tok_info *ti = netdev_priv(dev);
1564 struct trh_hdr *trhdr = (struct trh_hdr *) ti->current_skb->data; 1564 struct trh_hdr *trhdr = (struct trh_hdr *) ti->current_skb->data;
1565 unsigned int hdr_len; 1565 unsigned int hdr_len;
1566 __u32 dhb=0,dhb_base; 1566 __u32 dhb=0,dhb_base;
@@ -1674,7 +1674,7 @@ static void tr_tx(struct net_device *dev)
1674 1674
1675static void tr_rx(struct net_device *dev) 1675static void tr_rx(struct net_device *dev)
1676{ 1676{
1677 struct tok_info *ti = (struct tok_info *) dev->priv; 1677 struct tok_info *ti = netdev_priv(dev);
1678 __u32 rbuffer; 1678 __u32 rbuffer;
1679 void __iomem *rbuf, *rbufdata, *llc; 1679 void __iomem *rbuf, *rbufdata, *llc;
1680 __u8 rbuffer_page = 0; 1680 __u8 rbuffer_page = 0;
@@ -1846,7 +1846,7 @@ static void ibmtr_reset_timer(struct timer_list *tmr, struct net_device *dev)
1846void tok_rerun(unsigned long dev_addr){ 1846void tok_rerun(unsigned long dev_addr){
1847 1847
1848 struct net_device *dev = (struct net_device *)dev_addr; 1848 struct net_device *dev = (struct net_device *)dev_addr;
1849 struct tok_info *ti = (struct tok_info *) dev->priv; 1849 struct tok_info *ti = netdev_priv(dev);
1850 1850
1851 if ( ti->open_action == RESTART){ 1851 if ( ti->open_action == RESTART){
1852 ti->do_tok_int = FIRST_INT; 1852 ti->do_tok_int = FIRST_INT;
@@ -1868,7 +1868,7 @@ static void ibmtr_readlog(struct net_device *dev)
1868{ 1868{
1869 struct tok_info *ti; 1869 struct tok_info *ti;
1870 1870
1871 ti = (struct tok_info *) dev->priv; 1871 ti = netdev_priv(dev);
1872 1872
1873 ti->readlog_pending = 0; 1873 ti->readlog_pending = 0;
1874 SET_PAGE(ti->srb_page); 1874 SET_PAGE(ti->srb_page);
@@ -1891,7 +1891,7 @@ static struct net_device_stats *tok_get_stats(struct net_device *dev)
1891{ 1891{
1892 1892
1893 struct tok_info *toki; 1893 struct tok_info *toki;
1894 toki = (struct tok_info *) dev->priv; 1894 toki = netdev_priv(dev);
1895 return (struct net_device_stats *) &toki->tr_stats; 1895 return (struct net_device_stats *) &toki->tr_stats;
1896} 1896}
1897 1897
@@ -1899,7 +1899,7 @@ static struct net_device_stats *tok_get_stats(struct net_device *dev)
1899 1899
1900static int ibmtr_change_mtu(struct net_device *dev, int mtu) 1900static int ibmtr_change_mtu(struct net_device *dev, int mtu)
1901{ 1901{
1902 struct tok_info *ti = (struct tok_info *) dev->priv; 1902 struct tok_info *ti = netdev_priv(dev);
1903 1903
1904 if (ti->ring_speed == 16 && mtu > ti->maxmtu16) 1904 if (ti->ring_speed == 16 && mtu > ti->maxmtu16)
1905 return -EINVAL; 1905 return -EINVAL;
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
index fc4495581f96..49c4270ef5f7 100644
--- a/drivers/net/tokenring/lanstreamer.c
+++ b/drivers/net/tokenring/lanstreamer.c
@@ -246,7 +246,7 @@ static int __devinit streamer_init_one(struct pci_dev *pdev,
246 } 246 }
247 247
248 SET_MODULE_OWNER(dev); 248 SET_MODULE_OWNER(dev);
249 streamer_priv = dev->priv; 249 streamer_priv = netdev_priv(dev);
250 250
251#if STREAMER_NETWORK_MONITOR 251#if STREAMER_NETWORK_MONITOR
252#ifdef CONFIG_PROC_FS 252#ifdef CONFIG_PROC_FS
@@ -405,7 +405,7 @@ static void __devexit streamer_remove_one(struct pci_dev *pdev)
405 return; 405 return;
406 } 406 }
407 407
408 streamer_priv=dev->priv; 408 streamer_priv=netdev_priv(dev);
409 if (streamer_priv == NULL) { 409 if (streamer_priv == NULL) {
410 printk(KERN_ERR "lanstreamer::streamer_remove_one, ERROR dev->priv is NULL\n"); 410 printk(KERN_ERR "lanstreamer::streamer_remove_one, ERROR dev->priv is NULL\n");
411 return; 411 return;
@@ -449,7 +449,7 @@ static int streamer_reset(struct net_device *dev)
449 struct sk_buff *skb = NULL; 449 struct sk_buff *skb = NULL;
450 __u16 misr; 450 __u16 misr;
451 451
452 streamer_priv = (struct streamer_private *) dev->priv; 452 streamer_priv = netdev_priv(dev);
453 streamer_mmio = streamer_priv->streamer_mmio; 453 streamer_mmio = streamer_priv->streamer_mmio;
454 454
455 writew(readw(streamer_mmio + BCTL) | BCTL_SOFTRESET, streamer_mmio + BCTL); 455 writew(readw(streamer_mmio + BCTL) | BCTL_SOFTRESET, streamer_mmio + BCTL);
@@ -588,7 +588,7 @@ static int streamer_reset(struct net_device *dev)
588 588
589static int streamer_open(struct net_device *dev) 589static int streamer_open(struct net_device *dev)
590{ 590{
591 struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv; 591 struct streamer_private *streamer_priv = netdev_priv(dev);
592 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 592 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
593 unsigned long flags; 593 unsigned long flags;
594 char open_error[255]; 594 char open_error[255];
@@ -905,7 +905,7 @@ static int streamer_open(struct net_device *dev)
905static void streamer_rx(struct net_device *dev) 905static void streamer_rx(struct net_device *dev)
906{ 906{
907 struct streamer_private *streamer_priv = 907 struct streamer_private *streamer_priv =
908 (struct streamer_private *) dev->priv; 908 netdev_priv(dev);
909 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 909 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
910 struct streamer_rx_desc *rx_desc; 910 struct streamer_rx_desc *rx_desc;
911 int rx_ring_last_received, length, frame_length, buffer_cnt = 0; 911 int rx_ring_last_received, length, frame_length, buffer_cnt = 0;
@@ -1030,7 +1030,7 @@ static irqreturn_t streamer_interrupt(int irq, void *dev_id)
1030{ 1030{
1031 struct net_device *dev = (struct net_device *) dev_id; 1031 struct net_device *dev = (struct net_device *) dev_id;
1032 struct streamer_private *streamer_priv = 1032 struct streamer_private *streamer_priv =
1033 (struct streamer_private *) dev->priv; 1033 netdev_priv(dev);
1034 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 1034 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
1035 __u16 sisr; 1035 __u16 sisr;
1036 __u16 misr; 1036 __u16 misr;
@@ -1153,7 +1153,7 @@ static irqreturn_t streamer_interrupt(int irq, void *dev_id)
1153static int streamer_xmit(struct sk_buff *skb, struct net_device *dev) 1153static int streamer_xmit(struct sk_buff *skb, struct net_device *dev)
1154{ 1154{
1155 struct streamer_private *streamer_priv = 1155 struct streamer_private *streamer_priv =
1156 (struct streamer_private *) dev->priv; 1156 netdev_priv(dev);
1157 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 1157 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
1158 unsigned long flags ; 1158 unsigned long flags ;
1159 1159
@@ -1204,7 +1204,7 @@ static int streamer_xmit(struct sk_buff *skb, struct net_device *dev)
1204static int streamer_close(struct net_device *dev) 1204static int streamer_close(struct net_device *dev)
1205{ 1205{
1206 struct streamer_private *streamer_priv = 1206 struct streamer_private *streamer_priv =
1207 (struct streamer_private *) dev->priv; 1207 netdev_priv(dev);
1208 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 1208 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
1209 unsigned long flags; 1209 unsigned long flags;
1210 int i; 1210 int i;
@@ -1270,7 +1270,7 @@ static int streamer_close(struct net_device *dev)
1270static void streamer_set_rx_mode(struct net_device *dev) 1270static void streamer_set_rx_mode(struct net_device *dev)
1271{ 1271{
1272 struct streamer_private *streamer_priv = 1272 struct streamer_private *streamer_priv =
1273 (struct streamer_private *) dev->priv; 1273 netdev_priv(dev);
1274 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 1274 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
1275 __u8 options = 0; 1275 __u8 options = 0;
1276 struct dev_mc_list *dmi; 1276 struct dev_mc_list *dmi;
@@ -1329,7 +1329,7 @@ static void streamer_set_rx_mode(struct net_device *dev)
1329 1329
1330static void streamer_srb_bh(struct net_device *dev) 1330static void streamer_srb_bh(struct net_device *dev)
1331{ 1331{
1332 struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv; 1332 struct streamer_private *streamer_priv = netdev_priv(dev);
1333 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 1333 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
1334 __u16 srb_word; 1334 __u16 srb_word;
1335 1335
@@ -1494,14 +1494,14 @@ static void streamer_srb_bh(struct net_device *dev)
1494static struct net_device_stats *streamer_get_stats(struct net_device *dev) 1494static struct net_device_stats *streamer_get_stats(struct net_device *dev)
1495{ 1495{
1496 struct streamer_private *streamer_priv; 1496 struct streamer_private *streamer_priv;
1497 streamer_priv = (struct streamer_private *) dev->priv; 1497 streamer_priv = netdev_priv(dev);
1498 return (struct net_device_stats *) &streamer_priv->streamer_stats; 1498 return (struct net_device_stats *) &streamer_priv->streamer_stats;
1499} 1499}
1500 1500
1501static int streamer_set_mac_address(struct net_device *dev, void *addr) 1501static int streamer_set_mac_address(struct net_device *dev, void *addr)
1502{ 1502{
1503 struct sockaddr *saddr = addr; 1503 struct sockaddr *saddr = addr;
1504 struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv; 1504 struct streamer_private *streamer_priv = netdev_priv(dev);
1505 1505
1506 if (netif_running(dev)) 1506 if (netif_running(dev))
1507 { 1507 {
@@ -1526,7 +1526,7 @@ static int streamer_set_mac_address(struct net_device *dev, void *addr)
1526static void streamer_arb_cmd(struct net_device *dev) 1526static void streamer_arb_cmd(struct net_device *dev)
1527{ 1527{
1528 struct streamer_private *streamer_priv = 1528 struct streamer_private *streamer_priv =
1529 (struct streamer_private *) dev->priv; 1529 netdev_priv(dev);
1530 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 1530 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
1531 __u8 header_len; 1531 __u8 header_len;
1532 __u16 frame_len, buffer_len; 1532 __u16 frame_len, buffer_len;
@@ -1741,7 +1741,7 @@ drop_frame:
1741static void streamer_asb_bh(struct net_device *dev) 1741static void streamer_asb_bh(struct net_device *dev)
1742{ 1742{
1743 struct streamer_private *streamer_priv = 1743 struct streamer_private *streamer_priv =
1744 (struct streamer_private *) dev->priv; 1744 netdev_priv(dev);
1745 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 1745 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
1746 1746
1747 if (streamer_priv->asb_queued == 1) 1747 if (streamer_priv->asb_queued == 1)
@@ -1785,7 +1785,7 @@ static void streamer_asb_bh(struct net_device *dev)
1785static int streamer_change_mtu(struct net_device *dev, int mtu) 1785static int streamer_change_mtu(struct net_device *dev, int mtu)
1786{ 1786{
1787 struct streamer_private *streamer_priv = 1787 struct streamer_private *streamer_priv =
1788 (struct streamer_private *) dev->priv; 1788 netdev_priv(dev);
1789 __u16 max_mtu; 1789 __u16 max_mtu;
1790 1790
1791 if (streamer_priv->streamer_ring_speed == 4) 1791 if (streamer_priv->streamer_ring_speed == 4)
@@ -1849,7 +1849,7 @@ static int streamer_proc_info(char *buffer, char **start, off_t offset,
1849static int sprintf_info(char *buffer, struct net_device *dev) 1849static int sprintf_info(char *buffer, struct net_device *dev)
1850{ 1850{
1851 struct streamer_private *streamer_priv = 1851 struct streamer_private *streamer_priv =
1852 (struct streamer_private *) dev->priv; 1852 netdev_priv(dev);
1853 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; 1853 __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
1854 struct streamer_adapter_addr_table sat; 1854 struct streamer_adapter_addr_table sat;
1855 struct streamer_parameters_table spt; 1855 struct streamer_parameters_table spt;
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
index f8f4d74f01f1..9eafc2e25abc 100644
--- a/drivers/net/tokenring/madgemc.c
+++ b/drivers/net/tokenring/madgemc.c
@@ -690,7 +690,7 @@ static int madgemc_close(struct net_device *dev)
690static int madgemc_mcaproc(char *buf, int slot, void *d) 690static int madgemc_mcaproc(char *buf, int slot, void *d)
691{ 691{
692 struct net_device *dev = (struct net_device *)d; 692 struct net_device *dev = (struct net_device *)d;
693 struct net_local *tp = dev->priv; 693 struct net_local *tp = netdev_priv(dev);
694 struct card_info *curcard = tp->tmspriv; 694 struct card_info *curcard = tp->tmspriv;
695 int len = 0; 695 int len = 0;
696 696
@@ -736,7 +736,7 @@ static int __devexit madgemc_remove(struct device *device)
736 736
737 BUG_ON(!dev); 737 BUG_ON(!dev);
738 738
739 tp = dev->priv; 739 tp = netdev_priv(dev);
740 card = tp->tmspriv; 740 card = tp->tmspriv;
741 kfree(card); 741 kfree(card);
742 tp->tmspriv = NULL; 742 tp->tmspriv = NULL;
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index c323101a895b..b57f65b2591a 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -220,14 +220,14 @@ static int __devinit olympic_probe(struct pci_dev *pdev, const struct pci_device
220 goto op_release_dev; 220 goto op_release_dev;
221 } 221 }
222 222
223 olympic_priv = dev->priv ; 223 olympic_priv = netdev_priv(dev) ;
224 224
225 spin_lock_init(&olympic_priv->olympic_lock) ; 225 spin_lock_init(&olympic_priv->olympic_lock) ;
226 226
227 init_waitqueue_head(&olympic_priv->srb_wait); 227 init_waitqueue_head(&olympic_priv->srb_wait);
228 init_waitqueue_head(&olympic_priv->trb_wait); 228 init_waitqueue_head(&olympic_priv->trb_wait);
229#if OLYMPIC_DEBUG 229#if OLYMPIC_DEBUG
230 printk(KERN_INFO "pci_device: %p, dev:%p, dev->priv: %p\n", pdev, dev, dev->priv); 230 printk(KERN_INFO "pci_device: %p, dev:%p, dev->priv: %p\n", pdev, dev, netdev_priv(dev));
231#endif 231#endif
232 dev->irq=pdev->irq; 232 dev->irq=pdev->irq;
233 dev->base_addr=pci_resource_start(pdev, 0); 233 dev->base_addr=pci_resource_start(pdev, 0);
@@ -298,7 +298,7 @@ static int __devinit olympic_init(struct net_device *dev)
298 unsigned long t; 298 unsigned long t;
299 unsigned int uaa_addr; 299 unsigned int uaa_addr;
300 300
301 olympic_priv=(struct olympic_private *)dev->priv; 301 olympic_priv=netdev_priv(dev);
302 olympic_mmio=olympic_priv->olympic_mmio; 302 olympic_mmio=olympic_priv->olympic_mmio;
303 303
304 printk("%s \n", version); 304 printk("%s \n", version);
@@ -436,7 +436,7 @@ static int __devinit olympic_init(struct net_device *dev)
436 436
437static int olympic_open(struct net_device *dev) 437static int olympic_open(struct net_device *dev)
438{ 438{
439 struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv; 439 struct olympic_private *olympic_priv=netdev_priv(dev);
440 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*init_srb; 440 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*init_srb;
441 unsigned long flags, t; 441 unsigned long flags, t;
442 int i, open_finished = 1 ; 442 int i, open_finished = 1 ;
@@ -756,7 +756,7 @@ out:
756 */ 756 */
757static void olympic_rx(struct net_device *dev) 757static void olympic_rx(struct net_device *dev)
758{ 758{
759 struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv; 759 struct olympic_private *olympic_priv=netdev_priv(dev);
760 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio; 760 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio;
761 struct olympic_rx_status *rx_status; 761 struct olympic_rx_status *rx_status;
762 struct olympic_rx_desc *rx_desc ; 762 struct olympic_rx_desc *rx_desc ;
@@ -898,7 +898,7 @@ static void olympic_rx(struct net_device *dev)
898 898
899static void olympic_freemem(struct net_device *dev) 899static void olympic_freemem(struct net_device *dev)
900{ 900{
901 struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv; 901 struct olympic_private *olympic_priv=netdev_priv(dev);
902 int i; 902 int i;
903 903
904 for(i=0;i<OLYMPIC_RX_RING_SIZE;i++) { 904 for(i=0;i<OLYMPIC_RX_RING_SIZE;i++) {
@@ -931,7 +931,7 @@ static void olympic_freemem(struct net_device *dev)
931static irqreturn_t olympic_interrupt(int irq, void *dev_id) 931static irqreturn_t olympic_interrupt(int irq, void *dev_id)
932{ 932{
933 struct net_device *dev= (struct net_device *)dev_id; 933 struct net_device *dev= (struct net_device *)dev_id;
934 struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv; 934 struct olympic_private *olympic_priv=netdev_priv(dev);
935 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio; 935 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio;
936 u32 sisr; 936 u32 sisr;
937 u8 __iomem *adapter_check_area ; 937 u8 __iomem *adapter_check_area ;
@@ -1047,7 +1047,7 @@ static irqreturn_t olympic_interrupt(int irq, void *dev_id)
1047 1047
1048static int olympic_xmit(struct sk_buff *skb, struct net_device *dev) 1048static int olympic_xmit(struct sk_buff *skb, struct net_device *dev)
1049{ 1049{
1050 struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv; 1050 struct olympic_private *olympic_priv=netdev_priv(dev);
1051 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio; 1051 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio;
1052 unsigned long flags ; 1052 unsigned long flags ;
1053 1053
@@ -1078,7 +1078,7 @@ static int olympic_xmit(struct sk_buff *skb, struct net_device *dev)
1078 1078
1079static int olympic_close(struct net_device *dev) 1079static int olympic_close(struct net_device *dev)
1080{ 1080{
1081 struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv; 1081 struct olympic_private *olympic_priv=netdev_priv(dev);
1082 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*srb; 1082 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*srb;
1083 unsigned long t,flags; 1083 unsigned long t,flags;
1084 1084
@@ -1148,7 +1148,7 @@ static int olympic_close(struct net_device *dev)
1148 1148
1149static void olympic_set_rx_mode(struct net_device *dev) 1149static void olympic_set_rx_mode(struct net_device *dev)
1150{ 1150{
1151 struct olympic_private *olympic_priv = (struct olympic_private *) dev->priv ; 1151 struct olympic_private *olympic_priv = netdev_priv(dev);
1152 u8 __iomem *olympic_mmio = olympic_priv->olympic_mmio ; 1152 u8 __iomem *olympic_mmio = olympic_priv->olympic_mmio ;
1153 u8 options = 0; 1153 u8 options = 0;
1154 u8 __iomem *srb; 1154 u8 __iomem *srb;
@@ -1216,7 +1216,7 @@ static void olympic_set_rx_mode(struct net_device *dev)
1216 1216
1217static void olympic_srb_bh(struct net_device *dev) 1217static void olympic_srb_bh(struct net_device *dev)
1218{ 1218{
1219 struct olympic_private *olympic_priv = (struct olympic_private *) dev->priv ; 1219 struct olympic_private *olympic_priv = netdev_priv(dev);
1220 u8 __iomem *olympic_mmio = olympic_priv->olympic_mmio ; 1220 u8 __iomem *olympic_mmio = olympic_priv->olympic_mmio ;
1221 u8 __iomem *srb; 1221 u8 __iomem *srb;
1222 1222
@@ -1362,14 +1362,14 @@ static void olympic_srb_bh(struct net_device *dev)
1362static struct net_device_stats * olympic_get_stats(struct net_device *dev) 1362static struct net_device_stats * olympic_get_stats(struct net_device *dev)
1363{ 1363{
1364 struct olympic_private *olympic_priv ; 1364 struct olympic_private *olympic_priv ;
1365 olympic_priv=(struct olympic_private *) dev->priv; 1365 olympic_priv=netdev_priv(dev);
1366 return (struct net_device_stats *) &olympic_priv->olympic_stats; 1366 return (struct net_device_stats *) &olympic_priv->olympic_stats;
1367} 1367}
1368 1368
1369static int olympic_set_mac_address (struct net_device *dev, void *addr) 1369static int olympic_set_mac_address (struct net_device *dev, void *addr)
1370{ 1370{
1371 struct sockaddr *saddr = addr ; 1371 struct sockaddr *saddr = addr ;
1372 struct olympic_private *olympic_priv = (struct olympic_private *)dev->priv ; 1372 struct olympic_private *olympic_priv = netdev_priv(dev);
1373 1373
1374 if (netif_running(dev)) { 1374 if (netif_running(dev)) {
1375 printk(KERN_WARNING "%s: Cannot set mac/laa address while card is open\n", dev->name) ; 1375 printk(KERN_WARNING "%s: Cannot set mac/laa address while card is open\n", dev->name) ;
@@ -1390,7 +1390,7 @@ static int olympic_set_mac_address (struct net_device *dev, void *addr)
1390 1390
1391static void olympic_arb_cmd(struct net_device *dev) 1391static void olympic_arb_cmd(struct net_device *dev)
1392{ 1392{
1393 struct olympic_private *olympic_priv = (struct olympic_private *) dev->priv; 1393 struct olympic_private *olympic_priv = netdev_priv(dev);
1394 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio; 1394 u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio;
1395 u8 __iomem *arb_block, *asb_block, *srb ; 1395 u8 __iomem *arb_block, *asb_block, *srb ;
1396 u8 header_len ; 1396 u8 header_len ;
@@ -1576,7 +1576,7 @@ drop_frame:
1576 1576
1577static void olympic_asb_bh(struct net_device *dev) 1577static void olympic_asb_bh(struct net_device *dev)
1578{ 1578{
1579 struct olympic_private *olympic_priv = (struct olympic_private *) dev->priv ; 1579 struct olympic_private *olympic_priv = netdev_priv(dev);
1580 u8 __iomem *arb_block, *asb_block ; 1580 u8 __iomem *arb_block, *asb_block ;
1581 1581
1582 arb_block = (olympic_priv->olympic_lap + olympic_priv->arb) ; 1582 arb_block = (olympic_priv->olympic_lap + olympic_priv->arb) ;
@@ -1616,7 +1616,7 @@ static void olympic_asb_bh(struct net_device *dev)
1616 1616
1617static int olympic_change_mtu(struct net_device *dev, int mtu) 1617static int olympic_change_mtu(struct net_device *dev, int mtu)
1618{ 1618{
1619 struct olympic_private *olympic_priv = (struct olympic_private *) dev->priv; 1619 struct olympic_private *olympic_priv = netdev_priv(dev);
1620 u16 max_mtu ; 1620 u16 max_mtu ;
1621 1621
1622 if (olympic_priv->olympic_ring_speed == 4) 1622 if (olympic_priv->olympic_ring_speed == 4)
@@ -1638,7 +1638,7 @@ static int olympic_change_mtu(struct net_device *dev, int mtu)
1638static int olympic_proc_info(char *buffer, char **start, off_t offset, int length, int *eof, void *data) 1638static int olympic_proc_info(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
1639{ 1639{
1640 struct net_device *dev = (struct net_device *)data ; 1640 struct net_device *dev = (struct net_device *)data ;
1641 struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv; 1641 struct olympic_private *olympic_priv=netdev_priv(dev);
1642 u8 __iomem *oat = (olympic_priv->olympic_lap + olympic_priv->olympic_addr_table_addr) ; 1642 u8 __iomem *oat = (olympic_priv->olympic_lap + olympic_priv->olympic_addr_table_addr) ;
1643 u8 __iomem *opt = (olympic_priv->olympic_lap + olympic_priv->olympic_parms_addr) ; 1643 u8 __iomem *opt = (olympic_priv->olympic_lap + olympic_priv->olympic_parms_addr) ;
1644 int size = 0 ; 1644 int size = 0 ;
@@ -1749,7 +1749,7 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1749static void __devexit olympic_remove_one(struct pci_dev *pdev) 1749static void __devexit olympic_remove_one(struct pci_dev *pdev)
1750{ 1750{
1751 struct net_device *dev = pci_get_drvdata(pdev) ; 1751 struct net_device *dev = pci_get_drvdata(pdev) ;
1752 struct olympic_private *olympic_priv=(struct olympic_private *)dev->priv; 1752 struct olympic_private *olympic_priv=netdev_priv(dev);
1753 1753
1754 if (olympic_priv->olympic_network_monitor) { 1754 if (olympic_priv->olympic_network_monitor) {
1755 char proc_name[20] ; 1755 char proc_name[20] ;
diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c
index 3b2f00b9b7bd..aec75c930c21 100644
--- a/drivers/net/tokenring/tmspci.c
+++ b/drivers/net/tokenring/tmspci.c
@@ -149,7 +149,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
149 goto err_out_irq; 149 goto err_out_irq;
150 } 150 }
151 151
152 tp = dev->priv; 152 tp = netdev_priv(dev);
153 tp->setnselout = tms_pci_setnselout_pins; 153 tp->setnselout = tms_pci_setnselout_pins;
154 154
155 tp->sifreadb = tms_pci_sifreadb; 155 tp->sifreadb = tms_pci_sifreadb;
@@ -210,7 +210,7 @@ static void tms_pci_read_eeprom(struct net_device *dev)
210static unsigned short tms_pci_setnselout_pins(struct net_device *dev) 210static unsigned short tms_pci_setnselout_pins(struct net_device *dev)
211{ 211{
212 unsigned short val = 0; 212 unsigned short val = 0;
213 struct net_local *tp = dev->priv; 213 struct net_local *tp = netdev_priv(dev);
214 struct card_info *cardinfo = tp->tmspriv; 214 struct card_info *cardinfo = tp->tmspriv;
215 215
216 if(tp->DataRate == SPEED_4) 216 if(tp->DataRate == SPEED_4)