Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[pandora-kernel.git] / drivers / net / wireless / ray_cs.c
index 390ccf6..5ca624a 100644 (file)
 #include <linux/if_arp.h>
 #include <linux/ioport.h>
 #include <linux/skbuff.h>
-#include <linux/ethtool.h>
 #include <linux/ieee80211.h>
 
-#include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/cisreg.h>
@@ -81,8 +79,6 @@ static int ray_dev_config(struct net_device *dev, struct ifmap *map);
 static struct net_device_stats *ray_get_stats(struct net_device *dev);
 static int ray_dev_init(struct net_device *dev);
 
-static const struct ethtool_ops netdev_ethtool_ops;
-
 static int ray_open(struct net_device *dev);
 static netdev_tx_t ray_dev_start_xmit(struct sk_buff *skb,
                                            struct net_device *dev);
@@ -315,9 +311,8 @@ static int ray_probe(struct pcmcia_device *p_dev)
        local->finder = p_dev;
 
        /* The io structure describes IO port mapping. None used here */
-       p_dev->io.NumPorts1 = 0;
-       p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
-       p_dev->io.IOAddrLines = 5;
+       p_dev->resource[0]->end = 0;
+       p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
 
        /* General socket configuration */
        p_dev->conf.Attributes = CONF_ENABLE_IRQ;
@@ -335,7 +330,6 @@ static int ray_probe(struct pcmcia_device *p_dev)
 
        /* Raylink entries in the device structure */
        dev->netdev_ops = &ray_netdev_ops;
-       SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
        dev->wireless_handlers = &ray_handler_def;
 #ifdef WIRELESS_SPY
        local->wireless_data.spy_data = &local->spy_data;
@@ -394,7 +388,6 @@ static int ray_config(struct pcmcia_device *link)
        int ret = 0;
        int i;
        win_req_t req;
-       memreq_t mem;
        struct net_device *dev = (struct net_device *)link->priv;
        ray_dev_t *local = netdev_priv(dev);
 
@@ -431,9 +424,7 @@ static int ray_config(struct pcmcia_device *link)
        ret = pcmcia_request_window(link, &req, &link->win);
        if (ret)
                goto failed;
-       mem.CardOffset = 0x0000;
-       mem.Page = 0;
-       ret = pcmcia_map_mem_page(link, link->win, &mem);
+       ret = pcmcia_map_mem_page(link, link->win, 0);
        if (ret)
                goto failed;
        local->sram = ioremap(req.Base, req.Size);
@@ -447,9 +438,7 @@ static int ray_config(struct pcmcia_device *link)
        ret = pcmcia_request_window(link, &req, &local->rmem_handle);
        if (ret)
                goto failed;
-       mem.CardOffset = 0x8000;
-       mem.Page = 0;
-       ret = pcmcia_map_mem_page(link, local->rmem_handle, &mem);
+       ret = pcmcia_map_mem_page(link, local->rmem_handle, 0x8000);
        if (ret)
                goto failed;
        local->rmem = ioremap(req.Base, req.Size);
@@ -463,9 +452,7 @@ static int ray_config(struct pcmcia_device *link)
        ret = pcmcia_request_window(link, &req, &local->amem_handle);
        if (ret)
                goto failed;
-       mem.CardOffset = 0x0000;
-       mem.Page = 0;
-       ret = pcmcia_map_mem_page(link, local->amem_handle, &mem);
+       ret = pcmcia_map_mem_page(link, local->amem_handle, 0);
        if (ret)
                goto failed;
        local->amem = ioremap(req.Base, req.Size);
@@ -617,7 +604,7 @@ static int dl_startup_params(struct net_device *dev)
        /* Start kernel timer to wait for dl startup to complete. */
        local->timer.expires = jiffies + HZ / 2;
        local->timer.data = (long)local;
-       local->timer.function = &verify_dl_startup;
+       local->timer.function = verify_dl_startup;
        add_timer(&local->timer);
        dev_dbg(&link->dev,
              "ray_cs dl_startup_params started timer for verify_dl_startup\n");
@@ -793,7 +780,6 @@ static void ray_release(struct pcmcia_device *link)
 {
        struct net_device *dev = link->priv;
        ray_dev_t *local = netdev_priv(dev);
-       int i;
 
        dev_dbg(&link->dev, "ray_release\n");
 
@@ -802,13 +788,6 @@ static void ray_release(struct pcmcia_device *link)
        iounmap(local->sram);
        iounmap(local->rmem);
        iounmap(local->amem);
-       /* Do bother checking to see if these succeed or not */
-       i = pcmcia_release_window(link, local->amem_handle);
-       if (i != 0)
-               dev_dbg(&link->dev, "ReleaseWindow(local->amem) ret = %x\n", i);
-       i = pcmcia_release_window(link, local->rmem_handle);
-       if (i != 0)
-               dev_dbg(&link->dev, "ReleaseWindow(local->rmem) ret = %x\n", i);
        pcmcia_disable_device(link);
 
        dev_dbg(&link->dev, "ray_release ending\n");
@@ -1079,18 +1058,6 @@ AP to AP 1       1       dest AP         src AP          dest    source
        }
 } /* end encapsulate_frame */
 
-/*===========================================================================*/
-
-static void netdev_get_drvinfo(struct net_device *dev,
-                              struct ethtool_drvinfo *info)
-{
-       strcpy(info->driver, "ray_cs");
-}
-
-static const struct ethtool_ops netdev_ethtool_ops = {
-       .get_drvinfo = netdev_get_drvinfo,
-};
-
 /*====================================================================*/
 
 /*------------------------------------------------------------------*/
@@ -2014,12 +1981,12 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
                                        dev_dbg(&link->dev,
                                              "ray_cs interrupt network \"%s\" start failed\n",
                                              local->sparm.b4.a_current_ess_id);
-                                       local->timer.function = &start_net;
+                                       local->timer.function = start_net;
                                } else {
                                        dev_dbg(&link->dev,
                                              "ray_cs interrupt network \"%s\" join failed\n",
                                              local->sparm.b4.a_current_ess_id);
-                                       local->timer.function = &join_net;
+                                       local->timer.function = join_net;
                                }
                                add_timer(&local->timer);
                        }
@@ -2487,9 +2454,9 @@ static void authenticate(ray_dev_t *local)
 
        del_timer(&local->timer);
        if (build_auth_frame(local, local->bss_id, OPEN_AUTH_REQUEST)) {
-               local->timer.function = &join_net;
+               local->timer.function = join_net;
        } else {
-               local->timer.function = &authenticate_timeout;
+               local->timer.function = authenticate_timeout;
        }
        local->timer.expires = jiffies + HZ * 2;
        local->timer.data = (long)local;
@@ -2574,7 +2541,7 @@ static void associate(ray_dev_t *local)
                del_timer(&local->timer);
                local->timer.expires = jiffies + HZ * 2;
                local->timer.data = (long)local;
-               local->timer.function = &join_net;
+               local->timer.function = join_net;
                add_timer(&local->timer);
                local->card_status = CARD_ASSOC_FAILED;
                return;