diff options
Diffstat (limited to 'drivers/net/wireless/wavelan.c')
-rw-r--r-- | drivers/net/wireless/wavelan.c | 88 |
1 files changed, 43 insertions, 45 deletions
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index 1ac37e86b9bd..832679396b6c 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -134,7 +134,7 @@ static inline void wv_16_on(unsigned long ioaddr, u16 hacr) | |||
134 | */ | 134 | */ |
135 | static inline void wv_ints_off(struct net_device * dev) | 135 | static inline void wv_ints_off(struct net_device * dev) |
136 | { | 136 | { |
137 | net_local *lp = (net_local *) dev->priv; | 137 | net_local *lp = netdev_priv(dev); |
138 | unsigned long ioaddr = dev->base_addr; | 138 | unsigned long ioaddr = dev->base_addr; |
139 | 139 | ||
140 | lp->hacr &= ~HACR_INTRON; | 140 | lp->hacr &= ~HACR_INTRON; |
@@ -148,7 +148,7 @@ static inline void wv_ints_off(struct net_device * dev) | |||
148 | */ | 148 | */ |
149 | static inline void wv_ints_on(struct net_device * dev) | 149 | static inline void wv_ints_on(struct net_device * dev) |
150 | { | 150 | { |
151 | net_local *lp = (net_local *) dev->priv; | 151 | net_local *lp = netdev_priv(dev); |
152 | unsigned long ioaddr = dev->base_addr; | 152 | unsigned long ioaddr = dev->base_addr; |
153 | 153 | ||
154 | lp->hacr |= HACR_INTRON; | 154 | lp->hacr |= HACR_INTRON; |
@@ -526,7 +526,7 @@ static inline void obram_write(unsigned long ioaddr, u16 o, u8 * b, int n) | |||
526 | */ | 526 | */ |
527 | static void wv_ack(struct net_device * dev) | 527 | static void wv_ack(struct net_device * dev) |
528 | { | 528 | { |
529 | net_local *lp = (net_local *) dev->priv; | 529 | net_local *lp = netdev_priv(dev); |
530 | unsigned long ioaddr = dev->base_addr; | 530 | unsigned long ioaddr = dev->base_addr; |
531 | u16 scb_cs; | 531 | u16 scb_cs; |
532 | int i; | 532 | int i; |
@@ -568,7 +568,7 @@ static void wv_ack(struct net_device * dev) | |||
568 | */ | 568 | */ |
569 | static int wv_synchronous_cmd(struct net_device * dev, const char *str) | 569 | static int wv_synchronous_cmd(struct net_device * dev, const char *str) |
570 | { | 570 | { |
571 | net_local *lp = (net_local *) dev->priv; | 571 | net_local *lp = netdev_priv(dev); |
572 | unsigned long ioaddr = dev->base_addr; | 572 | unsigned long ioaddr = dev->base_addr; |
573 | u16 scb_cmd; | 573 | u16 scb_cmd; |
574 | ach_t cb; | 574 | ach_t cb; |
@@ -824,7 +824,7 @@ if (lp->tx_n_in_use > 0) | |||
824 | */ | 824 | */ |
825 | static void wv_82586_reconfig(struct net_device * dev) | 825 | static void wv_82586_reconfig(struct net_device * dev) |
826 | { | 826 | { |
827 | net_local *lp = (net_local *) dev->priv; | 827 | net_local *lp = netdev_priv(dev); |
828 | unsigned long flags; | 828 | unsigned long flags; |
829 | 829 | ||
830 | /* Arm the flag, will be cleard in wv_82586_config() */ | 830 | /* Arm the flag, will be cleard in wv_82586_config() */ |
@@ -922,7 +922,7 @@ static void wv_psa_show(psa_t * p) | |||
922 | static void wv_mmc_show(struct net_device * dev) | 922 | static void wv_mmc_show(struct net_device * dev) |
923 | { | 923 | { |
924 | unsigned long ioaddr = dev->base_addr; | 924 | unsigned long ioaddr = dev->base_addr; |
925 | net_local *lp = (net_local *) dev->priv; | 925 | net_local *lp = netdev_priv(dev); |
926 | mmr_t m; | 926 | mmr_t m; |
927 | 927 | ||
928 | /* Basic check */ | 928 | /* Basic check */ |
@@ -1102,8 +1102,6 @@ static void wv_scb_show(unsigned long ioaddr) | |||
1102 | */ | 1102 | */ |
1103 | static void wv_ru_show(struct net_device * dev) | 1103 | static void wv_ru_show(struct net_device * dev) |
1104 | { | 1104 | { |
1105 | /* net_local *lp = (net_local *) dev->priv; */ | ||
1106 | |||
1107 | printk(KERN_DEBUG | 1105 | printk(KERN_DEBUG |
1108 | "##### WaveLAN i82586 receiver unit status: #####\n"); | 1106 | "##### WaveLAN i82586 receiver unit status: #####\n"); |
1109 | printk(KERN_DEBUG "ru:"); | 1107 | printk(KERN_DEBUG "ru:"); |
@@ -1148,7 +1146,7 @@ static void wv_cu_show_one(struct net_device * dev, net_local * lp, int i, u16 p | |||
1148 | */ | 1146 | */ |
1149 | static void wv_cu_show(struct net_device * dev) | 1147 | static void wv_cu_show(struct net_device * dev) |
1150 | { | 1148 | { |
1151 | net_local *lp = (net_local *) dev->priv; | 1149 | net_local *lp = netdev_priv(dev); |
1152 | unsigned int i; | 1150 | unsigned int i; |
1153 | u16 p; | 1151 | u16 p; |
1154 | 1152 | ||
@@ -1190,7 +1188,7 @@ static void wv_local_show(struct net_device * dev) | |||
1190 | { | 1188 | { |
1191 | net_local *lp; | 1189 | net_local *lp; |
1192 | 1190 | ||
1193 | lp = (net_local *) dev->priv; | 1191 | lp = netdev_priv(dev); |
1194 | 1192 | ||
1195 | printk(KERN_DEBUG "local:"); | 1193 | printk(KERN_DEBUG "local:"); |
1196 | printk(" tx_n_in_use=%d,", lp->tx_n_in_use); | 1194 | printk(" tx_n_in_use=%d,", lp->tx_n_in_use); |
@@ -1250,7 +1248,7 @@ static inline void wv_packet_info(u8 * p, /* Packet to dump */ | |||
1250 | static void wv_init_info(struct net_device * dev) | 1248 | static void wv_init_info(struct net_device * dev) |
1251 | { | 1249 | { |
1252 | short ioaddr = dev->base_addr; | 1250 | short ioaddr = dev->base_addr; |
1253 | net_local *lp = (net_local *) dev->priv; | 1251 | net_local *lp = netdev_priv(dev); |
1254 | psa_t psa; | 1252 | psa_t psa; |
1255 | 1253 | ||
1256 | /* Read the parameter storage area */ | 1254 | /* Read the parameter storage area */ |
@@ -1360,7 +1358,7 @@ static en_stats *wavelan_get_stats(struct net_device * dev) | |||
1360 | printk(KERN_DEBUG "%s: <>wavelan_get_stats()\n", dev->name); | 1358 | printk(KERN_DEBUG "%s: <>wavelan_get_stats()\n", dev->name); |
1361 | #endif | 1359 | #endif |
1362 | 1360 | ||
1363 | return (&((net_local *) dev->priv)->stats); | 1361 | return &((net_local *)netdev_priv(dev))->stats; |
1364 | } | 1362 | } |
1365 | 1363 | ||
1366 | /*------------------------------------------------------------------*/ | 1364 | /*------------------------------------------------------------------*/ |
@@ -1373,7 +1371,7 @@ static en_stats *wavelan_get_stats(struct net_device * dev) | |||
1373 | */ | 1371 | */ |
1374 | static void wavelan_set_multicast_list(struct net_device * dev) | 1372 | static void wavelan_set_multicast_list(struct net_device * dev) |
1375 | { | 1373 | { |
1376 | net_local *lp = (net_local *) dev->priv; | 1374 | net_local *lp = netdev_priv(dev); |
1377 | 1375 | ||
1378 | #ifdef DEBUG_IOCTL_TRACE | 1376 | #ifdef DEBUG_IOCTL_TRACE |
1379 | printk(KERN_DEBUG "%s: ->wavelan_set_multicast_list()\n", | 1377 | printk(KERN_DEBUG "%s: ->wavelan_set_multicast_list()\n", |
@@ -1707,7 +1705,7 @@ static inline void wl_spy_gather(struct net_device * dev, | |||
1707 | */ | 1705 | */ |
1708 | static inline void wl_his_gather(struct net_device * dev, u8 * stats) | 1706 | static inline void wl_his_gather(struct net_device * dev, u8 * stats) |
1709 | { /* Statistics to gather */ | 1707 | { /* Statistics to gather */ |
1710 | net_local *lp = (net_local *) dev->priv; | 1708 | net_local *lp = netdev_priv(dev); |
1711 | u8 level = stats[0] & MMR_SIGNAL_LVL; | 1709 | u8 level = stats[0] & MMR_SIGNAL_LVL; |
1712 | int i; | 1710 | int i; |
1713 | 1711 | ||
@@ -1744,7 +1742,7 @@ static int wavelan_set_nwid(struct net_device *dev, | |||
1744 | char *extra) | 1742 | char *extra) |
1745 | { | 1743 | { |
1746 | unsigned long ioaddr = dev->base_addr; | 1744 | unsigned long ioaddr = dev->base_addr; |
1747 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 1745 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
1748 | psa_t psa; | 1746 | psa_t psa; |
1749 | mm_t m; | 1747 | mm_t m; |
1750 | unsigned long flags; | 1748 | unsigned long flags; |
@@ -1803,7 +1801,7 @@ static int wavelan_get_nwid(struct net_device *dev, | |||
1803 | char *extra) | 1801 | char *extra) |
1804 | { | 1802 | { |
1805 | unsigned long ioaddr = dev->base_addr; | 1803 | unsigned long ioaddr = dev->base_addr; |
1806 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 1804 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
1807 | psa_t psa; | 1805 | psa_t psa; |
1808 | unsigned long flags; | 1806 | unsigned long flags; |
1809 | int ret = 0; | 1807 | int ret = 0; |
@@ -1835,7 +1833,7 @@ static int wavelan_set_freq(struct net_device *dev, | |||
1835 | char *extra) | 1833 | char *extra) |
1836 | { | 1834 | { |
1837 | unsigned long ioaddr = dev->base_addr; | 1835 | unsigned long ioaddr = dev->base_addr; |
1838 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 1836 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
1839 | unsigned long flags; | 1837 | unsigned long flags; |
1840 | int ret; | 1838 | int ret; |
1841 | 1839 | ||
@@ -1865,7 +1863,7 @@ static int wavelan_get_freq(struct net_device *dev, | |||
1865 | char *extra) | 1863 | char *extra) |
1866 | { | 1864 | { |
1867 | unsigned long ioaddr = dev->base_addr; | 1865 | unsigned long ioaddr = dev->base_addr; |
1868 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 1866 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
1869 | psa_t psa; | 1867 | psa_t psa; |
1870 | unsigned long flags; | 1868 | unsigned long flags; |
1871 | int ret = 0; | 1869 | int ret = 0; |
@@ -1911,7 +1909,7 @@ static int wavelan_set_sens(struct net_device *dev, | |||
1911 | char *extra) | 1909 | char *extra) |
1912 | { | 1910 | { |
1913 | unsigned long ioaddr = dev->base_addr; | 1911 | unsigned long ioaddr = dev->base_addr; |
1914 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 1912 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
1915 | psa_t psa; | 1913 | psa_t psa; |
1916 | unsigned long flags; | 1914 | unsigned long flags; |
1917 | int ret = 0; | 1915 | int ret = 0; |
@@ -1947,7 +1945,7 @@ static int wavelan_get_sens(struct net_device *dev, | |||
1947 | char *extra) | 1945 | char *extra) |
1948 | { | 1946 | { |
1949 | unsigned long ioaddr = dev->base_addr; | 1947 | unsigned long ioaddr = dev->base_addr; |
1950 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 1948 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
1951 | psa_t psa; | 1949 | psa_t psa; |
1952 | unsigned long flags; | 1950 | unsigned long flags; |
1953 | int ret = 0; | 1951 | int ret = 0; |
@@ -1978,7 +1976,7 @@ static int wavelan_set_encode(struct net_device *dev, | |||
1978 | char *extra) | 1976 | char *extra) |
1979 | { | 1977 | { |
1980 | unsigned long ioaddr = dev->base_addr; | 1978 | unsigned long ioaddr = dev->base_addr; |
1981 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 1979 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
1982 | unsigned long flags; | 1980 | unsigned long flags; |
1983 | psa_t psa; | 1981 | psa_t psa; |
1984 | int ret = 0; | 1982 | int ret = 0; |
@@ -2048,7 +2046,7 @@ static int wavelan_get_encode(struct net_device *dev, | |||
2048 | char *extra) | 2046 | char *extra) |
2049 | { | 2047 | { |
2050 | unsigned long ioaddr = dev->base_addr; | 2048 | unsigned long ioaddr = dev->base_addr; |
2051 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 2049 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
2052 | psa_t psa; | 2050 | psa_t psa; |
2053 | unsigned long flags; | 2051 | unsigned long flags; |
2054 | int ret = 0; | 2052 | int ret = 0; |
@@ -2095,7 +2093,7 @@ static int wavelan_get_range(struct net_device *dev, | |||
2095 | char *extra) | 2093 | char *extra) |
2096 | { | 2094 | { |
2097 | unsigned long ioaddr = dev->base_addr; | 2095 | unsigned long ioaddr = dev->base_addr; |
2098 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 2096 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
2099 | struct iw_range *range = (struct iw_range *) extra; | 2097 | struct iw_range *range = (struct iw_range *) extra; |
2100 | unsigned long flags; | 2098 | unsigned long flags; |
2101 | int ret = 0; | 2099 | int ret = 0; |
@@ -2170,7 +2168,7 @@ static int wavelan_set_qthr(struct net_device *dev, | |||
2170 | char *extra) | 2168 | char *extra) |
2171 | { | 2169 | { |
2172 | unsigned long ioaddr = dev->base_addr; | 2170 | unsigned long ioaddr = dev->base_addr; |
2173 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 2171 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
2174 | psa_t psa; | 2172 | psa_t psa; |
2175 | unsigned long flags; | 2173 | unsigned long flags; |
2176 | 2174 | ||
@@ -2202,7 +2200,7 @@ static int wavelan_get_qthr(struct net_device *dev, | |||
2202 | char *extra) | 2200 | char *extra) |
2203 | { | 2201 | { |
2204 | unsigned long ioaddr = dev->base_addr; | 2202 | unsigned long ioaddr = dev->base_addr; |
2205 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 2203 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
2206 | psa_t psa; | 2204 | psa_t psa; |
2207 | unsigned long flags; | 2205 | unsigned long flags; |
2208 | 2206 | ||
@@ -2230,7 +2228,7 @@ static int wavelan_set_histo(struct net_device *dev, | |||
2230 | union iwreq_data *wrqu, | 2228 | union iwreq_data *wrqu, |
2231 | char *extra) | 2229 | char *extra) |
2232 | { | 2230 | { |
2233 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 2231 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
2234 | 2232 | ||
2235 | /* Check the number of intervals. */ | 2233 | /* Check the number of intervals. */ |
2236 | if (wrqu->data.length > 16) { | 2234 | if (wrqu->data.length > 16) { |
@@ -2273,7 +2271,7 @@ static int wavelan_get_histo(struct net_device *dev, | |||
2273 | union iwreq_data *wrqu, | 2271 | union iwreq_data *wrqu, |
2274 | char *extra) | 2272 | char *extra) |
2275 | { | 2273 | { |
2276 | net_local *lp = (net_local *) dev->priv; /* lp is not unused */ | 2274 | net_local *lp = netdev_priv(dev); /* lp is not unused */ |
2277 | 2275 | ||
2278 | /* Set the number of intervals. */ | 2276 | /* Set the number of intervals. */ |
2279 | wrqu->data.length = lp->his_number; | 2277 | wrqu->data.length = lp->his_number; |
@@ -2377,7 +2375,7 @@ static const struct iw_handler_def wavelan_handler_def = | |||
2377 | static iw_stats *wavelan_get_wireless_stats(struct net_device * dev) | 2375 | static iw_stats *wavelan_get_wireless_stats(struct net_device * dev) |
2378 | { | 2376 | { |
2379 | unsigned long ioaddr = dev->base_addr; | 2377 | unsigned long ioaddr = dev->base_addr; |
2380 | net_local *lp = (net_local *) dev->priv; | 2378 | net_local *lp = netdev_priv(dev); |
2381 | mmr_t m; | 2379 | mmr_t m; |
2382 | iw_stats *wstats; | 2380 | iw_stats *wstats; |
2383 | unsigned long flags; | 2381 | unsigned long flags; |
@@ -2452,7 +2450,7 @@ static iw_stats *wavelan_get_wireless_stats(struct net_device * dev) | |||
2452 | static void | 2450 | static void |
2453 | wv_packet_read(struct net_device * dev, u16 buf_off, int sksize) | 2451 | wv_packet_read(struct net_device * dev, u16 buf_off, int sksize) |
2454 | { | 2452 | { |
2455 | net_local *lp = (net_local *) dev->priv; | 2453 | net_local *lp = netdev_priv(dev); |
2456 | unsigned long ioaddr = dev->base_addr; | 2454 | unsigned long ioaddr = dev->base_addr; |
2457 | struct sk_buff *skb; | 2455 | struct sk_buff *skb; |
2458 | 2456 | ||
@@ -2546,7 +2544,7 @@ wv_packet_read(struct net_device * dev, u16 buf_off, int sksize) | |||
2546 | static void wv_receive(struct net_device * dev) | 2544 | static void wv_receive(struct net_device * dev) |
2547 | { | 2545 | { |
2548 | unsigned long ioaddr = dev->base_addr; | 2546 | unsigned long ioaddr = dev->base_addr; |
2549 | net_local *lp = (net_local *) dev->priv; | 2547 | net_local *lp = netdev_priv(dev); |
2550 | fd_t fd; | 2548 | fd_t fd; |
2551 | rbd_t rbd; | 2549 | rbd_t rbd; |
2552 | int nreaped = 0; | 2550 | int nreaped = 0; |
@@ -2728,7 +2726,7 @@ static void wv_receive(struct net_device * dev) | |||
2728 | */ | 2726 | */ |
2729 | static int wv_packet_write(struct net_device * dev, void *buf, short length) | 2727 | static int wv_packet_write(struct net_device * dev, void *buf, short length) |
2730 | { | 2728 | { |
2731 | net_local *lp = (net_local *) dev->priv; | 2729 | net_local *lp = netdev_priv(dev); |
2732 | unsigned long ioaddr = dev->base_addr; | 2730 | unsigned long ioaddr = dev->base_addr; |
2733 | unsigned short txblock; | 2731 | unsigned short txblock; |
2734 | unsigned short txpred; | 2732 | unsigned short txpred; |
@@ -2859,7 +2857,7 @@ static int wv_packet_write(struct net_device * dev, void *buf, short length) | |||
2859 | */ | 2857 | */ |
2860 | static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) | 2858 | static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) |
2861 | { | 2859 | { |
2862 | net_local *lp = (net_local *) dev->priv; | 2860 | net_local *lp = netdev_priv(dev); |
2863 | unsigned long flags; | 2861 | unsigned long flags; |
2864 | char data[ETH_ZLEN]; | 2862 | char data[ETH_ZLEN]; |
2865 | 2863 | ||
@@ -2927,7 +2925,7 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) | |||
2927 | static int wv_mmc_init(struct net_device * dev) | 2925 | static int wv_mmc_init(struct net_device * dev) |
2928 | { | 2926 | { |
2929 | unsigned long ioaddr = dev->base_addr; | 2927 | unsigned long ioaddr = dev->base_addr; |
2930 | net_local *lp = (net_local *) dev->priv; | 2928 | net_local *lp = netdev_priv(dev); |
2931 | psa_t psa; | 2929 | psa_t psa; |
2932 | mmw_t m; | 2930 | mmw_t m; |
2933 | int configured; | 2931 | int configured; |
@@ -3098,7 +3096,7 @@ static int wv_mmc_init(struct net_device * dev) | |||
3098 | */ | 3096 | */ |
3099 | static int wv_ru_start(struct net_device * dev) | 3097 | static int wv_ru_start(struct net_device * dev) |
3100 | { | 3098 | { |
3101 | net_local *lp = (net_local *) dev->priv; | 3099 | net_local *lp = netdev_priv(dev); |
3102 | unsigned long ioaddr = dev->base_addr; | 3100 | unsigned long ioaddr = dev->base_addr; |
3103 | u16 scb_cs; | 3101 | u16 scb_cs; |
3104 | fd_t fd; | 3102 | fd_t fd; |
@@ -3190,7 +3188,7 @@ static int wv_ru_start(struct net_device * dev) | |||
3190 | */ | 3188 | */ |
3191 | static int wv_cu_start(struct net_device * dev) | 3189 | static int wv_cu_start(struct net_device * dev) |
3192 | { | 3190 | { |
3193 | net_local *lp = (net_local *) dev->priv; | 3191 | net_local *lp = netdev_priv(dev); |
3194 | unsigned long ioaddr = dev->base_addr; | 3192 | unsigned long ioaddr = dev->base_addr; |
3195 | int i; | 3193 | int i; |
3196 | u16 txblock; | 3194 | u16 txblock; |
@@ -3291,7 +3289,7 @@ static int wv_cu_start(struct net_device * dev) | |||
3291 | */ | 3289 | */ |
3292 | static int wv_82586_start(struct net_device * dev) | 3290 | static int wv_82586_start(struct net_device * dev) |
3293 | { | 3291 | { |
3294 | net_local *lp = (net_local *) dev->priv; | 3292 | net_local *lp = netdev_priv(dev); |
3295 | unsigned long ioaddr = dev->base_addr; | 3293 | unsigned long ioaddr = dev->base_addr; |
3296 | scp_t scp; /* system configuration pointer */ | 3294 | scp_t scp; /* system configuration pointer */ |
3297 | iscp_t iscp; /* intermediate scp */ | 3295 | iscp_t iscp; /* intermediate scp */ |
@@ -3423,7 +3421,7 @@ static int wv_82586_start(struct net_device * dev) | |||
3423 | */ | 3421 | */ |
3424 | static void wv_82586_config(struct net_device * dev) | 3422 | static void wv_82586_config(struct net_device * dev) |
3425 | { | 3423 | { |
3426 | net_local *lp = (net_local *) dev->priv; | 3424 | net_local *lp = netdev_priv(dev); |
3427 | unsigned long ioaddr = dev->base_addr; | 3425 | unsigned long ioaddr = dev->base_addr; |
3428 | unsigned short txblock; | 3426 | unsigned short txblock; |
3429 | unsigned short txpred; | 3427 | unsigned short txpred; |
@@ -3599,7 +3597,7 @@ static void wv_82586_config(struct net_device * dev) | |||
3599 | */ | 3597 | */ |
3600 | static void wv_82586_stop(struct net_device * dev) | 3598 | static void wv_82586_stop(struct net_device * dev) |
3601 | { | 3599 | { |
3602 | net_local *lp = (net_local *) dev->priv; | 3600 | net_local *lp = netdev_priv(dev); |
3603 | unsigned long ioaddr = dev->base_addr; | 3601 | unsigned long ioaddr = dev->base_addr; |
3604 | u16 scb_cmd; | 3602 | u16 scb_cmd; |
3605 | 3603 | ||
@@ -3636,7 +3634,7 @@ static void wv_82586_stop(struct net_device * dev) | |||
3636 | */ | 3634 | */ |
3637 | static int wv_hw_reset(struct net_device * dev) | 3635 | static int wv_hw_reset(struct net_device * dev) |
3638 | { | 3636 | { |
3639 | net_local *lp = (net_local *) dev->priv; | 3637 | net_local *lp = netdev_priv(dev); |
3640 | unsigned long ioaddr = dev->base_addr; | 3638 | unsigned long ioaddr = dev->base_addr; |
3641 | 3639 | ||
3642 | #ifdef DEBUG_CONFIG_TRACE | 3640 | #ifdef DEBUG_CONFIG_TRACE |
@@ -3737,7 +3735,7 @@ static irqreturn_t wavelan_interrupt(int irq, void *dev_id) | |||
3737 | printk(KERN_DEBUG "%s: ->wavelan_interrupt()\n", dev->name); | 3735 | printk(KERN_DEBUG "%s: ->wavelan_interrupt()\n", dev->name); |
3738 | #endif | 3736 | #endif |
3739 | 3737 | ||
3740 | lp = (net_local *) dev->priv; | 3738 | lp = netdev_priv(dev); |
3741 | ioaddr = dev->base_addr; | 3739 | ioaddr = dev->base_addr; |
3742 | 3740 | ||
3743 | #ifdef DEBUG_INTERRUPT_INFO | 3741 | #ifdef DEBUG_INTERRUPT_INFO |
@@ -3880,7 +3878,7 @@ static irqreturn_t wavelan_interrupt(int irq, void *dev_id) | |||
3880 | */ | 3878 | */ |
3881 | static void wavelan_watchdog(struct net_device * dev) | 3879 | static void wavelan_watchdog(struct net_device * dev) |
3882 | { | 3880 | { |
3883 | net_local * lp = (net_local *)dev->priv; | 3881 | net_local *lp = netdev_priv(dev); |
3884 | u_long ioaddr = dev->base_addr; | 3882 | u_long ioaddr = dev->base_addr; |
3885 | unsigned long flags; | 3883 | unsigned long flags; |
3886 | unsigned int nreaped; | 3884 | unsigned int nreaped; |
@@ -3960,7 +3958,7 @@ static void wavelan_watchdog(struct net_device * dev) | |||
3960 | */ | 3958 | */ |
3961 | static int wavelan_open(struct net_device * dev) | 3959 | static int wavelan_open(struct net_device * dev) |
3962 | { | 3960 | { |
3963 | net_local * lp = (net_local *)dev->priv; | 3961 | net_local *lp = netdev_priv(dev); |
3964 | unsigned long flags; | 3962 | unsigned long flags; |
3965 | 3963 | ||
3966 | #ifdef DEBUG_CALLBACK_TRACE | 3964 | #ifdef DEBUG_CALLBACK_TRACE |
@@ -4015,7 +4013,7 @@ static int wavelan_open(struct net_device * dev) | |||
4015 | */ | 4013 | */ |
4016 | static int wavelan_close(struct net_device * dev) | 4014 | static int wavelan_close(struct net_device * dev) |
4017 | { | 4015 | { |
4018 | net_local *lp = (net_local *) dev->priv; | 4016 | net_local *lp = netdev_priv(dev); |
4019 | unsigned long flags; | 4017 | unsigned long flags; |
4020 | 4018 | ||
4021 | #ifdef DEBUG_CALLBACK_TRACE | 4019 | #ifdef DEBUG_CALLBACK_TRACE |
@@ -4114,8 +4112,8 @@ static int __init wavelan_config(struct net_device *dev, unsigned short ioaddr) | |||
4114 | dev->if_port = 0; | 4112 | dev->if_port = 0; |
4115 | 4113 | ||
4116 | /* Initialize device structures */ | 4114 | /* Initialize device structures */ |
4117 | memset(dev->priv, 0, sizeof(net_local)); | 4115 | memset(netdev_priv(dev), 0, sizeof(net_local)); |
4118 | lp = (net_local *) dev->priv; | 4116 | lp = netdev_priv(dev); |
4119 | 4117 | ||
4120 | /* Back link to the device structure. */ | 4118 | /* Back link to the device structure. */ |
4121 | lp->dev = dev; | 4119 | lp->dev = dev; |