diff options
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 72 | ||||
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 62 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan.c | 88 | ||||
-rw-r--r-- | drivers/net/znet.c | 22 | ||||
-rw-r--r-- | net/appletalk/ddp.c | 2 | ||||
-rw-r--r-- | net/atm/br2684.c | 2 | ||||
-rw-r--r-- | net/atm/lec.c | 34 | ||||
-rw-r--r-- | net/atm/mpc.c | 10 | ||||
-rw-r--r-- | net/bluetooth/bnep/core.c | 2 | ||||
-rw-r--r-- | net/bluetooth/bnep/netdev.c | 6 | ||||
-rw-r--r-- | net/bridge/br_if.c | 2 | ||||
-rw-r--r-- | net/bridge/br_sysfs_br.c | 2 | ||||
-rw-r--r-- | net/irda/irlan/irlan_common.c | 2 |
13 files changed, 153 insertions, 153 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index fe7498f12147..c6102e08179e 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -163,7 +163,7 @@ static int lbs_get_name(struct net_device *dev, struct iw_request_info *info, | |||
163 | static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, | 163 | static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, |
164 | struct iw_freq *fwrq, char *extra) | 164 | struct iw_freq *fwrq, char *extra) |
165 | { | 165 | { |
166 | struct lbs_private *priv = dev->priv; | 166 | struct lbs_private *priv = netdev_priv(dev); |
167 | struct chan_freq_power *cfp; | 167 | struct chan_freq_power *cfp; |
168 | 168 | ||
169 | lbs_deb_enter(LBS_DEB_WEXT); | 169 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -189,7 +189,7 @@ static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, | |||
189 | static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, | 189 | static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, |
190 | struct sockaddr *awrq, char *extra) | 190 | struct sockaddr *awrq, char *extra) |
191 | { | 191 | { |
192 | struct lbs_private *priv = dev->priv; | 192 | struct lbs_private *priv = netdev_priv(dev); |
193 | 193 | ||
194 | lbs_deb_enter(LBS_DEB_WEXT); | 194 | lbs_deb_enter(LBS_DEB_WEXT); |
195 | 195 | ||
@@ -207,7 +207,7 @@ static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, | |||
207 | static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, | 207 | static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, |
208 | struct iw_point *dwrq, char *extra) | 208 | struct iw_point *dwrq, char *extra) |
209 | { | 209 | { |
210 | struct lbs_private *priv = dev->priv; | 210 | struct lbs_private *priv = netdev_priv(dev); |
211 | 211 | ||
212 | lbs_deb_enter(LBS_DEB_WEXT); | 212 | lbs_deb_enter(LBS_DEB_WEXT); |
213 | 213 | ||
@@ -231,7 +231,7 @@ static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, | |||
231 | static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, | 231 | static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, |
232 | struct iw_point *dwrq, char *extra) | 232 | struct iw_point *dwrq, char *extra) |
233 | { | 233 | { |
234 | struct lbs_private *priv = dev->priv; | 234 | struct lbs_private *priv = netdev_priv(dev); |
235 | 235 | ||
236 | lbs_deb_enter(LBS_DEB_WEXT); | 236 | lbs_deb_enter(LBS_DEB_WEXT); |
237 | 237 | ||
@@ -248,7 +248,7 @@ static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, | |||
248 | static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, | 248 | static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, |
249 | struct iw_point *dwrq, char *extra) | 249 | struct iw_point *dwrq, char *extra) |
250 | { | 250 | { |
251 | struct lbs_private *priv = dev->priv; | 251 | struct lbs_private *priv = netdev_priv(dev); |
252 | 252 | ||
253 | lbs_deb_enter(LBS_DEB_WEXT); | 253 | lbs_deb_enter(LBS_DEB_WEXT); |
254 | 254 | ||
@@ -273,7 +273,7 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info, | |||
273 | struct iw_param *vwrq, char *extra) | 273 | struct iw_param *vwrq, char *extra) |
274 | { | 274 | { |
275 | int ret = 0; | 275 | int ret = 0; |
276 | struct lbs_private *priv = dev->priv; | 276 | struct lbs_private *priv = netdev_priv(dev); |
277 | u32 val = vwrq->value; | 277 | u32 val = vwrq->value; |
278 | 278 | ||
279 | lbs_deb_enter(LBS_DEB_WEXT); | 279 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -293,7 +293,7 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info, | |||
293 | static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info, | 293 | static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info, |
294 | struct iw_param *vwrq, char *extra) | 294 | struct iw_param *vwrq, char *extra) |
295 | { | 295 | { |
296 | struct lbs_private *priv = dev->priv; | 296 | struct lbs_private *priv = netdev_priv(dev); |
297 | int ret = 0; | 297 | int ret = 0; |
298 | u16 val = 0; | 298 | u16 val = 0; |
299 | 299 | ||
@@ -315,7 +315,7 @@ out: | |||
315 | static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, | 315 | static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, |
316 | struct iw_param *vwrq, char *extra) | 316 | struct iw_param *vwrq, char *extra) |
317 | { | 317 | { |
318 | struct lbs_private *priv = dev->priv; | 318 | struct lbs_private *priv = netdev_priv(dev); |
319 | int ret = 0; | 319 | int ret = 0; |
320 | u32 val = vwrq->value; | 320 | u32 val = vwrq->value; |
321 | 321 | ||
@@ -336,7 +336,7 @@ static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, | |||
336 | static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info, | 336 | static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info, |
337 | struct iw_param *vwrq, char *extra) | 337 | struct iw_param *vwrq, char *extra) |
338 | { | 338 | { |
339 | struct lbs_private *priv = dev->priv; | 339 | struct lbs_private *priv = netdev_priv(dev); |
340 | int ret = 0; | 340 | int ret = 0; |
341 | u16 val = 0; | 341 | u16 val = 0; |
342 | 342 | ||
@@ -359,7 +359,7 @@ out: | |||
359 | static int lbs_get_mode(struct net_device *dev, | 359 | static int lbs_get_mode(struct net_device *dev, |
360 | struct iw_request_info *info, u32 * uwrq, char *extra) | 360 | struct iw_request_info *info, u32 * uwrq, char *extra) |
361 | { | 361 | { |
362 | struct lbs_private *priv = dev->priv; | 362 | struct lbs_private *priv = netdev_priv(dev); |
363 | 363 | ||
364 | lbs_deb_enter(LBS_DEB_WEXT); | 364 | lbs_deb_enter(LBS_DEB_WEXT); |
365 | 365 | ||
@@ -385,7 +385,7 @@ static int lbs_get_txpow(struct net_device *dev, | |||
385 | struct iw_request_info *info, | 385 | struct iw_request_info *info, |
386 | struct iw_param *vwrq, char *extra) | 386 | struct iw_param *vwrq, char *extra) |
387 | { | 387 | { |
388 | struct lbs_private *priv = dev->priv; | 388 | struct lbs_private *priv = netdev_priv(dev); |
389 | s16 curlevel = 0; | 389 | s16 curlevel = 0; |
390 | int ret = 0; | 390 | int ret = 0; |
391 | 391 | ||
@@ -418,7 +418,7 @@ out: | |||
418 | static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info, | 418 | static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info, |
419 | struct iw_param *vwrq, char *extra) | 419 | struct iw_param *vwrq, char *extra) |
420 | { | 420 | { |
421 | struct lbs_private *priv = dev->priv; | 421 | struct lbs_private *priv = netdev_priv(dev); |
422 | int ret = 0; | 422 | int ret = 0; |
423 | u16 slimit = 0, llimit = 0; | 423 | u16 slimit = 0, llimit = 0; |
424 | 424 | ||
@@ -466,7 +466,7 @@ out: | |||
466 | static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info, | 466 | static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info, |
467 | struct iw_param *vwrq, char *extra) | 467 | struct iw_param *vwrq, char *extra) |
468 | { | 468 | { |
469 | struct lbs_private *priv = dev->priv; | 469 | struct lbs_private *priv = netdev_priv(dev); |
470 | int ret = 0; | 470 | int ret = 0; |
471 | u16 val = 0; | 471 | u16 val = 0; |
472 | 472 | ||
@@ -542,7 +542,7 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, | |||
542 | struct iw_point *dwrq, char *extra) | 542 | struct iw_point *dwrq, char *extra) |
543 | { | 543 | { |
544 | int i, j; | 544 | int i, j; |
545 | struct lbs_private *priv = dev->priv; | 545 | struct lbs_private *priv = netdev_priv(dev); |
546 | struct iw_range *range = (struct iw_range *)extra; | 546 | struct iw_range *range = (struct iw_range *)extra; |
547 | struct chan_freq_power *cfp; | 547 | struct chan_freq_power *cfp; |
548 | u8 rates[MAX_RATES + 1]; | 548 | u8 rates[MAX_RATES + 1]; |
@@ -708,7 +708,7 @@ out: | |||
708 | static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, | 708 | static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, |
709 | struct iw_param *vwrq, char *extra) | 709 | struct iw_param *vwrq, char *extra) |
710 | { | 710 | { |
711 | struct lbs_private *priv = dev->priv; | 711 | struct lbs_private *priv = netdev_priv(dev); |
712 | 712 | ||
713 | lbs_deb_enter(LBS_DEB_WEXT); | 713 | lbs_deb_enter(LBS_DEB_WEXT); |
714 | 714 | ||
@@ -758,7 +758,7 @@ static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, | |||
758 | static int lbs_get_power(struct net_device *dev, struct iw_request_info *info, | 758 | static int lbs_get_power(struct net_device *dev, struct iw_request_info *info, |
759 | struct iw_param *vwrq, char *extra) | 759 | struct iw_param *vwrq, char *extra) |
760 | { | 760 | { |
761 | struct lbs_private *priv = dev->priv; | 761 | struct lbs_private *priv = netdev_priv(dev); |
762 | 762 | ||
763 | lbs_deb_enter(LBS_DEB_WEXT); | 763 | lbs_deb_enter(LBS_DEB_WEXT); |
764 | 764 | ||
@@ -781,7 +781,7 @@ static struct iw_statistics *lbs_get_wireless_stats(struct net_device *dev) | |||
781 | EXCELLENT = 95, | 781 | EXCELLENT = 95, |
782 | PERFECT = 100 | 782 | PERFECT = 100 |
783 | }; | 783 | }; |
784 | struct lbs_private *priv = dev->priv; | 784 | struct lbs_private *priv = netdev_priv(dev); |
785 | u32 rssi_qual; | 785 | u32 rssi_qual; |
786 | u32 tx_qual; | 786 | u32 tx_qual; |
787 | u32 quality = 0; | 787 | u32 quality = 0; |
@@ -886,7 +886,7 @@ static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info, | |||
886 | struct iw_freq *fwrq, char *extra) | 886 | struct iw_freq *fwrq, char *extra) |
887 | { | 887 | { |
888 | int ret = -EINVAL; | 888 | int ret = -EINVAL; |
889 | struct lbs_private *priv = dev->priv; | 889 | struct lbs_private *priv = netdev_priv(dev); |
890 | struct chan_freq_power *cfp; | 890 | struct chan_freq_power *cfp; |
891 | struct assoc_request * assoc_req; | 891 | struct assoc_request * assoc_req; |
892 | 892 | ||
@@ -943,7 +943,7 @@ static int lbs_mesh_set_freq(struct net_device *dev, | |||
943 | struct iw_request_info *info, | 943 | struct iw_request_info *info, |
944 | struct iw_freq *fwrq, char *extra) | 944 | struct iw_freq *fwrq, char *extra) |
945 | { | 945 | { |
946 | struct lbs_private *priv = dev->priv; | 946 | struct lbs_private *priv = netdev_priv(dev); |
947 | struct chan_freq_power *cfp; | 947 | struct chan_freq_power *cfp; |
948 | int ret = -EINVAL; | 948 | int ret = -EINVAL; |
949 | 949 | ||
@@ -994,7 +994,7 @@ out: | |||
994 | static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info, | 994 | static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info, |
995 | struct iw_param *vwrq, char *extra) | 995 | struct iw_param *vwrq, char *extra) |
996 | { | 996 | { |
997 | struct lbs_private *priv = dev->priv; | 997 | struct lbs_private *priv = netdev_priv(dev); |
998 | u8 new_rate = 0; | 998 | u8 new_rate = 0; |
999 | int ret = -EINVAL; | 999 | int ret = -EINVAL; |
1000 | u8 rates[MAX_RATES + 1]; | 1000 | u8 rates[MAX_RATES + 1]; |
@@ -1054,7 +1054,7 @@ out: | |||
1054 | static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info, | 1054 | static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info, |
1055 | struct iw_param *vwrq, char *extra) | 1055 | struct iw_param *vwrq, char *extra) |
1056 | { | 1056 | { |
1057 | struct lbs_private *priv = dev->priv; | 1057 | struct lbs_private *priv = netdev_priv(dev); |
1058 | 1058 | ||
1059 | lbs_deb_enter(LBS_DEB_WEXT); | 1059 | lbs_deb_enter(LBS_DEB_WEXT); |
1060 | 1060 | ||
@@ -1079,7 +1079,7 @@ static int lbs_set_mode(struct net_device *dev, | |||
1079 | struct iw_request_info *info, u32 * uwrq, char *extra) | 1079 | struct iw_request_info *info, u32 * uwrq, char *extra) |
1080 | { | 1080 | { |
1081 | int ret = 0; | 1081 | int ret = 0; |
1082 | struct lbs_private *priv = dev->priv; | 1082 | struct lbs_private *priv = netdev_priv(dev); |
1083 | struct assoc_request * assoc_req; | 1083 | struct assoc_request * assoc_req; |
1084 | 1084 | ||
1085 | lbs_deb_enter(LBS_DEB_WEXT); | 1085 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1124,7 +1124,7 @@ static int lbs_get_encode(struct net_device *dev, | |||
1124 | struct iw_request_info *info, | 1124 | struct iw_request_info *info, |
1125 | struct iw_point *dwrq, u8 * extra) | 1125 | struct iw_point *dwrq, u8 * extra) |
1126 | { | 1126 | { |
1127 | struct lbs_private *priv = dev->priv; | 1127 | struct lbs_private *priv = netdev_priv(dev); |
1128 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; | 1128 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; |
1129 | 1129 | ||
1130 | lbs_deb_enter(LBS_DEB_WEXT); | 1130 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1319,7 +1319,7 @@ static int lbs_set_encode(struct net_device *dev, | |||
1319 | struct iw_point *dwrq, char *extra) | 1319 | struct iw_point *dwrq, char *extra) |
1320 | { | 1320 | { |
1321 | int ret = 0; | 1321 | int ret = 0; |
1322 | struct lbs_private *priv = dev->priv; | 1322 | struct lbs_private *priv = netdev_priv(dev); |
1323 | struct assoc_request * assoc_req; | 1323 | struct assoc_request * assoc_req; |
1324 | u16 is_default = 0, index = 0, set_tx_key = 0; | 1324 | u16 is_default = 0, index = 0, set_tx_key = 0; |
1325 | 1325 | ||
@@ -1395,7 +1395,7 @@ static int lbs_get_encodeext(struct net_device *dev, | |||
1395 | char *extra) | 1395 | char *extra) |
1396 | { | 1396 | { |
1397 | int ret = -EINVAL; | 1397 | int ret = -EINVAL; |
1398 | struct lbs_private *priv = dev->priv; | 1398 | struct lbs_private *priv = netdev_priv(dev); |
1399 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1399 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1400 | int index, max_key_len; | 1400 | int index, max_key_len; |
1401 | 1401 | ||
@@ -1501,7 +1501,7 @@ static int lbs_set_encodeext(struct net_device *dev, | |||
1501 | char *extra) | 1501 | char *extra) |
1502 | { | 1502 | { |
1503 | int ret = 0; | 1503 | int ret = 0; |
1504 | struct lbs_private *priv = dev->priv; | 1504 | struct lbs_private *priv = netdev_priv(dev); |
1505 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1505 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1506 | int alg = ext->alg; | 1506 | int alg = ext->alg; |
1507 | struct assoc_request * assoc_req; | 1507 | struct assoc_request * assoc_req; |
@@ -1639,7 +1639,7 @@ static int lbs_set_genie(struct net_device *dev, | |||
1639 | struct iw_point *dwrq, | 1639 | struct iw_point *dwrq, |
1640 | char *extra) | 1640 | char *extra) |
1641 | { | 1641 | { |
1642 | struct lbs_private *priv = dev->priv; | 1642 | struct lbs_private *priv = netdev_priv(dev); |
1643 | int ret = 0; | 1643 | int ret = 0; |
1644 | struct assoc_request * assoc_req; | 1644 | struct assoc_request * assoc_req; |
1645 | 1645 | ||
@@ -1685,7 +1685,7 @@ static int lbs_get_genie(struct net_device *dev, | |||
1685 | char *extra) | 1685 | char *extra) |
1686 | { | 1686 | { |
1687 | int ret = 0; | 1687 | int ret = 0; |
1688 | struct lbs_private *priv = dev->priv; | 1688 | struct lbs_private *priv = netdev_priv(dev); |
1689 | 1689 | ||
1690 | lbs_deb_enter(LBS_DEB_WEXT); | 1690 | lbs_deb_enter(LBS_DEB_WEXT); |
1691 | 1691 | ||
@@ -1713,7 +1713,7 @@ static int lbs_set_auth(struct net_device *dev, | |||
1713 | struct iw_param *dwrq, | 1713 | struct iw_param *dwrq, |
1714 | char *extra) | 1714 | char *extra) |
1715 | { | 1715 | { |
1716 | struct lbs_private *priv = dev->priv; | 1716 | struct lbs_private *priv = netdev_priv(dev); |
1717 | struct assoc_request * assoc_req; | 1717 | struct assoc_request * assoc_req; |
1718 | int ret = 0; | 1718 | int ret = 0; |
1719 | int updated = 0; | 1719 | int updated = 0; |
@@ -1816,7 +1816,7 @@ static int lbs_get_auth(struct net_device *dev, | |||
1816 | char *extra) | 1816 | char *extra) |
1817 | { | 1817 | { |
1818 | int ret = 0; | 1818 | int ret = 0; |
1819 | struct lbs_private *priv = dev->priv; | 1819 | struct lbs_private *priv = netdev_priv(dev); |
1820 | 1820 | ||
1821 | lbs_deb_enter(LBS_DEB_WEXT); | 1821 | lbs_deb_enter(LBS_DEB_WEXT); |
1822 | 1822 | ||
@@ -1857,7 +1857,7 @@ static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info, | |||
1857 | struct iw_param *vwrq, char *extra) | 1857 | struct iw_param *vwrq, char *extra) |
1858 | { | 1858 | { |
1859 | int ret = 0; | 1859 | int ret = 0; |
1860 | struct lbs_private *priv = dev->priv; | 1860 | struct lbs_private *priv = netdev_priv(dev); |
1861 | s16 dbm = (s16) vwrq->value; | 1861 | s16 dbm = (s16) vwrq->value; |
1862 | 1862 | ||
1863 | lbs_deb_enter(LBS_DEB_WEXT); | 1863 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1936,7 +1936,7 @@ out: | |||
1936 | static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, | 1936 | static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, |
1937 | struct iw_point *dwrq, char *extra) | 1937 | struct iw_point *dwrq, char *extra) |
1938 | { | 1938 | { |
1939 | struct lbs_private *priv = dev->priv; | 1939 | struct lbs_private *priv = netdev_priv(dev); |
1940 | 1940 | ||
1941 | lbs_deb_enter(LBS_DEB_WEXT); | 1941 | lbs_deb_enter(LBS_DEB_WEXT); |
1942 | 1942 | ||
@@ -1971,7 +1971,7 @@ static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, | |||
1971 | static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info, | 1971 | static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info, |
1972 | struct iw_point *dwrq, char *extra) | 1972 | struct iw_point *dwrq, char *extra) |
1973 | { | 1973 | { |
1974 | struct lbs_private *priv = dev->priv; | 1974 | struct lbs_private *priv = netdev_priv(dev); |
1975 | int ret = 0; | 1975 | int ret = 0; |
1976 | u8 ssid[IW_ESSID_MAX_SIZE]; | 1976 | u8 ssid[IW_ESSID_MAX_SIZE]; |
1977 | u8 ssid_len = 0; | 1977 | u8 ssid_len = 0; |
@@ -2040,7 +2040,7 @@ static int lbs_mesh_get_essid(struct net_device *dev, | |||
2040 | struct iw_request_info *info, | 2040 | struct iw_request_info *info, |
2041 | struct iw_point *dwrq, char *extra) | 2041 | struct iw_point *dwrq, char *extra) |
2042 | { | 2042 | { |
2043 | struct lbs_private *priv = dev->priv; | 2043 | struct lbs_private *priv = netdev_priv(dev); |
2044 | 2044 | ||
2045 | lbs_deb_enter(LBS_DEB_WEXT); | 2045 | lbs_deb_enter(LBS_DEB_WEXT); |
2046 | 2046 | ||
@@ -2058,7 +2058,7 @@ static int lbs_mesh_set_essid(struct net_device *dev, | |||
2058 | struct iw_request_info *info, | 2058 | struct iw_request_info *info, |
2059 | struct iw_point *dwrq, char *extra) | 2059 | struct iw_point *dwrq, char *extra) |
2060 | { | 2060 | { |
2061 | struct lbs_private *priv = dev->priv; | 2061 | struct lbs_private *priv = netdev_priv(dev); |
2062 | int ret = 0; | 2062 | int ret = 0; |
2063 | 2063 | ||
2064 | lbs_deb_enter(LBS_DEB_WEXT); | 2064 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -2102,7 +2102,7 @@ static int lbs_mesh_set_essid(struct net_device *dev, | |||
2102 | static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, | 2102 | static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, |
2103 | struct sockaddr *awrq, char *extra) | 2103 | struct sockaddr *awrq, char *extra) |
2104 | { | 2104 | { |
2105 | struct lbs_private *priv = dev->priv; | 2105 | struct lbs_private *priv = netdev_priv(dev); |
2106 | struct assoc_request * assoc_req; | 2106 | struct assoc_request * assoc_req; |
2107 | int ret = 0; | 2107 | int ret = 0; |
2108 | 2108 | ||
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index a1eeb48f9466..607ce9f61b54 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -1104,7 +1104,7 @@ static int rndis_iw_get_range(struct net_device *dev, | |||
1104 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1104 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1105 | { | 1105 | { |
1106 | struct iw_range *range = (struct iw_range *)extra; | 1106 | struct iw_range *range = (struct iw_range *)extra; |
1107 | struct usbnet *usbdev = dev->priv; | 1107 | struct usbnet *usbdev = netdev_priv(dev); |
1108 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1108 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1109 | int len, ret, i, j, num, has_80211g_rates; | 1109 | int len, ret, i, j, num, has_80211g_rates; |
1110 | u8 rates[8]; | 1110 | u8 rates[8]; |
@@ -1210,7 +1210,7 @@ static int rndis_iw_get_range(struct net_device *dev, | |||
1210 | static int rndis_iw_get_name(struct net_device *dev, | 1210 | static int rndis_iw_get_name(struct net_device *dev, |
1211 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1211 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1212 | { | 1212 | { |
1213 | struct usbnet *usbdev = dev->priv; | 1213 | struct usbnet *usbdev = netdev_priv(dev); |
1214 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1214 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1215 | 1215 | ||
1216 | strcpy(wrqu->name, priv->name); | 1216 | strcpy(wrqu->name, priv->name); |
@@ -1223,7 +1223,7 @@ static int rndis_iw_set_essid(struct net_device *dev, | |||
1223 | { | 1223 | { |
1224 | struct ndis_80211_ssid ssid; | 1224 | struct ndis_80211_ssid ssid; |
1225 | int length = wrqu->essid.length; | 1225 | int length = wrqu->essid.length; |
1226 | struct usbnet *usbdev = dev->priv; | 1226 | struct usbnet *usbdev = netdev_priv(dev); |
1227 | 1227 | ||
1228 | devdbg(usbdev, "SIOCSIWESSID: [flags:%d,len:%d] '%.32s'", | 1228 | devdbg(usbdev, "SIOCSIWESSID: [flags:%d,len:%d] '%.32s'", |
1229 | wrqu->essid.flags, wrqu->essid.length, essid); | 1229 | wrqu->essid.flags, wrqu->essid.length, essid); |
@@ -1250,7 +1250,7 @@ static int rndis_iw_get_essid(struct net_device *dev, | |||
1250 | struct iw_request_info *info, union iwreq_data *wrqu, char *essid) | 1250 | struct iw_request_info *info, union iwreq_data *wrqu, char *essid) |
1251 | { | 1251 | { |
1252 | struct ndis_80211_ssid ssid; | 1252 | struct ndis_80211_ssid ssid; |
1253 | struct usbnet *usbdev = dev->priv; | 1253 | struct usbnet *usbdev = netdev_priv(dev); |
1254 | int ret; | 1254 | int ret; |
1255 | 1255 | ||
1256 | ret = get_essid(usbdev, &ssid); | 1256 | ret = get_essid(usbdev, &ssid); |
@@ -1273,7 +1273,7 @@ static int rndis_iw_get_essid(struct net_device *dev, | |||
1273 | static int rndis_iw_get_bssid(struct net_device *dev, | 1273 | static int rndis_iw_get_bssid(struct net_device *dev, |
1274 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1274 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1275 | { | 1275 | { |
1276 | struct usbnet *usbdev = dev->priv; | 1276 | struct usbnet *usbdev = netdev_priv(dev); |
1277 | unsigned char bssid[ETH_ALEN]; | 1277 | unsigned char bssid[ETH_ALEN]; |
1278 | int ret; | 1278 | int ret; |
1279 | 1279 | ||
@@ -1294,7 +1294,7 @@ static int rndis_iw_get_bssid(struct net_device *dev, | |||
1294 | static int rndis_iw_set_bssid(struct net_device *dev, | 1294 | static int rndis_iw_set_bssid(struct net_device *dev, |
1295 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1295 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1296 | { | 1296 | { |
1297 | struct usbnet *usbdev = dev->priv; | 1297 | struct usbnet *usbdev = netdev_priv(dev); |
1298 | u8 *bssid = (u8 *)wrqu->ap_addr.sa_data; | 1298 | u8 *bssid = (u8 *)wrqu->ap_addr.sa_data; |
1299 | int ret; | 1299 | int ret; |
1300 | 1300 | ||
@@ -1316,7 +1316,7 @@ static int rndis_iw_set_auth(struct net_device *dev, | |||
1316 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1316 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1317 | { | 1317 | { |
1318 | struct iw_param *p = &wrqu->param; | 1318 | struct iw_param *p = &wrqu->param; |
1319 | struct usbnet *usbdev = dev->priv; | 1319 | struct usbnet *usbdev = netdev_priv(dev); |
1320 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1320 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1321 | int ret = -ENOTSUPP; | 1321 | int ret = -ENOTSUPP; |
1322 | 1322 | ||
@@ -1397,7 +1397,7 @@ static int rndis_iw_get_auth(struct net_device *dev, | |||
1397 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1397 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1398 | { | 1398 | { |
1399 | struct iw_param *p = &wrqu->param; | 1399 | struct iw_param *p = &wrqu->param; |
1400 | struct usbnet *usbdev = dev->priv; | 1400 | struct usbnet *usbdev = netdev_priv(dev); |
1401 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1401 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1402 | 1402 | ||
1403 | switch (p->flags & IW_AUTH_INDEX) { | 1403 | switch (p->flags & IW_AUTH_INDEX) { |
@@ -1429,7 +1429,7 @@ static int rndis_iw_get_mode(struct net_device *dev, | |||
1429 | struct iw_request_info *info, | 1429 | struct iw_request_info *info, |
1430 | union iwreq_data *wrqu, char *extra) | 1430 | union iwreq_data *wrqu, char *extra) |
1431 | { | 1431 | { |
1432 | struct usbnet *usbdev = dev->priv; | 1432 | struct usbnet *usbdev = netdev_priv(dev); |
1433 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1433 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1434 | 1434 | ||
1435 | switch (priv->infra_mode) { | 1435 | switch (priv->infra_mode) { |
@@ -1452,7 +1452,7 @@ static int rndis_iw_get_mode(struct net_device *dev, | |||
1452 | static int rndis_iw_set_mode(struct net_device *dev, | 1452 | static int rndis_iw_set_mode(struct net_device *dev, |
1453 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1453 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1454 | { | 1454 | { |
1455 | struct usbnet *usbdev = dev->priv; | 1455 | struct usbnet *usbdev = netdev_priv(dev); |
1456 | int mode; | 1456 | int mode; |
1457 | 1457 | ||
1458 | devdbg(usbdev, "SIOCSIWMODE: %08x", wrqu->mode); | 1458 | devdbg(usbdev, "SIOCSIWMODE: %08x", wrqu->mode); |
@@ -1477,7 +1477,7 @@ static int rndis_iw_set_mode(struct net_device *dev, | |||
1477 | static int rndis_iw_set_encode(struct net_device *dev, | 1477 | static int rndis_iw_set_encode(struct net_device *dev, |
1478 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1478 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1479 | { | 1479 | { |
1480 | struct usbnet *usbdev = dev->priv; | 1480 | struct usbnet *usbdev = netdev_priv(dev); |
1481 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1481 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1482 | int ret, index, key_len; | 1482 | int ret, index, key_len; |
1483 | u8 *key; | 1483 | u8 *key; |
@@ -1540,7 +1540,7 @@ static int rndis_iw_set_encode_ext(struct net_device *dev, | |||
1540 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1540 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1541 | { | 1541 | { |
1542 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1542 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1543 | struct usbnet *usbdev = dev->priv; | 1543 | struct usbnet *usbdev = netdev_priv(dev); |
1544 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1544 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1545 | struct ndis_80211_key ndis_key; | 1545 | struct ndis_80211_key ndis_key; |
1546 | int keyidx, ret; | 1546 | int keyidx, ret; |
@@ -1625,7 +1625,7 @@ static int rndis_iw_set_encode_ext(struct net_device *dev, | |||
1625 | static int rndis_iw_set_scan(struct net_device *dev, | 1625 | static int rndis_iw_set_scan(struct net_device *dev, |
1626 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1626 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1627 | { | 1627 | { |
1628 | struct usbnet *usbdev = dev->priv; | 1628 | struct usbnet *usbdev = netdev_priv(dev); |
1629 | union iwreq_data evt; | 1629 | union iwreq_data evt; |
1630 | int ret = -EINVAL; | 1630 | int ret = -EINVAL; |
1631 | __le32 tmp; | 1631 | __le32 tmp; |
@@ -1650,7 +1650,7 @@ static char *rndis_translate_scan(struct net_device *dev, | |||
1650 | struct ndis_80211_bssid_ex *bssid) | 1650 | struct ndis_80211_bssid_ex *bssid) |
1651 | { | 1651 | { |
1652 | #ifdef DEBUG | 1652 | #ifdef DEBUG |
1653 | struct usbnet *usbdev = dev->priv; | 1653 | struct usbnet *usbdev = netdev_priv(dev); |
1654 | #endif | 1654 | #endif |
1655 | u8 *ie; | 1655 | u8 *ie; |
1656 | char *current_val; | 1656 | char *current_val; |
@@ -1773,7 +1773,7 @@ static char *rndis_translate_scan(struct net_device *dev, | |||
1773 | static int rndis_iw_get_scan(struct net_device *dev, | 1773 | static int rndis_iw_get_scan(struct net_device *dev, |
1774 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1774 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1775 | { | 1775 | { |
1776 | struct usbnet *usbdev = dev->priv; | 1776 | struct usbnet *usbdev = netdev_priv(dev); |
1777 | void *buf = NULL; | 1777 | void *buf = NULL; |
1778 | char *cev = extra; | 1778 | char *cev = extra; |
1779 | struct ndis_80211_bssid_list_ex *bssid_list; | 1779 | struct ndis_80211_bssid_list_ex *bssid_list; |
@@ -1819,7 +1819,7 @@ out: | |||
1819 | static int rndis_iw_set_genie(struct net_device *dev, | 1819 | static int rndis_iw_set_genie(struct net_device *dev, |
1820 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1820 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1821 | { | 1821 | { |
1822 | struct usbnet *usbdev = dev->priv; | 1822 | struct usbnet *usbdev = netdev_priv(dev); |
1823 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1823 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1824 | int ret = 0; | 1824 | int ret = 0; |
1825 | 1825 | ||
@@ -1853,7 +1853,7 @@ static int rndis_iw_set_genie(struct net_device *dev, | |||
1853 | static int rndis_iw_get_genie(struct net_device *dev, | 1853 | static int rndis_iw_get_genie(struct net_device *dev, |
1854 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1854 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1855 | { | 1855 | { |
1856 | struct usbnet *usbdev = dev->priv; | 1856 | struct usbnet *usbdev = netdev_priv(dev); |
1857 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1857 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1858 | 1858 | ||
1859 | devdbg(usbdev, "SIOCGIWGENIE"); | 1859 | devdbg(usbdev, "SIOCGIWGENIE"); |
@@ -1876,7 +1876,7 @@ static int rndis_iw_get_genie(struct net_device *dev, | |||
1876 | static int rndis_iw_set_rts(struct net_device *dev, | 1876 | static int rndis_iw_set_rts(struct net_device *dev, |
1877 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1877 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1878 | { | 1878 | { |
1879 | struct usbnet *usbdev = dev->priv; | 1879 | struct usbnet *usbdev = netdev_priv(dev); |
1880 | __le32 tmp; | 1880 | __le32 tmp; |
1881 | devdbg(usbdev, "SIOCSIWRTS"); | 1881 | devdbg(usbdev, "SIOCSIWRTS"); |
1882 | 1882 | ||
@@ -1889,7 +1889,7 @@ static int rndis_iw_set_rts(struct net_device *dev, | |||
1889 | static int rndis_iw_get_rts(struct net_device *dev, | 1889 | static int rndis_iw_get_rts(struct net_device *dev, |
1890 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1890 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1891 | { | 1891 | { |
1892 | struct usbnet *usbdev = dev->priv; | 1892 | struct usbnet *usbdev = netdev_priv(dev); |
1893 | __le32 tmp; | 1893 | __le32 tmp; |
1894 | int len, ret; | 1894 | int len, ret; |
1895 | 1895 | ||
@@ -1910,7 +1910,7 @@ static int rndis_iw_get_rts(struct net_device *dev, | |||
1910 | static int rndis_iw_set_frag(struct net_device *dev, | 1910 | static int rndis_iw_set_frag(struct net_device *dev, |
1911 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1911 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1912 | { | 1912 | { |
1913 | struct usbnet *usbdev = dev->priv; | 1913 | struct usbnet *usbdev = netdev_priv(dev); |
1914 | __le32 tmp; | 1914 | __le32 tmp; |
1915 | 1915 | ||
1916 | devdbg(usbdev, "SIOCSIWFRAG"); | 1916 | devdbg(usbdev, "SIOCSIWFRAG"); |
@@ -1924,7 +1924,7 @@ static int rndis_iw_set_frag(struct net_device *dev, | |||
1924 | static int rndis_iw_get_frag(struct net_device *dev, | 1924 | static int rndis_iw_get_frag(struct net_device *dev, |
1925 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1925 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1926 | { | 1926 | { |
1927 | struct usbnet *usbdev = dev->priv; | 1927 | struct usbnet *usbdev = netdev_priv(dev); |
1928 | __le32 tmp; | 1928 | __le32 tmp; |
1929 | int len, ret; | 1929 | int len, ret; |
1930 | 1930 | ||
@@ -1944,7 +1944,7 @@ static int rndis_iw_get_frag(struct net_device *dev, | |||
1944 | static int rndis_iw_set_nick(struct net_device *dev, | 1944 | static int rndis_iw_set_nick(struct net_device *dev, |
1945 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1945 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1946 | { | 1946 | { |
1947 | struct usbnet *usbdev = dev->priv; | 1947 | struct usbnet *usbdev = netdev_priv(dev); |
1948 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1948 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1949 | 1949 | ||
1950 | devdbg(usbdev, "SIOCSIWNICK"); | 1950 | devdbg(usbdev, "SIOCSIWNICK"); |
@@ -1961,7 +1961,7 @@ static int rndis_iw_set_nick(struct net_device *dev, | |||
1961 | static int rndis_iw_get_nick(struct net_device *dev, | 1961 | static int rndis_iw_get_nick(struct net_device *dev, |
1962 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1962 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1963 | { | 1963 | { |
1964 | struct usbnet *usbdev = dev->priv; | 1964 | struct usbnet *usbdev = netdev_priv(dev); |
1965 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1965 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1966 | 1966 | ||
1967 | wrqu->data.flags = 1; | 1967 | wrqu->data.flags = 1; |
@@ -1977,7 +1977,7 @@ static int rndis_iw_get_nick(struct net_device *dev, | |||
1977 | static int rndis_iw_set_freq(struct net_device *dev, | 1977 | static int rndis_iw_set_freq(struct net_device *dev, |
1978 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1978 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1979 | { | 1979 | { |
1980 | struct usbnet *usbdev = dev->priv; | 1980 | struct usbnet *usbdev = netdev_priv(dev); |
1981 | struct ndis_80211_conf config; | 1981 | struct ndis_80211_conf config; |
1982 | unsigned int dsconfig; | 1982 | unsigned int dsconfig; |
1983 | int len, ret; | 1983 | int len, ret; |
@@ -2008,7 +2008,7 @@ static int rndis_iw_set_freq(struct net_device *dev, | |||
2008 | static int rndis_iw_get_freq(struct net_device *dev, | 2008 | static int rndis_iw_get_freq(struct net_device *dev, |
2009 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2009 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2010 | { | 2010 | { |
2011 | struct usbnet *usbdev = dev->priv; | 2011 | struct usbnet *usbdev = netdev_priv(dev); |
2012 | struct ndis_80211_conf config; | 2012 | struct ndis_80211_conf config; |
2013 | int len, ret; | 2013 | int len, ret; |
2014 | 2014 | ||
@@ -2025,7 +2025,7 @@ static int rndis_iw_get_freq(struct net_device *dev, | |||
2025 | static int rndis_iw_get_txpower(struct net_device *dev, | 2025 | static int rndis_iw_get_txpower(struct net_device *dev, |
2026 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2026 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2027 | { | 2027 | { |
2028 | struct usbnet *usbdev = dev->priv; | 2028 | struct usbnet *usbdev = netdev_priv(dev); |
2029 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2029 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2030 | __le32 tx_power; | 2030 | __le32 tx_power; |
2031 | int ret = 0, len; | 2031 | int ret = 0, len; |
@@ -2059,7 +2059,7 @@ static int rndis_iw_get_txpower(struct net_device *dev, | |||
2059 | static int rndis_iw_set_txpower(struct net_device *dev, | 2059 | static int rndis_iw_set_txpower(struct net_device *dev, |
2060 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2060 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2061 | { | 2061 | { |
2062 | struct usbnet *usbdev = dev->priv; | 2062 | struct usbnet *usbdev = netdev_priv(dev); |
2063 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2063 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2064 | __le32 tx_power = 0; | 2064 | __le32 tx_power = 0; |
2065 | int ret = 0; | 2065 | int ret = 0; |
@@ -2111,7 +2111,7 @@ static int rndis_iw_set_txpower(struct net_device *dev, | |||
2111 | static int rndis_iw_get_rate(struct net_device *dev, | 2111 | static int rndis_iw_get_rate(struct net_device *dev, |
2112 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2112 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2113 | { | 2113 | { |
2114 | struct usbnet *usbdev = dev->priv; | 2114 | struct usbnet *usbdev = netdev_priv(dev); |
2115 | __le32 tmp; | 2115 | __le32 tmp; |
2116 | int ret, len; | 2116 | int ret, len; |
2117 | 2117 | ||
@@ -2129,7 +2129,7 @@ static int rndis_iw_get_rate(struct net_device *dev, | |||
2129 | static int rndis_iw_set_mlme(struct net_device *dev, | 2129 | static int rndis_iw_set_mlme(struct net_device *dev, |
2130 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2130 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2131 | { | 2131 | { |
2132 | struct usbnet *usbdev = dev->priv; | 2132 | struct usbnet *usbdev = netdev_priv(dev); |
2133 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2133 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2134 | struct iw_mlme *mlme = (struct iw_mlme *)extra; | 2134 | struct iw_mlme *mlme = (struct iw_mlme *)extra; |
2135 | unsigned char bssid[ETH_ALEN]; | 2135 | unsigned char bssid[ETH_ALEN]; |
@@ -2154,7 +2154,7 @@ static int rndis_iw_set_mlme(struct net_device *dev, | |||
2154 | 2154 | ||
2155 | static struct iw_statistics *rndis_get_wireless_stats(struct net_device *dev) | 2155 | static struct iw_statistics *rndis_get_wireless_stats(struct net_device *dev) |
2156 | { | 2156 | { |
2157 | struct usbnet *usbdev = dev->priv; | 2157 | struct usbnet *usbdev = netdev_priv(dev); |
2158 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2158 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2159 | unsigned long flags; | 2159 | unsigned long flags; |
2160 | 2160 | ||
@@ -2284,7 +2284,7 @@ get_bssid: | |||
2284 | 2284 | ||
2285 | static void rndis_wext_set_multicast_list(struct net_device *dev) | 2285 | static void rndis_wext_set_multicast_list(struct net_device *dev) |
2286 | { | 2286 | { |
2287 | struct usbnet *usbdev = dev->priv; | 2287 | struct usbnet *usbdev = netdev_priv(dev); |
2288 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2288 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2289 | 2289 | ||
2290 | if (test_bit(WORK_SET_MULTICAST_LIST, &priv->work_pending)) | 2290 | if (test_bit(WORK_SET_MULTICAST_LIST, &priv->work_pending)) |
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; |
diff --git a/drivers/net/znet.c b/drivers/net/znet.c index d7588bf6d6dd..f0b15c9347d0 100644 --- a/drivers/net/znet.c +++ b/drivers/net/znet.c | |||
@@ -167,7 +167,7 @@ static void znet_tx_timeout (struct net_device *dev); | |||
167 | /* Request needed resources */ | 167 | /* Request needed resources */ |
168 | static int znet_request_resources (struct net_device *dev) | 168 | static int znet_request_resources (struct net_device *dev) |
169 | { | 169 | { |
170 | struct znet_private *znet = dev->priv; | 170 | struct znet_private *znet = netdev_priv(dev); |
171 | unsigned long flags; | 171 | unsigned long flags; |
172 | 172 | ||
173 | if (request_irq (dev->irq, &znet_interrupt, 0, "ZNet", dev)) | 173 | if (request_irq (dev->irq, &znet_interrupt, 0, "ZNet", dev)) |
@@ -201,7 +201,7 @@ static int znet_request_resources (struct net_device *dev) | |||
201 | 201 | ||
202 | static void znet_release_resources (struct net_device *dev) | 202 | static void znet_release_resources (struct net_device *dev) |
203 | { | 203 | { |
204 | struct znet_private *znet = dev->priv; | 204 | struct znet_private *znet = netdev_priv(dev); |
205 | unsigned long flags; | 205 | unsigned long flags; |
206 | 206 | ||
207 | release_region (znet->sia_base, znet->sia_size); | 207 | release_region (znet->sia_base, znet->sia_size); |
@@ -216,7 +216,7 @@ static void znet_release_resources (struct net_device *dev) | |||
216 | /* Keep the magical SIA stuff in a single function... */ | 216 | /* Keep the magical SIA stuff in a single function... */ |
217 | static void znet_transceiver_power (struct net_device *dev, int on) | 217 | static void znet_transceiver_power (struct net_device *dev, int on) |
218 | { | 218 | { |
219 | struct znet_private *znet = dev->priv; | 219 | struct znet_private *znet = netdev_priv(dev); |
220 | unsigned char v; | 220 | unsigned char v; |
221 | 221 | ||
222 | /* Turn on/off the 82501 SIA, using zenith-specific magic. */ | 222 | /* Turn on/off the 82501 SIA, using zenith-specific magic. */ |
@@ -235,7 +235,7 @@ static void znet_transceiver_power (struct net_device *dev, int on) | |||
235 | Also used from hardware_init. */ | 235 | Also used from hardware_init. */ |
236 | static void znet_set_multicast_list (struct net_device *dev) | 236 | static void znet_set_multicast_list (struct net_device *dev) |
237 | { | 237 | { |
238 | struct znet_private *znet = dev->priv; | 238 | struct znet_private *znet = netdev_priv(dev); |
239 | short ioaddr = dev->base_addr; | 239 | short ioaddr = dev->base_addr; |
240 | struct i82593_conf_block *cfblk = &znet->i593_init; | 240 | struct i82593_conf_block *cfblk = &znet->i593_init; |
241 | 241 | ||
@@ -386,7 +386,7 @@ static int __init znet_probe (void) | |||
386 | if (!dev) | 386 | if (!dev) |
387 | return -ENOMEM; | 387 | return -ENOMEM; |
388 | 388 | ||
389 | znet = dev->priv; | 389 | znet = netdev_priv(dev); |
390 | 390 | ||
391 | netinfo = (struct netidblk *)p; | 391 | netinfo = (struct netidblk *)p; |
392 | dev->base_addr = netinfo->iobase1; | 392 | dev->base_addr = netinfo->iobase1; |
@@ -530,7 +530,7 @@ static void znet_tx_timeout (struct net_device *dev) | |||
530 | static int znet_send_packet(struct sk_buff *skb, struct net_device *dev) | 530 | static int znet_send_packet(struct sk_buff *skb, struct net_device *dev) |
531 | { | 531 | { |
532 | int ioaddr = dev->base_addr; | 532 | int ioaddr = dev->base_addr; |
533 | struct znet_private *znet = dev->priv; | 533 | struct znet_private *znet = netdev_priv(dev); |
534 | unsigned long flags; | 534 | unsigned long flags; |
535 | short length = skb->len; | 535 | short length = skb->len; |
536 | 536 | ||
@@ -600,7 +600,7 @@ static int znet_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
600 | static irqreturn_t znet_interrupt(int irq, void *dev_id) | 600 | static irqreturn_t znet_interrupt(int irq, void *dev_id) |
601 | { | 601 | { |
602 | struct net_device *dev = dev_id; | 602 | struct net_device *dev = dev_id; |
603 | struct znet_private *znet = dev->priv; | 603 | struct znet_private *znet = netdev_priv(dev); |
604 | int ioaddr; | 604 | int ioaddr; |
605 | int boguscnt = 20; | 605 | int boguscnt = 20; |
606 | int handled = 0; | 606 | int handled = 0; |
@@ -678,7 +678,7 @@ static irqreturn_t znet_interrupt(int irq, void *dev_id) | |||
678 | 678 | ||
679 | static void znet_rx(struct net_device *dev) | 679 | static void znet_rx(struct net_device *dev) |
680 | { | 680 | { |
681 | struct znet_private *znet = dev->priv; | 681 | struct znet_private *znet = netdev_priv(dev); |
682 | int ioaddr = dev->base_addr; | 682 | int ioaddr = dev->base_addr; |
683 | int boguscount = 1; | 683 | int boguscount = 1; |
684 | short next_frame_end_offset = 0; /* Offset of next frame start. */ | 684 | short next_frame_end_offset = 0; /* Offset of next frame start. */ |
@@ -827,7 +827,7 @@ static void show_dma(struct net_device *dev) | |||
827 | { | 827 | { |
828 | short ioaddr = dev->base_addr; | 828 | short ioaddr = dev->base_addr; |
829 | unsigned char stat = inb (ioaddr); | 829 | unsigned char stat = inb (ioaddr); |
830 | struct znet_private *znet = dev->priv; | 830 | struct znet_private *znet = netdev_priv(dev); |
831 | unsigned long flags; | 831 | unsigned long flags; |
832 | short dma_port = ((znet->tx_dma&3)<<2) + IO_DMA2_BASE; | 832 | short dma_port = ((znet->tx_dma&3)<<2) + IO_DMA2_BASE; |
833 | unsigned addr = inb(dma_port); | 833 | unsigned addr = inb(dma_port); |
@@ -850,7 +850,7 @@ static void hardware_init(struct net_device *dev) | |||
850 | { | 850 | { |
851 | unsigned long flags; | 851 | unsigned long flags; |
852 | short ioaddr = dev->base_addr; | 852 | short ioaddr = dev->base_addr; |
853 | struct znet_private *znet = dev->priv; | 853 | struct znet_private *znet = netdev_priv(dev); |
854 | 854 | ||
855 | znet->rx_cur = znet->rx_start; | 855 | znet->rx_cur = znet->rx_start; |
856 | znet->tx_cur = znet->tx_start; | 856 | znet->tx_cur = znet->tx_start; |
@@ -912,7 +912,7 @@ static void update_stop_hit(short ioaddr, unsigned short rx_stop_offset) | |||
912 | static __exit void znet_cleanup (void) | 912 | static __exit void znet_cleanup (void) |
913 | { | 913 | { |
914 | if (znet_dev) { | 914 | if (znet_dev) { |
915 | struct znet_private *znet = znet_dev->priv; | 915 | struct znet_private *znet = netdev_priv(znet_dev); |
916 | 916 | ||
917 | unregister_netdev (znet_dev); | 917 | unregister_netdev (znet_dev); |
918 | kfree (znet->rx_start); | 918 | kfree (znet->rx_start); |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index d3134e7e6ee8..c3f002717378 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -1284,7 +1284,7 @@ static int handle_ip_over_ddp(struct sk_buff *skb) | |||
1284 | skb->dev = dev; | 1284 | skb->dev = dev; |
1285 | skb_reset_transport_header(skb); | 1285 | skb_reset_transport_header(skb); |
1286 | 1286 | ||
1287 | stats = dev->priv; | 1287 | stats = netdev_priv(dev); |
1288 | stats->rx_packets++; | 1288 | stats->rx_packets++; |
1289 | stats->rx_bytes += skb->len + 13; | 1289 | stats->rx_bytes += skb->len + 13; |
1290 | netif_rx(skb); /* Send the SKB up to a higher place. */ | 1290 | netif_rx(skb); /* Send the SKB up to a higher place. */ |
diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 29ef8dc6921b..ea9438fc6855 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c | |||
@@ -101,7 +101,7 @@ static LIST_HEAD(br2684_devs); | |||
101 | 101 | ||
102 | static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev) | 102 | static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev) |
103 | { | 103 | { |
104 | return (struct br2684_dev *)net_dev->priv; | 104 | return (struct br2684_dev *)netdev_priv(net_dev); |
105 | } | 105 | } |
106 | 106 | ||
107 | static inline struct net_device *list_entry_brdev(const struct list_head *le) | 107 | static inline struct net_device *list_entry_brdev(const struct list_head *le) |
diff --git a/net/atm/lec.c b/net/atm/lec.c index 1def62d17739..e5e301550e8a 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -152,7 +152,7 @@ static void lec_handle_bridge(struct sk_buff *skb, struct net_device *dev) | |||
152 | buff += 4; | 152 | buff += 4; |
153 | mesg->content.normal.flag = *buff & 0x01; /* 0x01 is topology change */ | 153 | mesg->content.normal.flag = *buff & 0x01; /* 0x01 is topology change */ |
154 | 154 | ||
155 | priv = (struct lec_priv *)dev->priv; | 155 | priv = netdev_priv(dev); |
156 | atm_force_charge(priv->lecd, skb2->truesize); | 156 | atm_force_charge(priv->lecd, skb2->truesize); |
157 | sk = sk_atm(priv->lecd); | 157 | sk = sk_atm(priv->lecd); |
158 | skb_queue_tail(&sk->sk_receive_queue, skb2); | 158 | skb_queue_tail(&sk->sk_receive_queue, skb2); |
@@ -218,7 +218,7 @@ static unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc) | |||
218 | 218 | ||
219 | static int lec_open(struct net_device *dev) | 219 | static int lec_open(struct net_device *dev) |
220 | { | 220 | { |
221 | struct lec_priv *priv = (struct lec_priv *)dev->priv; | 221 | struct lec_priv *priv = netdev_priv(dev); |
222 | 222 | ||
223 | netif_start_queue(dev); | 223 | netif_start_queue(dev); |
224 | memset(&priv->stats, 0, sizeof(struct net_device_stats)); | 224 | memset(&priv->stats, 0, sizeof(struct net_device_stats)); |
@@ -252,7 +252,7 @@ static void lec_tx_timeout(struct net_device *dev) | |||
252 | static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev) | 252 | static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev) |
253 | { | 253 | { |
254 | struct sk_buff *skb2; | 254 | struct sk_buff *skb2; |
255 | struct lec_priv *priv = (struct lec_priv *)dev->priv; | 255 | struct lec_priv *priv = netdev_priv(dev); |
256 | struct lecdatahdr_8023 *lec_h; | 256 | struct lecdatahdr_8023 *lec_h; |
257 | struct atm_vcc *vcc; | 257 | struct atm_vcc *vcc; |
258 | struct lec_arp_table *entry; | 258 | struct lec_arp_table *entry; |
@@ -433,14 +433,14 @@ static int lec_close(struct net_device *dev) | |||
433 | */ | 433 | */ |
434 | static struct net_device_stats *lec_get_stats(struct net_device *dev) | 434 | static struct net_device_stats *lec_get_stats(struct net_device *dev) |
435 | { | 435 | { |
436 | return &((struct lec_priv *)dev->priv)->stats; | 436 | return &((struct lec_priv *)netdev_priv(dev))->stats; |
437 | } | 437 | } |
438 | 438 | ||
439 | static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) | 439 | static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) |
440 | { | 440 | { |
441 | unsigned long flags; | 441 | unsigned long flags; |
442 | struct net_device *dev = (struct net_device *)vcc->proto_data; | 442 | struct net_device *dev = (struct net_device *)vcc->proto_data; |
443 | struct lec_priv *priv = (struct lec_priv *)dev->priv; | 443 | struct lec_priv *priv = netdev_priv(dev); |
444 | struct atmlec_msg *mesg; | 444 | struct atmlec_msg *mesg; |
445 | struct lec_arp_table *entry; | 445 | struct lec_arp_table *entry; |
446 | int i; | 446 | int i; |
@@ -580,7 +580,7 @@ static void lec_atm_close(struct atm_vcc *vcc) | |||
580 | { | 580 | { |
581 | struct sk_buff *skb; | 581 | struct sk_buff *skb; |
582 | struct net_device *dev = (struct net_device *)vcc->proto_data; | 582 | struct net_device *dev = (struct net_device *)vcc->proto_data; |
583 | struct lec_priv *priv = (struct lec_priv *)dev->priv; | 583 | struct lec_priv *priv = netdev_priv(dev); |
584 | 584 | ||
585 | priv->lecd = NULL; | 585 | priv->lecd = NULL; |
586 | /* Do something needful? */ | 586 | /* Do something needful? */ |
@@ -711,7 +711,7 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb) | |||
711 | { | 711 | { |
712 | unsigned long flags; | 712 | unsigned long flags; |
713 | struct net_device *dev = (struct net_device *)vcc->proto_data; | 713 | struct net_device *dev = (struct net_device *)vcc->proto_data; |
714 | struct lec_priv *priv = (struct lec_priv *)dev->priv; | 714 | struct lec_priv *priv = netdev_priv(dev); |
715 | 715 | ||
716 | #if DUMP_PACKETS >0 | 716 | #if DUMP_PACKETS >0 |
717 | int i = 0; | 717 | int i = 0; |
@@ -858,7 +858,7 @@ static int lec_vcc_attach(struct atm_vcc *vcc, void __user *arg) | |||
858 | vpriv->old_pop = vcc->pop; | 858 | vpriv->old_pop = vcc->pop; |
859 | vcc->user_back = vpriv; | 859 | vcc->user_back = vpriv; |
860 | vcc->pop = lec_pop; | 860 | vcc->pop = lec_pop; |
861 | lec_vcc_added(dev_lec[ioc_data.dev_num]->priv, | 861 | lec_vcc_added(netdev_priv(dev_lec[ioc_data.dev_num]), |
862 | &ioc_data, vcc, vcc->push); | 862 | &ioc_data, vcc, vcc->push); |
863 | vcc->proto_data = dev_lec[ioc_data.dev_num]; | 863 | vcc->proto_data = dev_lec[ioc_data.dev_num]; |
864 | vcc->push = lec_push; | 864 | vcc->push = lec_push; |
@@ -870,7 +870,8 @@ static int lec_mcast_attach(struct atm_vcc *vcc, int arg) | |||
870 | if (arg < 0 || arg >= MAX_LEC_ITF || !dev_lec[arg]) | 870 | if (arg < 0 || arg >= MAX_LEC_ITF || !dev_lec[arg]) |
871 | return -EINVAL; | 871 | return -EINVAL; |
872 | vcc->proto_data = dev_lec[arg]; | 872 | vcc->proto_data = dev_lec[arg]; |
873 | return (lec_mcast_make((struct lec_priv *)dev_lec[arg]->priv, vcc)); | 873 | return lec_mcast_make((struct lec_priv *)netdev_priv(dev_lec[arg]), |
874 | vcc); | ||
874 | } | 875 | } |
875 | 876 | ||
876 | /* Initialize device. */ | 877 | /* Initialize device. */ |
@@ -912,11 +913,11 @@ static int lecd_attach(struct atm_vcc *vcc, int arg) | |||
912 | return -EINVAL; | 913 | return -EINVAL; |
913 | } | 914 | } |
914 | 915 | ||
915 | priv = dev_lec[i]->priv; | 916 | priv = netdev_priv(dev_lec[i]); |
916 | priv->is_trdev = is_trdev; | 917 | priv->is_trdev = is_trdev; |
917 | lec_init(dev_lec[i]); | 918 | lec_init(dev_lec[i]); |
918 | } else { | 919 | } else { |
919 | priv = dev_lec[i]->priv; | 920 | priv = netdev_priv(dev_lec[i]); |
920 | if (priv->lecd) | 921 | if (priv->lecd) |
921 | return -EADDRINUSE; | 922 | return -EADDRINUSE; |
922 | } | 923 | } |
@@ -1077,7 +1078,8 @@ static void *lec_itf_walk(struct lec_state *state, loff_t *l) | |||
1077 | void *v; | 1078 | void *v; |
1078 | 1079 | ||
1079 | dev = state->dev ? state->dev : dev_lec[state->itf]; | 1080 | dev = state->dev ? state->dev : dev_lec[state->itf]; |
1080 | v = (dev && dev->priv) ? lec_priv_walk(state, l, dev->priv) : NULL; | 1081 | v = (dev && netdev_priv(dev)) ? |
1082 | lec_priv_walk(state, l, netdev_priv(dev)) : NULL; | ||
1081 | if (!v && dev) { | 1083 | if (!v && dev) { |
1082 | dev_put(dev); | 1084 | dev_put(dev); |
1083 | /* Partial state reset for the next time we get called */ | 1085 | /* Partial state reset for the next time we get called */ |
@@ -1239,7 +1241,7 @@ static void __exit lane_module_cleanup(void) | |||
1239 | 1241 | ||
1240 | for (i = 0; i < MAX_LEC_ITF; i++) { | 1242 | for (i = 0; i < MAX_LEC_ITF; i++) { |
1241 | if (dev_lec[i] != NULL) { | 1243 | if (dev_lec[i] != NULL) { |
1242 | priv = (struct lec_priv *)dev_lec[i]->priv; | 1244 | priv = netdev_priv(dev_lec[i]); |
1243 | unregister_netdev(dev_lec[i]); | 1245 | unregister_netdev(dev_lec[i]); |
1244 | free_netdev(dev_lec[i]); | 1246 | free_netdev(dev_lec[i]); |
1245 | dev_lec[i] = NULL; | 1247 | dev_lec[i] = NULL; |
@@ -1263,7 +1265,7 @@ static int lane2_resolve(struct net_device *dev, const u8 *dst_mac, int force, | |||
1263 | u8 **tlvs, u32 *sizeoftlvs) | 1265 | u8 **tlvs, u32 *sizeoftlvs) |
1264 | { | 1266 | { |
1265 | unsigned long flags; | 1267 | unsigned long flags; |
1266 | struct lec_priv *priv = (struct lec_priv *)dev->priv; | 1268 | struct lec_priv *priv = netdev_priv(dev); |
1267 | struct lec_arp_table *table; | 1269 | struct lec_arp_table *table; |
1268 | struct sk_buff *skb; | 1270 | struct sk_buff *skb; |
1269 | int retval; | 1271 | int retval; |
@@ -1310,7 +1312,7 @@ static int lane2_associate_req(struct net_device *dev, const u8 *lan_dst, | |||
1310 | { | 1312 | { |
1311 | int retval; | 1313 | int retval; |
1312 | struct sk_buff *skb; | 1314 | struct sk_buff *skb; |
1313 | struct lec_priv *priv = (struct lec_priv *)dev->priv; | 1315 | struct lec_priv *priv = netdev_priv(dev); |
1314 | 1316 | ||
1315 | if (compare_ether_addr(lan_dst, dev->dev_addr)) | 1317 | if (compare_ether_addr(lan_dst, dev->dev_addr)) |
1316 | return (0); /* not our mac address */ | 1318 | return (0); /* not our mac address */ |
@@ -1347,7 +1349,7 @@ static void lane2_associate_ind(struct net_device *dev, const u8 *mac_addr, | |||
1347 | #if 0 | 1349 | #if 0 |
1348 | int i = 0; | 1350 | int i = 0; |
1349 | #endif | 1351 | #endif |
1350 | struct lec_priv *priv = (struct lec_priv *)dev->priv; | 1352 | struct lec_priv *priv = netdev_priv(dev); |
1351 | #if 0 /* | 1353 | #if 0 /* |
1352 | * Why have the TLVs in LE_ARP entries | 1354 | * Why have the TLVs in LE_ARP entries |
1353 | * since we do not use them? When you | 1355 | * since we do not use them? When you |
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 010b1d2a5a8f..12e9ea371db1 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -785,7 +785,7 @@ static int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg) | |||
785 | } | 785 | } |
786 | 786 | ||
787 | if (mpc->dev) { /* check if the lec is LANE2 capable */ | 787 | if (mpc->dev) { /* check if the lec is LANE2 capable */ |
788 | priv = (struct lec_priv *)mpc->dev->priv; | 788 | priv = netdev_priv(mpc->dev); |
789 | if (priv->lane_version < 2) { | 789 | if (priv->lane_version < 2) { |
790 | dev_put(mpc->dev); | 790 | dev_put(mpc->dev); |
791 | mpc->dev = NULL; | 791 | mpc->dev = NULL; |
@@ -845,7 +845,7 @@ static void mpoad_close(struct atm_vcc *vcc) | |||
845 | 845 | ||
846 | mpc->mpoad_vcc = NULL; | 846 | mpc->mpoad_vcc = NULL; |
847 | if (mpc->dev) { | 847 | if (mpc->dev) { |
848 | struct lec_priv *priv = (struct lec_priv *)mpc->dev->priv; | 848 | struct lec_priv *priv = netdev_priv(mpc->dev); |
849 | priv->lane2_ops->associate_indicator = NULL; | 849 | priv->lane2_ops->associate_indicator = NULL; |
850 | stop_mpc(mpc); | 850 | stop_mpc(mpc); |
851 | dev_put(mpc->dev); | 851 | dev_put(mpc->dev); |
@@ -976,7 +976,7 @@ static int mpoa_event_listener(struct notifier_block *mpoa_notifier, unsigned lo | |||
976 | 976 | ||
977 | switch (event) { | 977 | switch (event) { |
978 | case NETDEV_REGISTER: /* a new lec device was allocated */ | 978 | case NETDEV_REGISTER: /* a new lec device was allocated */ |
979 | priv = (struct lec_priv *)dev->priv; | 979 | priv = netdev_priv(dev); |
980 | if (priv->lane_version < 2) | 980 | if (priv->lane_version < 2) |
981 | break; | 981 | break; |
982 | priv->lane2_ops->associate_indicator = lane2_assoc_ind; | 982 | priv->lane2_ops->associate_indicator = lane2_assoc_ind; |
@@ -1324,7 +1324,7 @@ static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg, struct mpoa_client *m | |||
1324 | dprintk("\n"); | 1324 | dprintk("\n"); |
1325 | 1325 | ||
1326 | if (mpc->dev) { | 1326 | if (mpc->dev) { |
1327 | priv = (struct lec_priv *)mpc->dev->priv; | 1327 | priv = netdev_priv(mpc->dev); |
1328 | retval = priv->lane2_ops->associate_req(mpc->dev, mpc->dev->dev_addr, tlv, sizeof(tlv)); | 1328 | retval = priv->lane2_ops->associate_req(mpc->dev, mpc->dev->dev_addr, tlv, sizeof(tlv)); |
1329 | if (retval == 0) | 1329 | if (retval == 0) |
1330 | printk("mpoa: (%s) MPOA device type TLV association failed\n", mpc->dev->name); | 1330 | printk("mpoa: (%s) MPOA device type TLV association failed\n", mpc->dev->name); |
@@ -1474,7 +1474,7 @@ static void __exit atm_mpoa_cleanup(void) | |||
1474 | tmp = mpc->next; | 1474 | tmp = mpc->next; |
1475 | if (mpc->dev != NULL) { | 1475 | if (mpc->dev != NULL) { |
1476 | stop_mpc(mpc); | 1476 | stop_mpc(mpc); |
1477 | priv = (struct lec_priv *)mpc->dev->priv; | 1477 | priv = netdev_priv(mpc->dev); |
1478 | if (priv->lane2_ops != NULL) | 1478 | if (priv->lane2_ops != NULL) |
1479 | priv->lane2_ops->associate_indicator = NULL; | 1479 | priv->lane2_ops->associate_indicator = NULL; |
1480 | } | 1480 | } |
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index 7a4d5303b4fe..f8efaf35293c 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c | |||
@@ -565,7 +565,7 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) | |||
565 | goto failed; | 565 | goto failed; |
566 | } | 566 | } |
567 | 567 | ||
568 | s = dev->priv; | 568 | s = netdev_priv(dev); |
569 | 569 | ||
570 | /* This is rx header therefore addresses are swapped. | 570 | /* This is rx header therefore addresses are swapped. |
571 | * ie eh.h_dest is our local address. */ | 571 | * ie eh.h_dest is our local address. */ |
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c index d9fa0ab2c87f..47e179f62e82 100644 --- a/net/bluetooth/bnep/netdev.c +++ b/net/bluetooth/bnep/netdev.c | |||
@@ -62,14 +62,14 @@ static int bnep_net_close(struct net_device *dev) | |||
62 | 62 | ||
63 | static struct net_device_stats *bnep_net_get_stats(struct net_device *dev) | 63 | static struct net_device_stats *bnep_net_get_stats(struct net_device *dev) |
64 | { | 64 | { |
65 | struct bnep_session *s = dev->priv; | 65 | struct bnep_session *s = netdev_priv(dev); |
66 | return &s->stats; | 66 | return &s->stats; |
67 | } | 67 | } |
68 | 68 | ||
69 | static void bnep_net_set_mc_list(struct net_device *dev) | 69 | static void bnep_net_set_mc_list(struct net_device *dev) |
70 | { | 70 | { |
71 | #ifdef CONFIG_BT_BNEP_MC_FILTER | 71 | #ifdef CONFIG_BT_BNEP_MC_FILTER |
72 | struct bnep_session *s = dev->priv; | 72 | struct bnep_session *s = netdev_priv(dev); |
73 | struct sock *sk = s->sock->sk; | 73 | struct sock *sk = s->sock->sk; |
74 | struct bnep_set_filter_req *r; | 74 | struct bnep_set_filter_req *r; |
75 | struct sk_buff *skb; | 75 | struct sk_buff *skb; |
@@ -183,7 +183,7 @@ static inline int bnep_net_proto_filter(struct sk_buff *skb, struct bnep_session | |||
183 | 183 | ||
184 | static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev) | 184 | static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev) |
185 | { | 185 | { |
186 | struct bnep_session *s = dev->priv; | 186 | struct bnep_session *s = netdev_priv(dev); |
187 | struct sock *sk = s->sock->sk; | 187 | struct sock *sk = s->sock->sk; |
188 | 188 | ||
189 | BT_DBG("skb %p, dev %p", skb, dev); | 189 | BT_DBG("skb %p, dev %p", skb, dev); |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 0a09ccf68c1c..ee3a8dd13f55 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -460,7 +460,7 @@ void br_net_exit(struct net *net) | |||
460 | restart: | 460 | restart: |
461 | for_each_netdev(net, dev) { | 461 | for_each_netdev(net, dev) { |
462 | if (dev->priv_flags & IFF_EBRIDGE) { | 462 | if (dev->priv_flags & IFF_EBRIDGE) { |
463 | del_br(dev->priv); | 463 | del_br(netdev_priv(dev)); |
464 | goto restart; | 464 | goto restart; |
465 | } | 465 | } |
466 | } | 466 | } |
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 158dee8b4965..603d89248e71 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include "br_private.h" | 22 | #include "br_private.h" |
23 | 23 | ||
24 | #define to_dev(obj) container_of(obj, struct device, kobj) | 24 | #define to_dev(obj) container_of(obj, struct device, kobj) |
25 | #define to_bridge(cd) ((struct net_bridge *)(to_net_dev(cd)->priv)) | 25 | #define to_bridge(cd) ((struct net_bridge *)netdev_priv(to_net_dev(cd))) |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * Common code for storing bridge parameters. | 28 | * Common code for storing bridge parameters. |
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index 9a1cd87e7142..774d73a76852 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c | |||
@@ -207,7 +207,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr) | |||
207 | if (!dev) | 207 | if (!dev) |
208 | return NULL; | 208 | return NULL; |
209 | 209 | ||
210 | self = dev->priv; | 210 | self = netdev_priv(dev); |
211 | self->dev = dev; | 211 | self->dev = dev; |
212 | 212 | ||
213 | /* | 213 | /* |