aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/airo.c171
1 files changed, 86 insertions, 85 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 7c99f5a5b332..d7388d2aee97 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -1270,6 +1270,7 @@ static int flashrestart(struct airo_info *ai,struct net_device *dev);
1270#define airo_print_err(name, fmt, args...) \ 1270#define airo_print_err(name, fmt, args...) \
1271 airo_print(KERN_ERR, name, fmt, ##args) 1271 airo_print(KERN_ERR, name, fmt, ##args)
1272 1272
1273#define AIRO_FLASH(dev) (((struct airo_info *)dev->ml_priv)->flash)
1273 1274
1274/*********************************************************************** 1275/***********************************************************************
1275 * MIC ROUTINES * 1276 * MIC ROUTINES *
@@ -1865,7 +1866,7 @@ static void try_auto_wep(struct airo_info *ai)
1865} 1866}
1866 1867
1867static int airo_open(struct net_device *dev) { 1868static int airo_open(struct net_device *dev) {
1868 struct airo_info *ai = dev->priv; 1869 struct airo_info *ai = dev->ml_priv;
1869 int rc = 0; 1870 int rc = 0;
1870 1871
1871 if (test_bit(FLAG_FLASHING, &ai->flags)) 1872 if (test_bit(FLAG_FLASHING, &ai->flags))
@@ -1912,7 +1913,7 @@ static int airo_open(struct net_device *dev) {
1912static int mpi_start_xmit(struct sk_buff *skb, struct net_device *dev) { 1913static int mpi_start_xmit(struct sk_buff *skb, struct net_device *dev) {
1913 int npacks, pending; 1914 int npacks, pending;
1914 unsigned long flags; 1915 unsigned long flags;
1915 struct airo_info *ai = dev->priv; 1916 struct airo_info *ai = dev->ml_priv;
1916 1917
1917 if (!skb) { 1918 if (!skb) {
1918 airo_print_err(dev->name, "%s: skb == NULL!",__func__); 1919 airo_print_err(dev->name, "%s: skb == NULL!",__func__);
@@ -1956,7 +1957,7 @@ static int mpi_send_packet (struct net_device *dev)
1956 unsigned char *buffer; 1957 unsigned char *buffer;
1957 s16 len; 1958 s16 len;
1958 __le16 *payloadLen; 1959 __le16 *payloadLen;
1959 struct airo_info *ai = dev->priv; 1960 struct airo_info *ai = dev->ml_priv;
1960 u8 *sendbuf; 1961 u8 *sendbuf;
1961 1962
1962 /* get a packet to send */ 1963 /* get a packet to send */
@@ -2085,7 +2086,7 @@ static void get_tx_error(struct airo_info *ai, s32 fid)
2085static void airo_end_xmit(struct net_device *dev) { 2086static void airo_end_xmit(struct net_device *dev) {
2086 u16 status; 2087 u16 status;
2087 int i; 2088 int i;
2088 struct airo_info *priv = dev->priv; 2089 struct airo_info *priv = dev->ml_priv;
2089 struct sk_buff *skb = priv->xmit.skb; 2090 struct sk_buff *skb = priv->xmit.skb;
2090 int fid = priv->xmit.fid; 2091 int fid = priv->xmit.fid;
2091 u32 *fids = priv->fids; 2092 u32 *fids = priv->fids;
@@ -2111,7 +2112,7 @@ static void airo_end_xmit(struct net_device *dev) {
2111static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) { 2112static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) {
2112 s16 len; 2113 s16 len;
2113 int i, j; 2114 int i, j;
2114 struct airo_info *priv = dev->priv; 2115 struct airo_info *priv = dev->ml_priv;
2115 u32 *fids = priv->fids; 2116 u32 *fids = priv->fids;
2116 2117
2117 if ( skb == NULL ) { 2118 if ( skb == NULL ) {
@@ -2150,7 +2151,7 @@ static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) {
2150static void airo_end_xmit11(struct net_device *dev) { 2151static void airo_end_xmit11(struct net_device *dev) {
2151 u16 status; 2152 u16 status;
2152 int i; 2153 int i;
2153 struct airo_info *priv = dev->priv; 2154 struct airo_info *priv = dev->ml_priv;
2154 struct sk_buff *skb = priv->xmit11.skb; 2155 struct sk_buff *skb = priv->xmit11.skb;
2155 int fid = priv->xmit11.fid; 2156 int fid = priv->xmit11.fid;
2156 u32 *fids = priv->fids; 2157 u32 *fids = priv->fids;
@@ -2176,7 +2177,7 @@ static void airo_end_xmit11(struct net_device *dev) {
2176static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) { 2177static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) {
2177 s16 len; 2178 s16 len;
2178 int i, j; 2179 int i, j;
2179 struct airo_info *priv = dev->priv; 2180 struct airo_info *priv = dev->ml_priv;
2180 u32 *fids = priv->fids; 2181 u32 *fids = priv->fids;
2181 2182
2182 if (test_bit(FLAG_MPI, &priv->flags)) { 2183 if (test_bit(FLAG_MPI, &priv->flags)) {
@@ -2220,7 +2221,7 @@ static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) {
2220 2221
2221static void airo_read_stats(struct net_device *dev) 2222static void airo_read_stats(struct net_device *dev)
2222{ 2223{
2223 struct airo_info *ai = dev->priv; 2224 struct airo_info *ai = dev->ml_priv;
2224 StatsRid stats_rid; 2225 StatsRid stats_rid;
2225 __le32 *vals = stats_rid.vals; 2226 __le32 *vals = stats_rid.vals;
2226 2227
@@ -2254,7 +2255,7 @@ static void airo_read_stats(struct net_device *dev)
2254 2255
2255static struct net_device_stats *airo_get_stats(struct net_device *dev) 2256static struct net_device_stats *airo_get_stats(struct net_device *dev)
2256{ 2257{
2257 struct airo_info *local = dev->priv; 2258 struct airo_info *local = dev->ml_priv;
2258 2259
2259 if (!test_bit(JOB_STATS, &local->jobs)) { 2260 if (!test_bit(JOB_STATS, &local->jobs)) {
2260 /* Get stats out of the card if available */ 2261 /* Get stats out of the card if available */
@@ -2281,7 +2282,7 @@ static void airo_set_promisc(struct airo_info *ai) {
2281} 2282}
2282 2283
2283static void airo_set_multicast_list(struct net_device *dev) { 2284static void airo_set_multicast_list(struct net_device *dev) {
2284 struct airo_info *ai = dev->priv; 2285 struct airo_info *ai = dev->ml_priv;
2285 2286
2286 if ((dev->flags ^ ai->flags) & IFF_PROMISC) { 2287 if ((dev->flags ^ ai->flags) & IFF_PROMISC) {
2287 change_bit(FLAG_PROMISC, &ai->flags); 2288 change_bit(FLAG_PROMISC, &ai->flags);
@@ -2299,7 +2300,7 @@ static void airo_set_multicast_list(struct net_device *dev) {
2299 2300
2300static int airo_set_mac_address(struct net_device *dev, void *p) 2301static int airo_set_mac_address(struct net_device *dev, void *p)
2301{ 2302{
2302 struct airo_info *ai = dev->priv; 2303 struct airo_info *ai = dev->ml_priv;
2303 struct sockaddr *addr = p; 2304 struct sockaddr *addr = p;
2304 2305
2305 readConfigRid(ai, 1); 2306 readConfigRid(ai, 1);
@@ -2339,7 +2340,7 @@ static void del_airo_dev(struct airo_info *ai)
2339} 2340}
2340 2341
2341static int airo_close(struct net_device *dev) { 2342static int airo_close(struct net_device *dev) {
2342 struct airo_info *ai = dev->priv; 2343 struct airo_info *ai = dev->ml_priv;
2343 2344
2344 netif_stop_queue(dev); 2345 netif_stop_queue(dev);
2345 2346
@@ -2365,7 +2366,7 @@ static int airo_close(struct net_device *dev) {
2365 2366
2366void stop_airo_card( struct net_device *dev, int freeres ) 2367void stop_airo_card( struct net_device *dev, int freeres )
2367{ 2368{
2368 struct airo_info *ai = dev->priv; 2369 struct airo_info *ai = dev->ml_priv;
2369 2370
2370 set_bit(FLAG_RADIO_DOWN, &ai->flags); 2371 set_bit(FLAG_RADIO_DOWN, &ai->flags);
2371 disable_MAC(ai, 1); 2372 disable_MAC(ai, 1);
@@ -2665,7 +2666,7 @@ static struct net_device *init_wifidev(struct airo_info *ai,
2665 struct net_device *dev = alloc_netdev(0, "wifi%d", wifi_setup); 2666 struct net_device *dev = alloc_netdev(0, "wifi%d", wifi_setup);
2666 if (!dev) 2667 if (!dev)
2667 return NULL; 2668 return NULL;
2668 dev->priv = ethdev->priv; 2669 dev->ml_priv = ethdev->ml_priv;
2669 dev->irq = ethdev->irq; 2670 dev->irq = ethdev->irq;
2670 dev->base_addr = ethdev->base_addr; 2671 dev->base_addr = ethdev->base_addr;
2671 dev->wireless_data = ethdev->wireless_data; 2672 dev->wireless_data = ethdev->wireless_data;
@@ -2680,7 +2681,7 @@ static struct net_device *init_wifidev(struct airo_info *ai,
2680} 2681}
2681 2682
2682static int reset_card( struct net_device *dev , int lock) { 2683static int reset_card( struct net_device *dev , int lock) {
2683 struct airo_info *ai = dev->priv; 2684 struct airo_info *ai = dev->ml_priv;
2684 2685
2685 if (lock && down_interruptible(&ai->sem)) 2686 if (lock && down_interruptible(&ai->sem))
2686 return -1; 2687 return -1;
@@ -2765,7 +2766,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2765 return NULL; 2766 return NULL;
2766 } 2767 }
2767 2768
2768 ai = dev->priv; 2769 ai = dev->ml_priv = netdev_priv(dev);
2769 ai->wifidev = NULL; 2770 ai->wifidev = NULL;
2770 ai->flags = 1 << FLAG_RADIO_DOWN; 2771 ai->flags = 1 << FLAG_RADIO_DOWN;
2771 ai->jobs = 0; 2772 ai->jobs = 0;
@@ -2866,7 +2867,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2866 for( i = 0; i < MAX_FIDS; i++ ) 2867 for( i = 0; i < MAX_FIDS; i++ )
2867 ai->fids[i] = transmit_allocate(ai,AIRO_DEF_MTU,i>=MAX_FIDS/2); 2868 ai->fids[i] = transmit_allocate(ai,AIRO_DEF_MTU,i>=MAX_FIDS/2);
2868 2869
2869 if (setup_proc_entry(dev, dev->priv) < 0) 2870 if (setup_proc_entry(dev, dev->ml_priv) < 0)
2870 goto err_out_wifi; 2871 goto err_out_wifi;
2871 2872
2872 return dev; 2873 return dev;
@@ -2915,7 +2916,7 @@ static int waitbusy (struct airo_info *ai) {
2915int reset_airo_card( struct net_device *dev ) 2916int reset_airo_card( struct net_device *dev )
2916{ 2917{
2917 int i; 2918 int i;
2918 struct airo_info *ai = dev->priv; 2919 struct airo_info *ai = dev->ml_priv;
2919 2920
2920 if (reset_card (dev, 1)) 2921 if (reset_card (dev, 1))
2921 return -1; 2922 return -1;
@@ -2938,7 +2939,7 @@ int reset_airo_card( struct net_device *dev )
2938EXPORT_SYMBOL(reset_airo_card); 2939EXPORT_SYMBOL(reset_airo_card);
2939 2940
2940static void airo_send_event(struct net_device *dev) { 2941static void airo_send_event(struct net_device *dev) {
2941 struct airo_info *ai = dev->priv; 2942 struct airo_info *ai = dev->ml_priv;
2942 union iwreq_data wrqu; 2943 union iwreq_data wrqu;
2943 StatusRid status_rid; 2944 StatusRid status_rid;
2944 2945
@@ -3015,7 +3016,7 @@ out:
3015 3016
3016static int airo_thread(void *data) { 3017static int airo_thread(void *data) {
3017 struct net_device *dev = data; 3018 struct net_device *dev = data;
3018 struct airo_info *ai = dev->priv; 3019 struct airo_info *ai = dev->ml_priv;
3019 int locked; 3020 int locked;
3020 3021
3021 set_freezable(); 3022 set_freezable();
@@ -3130,7 +3131,7 @@ static irqreturn_t airo_interrupt(int irq, void *dev_id)
3130 struct net_device *dev = dev_id; 3131 struct net_device *dev = dev_id;
3131 u16 status; 3132 u16 status;
3132 u16 fid; 3133 u16 fid;
3133 struct airo_info *apriv = dev->priv; 3134 struct airo_info *apriv = dev->ml_priv;
3134 u16 savedInterrupts = 0; 3135 u16 savedInterrupts = 0;
3135 int handled = 0; 3136 int handled = 0;
3136 3137
@@ -4600,7 +4601,7 @@ static int proc_status_open(struct inode *inode, struct file *file)
4600 struct proc_data *data; 4601 struct proc_data *data;
4601 struct proc_dir_entry *dp = PDE(inode); 4602 struct proc_dir_entry *dp = PDE(inode);
4602 struct net_device *dev = dp->data; 4603 struct net_device *dev = dp->data;
4603 struct airo_info *apriv = dev->priv; 4604 struct airo_info *apriv = dev->ml_priv;
4604 CapabilityRid cap_rid; 4605 CapabilityRid cap_rid;
4605 StatusRid status_rid; 4606 StatusRid status_rid;
4606 u16 mode; 4607 u16 mode;
@@ -4683,7 +4684,7 @@ static int proc_stats_rid_open( struct inode *inode,
4683 struct proc_data *data; 4684 struct proc_data *data;
4684 struct proc_dir_entry *dp = PDE(inode); 4685 struct proc_dir_entry *dp = PDE(inode);
4685 struct net_device *dev = dp->data; 4686 struct net_device *dev = dp->data;
4686 struct airo_info *apriv = dev->priv; 4687 struct airo_info *apriv = dev->ml_priv;
4687 StatsRid stats; 4688 StatsRid stats;
4688 int i, j; 4689 int i, j;
4689 __le32 *vals = stats.vals; 4690 __le32 *vals = stats.vals;
@@ -4746,7 +4747,7 @@ static void proc_config_on_close(struct inode *inode, struct file *file)
4746 struct proc_data *data = file->private_data; 4747 struct proc_data *data = file->private_data;
4747 struct proc_dir_entry *dp = PDE(inode); 4748 struct proc_dir_entry *dp = PDE(inode);
4748 struct net_device *dev = dp->data; 4749 struct net_device *dev = dp->data;
4749 struct airo_info *ai = dev->priv; 4750 struct airo_info *ai = dev->ml_priv;
4750 char *line; 4751 char *line;
4751 4752
4752 if ( !data->writelen ) return; 4753 if ( !data->writelen ) return;
@@ -4958,7 +4959,7 @@ static int proc_config_open(struct inode *inode, struct file *file)
4958 struct proc_data *data; 4959 struct proc_data *data;
4959 struct proc_dir_entry *dp = PDE(inode); 4960 struct proc_dir_entry *dp = PDE(inode);
4960 struct net_device *dev = dp->data; 4961 struct net_device *dev = dp->data;
4961 struct airo_info *ai = dev->priv; 4962 struct airo_info *ai = dev->ml_priv;
4962 int i; 4963 int i;
4963 __le16 mode; 4964 __le16 mode;
4964 4965
@@ -5049,7 +5050,7 @@ static void proc_SSID_on_close(struct inode *inode, struct file *file)
5049 struct proc_data *data = (struct proc_data *)file->private_data; 5050 struct proc_data *data = (struct proc_data *)file->private_data;
5050 struct proc_dir_entry *dp = PDE(inode); 5051 struct proc_dir_entry *dp = PDE(inode);
5051 struct net_device *dev = dp->data; 5052 struct net_device *dev = dp->data;
5052 struct airo_info *ai = dev->priv; 5053 struct airo_info *ai = dev->ml_priv;
5053 SsidRid SSID_rid; 5054 SsidRid SSID_rid;
5054 int i; 5055 int i;
5055 char *p = data->wbuffer; 5056 char *p = data->wbuffer;
@@ -5092,7 +5093,7 @@ static void proc_APList_on_close( struct inode *inode, struct file *file ) {
5092 struct proc_data *data = (struct proc_data *)file->private_data; 5093 struct proc_data *data = (struct proc_data *)file->private_data;
5093 struct proc_dir_entry *dp = PDE(inode); 5094 struct proc_dir_entry *dp = PDE(inode);
5094 struct net_device *dev = dp->data; 5095 struct net_device *dev = dp->data;
5095 struct airo_info *ai = dev->priv; 5096 struct airo_info *ai = dev->ml_priv;
5096 APListRid APList_rid; 5097 APListRid APList_rid;
5097 int i; 5098 int i;
5098 5099
@@ -5187,7 +5188,7 @@ static void proc_wepkey_on_close( struct inode *inode, struct file *file ) {
5187 struct proc_data *data; 5188 struct proc_data *data;
5188 struct proc_dir_entry *dp = PDE(inode); 5189 struct proc_dir_entry *dp = PDE(inode);
5189 struct net_device *dev = dp->data; 5190 struct net_device *dev = dp->data;
5190 struct airo_info *ai = dev->priv; 5191 struct airo_info *ai = dev->ml_priv;
5191 int i; 5192 int i;
5192 char key[16]; 5193 char key[16];
5193 u16 index = 0; 5194 u16 index = 0;
@@ -5229,7 +5230,7 @@ static int proc_wepkey_open( struct inode *inode, struct file *file )
5229 struct proc_data *data; 5230 struct proc_data *data;
5230 struct proc_dir_entry *dp = PDE(inode); 5231 struct proc_dir_entry *dp = PDE(inode);
5231 struct net_device *dev = dp->data; 5232 struct net_device *dev = dp->data;
5232 struct airo_info *ai = dev->priv; 5233 struct airo_info *ai = dev->ml_priv;
5233 char *ptr; 5234 char *ptr;
5234 WepKeyRid wkr; 5235 WepKeyRid wkr;
5235 __le16 lastindex; 5236 __le16 lastindex;
@@ -5278,7 +5279,7 @@ static int proc_SSID_open(struct inode *inode, struct file *file)
5278 struct proc_data *data; 5279 struct proc_data *data;
5279 struct proc_dir_entry *dp = PDE(inode); 5280 struct proc_dir_entry *dp = PDE(inode);
5280 struct net_device *dev = dp->data; 5281 struct net_device *dev = dp->data;
5281 struct airo_info *ai = dev->priv; 5282 struct airo_info *ai = dev->ml_priv;
5282 int i; 5283 int i;
5283 char *ptr; 5284 char *ptr;
5284 SsidRid SSID_rid; 5285 SsidRid SSID_rid;
@@ -5322,7 +5323,7 @@ static int proc_APList_open( struct inode *inode, struct file *file ) {
5322 struct proc_data *data; 5323 struct proc_data *data;
5323 struct proc_dir_entry *dp = PDE(inode); 5324 struct proc_dir_entry *dp = PDE(inode);
5324 struct net_device *dev = dp->data; 5325 struct net_device *dev = dp->data;
5325 struct airo_info *ai = dev->priv; 5326 struct airo_info *ai = dev->ml_priv;
5326 int i; 5327 int i;
5327 char *ptr; 5328 char *ptr;
5328 APListRid APList_rid; 5329 APListRid APList_rid;
@@ -5362,7 +5363,7 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) {
5362 struct proc_data *data; 5363 struct proc_data *data;
5363 struct proc_dir_entry *dp = PDE(inode); 5364 struct proc_dir_entry *dp = PDE(inode);
5364 struct net_device *dev = dp->data; 5365 struct net_device *dev = dp->data;
5365 struct airo_info *ai = dev->priv; 5366 struct airo_info *ai = dev->ml_priv;
5366 char *ptr; 5367 char *ptr;
5367 BSSListRid BSSList_rid; 5368 BSSListRid BSSList_rid;
5368 int rc; 5369 int rc;
@@ -5440,7 +5441,7 @@ static int proc_close( struct inode *inode, struct file *file )
5440 associated we will check every minute to see if anything has 5441 associated we will check every minute to see if anything has
5441 changed. */ 5442 changed. */
5442static void timer_func( struct net_device *dev ) { 5443static void timer_func( struct net_device *dev ) {
5443 struct airo_info *apriv = dev->priv; 5444 struct airo_info *apriv = dev->ml_priv;
5444 5445
5445/* We don't have a link so try changing the authtype */ 5446/* We don't have a link so try changing the authtype */
5446 readConfigRid(apriv, 0); 5447 readConfigRid(apriv, 0);
@@ -5511,7 +5512,7 @@ static void __devexit airo_pci_remove(struct pci_dev *pdev)
5511static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state) 5512static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state)
5512{ 5513{
5513 struct net_device *dev = pci_get_drvdata(pdev); 5514 struct net_device *dev = pci_get_drvdata(pdev);
5514 struct airo_info *ai = dev->priv; 5515 struct airo_info *ai = dev->ml_priv;
5515 Cmd cmd; 5516 Cmd cmd;
5516 Resp rsp; 5517 Resp rsp;
5517 5518
@@ -5543,7 +5544,7 @@ static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state)
5543static int airo_pci_resume(struct pci_dev *pdev) 5544static int airo_pci_resume(struct pci_dev *pdev)
5544{ 5545{
5545 struct net_device *dev = pci_get_drvdata(pdev); 5546 struct net_device *dev = pci_get_drvdata(pdev);
5546 struct airo_info *ai = dev->priv; 5547 struct airo_info *ai = dev->ml_priv;
5547 pci_power_t prev_state = pdev->current_state; 5548 pci_power_t prev_state = pdev->current_state;
5548 5549
5549 pci_set_power_state(pdev, PCI_D0); 5550 pci_set_power_state(pdev, PCI_D0);
@@ -5722,7 +5723,7 @@ static int airo_set_freq(struct net_device *dev,
5722 struct iw_freq *fwrq, 5723 struct iw_freq *fwrq,
5723 char *extra) 5724 char *extra)
5724{ 5725{
5725 struct airo_info *local = dev->priv; 5726 struct airo_info *local = dev->ml_priv;
5726 int rc = -EINPROGRESS; /* Call commit handler */ 5727 int rc = -EINPROGRESS; /* Call commit handler */
5727 5728
5728 /* If setting by frequency, convert to a channel */ 5729 /* If setting by frequency, convert to a channel */
@@ -5767,7 +5768,7 @@ static int airo_get_freq(struct net_device *dev,
5767 struct iw_freq *fwrq, 5768 struct iw_freq *fwrq,
5768 char *extra) 5769 char *extra)
5769{ 5770{
5770 struct airo_info *local = dev->priv; 5771 struct airo_info *local = dev->ml_priv;
5771 StatusRid status_rid; /* Card status info */ 5772 StatusRid status_rid; /* Card status info */
5772 int ch; 5773 int ch;
5773 5774
@@ -5798,7 +5799,7 @@ static int airo_set_essid(struct net_device *dev,
5798 struct iw_point *dwrq, 5799 struct iw_point *dwrq,
5799 char *extra) 5800 char *extra)
5800{ 5801{
5801 struct airo_info *local = dev->priv; 5802 struct airo_info *local = dev->ml_priv;
5802 SsidRid SSID_rid; /* SSIDs */ 5803 SsidRid SSID_rid; /* SSIDs */
5803 5804
5804 /* Reload the list of current SSID */ 5805 /* Reload the list of current SSID */
@@ -5844,7 +5845,7 @@ static int airo_get_essid(struct net_device *dev,
5844 struct iw_point *dwrq, 5845 struct iw_point *dwrq,
5845 char *extra) 5846 char *extra)
5846{ 5847{
5847 struct airo_info *local = dev->priv; 5848 struct airo_info *local = dev->ml_priv;
5848 StatusRid status_rid; /* Card status info */ 5849 StatusRid status_rid; /* Card status info */
5849 5850
5850 readStatusRid(local, &status_rid, 1); 5851 readStatusRid(local, &status_rid, 1);
@@ -5872,7 +5873,7 @@ static int airo_set_wap(struct net_device *dev,
5872 struct sockaddr *awrq, 5873 struct sockaddr *awrq,
5873 char *extra) 5874 char *extra)
5874{ 5875{
5875 struct airo_info *local = dev->priv; 5876 struct airo_info *local = dev->ml_priv;
5876 Cmd cmd; 5877 Cmd cmd;
5877 Resp rsp; 5878 Resp rsp;
5878 APListRid APList_rid; 5879 APListRid APList_rid;
@@ -5909,7 +5910,7 @@ static int airo_get_wap(struct net_device *dev,
5909 struct sockaddr *awrq, 5910 struct sockaddr *awrq,
5910 char *extra) 5911 char *extra)
5911{ 5912{
5912 struct airo_info *local = dev->priv; 5913 struct airo_info *local = dev->ml_priv;
5913 StatusRid status_rid; /* Card status info */ 5914 StatusRid status_rid; /* Card status info */
5914 5915
5915 readStatusRid(local, &status_rid, 1); 5916 readStatusRid(local, &status_rid, 1);
@@ -5930,7 +5931,7 @@ static int airo_set_nick(struct net_device *dev,
5930 struct iw_point *dwrq, 5931 struct iw_point *dwrq,
5931 char *extra) 5932 char *extra)
5932{ 5933{
5933 struct airo_info *local = dev->priv; 5934 struct airo_info *local = dev->ml_priv;
5934 5935
5935 /* Check the size of the string */ 5936 /* Check the size of the string */
5936 if(dwrq->length > 16) { 5937 if(dwrq->length > 16) {
@@ -5953,7 +5954,7 @@ static int airo_get_nick(struct net_device *dev,
5953 struct iw_point *dwrq, 5954 struct iw_point *dwrq,
5954 char *extra) 5955 char *extra)
5955{ 5956{
5956 struct airo_info *local = dev->priv; 5957 struct airo_info *local = dev->ml_priv;
5957 5958
5958 readConfigRid(local, 1); 5959 readConfigRid(local, 1);
5959 strncpy(extra, local->config.nodeName, 16); 5960 strncpy(extra, local->config.nodeName, 16);
@@ -5972,7 +5973,7 @@ static int airo_set_rate(struct net_device *dev,
5972 struct iw_param *vwrq, 5973 struct iw_param *vwrq,
5973 char *extra) 5974 char *extra)
5974{ 5975{
5975 struct airo_info *local = dev->priv; 5976 struct airo_info *local = dev->ml_priv;
5976 CapabilityRid cap_rid; /* Card capability info */ 5977 CapabilityRid cap_rid; /* Card capability info */
5977 u8 brate = 0; 5978 u8 brate = 0;
5978 int i; 5979 int i;
@@ -6042,7 +6043,7 @@ static int airo_get_rate(struct net_device *dev,
6042 struct iw_param *vwrq, 6043 struct iw_param *vwrq,
6043 char *extra) 6044 char *extra)
6044{ 6045{
6045 struct airo_info *local = dev->priv; 6046 struct airo_info *local = dev->ml_priv;
6046 StatusRid status_rid; /* Card status info */ 6047 StatusRid status_rid; /* Card status info */
6047 6048
6048 readStatusRid(local, &status_rid, 1); 6049 readStatusRid(local, &status_rid, 1);
@@ -6064,7 +6065,7 @@ static int airo_set_rts(struct net_device *dev,
6064 struct iw_param *vwrq, 6065 struct iw_param *vwrq,
6065 char *extra) 6066 char *extra)
6066{ 6067{
6067 struct airo_info *local = dev->priv; 6068 struct airo_info *local = dev->ml_priv;
6068 int rthr = vwrq->value; 6069 int rthr = vwrq->value;
6069 6070
6070 if(vwrq->disabled) 6071 if(vwrq->disabled)
@@ -6088,7 +6089,7 @@ static int airo_get_rts(struct net_device *dev,
6088 struct iw_param *vwrq, 6089 struct iw_param *vwrq,
6089 char *extra) 6090 char *extra)
6090{ 6091{
6091 struct airo_info *local = dev->priv; 6092 struct airo_info *local = dev->ml_priv;
6092 6093
6093 readConfigRid(local, 1); 6094 readConfigRid(local, 1);
6094 vwrq->value = le16_to_cpu(local->config.rtsThres); 6095 vwrq->value = le16_to_cpu(local->config.rtsThres);
@@ -6107,7 +6108,7 @@ static int airo_set_frag(struct net_device *dev,
6107 struct iw_param *vwrq, 6108 struct iw_param *vwrq,
6108 char *extra) 6109 char *extra)
6109{ 6110{
6110 struct airo_info *local = dev->priv; 6111 struct airo_info *local = dev->ml_priv;
6111 int fthr = vwrq->value; 6112 int fthr = vwrq->value;
6112 6113
6113 if(vwrq->disabled) 6114 if(vwrq->disabled)
@@ -6132,7 +6133,7 @@ static int airo_get_frag(struct net_device *dev,
6132 struct iw_param *vwrq, 6133 struct iw_param *vwrq,
6133 char *extra) 6134 char *extra)
6134{ 6135{
6135 struct airo_info *local = dev->priv; 6136 struct airo_info *local = dev->ml_priv;
6136 6137
6137 readConfigRid(local, 1); 6138 readConfigRid(local, 1);
6138 vwrq->value = le16_to_cpu(local->config.fragThresh); 6139 vwrq->value = le16_to_cpu(local->config.fragThresh);
@@ -6151,7 +6152,7 @@ static int airo_set_mode(struct net_device *dev,
6151 __u32 *uwrq, 6152 __u32 *uwrq,
6152 char *extra) 6153 char *extra)
6153{ 6154{
6154 struct airo_info *local = dev->priv; 6155 struct airo_info *local = dev->ml_priv;
6155 int reset = 0; 6156 int reset = 0;
6156 6157
6157 readConfigRid(local, 1); 6158 readConfigRid(local, 1);
@@ -6214,7 +6215,7 @@ static int airo_get_mode(struct net_device *dev,
6214 __u32 *uwrq, 6215 __u32 *uwrq,
6215 char *extra) 6216 char *extra)
6216{ 6217{
6217 struct airo_info *local = dev->priv; 6218 struct airo_info *local = dev->ml_priv;
6218 6219
6219 readConfigRid(local, 1); 6220 readConfigRid(local, 1);
6220 /* If not managed, assume it's ad-hoc */ 6221 /* If not managed, assume it's ad-hoc */
@@ -6251,7 +6252,7 @@ static int airo_set_encode(struct net_device *dev,
6251 struct iw_point *dwrq, 6252 struct iw_point *dwrq,
6252 char *extra) 6253 char *extra)
6253{ 6254{
6254 struct airo_info *local = dev->priv; 6255 struct airo_info *local = dev->ml_priv;
6255 CapabilityRid cap_rid; /* Card capability info */ 6256 CapabilityRid cap_rid; /* Card capability info */
6256 int perm = ( dwrq->flags & IW_ENCODE_TEMP ? 0 : 1 ); 6257 int perm = ( dwrq->flags & IW_ENCODE_TEMP ? 0 : 1 );
6257 __le16 currentAuthType = local->config.authType; 6258 __le16 currentAuthType = local->config.authType;
@@ -6338,7 +6339,7 @@ static int airo_get_encode(struct net_device *dev,
6338 struct iw_point *dwrq, 6339 struct iw_point *dwrq,
6339 char *extra) 6340 char *extra)
6340{ 6341{
6341 struct airo_info *local = dev->priv; 6342 struct airo_info *local = dev->ml_priv;
6342 int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; 6343 int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
6343 CapabilityRid cap_rid; /* Card capability info */ 6344 CapabilityRid cap_rid; /* Card capability info */
6344 6345
@@ -6386,7 +6387,7 @@ static int airo_set_encodeext(struct net_device *dev,
6386 union iwreq_data *wrqu, 6387 union iwreq_data *wrqu,
6387 char *extra) 6388 char *extra)
6388{ 6389{
6389 struct airo_info *local = dev->priv; 6390 struct airo_info *local = dev->ml_priv;
6390 struct iw_point *encoding = &wrqu->encoding; 6391 struct iw_point *encoding = &wrqu->encoding;
6391 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; 6392 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
6392 CapabilityRid cap_rid; /* Card capability info */ 6393 CapabilityRid cap_rid; /* Card capability info */
@@ -6472,7 +6473,7 @@ static int airo_get_encodeext(struct net_device *dev,
6472 union iwreq_data *wrqu, 6473 union iwreq_data *wrqu,
6473 char *extra) 6474 char *extra)
6474{ 6475{
6475 struct airo_info *local = dev->priv; 6476 struct airo_info *local = dev->ml_priv;
6476 struct iw_point *encoding = &wrqu->encoding; 6477 struct iw_point *encoding = &wrqu->encoding;
6477 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; 6478 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
6478 CapabilityRid cap_rid; /* Card capability info */ 6479 CapabilityRid cap_rid; /* Card capability info */
@@ -6535,7 +6536,7 @@ static int airo_set_auth(struct net_device *dev,
6535 struct iw_request_info *info, 6536 struct iw_request_info *info,
6536 union iwreq_data *wrqu, char *extra) 6537 union iwreq_data *wrqu, char *extra)
6537{ 6538{
6538 struct airo_info *local = dev->priv; 6539 struct airo_info *local = dev->ml_priv;
6539 struct iw_param *param = &wrqu->param; 6540 struct iw_param *param = &wrqu->param;
6540 __le16 currentAuthType = local->config.authType; 6541 __le16 currentAuthType = local->config.authType;
6541 6542
@@ -6603,7 +6604,7 @@ static int airo_get_auth(struct net_device *dev,
6603 struct iw_request_info *info, 6604 struct iw_request_info *info,
6604 union iwreq_data *wrqu, char *extra) 6605 union iwreq_data *wrqu, char *extra)
6605{ 6606{
6606 struct airo_info *local = dev->priv; 6607 struct airo_info *local = dev->ml_priv;
6607 struct iw_param *param = &wrqu->param; 6608 struct iw_param *param = &wrqu->param;
6608 __le16 currentAuthType = local->config.authType; 6609 __le16 currentAuthType = local->config.authType;
6609 6610
@@ -6652,7 +6653,7 @@ static int airo_set_txpow(struct net_device *dev,
6652 struct iw_param *vwrq, 6653 struct iw_param *vwrq,
6653 char *extra) 6654 char *extra)
6654{ 6655{
6655 struct airo_info *local = dev->priv; 6656 struct airo_info *local = dev->ml_priv;
6656 CapabilityRid cap_rid; /* Card capability info */ 6657 CapabilityRid cap_rid; /* Card capability info */
6657 int i; 6658 int i;
6658 int rc = -EINVAL; 6659 int rc = -EINVAL;
@@ -6689,7 +6690,7 @@ static int airo_get_txpow(struct net_device *dev,
6689 struct iw_param *vwrq, 6690 struct iw_param *vwrq,
6690 char *extra) 6691 char *extra)
6691{ 6692{
6692 struct airo_info *local = dev->priv; 6693 struct airo_info *local = dev->ml_priv;
6693 6694
6694 readConfigRid(local, 1); 6695 readConfigRid(local, 1);
6695 vwrq->value = le16_to_cpu(local->config.txPower); 6696 vwrq->value = le16_to_cpu(local->config.txPower);
@@ -6709,7 +6710,7 @@ static int airo_set_retry(struct net_device *dev,
6709 struct iw_param *vwrq, 6710 struct iw_param *vwrq,
6710 char *extra) 6711 char *extra)
6711{ 6712{
6712 struct airo_info *local = dev->priv; 6713 struct airo_info *local = dev->ml_priv;
6713 int rc = -EINVAL; 6714 int rc = -EINVAL;
6714 6715
6715 if(vwrq->disabled) { 6716 if(vwrq->disabled) {
@@ -6747,7 +6748,7 @@ static int airo_get_retry(struct net_device *dev,
6747 struct iw_param *vwrq, 6748 struct iw_param *vwrq,
6748 char *extra) 6749 char *extra)
6749{ 6750{
6750 struct airo_info *local = dev->priv; 6751 struct airo_info *local = dev->ml_priv;
6751 6752
6752 vwrq->disabled = 0; /* Can't be disabled */ 6753 vwrq->disabled = 0; /* Can't be disabled */
6753 6754
@@ -6778,7 +6779,7 @@ static int airo_get_range(struct net_device *dev,
6778 struct iw_point *dwrq, 6779 struct iw_point *dwrq,
6779 char *extra) 6780 char *extra)
6780{ 6781{
6781 struct airo_info *local = dev->priv; 6782 struct airo_info *local = dev->ml_priv;
6782 struct iw_range *range = (struct iw_range *) extra; 6783 struct iw_range *range = (struct iw_range *) extra;
6783 CapabilityRid cap_rid; /* Card capability info */ 6784 CapabilityRid cap_rid; /* Card capability info */
6784 int i; 6785 int i;
@@ -6903,7 +6904,7 @@ static int airo_set_power(struct net_device *dev,
6903 struct iw_param *vwrq, 6904 struct iw_param *vwrq,
6904 char *extra) 6905 char *extra)
6905{ 6906{
6906 struct airo_info *local = dev->priv; 6907 struct airo_info *local = dev->ml_priv;
6907 6908
6908 readConfigRid(local, 1); 6909 readConfigRid(local, 1);
6909 if (vwrq->disabled) { 6910 if (vwrq->disabled) {
@@ -6960,7 +6961,7 @@ static int airo_get_power(struct net_device *dev,
6960 struct iw_param *vwrq, 6961 struct iw_param *vwrq,
6961 char *extra) 6962 char *extra)
6962{ 6963{
6963 struct airo_info *local = dev->priv; 6964 struct airo_info *local = dev->ml_priv;
6964 __le16 mode; 6965 __le16 mode;
6965 6966
6966 readConfigRid(local, 1); 6967 readConfigRid(local, 1);
@@ -6991,7 +6992,7 @@ static int airo_set_sens(struct net_device *dev,
6991 struct iw_param *vwrq, 6992 struct iw_param *vwrq,
6992 char *extra) 6993 char *extra)
6993{ 6994{
6994 struct airo_info *local = dev->priv; 6995 struct airo_info *local = dev->ml_priv;
6995 6996
6996 readConfigRid(local, 1); 6997 readConfigRid(local, 1);
6997 local->config.rssiThreshold = 6998 local->config.rssiThreshold =
@@ -7010,7 +7011,7 @@ static int airo_get_sens(struct net_device *dev,
7010 struct iw_param *vwrq, 7011 struct iw_param *vwrq,
7011 char *extra) 7012 char *extra)
7012{ 7013{
7013 struct airo_info *local = dev->priv; 7014 struct airo_info *local = dev->ml_priv;
7014 7015
7015 readConfigRid(local, 1); 7016 readConfigRid(local, 1);
7016 vwrq->value = le16_to_cpu(local->config.rssiThreshold); 7017 vwrq->value = le16_to_cpu(local->config.rssiThreshold);
@@ -7030,7 +7031,7 @@ static int airo_get_aplist(struct net_device *dev,
7030 struct iw_point *dwrq, 7031 struct iw_point *dwrq,
7031 char *extra) 7032 char *extra)
7032{ 7033{
7033 struct airo_info *local = dev->priv; 7034 struct airo_info *local = dev->ml_priv;
7034 struct sockaddr *address = (struct sockaddr *) extra; 7035 struct sockaddr *address = (struct sockaddr *) extra;
7035 struct iw_quality qual[IW_MAX_AP]; 7036 struct iw_quality qual[IW_MAX_AP];
7036 BSSListRid BSSList; 7037 BSSListRid BSSList;
@@ -7103,7 +7104,7 @@ static int airo_set_scan(struct net_device *dev,
7103 struct iw_point *dwrq, 7104 struct iw_point *dwrq,
7104 char *extra) 7105 char *extra)
7105{ 7106{
7106 struct airo_info *ai = dev->priv; 7107 struct airo_info *ai = dev->ml_priv;
7107 Cmd cmd; 7108 Cmd cmd;
7108 Resp rsp; 7109 Resp rsp;
7109 int wake = 0; 7110 int wake = 0;
@@ -7149,7 +7150,7 @@ static inline char *airo_translate_scan(struct net_device *dev,
7149 char *end_buf, 7150 char *end_buf,
7150 BSSListRid *bss) 7151 BSSListRid *bss)
7151{ 7152{
7152 struct airo_info *ai = dev->priv; 7153 struct airo_info *ai = dev->ml_priv;
7153 struct iw_event iwe; /* Temporary buffer */ 7154 struct iw_event iwe; /* Temporary buffer */
7154 __le16 capabilities; 7155 __le16 capabilities;
7155 char * current_val; /* For rates */ 7156 char * current_val; /* For rates */
@@ -7331,7 +7332,7 @@ static int airo_get_scan(struct net_device *dev,
7331 struct iw_point *dwrq, 7332 struct iw_point *dwrq,
7332 char *extra) 7333 char *extra)
7333{ 7334{
7334 struct airo_info *ai = dev->priv; 7335 struct airo_info *ai = dev->ml_priv;
7335 BSSListElement *net; 7336 BSSListElement *net;
7336 int err = 0; 7337 int err = 0;
7337 char *current_ev = extra; 7338 char *current_ev = extra;
@@ -7375,7 +7376,7 @@ static int airo_config_commit(struct net_device *dev,
7375 void *zwrq, /* NULL */ 7376 void *zwrq, /* NULL */
7376 char *extra) /* NULL */ 7377 char *extra) /* NULL */
7377{ 7378{
7378 struct airo_info *local = dev->priv; 7379 struct airo_info *local = dev->ml_priv;
7379 7380
7380 if (!test_bit (FLAG_COMMIT, &local->flags)) 7381 if (!test_bit (FLAG_COMMIT, &local->flags))
7381 return 0; 7382 return 0;
@@ -7520,7 +7521,7 @@ static const struct iw_handler_def airo_handler_def =
7520static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 7521static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
7521{ 7522{
7522 int rc = 0; 7523 int rc = 0;
7523 struct airo_info *ai = (struct airo_info *)dev->priv; 7524 struct airo_info *ai = dev->ml_priv;
7524 7525
7525 if (ai->power.event) 7526 if (ai->power.event)
7526 return 0; 7527 return 0;
@@ -7648,7 +7649,7 @@ static void airo_read_wireless_stats(struct airo_info *local)
7648 7649
7649static struct iw_statistics *airo_get_wireless_stats(struct net_device *dev) 7650static struct iw_statistics *airo_get_wireless_stats(struct net_device *dev)
7650{ 7651{
7651 struct airo_info *local = dev->priv; 7652 struct airo_info *local = dev->ml_priv;
7652 7653
7653 if (!test_bit(JOB_WSTATS, &local->jobs)) { 7654 if (!test_bit(JOB_WSTATS, &local->jobs)) {
7654 /* Get stats out of the card if available */ 7655 /* Get stats out of the card if available */
@@ -7673,7 +7674,7 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) {
7673 unsigned short ridcode; 7674 unsigned short ridcode;
7674 unsigned char *iobuf; 7675 unsigned char *iobuf;
7675 int len; 7676 int len;
7676 struct airo_info *ai = dev->priv; 7677 struct airo_info *ai = dev->ml_priv;
7677 7678
7678 if (test_bit(FLAG_FLASHING, &ai->flags)) 7679 if (test_bit(FLAG_FLASHING, &ai->flags))
7679 return -EIO; 7680 return -EIO;
@@ -7739,7 +7740,7 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) {
7739 */ 7740 */
7740 7741
7741static int writerids(struct net_device *dev, aironet_ioctl *comp) { 7742static int writerids(struct net_device *dev, aironet_ioctl *comp) {
7742 struct airo_info *ai = dev->priv; 7743 struct airo_info *ai = dev->ml_priv;
7743 int ridcode; 7744 int ridcode;
7744 int enabled; 7745 int enabled;
7745 static int (* writer)(struct airo_info *, u16 rid, const void *, int, int); 7746 static int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
@@ -7862,41 +7863,41 @@ static int flashcard(struct net_device *dev, aironet_ioctl *comp) {
7862 switch(comp->command) 7863 switch(comp->command)
7863 { 7864 {
7864 case AIROFLSHRST: 7865 case AIROFLSHRST:
7865 return cmdreset((struct airo_info *)dev->priv); 7866 return cmdreset((struct airo_info *)dev->ml_priv);
7866 7867
7867 case AIROFLSHSTFL: 7868 case AIROFLSHSTFL:
7868 if (!((struct airo_info *)dev->priv)->flash && 7869 if (!AIRO_FLASH(dev) &&
7869 (((struct airo_info *)dev->priv)->flash = kmalloc (FLASHSIZE, GFP_KERNEL)) == NULL) 7870 (AIRO_FLASH(dev) = kmalloc(FLASHSIZE, GFP_KERNEL)) == NULL)
7870 return -ENOMEM; 7871 return -ENOMEM;
7871 return setflashmode((struct airo_info *)dev->priv); 7872 return setflashmode((struct airo_info *)dev->ml_priv);
7872 7873
7873 case AIROFLSHGCHR: /* Get char from aux */ 7874 case AIROFLSHGCHR: /* Get char from aux */
7874 if(comp->len != sizeof(int)) 7875 if(comp->len != sizeof(int))
7875 return -EINVAL; 7876 return -EINVAL;
7876 if (copy_from_user(&z,comp->data,comp->len)) 7877 if (copy_from_user(&z,comp->data,comp->len))
7877 return -EFAULT; 7878 return -EFAULT;
7878 return flashgchar((struct airo_info *)dev->priv,z,8000); 7879 return flashgchar((struct airo_info *)dev->ml_priv, z, 8000);
7879 7880
7880 case AIROFLSHPCHR: /* Send char to card. */ 7881 case AIROFLSHPCHR: /* Send char to card. */
7881 if(comp->len != sizeof(int)) 7882 if(comp->len != sizeof(int))
7882 return -EINVAL; 7883 return -EINVAL;
7883 if (copy_from_user(&z,comp->data,comp->len)) 7884 if (copy_from_user(&z,comp->data,comp->len))
7884 return -EFAULT; 7885 return -EFAULT;
7885 return flashpchar((struct airo_info *)dev->priv,z,8000); 7886 return flashpchar((struct airo_info *)dev->ml_priv, z, 8000);
7886 7887
7887 case AIROFLPUTBUF: /* Send 32k to card */ 7888 case AIROFLPUTBUF: /* Send 32k to card */
7888 if (!((struct airo_info *)dev->priv)->flash) 7889 if (!AIRO_FLASH(dev))
7889 return -ENOMEM; 7890 return -ENOMEM;
7890 if(comp->len > FLASHSIZE) 7891 if(comp->len > FLASHSIZE)
7891 return -EINVAL; 7892 return -EINVAL;
7892 if(copy_from_user(((struct airo_info *)dev->priv)->flash,comp->data,comp->len)) 7893 if (copy_from_user(AIRO_FLASH(dev), comp->data, comp->len))
7893 return -EFAULT; 7894 return -EFAULT;
7894 7895
7895 flashputbuf((struct airo_info *)dev->priv); 7896 flashputbuf((struct airo_info *)dev->ml_priv);
7896 return 0; 7897 return 0;
7897 7898
7898 case AIRORESTART: 7899 case AIRORESTART:
7899 if(flashrestart((struct airo_info *)dev->priv,dev)) 7900 if (flashrestart((struct airo_info *)dev->ml_priv, dev))
7900 return -EIO; 7901 return -EIO;
7901 return 0; 7902 return 0;
7902 } 7903 }