diff options
Diffstat (limited to 'drivers/net/wireless/ray_cs.c')
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index abff8934db1..88560d0ae50 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c @@ -46,7 +46,6 @@ #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> @@ -97,7 +96,6 @@ static iw_stats *ray_get_wireless_stats(struct net_device *dev); static const struct iw_handler_def ray_handler_def; /***** Prototypes for raylink functions **************************************/ -static int asc_to_int(char a); static void authenticate(ray_dev_t *local); static int build_auth_frame(ray_dev_t *local, UCHAR *dest, int auth_type); static void authenticate_timeout(u_long); @@ -316,9 +314,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; @@ -395,7 +392,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); @@ -432,9 +428,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); @@ -448,9 +442,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); @@ -464,9 +456,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); @@ -794,7 +784,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"); @@ -803,13 +792,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"); @@ -1717,24 +1699,6 @@ static void authenticate_timeout(u_long data) } /*===========================================================================*/ -static int asc_to_int(char a) -{ - if (a < '0') - return -1; - if (a <= '9') - return (a - '0'); - if (a < 'A') - return -1; - if (a <= 'F') - return (10 + a - 'A'); - if (a < 'a') - return -1; - if (a <= 'f') - return (10 + a - 'a'); - return -1; -} - -/*===========================================================================*/ static int parse_addr(char *in_str, UCHAR *out) { int len; @@ -1754,14 +1718,14 @@ static int parse_addr(char *in_str, UCHAR *out) i = 5; while (j > 0) { - if ((k = asc_to_int(in_str[j--])) != -1) + if ((k = hex_to_bin(in_str[j--])) != -1) out[i] = k; else return 0; if (j == 0) break; - if ((k = asc_to_int(in_str[j--])) != -1) + if ((k = hex_to_bin(in_str[j--])) != -1) out[i] += k << 4; else return 0; |