aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/arlan-proc.c14
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c14
-rw-r--r--drivers/net/wireless/orinoco_tmd.c2
-rw-r--r--drivers/net/wireless/prism54/isl_ioctl.c6
-rw-r--r--drivers/net/wireless/ray_cs.c66
-rw-r--r--drivers/net/wireless/strip.c2
-rw-r--r--drivers/net/wireless/wl3501_cs.c66
9 files changed, 87 insertions, 87 deletions
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c
index 015abd928ab0..c6e70dbc5de8 100644
--- a/drivers/net/wireless/arlan-proc.c
+++ b/drivers/net/wireless/arlan-proc.c
@@ -435,7 +435,7 @@ static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp,
435 goto final; 435 goto final;
436 } 436 }
437 else 437 else
438 priva = arlan_device[devnum]->priv; 438 priva = netdev_priv(arlan_device[devnum]);
439 439
440 if (priva == NULL) 440 if (priva == NULL)
441 { 441 {
@@ -654,7 +654,7 @@ static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp
654 goto final; 654 goto final;
655 } 655 }
656 else 656 else
657 priva = arlan_device[devnum]->priv; 657 priva = netdev_priv(arlan_device[devnum]);
658 if (priva == NULL) 658 if (priva == NULL)
659 { 659 {
660 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n "); 660 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
@@ -688,7 +688,7 @@ static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp
688 goto final; 688 goto final;
689 } 689 }
690 else 690 else
691 priva = arlan_device[devnum]->priv; 691 priva = netdev_priv(arlan_device[devnum]);
692 if (priva == NULL) 692 if (priva == NULL)
693 { 693 {
694 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n "); 694 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
@@ -716,7 +716,7 @@ static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp
716 pos += sprintf(arlan_drive_info + pos, "No device found here \n"); 716 pos += sprintf(arlan_drive_info + pos, "No device found here \n");
717 goto final; 717 goto final;
718 } else 718 } else
719 priva = arlan_device[devnum]->priv; 719 priva = netdev_priv(arlan_device[devnum]);
720 if (priva == NULL) 720 if (priva == NULL)
721 { 721 {
722 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n "); 722 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
@@ -745,7 +745,7 @@ static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp,
745 goto final; 745 goto final;
746 } 746 }
747 else 747 else
748 priva = arlan_device[devnum]->priv; 748 priva = netdev_priv(arlan_device[devnum]);
749 if (priva == NULL) 749 if (priva == NULL)
750 { 750 {
751 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n "); 751 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
@@ -780,7 +780,7 @@ static int arlan_configure(ctl_table * ctl, int write, struct file *filp,
780 } 780 }
781 else if (arlan_device[devnum] != NULL) 781 else if (arlan_device[devnum] != NULL)
782 { 782 {
783 priv = arlan_device[devnum]->priv; 783 priv = netdev_priv(arlan_device[devnum]);
784 784
785 arlan_command(arlan_device[devnum], ARLAN_COMMAND_CLEAN_AND_CONF); 785 arlan_command(arlan_device[devnum], ARLAN_COMMAND_CLEAN_AND_CONF);
786 } 786 }
@@ -805,7 +805,7 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp,
805 } 805 }
806 else if (arlan_device[devnum] != NULL) 806 else if (arlan_device[devnum] != NULL)
807 { 807 {
808 priv = arlan_device[devnum]->priv; 808 priv = netdev_priv(arlan_device[devnum]);
809 arlan_command(arlan_device[devnum], ARLAN_COMMAND_CLEAN_AND_RESET); 809 arlan_command(arlan_device[devnum], ARLAN_COMMAND_CLEAN_AND_RESET);
810 810
811 } else 811 } else
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 30e723f65979..f9cf22bda42e 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -272,7 +272,7 @@ static int sandisk_enable_wireless(struct net_device *dev)
272{ 272{
273 int res, ret = 0; 273 int res, ret = 0;
274 conf_reg_t reg; 274 conf_reg_t reg;
275 struct hostap_interface *iface = dev->priv; 275 struct hostap_interface *iface = netdev_priv(dev);
276 local_info_t *local = iface->local; 276 local_info_t *local = iface->local;
277 tuple_t tuple; 277 tuple_t tuple;
278 cisparse_t *parse = NULL; 278 cisparse_t *parse = NULL;
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index d3dacbceabb3..adedb9716542 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -3424,7 +3424,7 @@ static void prism2_suspend(struct net_device *dev)
3424 struct local_info *local; 3424 struct local_info *local;
3425 union iwreq_data wrqu; 3425 union iwreq_data wrqu;
3426 3426
3427 iface = dev->priv; 3427 iface = netdev_priv(dev);
3428 local = iface->local; 3428 local = iface->local;
3429 3429
3430 /* Send disconnect event, e.g., to trigger reassociation after resume 3430 /* Send disconnect event, e.g., to trigger reassociation after resume
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 8c71077d653c..d58ac84f4e9e 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -3088,7 +3088,7 @@ static int prism2_ioctl_priv_download(local_info_t *local, struct iw_point *p)
3088static int prism2_set_genericelement(struct net_device *dev, u8 *elem, 3088static int prism2_set_genericelement(struct net_device *dev, u8 *elem,
3089 size_t len) 3089 size_t len)
3090{ 3090{
3091 struct hostap_interface *iface = dev->priv; 3091 struct hostap_interface *iface = netdev_priv(dev);
3092 local_info_t *local = iface->local; 3092 local_info_t *local = iface->local;
3093 u8 *buf; 3093 u8 *buf;
3094 3094
@@ -3116,7 +3116,7 @@ static int prism2_ioctl_siwauth(struct net_device *dev,
3116 struct iw_request_info *info, 3116 struct iw_request_info *info,
3117 struct iw_param *data, char *extra) 3117 struct iw_param *data, char *extra)
3118{ 3118{
3119 struct hostap_interface *iface = dev->priv; 3119 struct hostap_interface *iface = netdev_priv(dev);
3120 local_info_t *local = iface->local; 3120 local_info_t *local = iface->local;
3121 3121
3122 switch (data->flags & IW_AUTH_INDEX) { 3122 switch (data->flags & IW_AUTH_INDEX) {
@@ -3182,7 +3182,7 @@ static int prism2_ioctl_giwauth(struct net_device *dev,
3182 struct iw_request_info *info, 3182 struct iw_request_info *info,
3183 struct iw_param *data, char *extra) 3183 struct iw_param *data, char *extra)
3184{ 3184{
3185 struct hostap_interface *iface = dev->priv; 3185 struct hostap_interface *iface = netdev_priv(dev);
3186 local_info_t *local = iface->local; 3186 local_info_t *local = iface->local;
3187 3187
3188 switch (data->flags & IW_AUTH_INDEX) { 3188 switch (data->flags & IW_AUTH_INDEX) {
@@ -3221,7 +3221,7 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev,
3221 struct iw_request_info *info, 3221 struct iw_request_info *info,
3222 struct iw_point *erq, char *extra) 3222 struct iw_point *erq, char *extra)
3223{ 3223{
3224 struct hostap_interface *iface = dev->priv; 3224 struct hostap_interface *iface = netdev_priv(dev);
3225 local_info_t *local = iface->local; 3225 local_info_t *local = iface->local;
3226 struct iw_encode_ext *ext = (struct iw_encode_ext *) extra; 3226 struct iw_encode_ext *ext = (struct iw_encode_ext *) extra;
3227 int i, ret = 0; 3227 int i, ret = 0;
@@ -3395,7 +3395,7 @@ static int prism2_ioctl_giwencodeext(struct net_device *dev,
3395 struct iw_request_info *info, 3395 struct iw_request_info *info,
3396 struct iw_point *erq, char *extra) 3396 struct iw_point *erq, char *extra)
3397{ 3397{
3398 struct hostap_interface *iface = dev->priv; 3398 struct hostap_interface *iface = netdev_priv(dev);
3399 local_info_t *local = iface->local; 3399 local_info_t *local = iface->local;
3400 struct ieee80211_crypt_data **crypt; 3400 struct ieee80211_crypt_data **crypt;
3401 void *sta_ptr; 3401 void *sta_ptr;
@@ -3716,7 +3716,7 @@ static int prism2_ioctl_giwgenie(struct net_device *dev,
3716 struct iw_request_info *info, 3716 struct iw_request_info *info,
3717 struct iw_point *data, char *extra) 3717 struct iw_point *data, char *extra)
3718{ 3718{
3719 struct hostap_interface *iface = dev->priv; 3719 struct hostap_interface *iface = netdev_priv(dev);
3720 local_info_t *local = iface->local; 3720 local_info_t *local = iface->local;
3721 int len = local->generic_elem_len - 2; 3721 int len = local->generic_elem_len - 2;
3722 3722
@@ -3755,7 +3755,7 @@ static int prism2_ioctl_siwmlme(struct net_device *dev,
3755 struct iw_request_info *info, 3755 struct iw_request_info *info,
3756 struct iw_point *data, char *extra) 3756 struct iw_point *data, char *extra)
3757{ 3757{
3758 struct hostap_interface *iface = dev->priv; 3758 struct hostap_interface *iface = netdev_priv(dev);
3759 local_info_t *local = iface->local; 3759 local_info_t *local = iface->local;
3760 struct iw_mlme *mlme = (struct iw_mlme *) extra; 3760 struct iw_mlme *mlme = (struct iw_mlme *) extra;
3761 u16 reason; 3761 u16 reason;
diff --git a/drivers/net/wireless/orinoco_tmd.c b/drivers/net/wireless/orinoco_tmd.c
index 7c7b960c91df..b9c54d8fceb9 100644
--- a/drivers/net/wireless/orinoco_tmd.c
+++ b/drivers/net/wireless/orinoco_tmd.c
@@ -190,7 +190,7 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,
190static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev) 190static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev)
191{ 191{
192 struct net_device *dev = pci_get_drvdata(pdev); 192 struct net_device *dev = pci_get_drvdata(pdev);
193 struct orinoco_private *priv = dev->priv; 193 struct orinoco_private *priv = netdev_priv(dev);
194 struct orinoco_pci_card *card = priv->card; 194 struct orinoco_pci_card *card = priv->card;
195 195
196 unregister_netdev(dev); 196 unregister_netdev(dev);
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index 585f5996d292..f1066614dc31 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -1753,7 +1753,7 @@ prism54_get_oid(struct net_device *ndev, struct iw_request_info *info,
1753 int rvalue; 1753 int rvalue;
1754 enum oid_num_t n = dwrq->flags; 1754 enum oid_num_t n = dwrq->flags;
1755 1755
1756 rvalue = mgt_get_request((islpci_private *) ndev->priv, n, 0, NULL, &r); 1756 rvalue = mgt_get_request(netdev_priv(ndev), n, 0, NULL, &r);
1757 dwrq->length = mgt_response_to_str(n, &r, extra); 1757 dwrq->length = mgt_response_to_str(n, &r, extra);
1758 if ((isl_oid[n].flags & OID_FLAG_TYPE) != OID_TYPE_U32) 1758 if ((isl_oid[n].flags & OID_FLAG_TYPE) != OID_TYPE_U32)
1759 kfree(r.ptr); 1759 kfree(r.ptr);
@@ -1766,7 +1766,7 @@ prism54_set_u32(struct net_device *ndev, struct iw_request_info *info,
1766{ 1766{
1767 u32 oid = uwrq[0], u = uwrq[1]; 1767 u32 oid = uwrq[0], u = uwrq[1];
1768 1768
1769 return mgt_set_request((islpci_private *) ndev->priv, oid, 0, &u); 1769 return mgt_set_request(netdev_priv(ndev), oid, 0, &u);
1770} 1770}
1771 1771
1772static int 1772static int
@@ -1775,7 +1775,7 @@ prism54_set_raw(struct net_device *ndev, struct iw_request_info *info,
1775{ 1775{
1776 u32 oid = dwrq->flags; 1776 u32 oid = dwrq->flags;
1777 1777
1778 return mgt_set_request((islpci_private *) ndev->priv, oid, 0, extra); 1778 return mgt_set_request(netdev_priv(ndev), oid, 0, extra);
1779} 1779}
1780 1780
1781void 1781void
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 3be624295a1f..1d9dbf830015 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -314,7 +314,7 @@ static int ray_probe(struct pcmcia_device *p_dev)
314 if (!dev) 314 if (!dev)
315 goto fail_alloc_dev; 315 goto fail_alloc_dev;
316 316
317 local = dev->priv; 317 local = netdev_priv(dev);
318 local->finder = p_dev; 318 local->finder = p_dev;
319 319
320 /* The io structure describes IO port mapping. None used here */ 320 /* The io structure describes IO port mapping. None used here */
@@ -388,7 +388,7 @@ static void ray_detach(struct pcmcia_device *link)
388 388
389 ray_release(link); 389 ray_release(link);
390 390
391 local = (ray_dev_t *)dev->priv; 391 local = netdev_priv(dev);
392 del_timer(&local->timer); 392 del_timer(&local->timer);
393 393
394 if (link->priv) { 394 if (link->priv) {
@@ -412,7 +412,7 @@ static int ray_config(struct pcmcia_device *link)
412 win_req_t req; 412 win_req_t req;
413 memreq_t mem; 413 memreq_t mem;
414 struct net_device *dev = (struct net_device *)link->priv; 414 struct net_device *dev = (struct net_device *)link->priv;
415 ray_dev_t *local = (ray_dev_t *)dev->priv; 415 ray_dev_t *local = netdev_priv(dev);
416 416
417 DEBUG(1, "ray_config(0x%p)\n", link); 417 DEBUG(1, "ray_config(0x%p)\n", link);
418 418
@@ -520,7 +520,7 @@ static int ray_init(struct net_device *dev)
520 int i; 520 int i;
521 UCHAR *p; 521 UCHAR *p;
522 struct ccs __iomem *pccs; 522 struct ccs __iomem *pccs;
523 ray_dev_t *local = (ray_dev_t *)dev->priv; 523 ray_dev_t *local = netdev_priv(dev);
524 struct pcmcia_device *link = local->finder; 524 struct pcmcia_device *link = local->finder;
525 DEBUG(1, "ray_init(0x%p)\n", dev); 525 DEBUG(1, "ray_init(0x%p)\n", dev);
526 if (!(pcmcia_dev_present(link))) { 526 if (!(pcmcia_dev_present(link))) {
@@ -581,7 +581,7 @@ static int ray_init(struct net_device *dev)
581static int dl_startup_params(struct net_device *dev) 581static int dl_startup_params(struct net_device *dev)
582{ 582{
583 int ccsindex; 583 int ccsindex;
584 ray_dev_t *local = (ray_dev_t *)dev->priv; 584 ray_dev_t *local = netdev_priv(dev);
585 struct ccs __iomem *pccs; 585 struct ccs __iomem *pccs;
586 struct pcmcia_device *link = local->finder; 586 struct pcmcia_device *link = local->finder;
587 587
@@ -786,7 +786,7 @@ static void join_net(u_long data)
786static void ray_release(struct pcmcia_device *link) 786static void ray_release(struct pcmcia_device *link)
787{ 787{
788 struct net_device *dev = link->priv; 788 struct net_device *dev = link->priv;
789 ray_dev_t *local = dev->priv; 789 ray_dev_t *local = netdev_priv(dev);
790 int i; 790 int i;
791 791
792 DEBUG(1, "ray_release(0x%p)\n", link); 792 DEBUG(1, "ray_release(0x%p)\n", link);
@@ -834,7 +834,7 @@ int ray_dev_init(struct net_device *dev)
834#ifdef RAY_IMMEDIATE_INIT 834#ifdef RAY_IMMEDIATE_INIT
835 int i; 835 int i;
836#endif /* RAY_IMMEDIATE_INIT */ 836#endif /* RAY_IMMEDIATE_INIT */
837 ray_dev_t *local = dev->priv; 837 ray_dev_t *local = netdev_priv(dev);
838 struct pcmcia_device *link = local->finder; 838 struct pcmcia_device *link = local->finder;
839 839
840 DEBUG(1,"ray_dev_init(dev=%p)\n",dev); 840 DEBUG(1,"ray_dev_init(dev=%p)\n",dev);
@@ -868,7 +868,7 @@ int ray_dev_init(struct net_device *dev)
868/*===========================================================================*/ 868/*===========================================================================*/
869static int ray_dev_config(struct net_device *dev, struct ifmap *map) 869static int ray_dev_config(struct net_device *dev, struct ifmap *map)
870{ 870{
871 ray_dev_t *local = dev->priv; 871 ray_dev_t *local = netdev_priv(dev);
872 struct pcmcia_device *link = local->finder; 872 struct pcmcia_device *link = local->finder;
873 /* Dummy routine to satisfy device structure */ 873 /* Dummy routine to satisfy device structure */
874 DEBUG(1,"ray_dev_config(dev=%p,ifmap=%p)\n",dev,map); 874 DEBUG(1,"ray_dev_config(dev=%p,ifmap=%p)\n",dev,map);
@@ -882,7 +882,7 @@ static int ray_dev_config(struct net_device *dev, struct ifmap *map)
882/*===========================================================================*/ 882/*===========================================================================*/
883static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) 883static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
884{ 884{
885 ray_dev_t *local = dev->priv; 885 ray_dev_t *local = netdev_priv(dev);
886 struct pcmcia_device *link = local->finder; 886 struct pcmcia_device *link = local->finder;
887 short length = skb->len; 887 short length = skb->len;
888 888
@@ -925,7 +925,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
925static int ray_hw_xmit(unsigned char* data, int len, struct net_device* dev, 925static int ray_hw_xmit(unsigned char* data, int len, struct net_device* dev,
926 UCHAR msg_type) 926 UCHAR msg_type)
927{ 927{
928 ray_dev_t *local = (ray_dev_t *)dev->priv; 928 ray_dev_t *local = netdev_priv(dev);
929 struct ccs __iomem *pccs; 929 struct ccs __iomem *pccs;
930 int ccsindex; 930 int ccsindex;
931 int offset; 931 int offset;
@@ -1099,7 +1099,7 @@ static int ray_set_freq(struct net_device *dev,
1099 struct iw_freq *fwrq, 1099 struct iw_freq *fwrq,
1100 char *extra) 1100 char *extra)
1101{ 1101{
1102 ray_dev_t *local = (ray_dev_t *)dev->priv; 1102 ray_dev_t *local = netdev_priv(dev);
1103 int err = -EINPROGRESS; /* Call commit handler */ 1103 int err = -EINPROGRESS; /* Call commit handler */
1104 1104
1105 /* Reject if card is already initialised */ 1105 /* Reject if card is already initialised */
@@ -1124,7 +1124,7 @@ static int ray_get_freq(struct net_device *dev,
1124 struct iw_freq *fwrq, 1124 struct iw_freq *fwrq,
1125 char *extra) 1125 char *extra)
1126{ 1126{
1127 ray_dev_t *local = (ray_dev_t *)dev->priv; 1127 ray_dev_t *local = netdev_priv(dev);
1128 1128
1129 fwrq->m = local->sparm.b5.a_hop_pattern; 1129 fwrq->m = local->sparm.b5.a_hop_pattern;
1130 fwrq->e = 0; 1130 fwrq->e = 0;
@@ -1140,7 +1140,7 @@ static int ray_set_essid(struct net_device *dev,
1140 struct iw_point *dwrq, 1140 struct iw_point *dwrq,
1141 char *extra) 1141 char *extra)
1142{ 1142{
1143 ray_dev_t *local = (ray_dev_t *)dev->priv; 1143 ray_dev_t *local = netdev_priv(dev);
1144 1144
1145 /* Reject if card is already initialised */ 1145 /* Reject if card is already initialised */
1146 if(local->card_status != CARD_AWAITING_PARAM) 1146 if(local->card_status != CARD_AWAITING_PARAM)
@@ -1173,7 +1173,7 @@ static int ray_get_essid(struct net_device *dev,
1173 struct iw_point *dwrq, 1173 struct iw_point *dwrq,
1174 char *extra) 1174 char *extra)
1175{ 1175{
1176 ray_dev_t *local = (ray_dev_t *)dev->priv; 1176 ray_dev_t *local = netdev_priv(dev);
1177 1177
1178 /* Get the essid that was set */ 1178 /* Get the essid that was set */
1179 memcpy(extra, local->sparm.b5.a_current_ess_id, IW_ESSID_MAX_SIZE); 1179 memcpy(extra, local->sparm.b5.a_current_ess_id, IW_ESSID_MAX_SIZE);
@@ -1194,7 +1194,7 @@ static int ray_get_wap(struct net_device *dev,
1194 struct sockaddr *awrq, 1194 struct sockaddr *awrq,
1195 char *extra) 1195 char *extra)
1196{ 1196{
1197 ray_dev_t *local = (ray_dev_t *)dev->priv; 1197 ray_dev_t *local = netdev_priv(dev);
1198 1198
1199 memcpy(awrq->sa_data, local->bss_id, ETH_ALEN); 1199 memcpy(awrq->sa_data, local->bss_id, ETH_ALEN);
1200 awrq->sa_family = ARPHRD_ETHER; 1200 awrq->sa_family = ARPHRD_ETHER;
@@ -1211,7 +1211,7 @@ static int ray_set_rate(struct net_device *dev,
1211 struct iw_param *vwrq, 1211 struct iw_param *vwrq,
1212 char *extra) 1212 char *extra)
1213{ 1213{
1214 ray_dev_t *local = (ray_dev_t *)dev->priv; 1214 ray_dev_t *local = netdev_priv(dev);
1215 1215
1216 /* Reject if card is already initialised */ 1216 /* Reject if card is already initialised */
1217 if(local->card_status != CARD_AWAITING_PARAM) 1217 if(local->card_status != CARD_AWAITING_PARAM)
@@ -1240,7 +1240,7 @@ static int ray_get_rate(struct net_device *dev,
1240 struct iw_param *vwrq, 1240 struct iw_param *vwrq,
1241 char *extra) 1241 char *extra)
1242{ 1242{
1243 ray_dev_t *local = (ray_dev_t *)dev->priv; 1243 ray_dev_t *local = netdev_priv(dev);
1244 1244
1245 if(local->net_default_tx_rate == 3) 1245 if(local->net_default_tx_rate == 3)
1246 vwrq->value = 2000000; /* Hum... */ 1246 vwrq->value = 2000000; /* Hum... */
@@ -1260,7 +1260,7 @@ static int ray_set_rts(struct net_device *dev,
1260 struct iw_param *vwrq, 1260 struct iw_param *vwrq,
1261 char *extra) 1261 char *extra)
1262{ 1262{
1263 ray_dev_t *local = (ray_dev_t *)dev->priv; 1263 ray_dev_t *local = netdev_priv(dev);
1264 int rthr = vwrq->value; 1264 int rthr = vwrq->value;
1265 1265
1266 /* Reject if card is already initialised */ 1266 /* Reject if card is already initialised */
@@ -1290,7 +1290,7 @@ static int ray_get_rts(struct net_device *dev,
1290 struct iw_param *vwrq, 1290 struct iw_param *vwrq,
1291 char *extra) 1291 char *extra)
1292{ 1292{
1293 ray_dev_t *local = (ray_dev_t *)dev->priv; 1293 ray_dev_t *local = netdev_priv(dev);
1294 1294
1295 vwrq->value = (local->sparm.b5.a_rts_threshold[0] << 8) 1295 vwrq->value = (local->sparm.b5.a_rts_threshold[0] << 8)
1296 + local->sparm.b5.a_rts_threshold[1]; 1296 + local->sparm.b5.a_rts_threshold[1];
@@ -1309,7 +1309,7 @@ static int ray_set_frag(struct net_device *dev,
1309 struct iw_param *vwrq, 1309 struct iw_param *vwrq,
1310 char *extra) 1310 char *extra)
1311{ 1311{
1312 ray_dev_t *local = (ray_dev_t *)dev->priv; 1312 ray_dev_t *local = netdev_priv(dev);
1313 int fthr = vwrq->value; 1313 int fthr = vwrq->value;
1314 1314
1315 /* Reject if card is already initialised */ 1315 /* Reject if card is already initialised */
@@ -1338,7 +1338,7 @@ static int ray_get_frag(struct net_device *dev,
1338 struct iw_param *vwrq, 1338 struct iw_param *vwrq,
1339 char *extra) 1339 char *extra)
1340{ 1340{
1341 ray_dev_t *local = (ray_dev_t *)dev->priv; 1341 ray_dev_t *local = netdev_priv(dev);
1342 1342
1343 vwrq->value = (local->sparm.b5.a_frag_threshold[0] << 8) 1343 vwrq->value = (local->sparm.b5.a_frag_threshold[0] << 8)
1344 + local->sparm.b5.a_frag_threshold[1]; 1344 + local->sparm.b5.a_frag_threshold[1];
@@ -1357,7 +1357,7 @@ static int ray_set_mode(struct net_device *dev,
1357 __u32 *uwrq, 1357 __u32 *uwrq,
1358 char *extra) 1358 char *extra)
1359{ 1359{
1360 ray_dev_t *local = (ray_dev_t *)dev->priv; 1360 ray_dev_t *local = netdev_priv(dev);
1361 int err = -EINPROGRESS; /* Call commit handler */ 1361 int err = -EINPROGRESS; /* Call commit handler */
1362 char card_mode = 1; 1362 char card_mode = 1;
1363 1363
@@ -1389,7 +1389,7 @@ static int ray_get_mode(struct net_device *dev,
1389 __u32 *uwrq, 1389 __u32 *uwrq,
1390 char *extra) 1390 char *extra)
1391{ 1391{
1392 ray_dev_t *local = (ray_dev_t *)dev->priv; 1392 ray_dev_t *local = netdev_priv(dev);
1393 1393
1394 if(local->sparm.b5.a_network_type) 1394 if(local->sparm.b5.a_network_type)
1395 *uwrq = IW_MODE_INFRA; 1395 *uwrq = IW_MODE_INFRA;
@@ -1492,7 +1492,7 @@ static int ray_commit(struct net_device *dev,
1492 */ 1492 */
1493static iw_stats * ray_get_wireless_stats(struct net_device * dev) 1493static iw_stats * ray_get_wireless_stats(struct net_device * dev)
1494{ 1494{
1495 ray_dev_t * local = (ray_dev_t *) dev->priv; 1495 ray_dev_t * local = netdev_priv(dev);
1496 struct pcmcia_device *link = local->finder; 1496 struct pcmcia_device *link = local->finder;
1497 struct status __iomem *p = local->sram + STATUS_BASE; 1497 struct status __iomem *p = local->sram + STATUS_BASE;
1498 1498
@@ -1580,7 +1580,7 @@ static const struct iw_handler_def ray_handler_def =
1580/*===========================================================================*/ 1580/*===========================================================================*/
1581static int ray_open(struct net_device *dev) 1581static int ray_open(struct net_device *dev)
1582{ 1582{
1583 ray_dev_t *local = (ray_dev_t *)dev->priv; 1583 ray_dev_t *local = netdev_priv(dev);
1584 struct pcmcia_device *link; 1584 struct pcmcia_device *link;
1585 link = local->finder; 1585 link = local->finder;
1586 1586
@@ -1614,7 +1614,7 @@ static int ray_open(struct net_device *dev)
1614/*===========================================================================*/ 1614/*===========================================================================*/
1615static int ray_dev_close(struct net_device *dev) 1615static int ray_dev_close(struct net_device *dev)
1616{ 1616{
1617 ray_dev_t *local = (ray_dev_t *)dev->priv; 1617 ray_dev_t *local = netdev_priv(dev);
1618 struct pcmcia_device *link; 1618 struct pcmcia_device *link;
1619 link = local->finder; 1619 link = local->finder;
1620 1620
@@ -1773,7 +1773,7 @@ static int parse_addr(char *in_str, UCHAR *out)
1773/*===========================================================================*/ 1773/*===========================================================================*/
1774static struct net_device_stats *ray_get_stats(struct net_device *dev) 1774static struct net_device_stats *ray_get_stats(struct net_device *dev)
1775{ 1775{
1776 ray_dev_t *local = (ray_dev_t *)dev->priv; 1776 ray_dev_t *local = netdev_priv(dev);
1777 struct pcmcia_device *link = local->finder; 1777 struct pcmcia_device *link = local->finder;
1778 struct status __iomem *p = local->sram + STATUS_BASE; 1778 struct status __iomem *p = local->sram + STATUS_BASE;
1779 if (!(pcmcia_dev_present(link))) { 1779 if (!(pcmcia_dev_present(link))) {
@@ -1803,7 +1803,7 @@ static struct net_device_stats *ray_get_stats(struct net_device *dev)
1803/*===========================================================================*/ 1803/*===========================================================================*/
1804static void ray_update_parm(struct net_device *dev, UCHAR objid, UCHAR *value, int len) 1804static void ray_update_parm(struct net_device *dev, UCHAR objid, UCHAR *value, int len)
1805{ 1805{
1806 ray_dev_t *local = (ray_dev_t *)dev->priv; 1806 ray_dev_t *local = netdev_priv(dev);
1807 struct pcmcia_device *link = local->finder; 1807 struct pcmcia_device *link = local->finder;
1808 int ccsindex; 1808 int ccsindex;
1809 int i; 1809 int i;
@@ -1840,7 +1840,7 @@ static void ray_update_multi_list(struct net_device *dev, int all)
1840 int ccsindex; 1840 int ccsindex;
1841 struct ccs __iomem *pccs; 1841 struct ccs __iomem *pccs;
1842 int i = 0; 1842 int i = 0;
1843 ray_dev_t *local = (ray_dev_t *)dev->priv; 1843 ray_dev_t *local = netdev_priv(dev);
1844 struct pcmcia_device *link = local->finder; 1844 struct pcmcia_device *link = local->finder;
1845 void __iomem *p = local->sram + HOST_TO_ECF_BASE; 1845 void __iomem *p = local->sram + HOST_TO_ECF_BASE;
1846 1846
@@ -1884,7 +1884,7 @@ static void ray_update_multi_list(struct net_device *dev, int all)
1884/*===========================================================================*/ 1884/*===========================================================================*/
1885static void set_multicast_list(struct net_device *dev) 1885static void set_multicast_list(struct net_device *dev)
1886{ 1886{
1887 ray_dev_t *local = (ray_dev_t *)dev->priv; 1887 ray_dev_t *local = netdev_priv(dev);
1888 UCHAR promisc; 1888 UCHAR promisc;
1889 1889
1890 DEBUG(2,"ray_cs set_multicast_list(%p)\n",dev); 1890 DEBUG(2,"ray_cs set_multicast_list(%p)\n",dev);
@@ -1935,7 +1935,7 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
1935 1935
1936 DEBUG(4,"ray_cs: interrupt for *dev=%p\n",dev); 1936 DEBUG(4,"ray_cs: interrupt for *dev=%p\n",dev);
1937 1937
1938 local = (ray_dev_t *)dev->priv; 1938 local = netdev_priv(dev);
1939 link = (struct pcmcia_device *)local->finder; 1939 link = (struct pcmcia_device *)local->finder;
1940 if (!pcmcia_dev_present(link)) { 1940 if (!pcmcia_dev_present(link)) {
1941 DEBUG(2,"ray_cs interrupt from device not present or suspended.\n"); 1941 DEBUG(2,"ray_cs interrupt from device not present or suspended.\n");
@@ -2165,7 +2165,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs, unsigned i
2165{ 2165{
2166 struct sk_buff *skb = NULL; 2166 struct sk_buff *skb = NULL;
2167 struct rcs __iomem *prcslink = prcs; 2167 struct rcs __iomem *prcslink = prcs;
2168 ray_dev_t *local = dev->priv; 2168 ray_dev_t *local = netdev_priv(dev);
2169 UCHAR *rx_ptr; 2169 UCHAR *rx_ptr;
2170 int total_len; 2170 int total_len;
2171 int tmp; 2171 int tmp;
@@ -2618,7 +2618,7 @@ static int ray_cs_proc_read(char *buf, char **start, off_t offset, int len)
2618 dev = (struct net_device *)link->priv; 2618 dev = (struct net_device *)link->priv;
2619 if (!dev) 2619 if (!dev)
2620 return 0; 2620 return 0;
2621 local = (ray_dev_t *)dev->priv; 2621 local = netdev_priv(dev);
2622 if (!local) 2622 if (!local)
2623 return 0; 2623 return 0;
2624 2624
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index 904e548e6795..c49d5a1f94a2 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -2572,7 +2572,7 @@ static struct strip *strip_alloc(void)
2572 return NULL; /* If no more memory, return */ 2572 return NULL; /* If no more memory, return */
2573 2573
2574 2574
2575 strip_info = dev->priv; 2575 strip_info = netdev_priv(dev);
2576 strip_info->dev = dev; 2576 strip_info->dev = dev;
2577 2577
2578 strip_info->magic = STRIP_MAGIC; 2578 strip_info->magic = STRIP_MAGIC;
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index c8b5c2271938..72f3d97e7cb4 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -859,7 +859,7 @@ static int wl3501_esbq_confirm(struct wl3501_card *this)
859 859
860static void wl3501_online(struct net_device *dev) 860static void wl3501_online(struct net_device *dev)
861{ 861{
862 struct wl3501_card *this = dev->priv; 862 struct wl3501_card *this = netdev_priv(dev);
863 863
864 printk(KERN_INFO "%s: Wireless LAN online. BSSID: " 864 printk(KERN_INFO "%s: Wireless LAN online. BSSID: "
865 "%02X %02X %02X %02X %02X %02X\n", dev->name, 865 "%02X %02X %02X %02X %02X %02X\n", dev->name,
@@ -907,7 +907,7 @@ static int wl3501_mgmt_association(struct wl3501_card *this)
907 907
908static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr) 908static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr)
909{ 909{
910 struct wl3501_card *this = dev->priv; 910 struct wl3501_card *this = netdev_priv(dev);
911 struct wl3501_join_confirm sig; 911 struct wl3501_join_confirm sig;
912 912
913 dprintk(3, "entry"); 913 dprintk(3, "entry");
@@ -1046,7 +1046,7 @@ static inline void wl3501_start_confirm_interrupt(struct net_device *dev,
1046static inline void wl3501_assoc_confirm_interrupt(struct net_device *dev, 1046static inline void wl3501_assoc_confirm_interrupt(struct net_device *dev,
1047 u16 addr) 1047 u16 addr)
1048{ 1048{
1049 struct wl3501_card *this = dev->priv; 1049 struct wl3501_card *this = netdev_priv(dev);
1050 struct wl3501_assoc_confirm sig; 1050 struct wl3501_assoc_confirm sig;
1051 1051
1052 dprintk(3, "entry"); 1052 dprintk(3, "entry");
@@ -1075,7 +1075,7 @@ static inline void wl3501_rx_interrupt(struct net_device *dev)
1075 int morepkts; 1075 int morepkts;
1076 u16 addr; 1076 u16 addr;
1077 u8 sig_id; 1077 u8 sig_id;
1078 struct wl3501_card *this = dev->priv; 1078 struct wl3501_card *this = netdev_priv(dev);
1079 1079
1080 dprintk(3, "entry"); 1080 dprintk(3, "entry");
1081loop: 1081loop:
@@ -1257,7 +1257,7 @@ fail:
1257 1257
1258static int wl3501_close(struct net_device *dev) 1258static int wl3501_close(struct net_device *dev)
1259{ 1259{
1260 struct wl3501_card *this = dev->priv; 1260 struct wl3501_card *this = netdev_priv(dev);
1261 int rc = -ENODEV; 1261 int rc = -ENODEV;
1262 unsigned long flags; 1262 unsigned long flags;
1263 struct pcmcia_device *link; 1263 struct pcmcia_device *link;
@@ -1289,7 +1289,7 @@ static int wl3501_close(struct net_device *dev)
1289 */ 1289 */
1290static int wl3501_reset(struct net_device *dev) 1290static int wl3501_reset(struct net_device *dev)
1291{ 1291{
1292 struct wl3501_card *this = dev->priv; 1292 struct wl3501_card *this = netdev_priv(dev);
1293 int rc = -ENODEV; 1293 int rc = -ENODEV;
1294 1294
1295 wl3501_block_interrupt(this); 1295 wl3501_block_interrupt(this);
@@ -1318,7 +1318,7 @@ out:
1318 1318
1319static void wl3501_tx_timeout(struct net_device *dev) 1319static void wl3501_tx_timeout(struct net_device *dev)
1320{ 1320{
1321 struct wl3501_card *this = dev->priv; 1321 struct wl3501_card *this = netdev_priv(dev);
1322 struct net_device_stats *stats = &this->stats; 1322 struct net_device_stats *stats = &this->stats;
1323 unsigned long flags; 1323 unsigned long flags;
1324 int rc; 1324 int rc;
@@ -1344,7 +1344,7 @@ static void wl3501_tx_timeout(struct net_device *dev)
1344static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 1344static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
1345{ 1345{
1346 int enabled, rc; 1346 int enabled, rc;
1347 struct wl3501_card *this = dev->priv; 1347 struct wl3501_card *this = netdev_priv(dev);
1348 unsigned long flags; 1348 unsigned long flags;
1349 1349
1350 spin_lock_irqsave(&this->lock, flags); 1350 spin_lock_irqsave(&this->lock, flags);
@@ -1371,7 +1371,7 @@ static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
1371static int wl3501_open(struct net_device *dev) 1371static int wl3501_open(struct net_device *dev)
1372{ 1372{
1373 int rc = -ENODEV; 1373 int rc = -ENODEV;
1374 struct wl3501_card *this = dev->priv; 1374 struct wl3501_card *this = netdev_priv(dev);
1375 unsigned long flags; 1375 unsigned long flags;
1376 struct pcmcia_device *link; 1376 struct pcmcia_device *link;
1377 link = this->p_dev; 1377 link = this->p_dev;
@@ -1410,14 +1410,14 @@ fail:
1410 1410
1411static struct net_device_stats *wl3501_get_stats(struct net_device *dev) 1411static struct net_device_stats *wl3501_get_stats(struct net_device *dev)
1412{ 1412{
1413 struct wl3501_card *this = dev->priv; 1413 struct wl3501_card *this = netdev_priv(dev);
1414 1414
1415 return &this->stats; 1415 return &this->stats;
1416} 1416}
1417 1417
1418static struct iw_statistics *wl3501_get_wireless_stats(struct net_device *dev) 1418static struct iw_statistics *wl3501_get_wireless_stats(struct net_device *dev)
1419{ 1419{
1420 struct wl3501_card *this = dev->priv; 1420 struct wl3501_card *this = netdev_priv(dev);
1421 struct iw_statistics *wstats = &this->wstats; 1421 struct iw_statistics *wstats = &this->wstats;
1422 u32 value; /* size checked: it is u32 */ 1422 u32 value; /* size checked: it is u32 */
1423 1423
@@ -1497,7 +1497,7 @@ static int wl3501_get_name(struct net_device *dev, struct iw_request_info *info,
1497static int wl3501_set_freq(struct net_device *dev, struct iw_request_info *info, 1497static int wl3501_set_freq(struct net_device *dev, struct iw_request_info *info,
1498 union iwreq_data *wrqu, char *extra) 1498 union iwreq_data *wrqu, char *extra)
1499{ 1499{
1500 struct wl3501_card *this = dev->priv; 1500 struct wl3501_card *this = netdev_priv(dev);
1501 int channel = wrqu->freq.m; 1501 int channel = wrqu->freq.m;
1502 int rc = -EINVAL; 1502 int rc = -EINVAL;
1503 1503
@@ -1511,7 +1511,7 @@ static int wl3501_set_freq(struct net_device *dev, struct iw_request_info *info,
1511static int wl3501_get_freq(struct net_device *dev, struct iw_request_info *info, 1511static int wl3501_get_freq(struct net_device *dev, struct iw_request_info *info,
1512 union iwreq_data *wrqu, char *extra) 1512 union iwreq_data *wrqu, char *extra)
1513{ 1513{
1514 struct wl3501_card *this = dev->priv; 1514 struct wl3501_card *this = netdev_priv(dev);
1515 1515
1516 wrqu->freq.m = wl3501_chan2freq[this->chan - 1] * 100000; 1516 wrqu->freq.m = wl3501_chan2freq[this->chan - 1] * 100000;
1517 wrqu->freq.e = 1; 1517 wrqu->freq.e = 1;
@@ -1526,7 +1526,7 @@ static int wl3501_set_mode(struct net_device *dev, struct iw_request_info *info,
1526 if (wrqu->mode == IW_MODE_INFRA || 1526 if (wrqu->mode == IW_MODE_INFRA ||
1527 wrqu->mode == IW_MODE_ADHOC || 1527 wrqu->mode == IW_MODE_ADHOC ||
1528 wrqu->mode == IW_MODE_AUTO) { 1528 wrqu->mode == IW_MODE_AUTO) {
1529 struct wl3501_card *this = dev->priv; 1529 struct wl3501_card *this = netdev_priv(dev);
1530 1530
1531 this->net_type = wrqu->mode; 1531 this->net_type = wrqu->mode;
1532 rc = wl3501_reset(dev); 1532 rc = wl3501_reset(dev);
@@ -1537,7 +1537,7 @@ static int wl3501_set_mode(struct net_device *dev, struct iw_request_info *info,
1537static int wl3501_get_mode(struct net_device *dev, struct iw_request_info *info, 1537static int wl3501_get_mode(struct net_device *dev, struct iw_request_info *info,
1538 union iwreq_data *wrqu, char *extra) 1538 union iwreq_data *wrqu, char *extra)
1539{ 1539{
1540 struct wl3501_card *this = dev->priv; 1540 struct wl3501_card *this = netdev_priv(dev);
1541 1541
1542 wrqu->mode = this->net_type; 1542 wrqu->mode = this->net_type;
1543 return 0; 1543 return 0;
@@ -1546,7 +1546,7 @@ static int wl3501_get_mode(struct net_device *dev, struct iw_request_info *info,
1546static int wl3501_get_sens(struct net_device *dev, struct iw_request_info *info, 1546static int wl3501_get_sens(struct net_device *dev, struct iw_request_info *info,
1547 union iwreq_data *wrqu, char *extra) 1547 union iwreq_data *wrqu, char *extra)
1548{ 1548{
1549 struct wl3501_card *this = dev->priv; 1549 struct wl3501_card *this = netdev_priv(dev);
1550 1550
1551 wrqu->sens.value = this->rssi; 1551 wrqu->sens.value = this->rssi;
1552 wrqu->sens.disabled = !wrqu->sens.value; 1552 wrqu->sens.disabled = !wrqu->sens.value;
@@ -1577,7 +1577,7 @@ static int wl3501_get_range(struct net_device *dev,
1577static int wl3501_set_wap(struct net_device *dev, struct iw_request_info *info, 1577static int wl3501_set_wap(struct net_device *dev, struct iw_request_info *info,
1578 union iwreq_data *wrqu, char *extra) 1578 union iwreq_data *wrqu, char *extra)
1579{ 1579{
1580 struct wl3501_card *this = dev->priv; 1580 struct wl3501_card *this = netdev_priv(dev);
1581 static const u8 bcast[ETH_ALEN] = { 255, 255, 255, 255, 255, 255 }; 1581 static const u8 bcast[ETH_ALEN] = { 255, 255, 255, 255, 255, 255 };
1582 int rc = -EINVAL; 1582 int rc = -EINVAL;
1583 1583
@@ -1597,7 +1597,7 @@ out:
1597static int wl3501_get_wap(struct net_device *dev, struct iw_request_info *info, 1597static int wl3501_get_wap(struct net_device *dev, struct iw_request_info *info,
1598 union iwreq_data *wrqu, char *extra) 1598 union iwreq_data *wrqu, char *extra)
1599{ 1599{
1600 struct wl3501_card *this = dev->priv; 1600 struct wl3501_card *this = netdev_priv(dev);
1601 1601
1602 wrqu->ap_addr.sa_family = ARPHRD_ETHER; 1602 wrqu->ap_addr.sa_family = ARPHRD_ETHER;
1603 memcpy(wrqu->ap_addr.sa_data, this->bssid, ETH_ALEN); 1603 memcpy(wrqu->ap_addr.sa_data, this->bssid, ETH_ALEN);
@@ -1616,7 +1616,7 @@ static int wl3501_set_scan(struct net_device *dev, struct iw_request_info *info,
1616static int wl3501_get_scan(struct net_device *dev, struct iw_request_info *info, 1616static int wl3501_get_scan(struct net_device *dev, struct iw_request_info *info,
1617 union iwreq_data *wrqu, char *extra) 1617 union iwreq_data *wrqu, char *extra)
1618{ 1618{
1619 struct wl3501_card *this = dev->priv; 1619 struct wl3501_card *this = netdev_priv(dev);
1620 int i; 1620 int i;
1621 char *current_ev = extra; 1621 char *current_ev = extra;
1622 struct iw_event iwe; 1622 struct iw_event iwe;
@@ -1666,7 +1666,7 @@ static int wl3501_set_essid(struct net_device *dev,
1666 struct iw_request_info *info, 1666 struct iw_request_info *info,
1667 union iwreq_data *wrqu, char *extra) 1667 union iwreq_data *wrqu, char *extra)
1668{ 1668{
1669 struct wl3501_card *this = dev->priv; 1669 struct wl3501_card *this = netdev_priv(dev);
1670 1670
1671 if (wrqu->data.flags) { 1671 if (wrqu->data.flags) {
1672 iw_set_mgmt_info_element(IW_MGMT_INFO_ELEMENT_SSID, 1672 iw_set_mgmt_info_element(IW_MGMT_INFO_ELEMENT_SSID,
@@ -1683,7 +1683,7 @@ static int wl3501_get_essid(struct net_device *dev,
1683 struct iw_request_info *info, 1683 struct iw_request_info *info,
1684 union iwreq_data *wrqu, char *extra) 1684 union iwreq_data *wrqu, char *extra)
1685{ 1685{
1686 struct wl3501_card *this = dev->priv; 1686 struct wl3501_card *this = netdev_priv(dev);
1687 unsigned long flags; 1687 unsigned long flags;
1688 1688
1689 spin_lock_irqsave(&this->lock, flags); 1689 spin_lock_irqsave(&this->lock, flags);
@@ -1697,7 +1697,7 @@ static int wl3501_get_essid(struct net_device *dev,
1697static int wl3501_set_nick(struct net_device *dev, struct iw_request_info *info, 1697static int wl3501_set_nick(struct net_device *dev, struct iw_request_info *info,
1698 union iwreq_data *wrqu, char *extra) 1698 union iwreq_data *wrqu, char *extra)
1699{ 1699{
1700 struct wl3501_card *this = dev->priv; 1700 struct wl3501_card *this = netdev_priv(dev);
1701 1701
1702 if (wrqu->data.length > sizeof(this->nick)) 1702 if (wrqu->data.length > sizeof(this->nick))
1703 return -E2BIG; 1703 return -E2BIG;
@@ -1708,7 +1708,7 @@ static int wl3501_set_nick(struct net_device *dev, struct iw_request_info *info,
1708static int wl3501_get_nick(struct net_device *dev, struct iw_request_info *info, 1708static int wl3501_get_nick(struct net_device *dev, struct iw_request_info *info,
1709 union iwreq_data *wrqu, char *extra) 1709 union iwreq_data *wrqu, char *extra)
1710{ 1710{
1711 struct wl3501_card *this = dev->priv; 1711 struct wl3501_card *this = netdev_priv(dev);
1712 1712
1713 strlcpy(extra, this->nick, 32); 1713 strlcpy(extra, this->nick, 32);
1714 wrqu->data.length = strlen(extra); 1714 wrqu->data.length = strlen(extra);
@@ -1733,7 +1733,7 @@ static int wl3501_get_rts_threshold(struct net_device *dev,
1733 union iwreq_data *wrqu, char *extra) 1733 union iwreq_data *wrqu, char *extra)
1734{ 1734{
1735 u16 threshold; /* size checked: it is u16 */ 1735 u16 threshold; /* size checked: it is u16 */
1736 struct wl3501_card *this = dev->priv; 1736 struct wl3501_card *this = netdev_priv(dev);
1737 int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_RTS_THRESHOLD, 1737 int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_RTS_THRESHOLD,
1738 &threshold, sizeof(threshold)); 1738 &threshold, sizeof(threshold));
1739 if (!rc) { 1739 if (!rc) {
@@ -1749,7 +1749,7 @@ static int wl3501_get_frag_threshold(struct net_device *dev,
1749 union iwreq_data *wrqu, char *extra) 1749 union iwreq_data *wrqu, char *extra)
1750{ 1750{
1751 u16 threshold; /* size checked: it is u16 */ 1751 u16 threshold; /* size checked: it is u16 */
1752 struct wl3501_card *this = dev->priv; 1752 struct wl3501_card *this = netdev_priv(dev);
1753 int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_FRAG_THRESHOLD, 1753 int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_FRAG_THRESHOLD,
1754 &threshold, sizeof(threshold)); 1754 &threshold, sizeof(threshold));
1755 if (!rc) { 1755 if (!rc) {
@@ -1765,7 +1765,7 @@ static int wl3501_get_txpow(struct net_device *dev,
1765 union iwreq_data *wrqu, char *extra) 1765 union iwreq_data *wrqu, char *extra)
1766{ 1766{
1767 u16 txpow; 1767 u16 txpow;
1768 struct wl3501_card *this = dev->priv; 1768 struct wl3501_card *this = netdev_priv(dev);
1769 int rc = wl3501_get_mib_value(this, 1769 int rc = wl3501_get_mib_value(this,
1770 WL3501_MIB_ATTR_CURRENT_TX_PWR_LEVEL, 1770 WL3501_MIB_ATTR_CURRENT_TX_PWR_LEVEL,
1771 &txpow, sizeof(txpow)); 1771 &txpow, sizeof(txpow));
@@ -1787,7 +1787,7 @@ static int wl3501_get_retry(struct net_device *dev,
1787 union iwreq_data *wrqu, char *extra) 1787 union iwreq_data *wrqu, char *extra)
1788{ 1788{
1789 u8 retry; /* size checked: it is u8 */ 1789 u8 retry; /* size checked: it is u8 */
1790 struct wl3501_card *this = dev->priv; 1790 struct wl3501_card *this = netdev_priv(dev);
1791 int rc = wl3501_get_mib_value(this, 1791 int rc = wl3501_get_mib_value(this,
1792 WL3501_MIB_ATTR_LONG_RETRY_LIMIT, 1792 WL3501_MIB_ATTR_LONG_RETRY_LIMIT,
1793 &retry, sizeof(retry)); 1793 &retry, sizeof(retry));
@@ -1814,7 +1814,7 @@ static int wl3501_get_encode(struct net_device *dev,
1814 union iwreq_data *wrqu, char *extra) 1814 union iwreq_data *wrqu, char *extra)
1815{ 1815{
1816 u8 implemented, restricted, keys[100], len_keys, tocopy; 1816 u8 implemented, restricted, keys[100], len_keys, tocopy;
1817 struct wl3501_card *this = dev->priv; 1817 struct wl3501_card *this = netdev_priv(dev);
1818 int rc = wl3501_get_mib_value(this, 1818 int rc = wl3501_get_mib_value(this,
1819 WL3501_MIB_ATTR_PRIV_OPT_IMPLEMENTED, 1819 WL3501_MIB_ATTR_PRIV_OPT_IMPLEMENTED,
1820 &implemented, sizeof(implemented)); 1820 &implemented, sizeof(implemented));
@@ -1852,7 +1852,7 @@ static int wl3501_get_power(struct net_device *dev,
1852 union iwreq_data *wrqu, char *extra) 1852 union iwreq_data *wrqu, char *extra)
1853{ 1853{
1854 u8 pwr_state; 1854 u8 pwr_state;
1855 struct wl3501_card *this = dev->priv; 1855 struct wl3501_card *this = netdev_priv(dev);
1856 int rc = wl3501_get_mib_value(this, 1856 int rc = wl3501_get_mib_value(this,
1857 WL3501_MIB_ATTR_CURRENT_PWR_STATE, 1857 WL3501_MIB_ATTR_CURRENT_PWR_STATE,
1858 &pwr_state, sizeof(pwr_state)); 1858 &pwr_state, sizeof(pwr_state));
@@ -1937,7 +1937,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev)
1937 dev->tx_timeout = wl3501_tx_timeout; 1937 dev->tx_timeout = wl3501_tx_timeout;
1938 dev->watchdog_timeo = 5 * HZ; 1938 dev->watchdog_timeo = 5 * HZ;
1939 dev->get_stats = wl3501_get_stats; 1939 dev->get_stats = wl3501_get_stats;
1940 this = dev->priv; 1940 this = netdev_priv(dev);
1941 this->wireless_data.spy_data = &this->spy_data; 1941 this->wireless_data.spy_data = &this->spy_data;
1942 this->p_dev = p_dev; 1942 this->p_dev = p_dev;
1943 dev->wireless_data = &this->wireless_data; 1943 dev->wireless_data = &this->wireless_data;
@@ -2006,7 +2006,7 @@ static int wl3501_config(struct pcmcia_device *link)
2006 2006
2007 SET_MODULE_OWNER(dev); 2007 SET_MODULE_OWNER(dev);
2008 2008
2009 this = dev->priv; 2009 this = netdev_priv(dev);
2010 /* 2010 /*
2011 * At this point, the dev_node_t structure(s) should be initialized and 2011 * At this point, the dev_node_t structure(s) should be initialized and
2012 * arranged in a linked list at link->dev_node. 2012 * arranged in a linked list at link->dev_node.
@@ -2079,7 +2079,7 @@ static int wl3501_suspend(struct pcmcia_device *link)
2079{ 2079{
2080 struct net_device *dev = link->priv; 2080 struct net_device *dev = link->priv;
2081 2081
2082 wl3501_pwr_mgmt(dev->priv, WL3501_SUSPEND); 2082 wl3501_pwr_mgmt(netdev_priv(dev), WL3501_SUSPEND);
2083 if (link->open) 2083 if (link->open)
2084 netif_device_detach(dev); 2084 netif_device_detach(dev);
2085 2085
@@ -2090,7 +2090,7 @@ static int wl3501_resume(struct pcmcia_device *link)
2090{ 2090{
2091 struct net_device *dev = link->priv; 2091 struct net_device *dev = link->priv;
2092 2092
2093 wl3501_pwr_mgmt(dev->priv, WL3501_RESUME); 2093 wl3501_pwr_mgmt(netdev_priv(dev), WL3501_RESUME);
2094 if (link->open) { 2094 if (link->open) {
2095 wl3501_reset(dev); 2095 wl3501_reset(dev);
2096 netif_device_attach(dev); 2096 netif_device_attach(dev);