Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 1 | /* orinoco_nortel.c |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 2 | * |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 3 | * Driver for Prism II devices which would usually be driven by orinoco_cs, |
Pavel Roskin | d495657 | 2005-12-16 18:57:10 -0500 | [diff] [blame] | 4 | * but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in |
| 5 | * Nortel emobility, Symbol LA-4113 and Symbol LA-4123. |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 6 | * |
| 7 | * Copyright (C) 2002 Tobias Hoffmann |
| 8 | * (C) 2003 Christoph Jungegger <disdos@traum404.de> |
| 9 | * |
| 10 | * Some of this code is borrowed from orinoco_plx.c |
| 11 | * Copyright (C) 2001 Daniel Barlow |
| 12 | * Some of this code is borrowed from orinoco_pci.c |
| 13 | * Copyright (C) 2001 Jean Tourrilhes |
| 14 | * Some of this code is "inspired" by linux-wlan-ng-0.1.10, but nothing |
| 15 | * has been copied from it. linux-wlan-ng-0.1.10 is originally : |
| 16 | * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved. |
| 17 | * |
| 18 | * The contents of this file are subject to the Mozilla Public License |
| 19 | * Version 1.1 (the "License"); you may not use this file except in |
| 20 | * compliance with the License. You may obtain a copy of the License |
| 21 | * at http://www.mozilla.org/MPL/ |
| 22 | * |
| 23 | * Software distributed under the License is distributed on an "AS IS" |
| 24 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See |
| 25 | * the License for the specific language governing rights and |
| 26 | * limitations under the License. |
| 27 | * |
| 28 | * Alternatively, the contents of this file may be used under the |
| 29 | * terms of the GNU General Public License version 2 (the "GPL"), in |
| 30 | * which case the provisions of the GPL are applicable instead of the |
| 31 | * above. If you wish to allow the use of your version of this file |
| 32 | * only under the terms of the GPL and not to allow others to use your |
| 33 | * version of this file under the MPL, indicate your decision by |
| 34 | * deleting the provisions above and replace them with the notice and |
| 35 | * other provisions required by the GPL. If you do not delete the |
| 36 | * provisions above, a recipient may use your version of this file |
| 37 | * under either the MPL or the GPL. |
| 38 | */ |
| 39 | |
| 40 | #define DRIVER_NAME "orinoco_nortel" |
| 41 | #define PFX DRIVER_NAME ": " |
| 42 | |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 43 | #include <linux/module.h> |
| 44 | #include <linux/kernel.h> |
| 45 | #include <linux/init.h> |
Pavel Roskin | ef846bf | 2005-09-23 04:18:07 -0400 | [diff] [blame] | 46 | #include <linux/delay.h> |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 47 | #include <linux/pci.h> |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 48 | #include <pcmcia/cisreg.h> |
| 49 | |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 50 | #include "orinoco.h" |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 51 | #include "orinoco_pci.h" |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 52 | |
| 53 | #define COR_OFFSET (0xe0) /* COR attribute offset of Prism2 PC card */ |
| 54 | #define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */ |
| 55 | |
| 56 | |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 57 | /* |
Pavel Roskin | dc3437d | 2006-04-07 04:11:00 -0400 | [diff] [blame] | 58 | * Do a soft reset of the card using the Configuration Option Register |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 59 | * We need this to get going... |
| 60 | * This is the part of the code that is strongly inspired from wlan-ng |
| 61 | * |
| 62 | * Note bis : Don't try to access HERMES_CMD during the reset phase. |
| 63 | * It just won't work ! |
| 64 | */ |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 65 | static int orinoco_nortel_cor_reset(struct orinoco_private *priv) |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 66 | { |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 67 | struct orinoco_pci_card *card = priv->card; |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 68 | |
Pavel Roskin | dc3437d | 2006-04-07 04:11:00 -0400 | [diff] [blame] | 69 | /* Assert the reset until the card notices */ |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 70 | iowrite16(8, card->bridge_io + 2); |
| 71 | ioread16(card->attr_io + COR_OFFSET); |
| 72 | iowrite16(0x80, card->attr_io + COR_OFFSET); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 73 | mdelay(1); |
| 74 | |
| 75 | /* Give time for the card to recover from this hard effort */ |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 76 | iowrite16(0, card->attr_io + COR_OFFSET); |
| 77 | iowrite16(0, card->attr_io + COR_OFFSET); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 78 | mdelay(1); |
| 79 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 80 | /* Set COR as usual */ |
| 81 | iowrite16(COR_VALUE, card->attr_io + COR_OFFSET); |
| 82 | iowrite16(COR_VALUE, card->attr_io + COR_OFFSET); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 83 | mdelay(1); |
| 84 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 85 | iowrite16(0x228, card->bridge_io + 2); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 86 | |
| 87 | return 0; |
| 88 | } |
| 89 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 90 | static int orinoco_nortel_hw_init(struct orinoco_pci_card *card) |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 91 | { |
| 92 | int i; |
| 93 | u32 reg; |
| 94 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 95 | /* Setup bridge */ |
| 96 | if (ioread16(card->bridge_io) & 1) { |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 97 | printk(KERN_ERR PFX "brg1 answer1 wrong\n"); |
| 98 | return -EBUSY; |
| 99 | } |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 100 | iowrite16(0x118, card->bridge_io + 2); |
| 101 | iowrite16(0x108, card->bridge_io + 2); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 102 | mdelay(30); |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 103 | iowrite16(0x8, card->bridge_io + 2); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 104 | for (i = 0; i < 30; i++) { |
| 105 | mdelay(30); |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 106 | if (ioread16(card->bridge_io) & 0x10) { |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 107 | break; |
| 108 | } |
| 109 | } |
| 110 | if (i == 30) { |
| 111 | printk(KERN_ERR PFX "brg1 timed out\n"); |
| 112 | return -EBUSY; |
| 113 | } |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 114 | if (ioread16(card->attr_io + COR_OFFSET) & 1) { |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 115 | printk(KERN_ERR PFX "brg2 answer1 wrong\n"); |
| 116 | return -EBUSY; |
| 117 | } |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 118 | if (ioread16(card->attr_io + COR_OFFSET + 2) & 1) { |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 119 | printk(KERN_ERR PFX "brg2 answer2 wrong\n"); |
| 120 | return -EBUSY; |
| 121 | } |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 122 | if (ioread16(card->attr_io + COR_OFFSET + 4) & 1) { |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 123 | printk(KERN_ERR PFX "brg2 answer3 wrong\n"); |
| 124 | return -EBUSY; |
| 125 | } |
| 126 | |
Pavel Roskin | dc3437d | 2006-04-07 04:11:00 -0400 | [diff] [blame] | 127 | /* Set the PCMCIA COR register */ |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 128 | iowrite16(COR_VALUE, card->attr_io + COR_OFFSET); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 129 | mdelay(1); |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 130 | reg = ioread16(card->attr_io + COR_OFFSET); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 131 | if (reg != COR_VALUE) { |
| 132 | printk(KERN_ERR PFX "Error setting COR value (reg=%x)\n", |
| 133 | reg); |
| 134 | return -EBUSY; |
| 135 | } |
| 136 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 137 | /* Set LEDs */ |
| 138 | iowrite16(1, card->bridge_io + 10); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 139 | return 0; |
| 140 | } |
| 141 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 142 | static int orinoco_nortel_init_one(struct pci_dev *pdev, |
| 143 | const struct pci_device_id *ent) |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 144 | { |
| 145 | int err; |
| 146 | struct orinoco_private *priv; |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 147 | struct orinoco_pci_card *card; |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 148 | struct net_device *dev; |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 149 | void __iomem *hermes_io, *bridge_io, *attr_io; |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 150 | |
| 151 | err = pci_enable_device(pdev); |
| 152 | if (err) { |
| 153 | printk(KERN_ERR PFX "Cannot enable PCI device\n"); |
| 154 | return err; |
| 155 | } |
| 156 | |
| 157 | err = pci_request_regions(pdev, DRIVER_NAME); |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 158 | if (err) { |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 159 | printk(KERN_ERR PFX "Cannot obtain PCI resources\n"); |
| 160 | goto fail_resources; |
| 161 | } |
| 162 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 163 | bridge_io = pci_iomap(pdev, 0, 0); |
| 164 | if (!bridge_io) { |
| 165 | printk(KERN_ERR PFX "Cannot map bridge registers\n"); |
| 166 | err = -EIO; |
| 167 | goto fail_map_bridge; |
| 168 | } |
| 169 | |
| 170 | attr_io = pci_iomap(pdev, 1, 0); |
| 171 | if (!attr_io) { |
| 172 | printk(KERN_ERR PFX "Cannot map PCMCIA attributes\n"); |
| 173 | err = -EIO; |
| 174 | goto fail_map_attr; |
| 175 | } |
| 176 | |
| 177 | hermes_io = pci_iomap(pdev, 2, 0); |
| 178 | if (!hermes_io) { |
| 179 | printk(KERN_ERR PFX "Cannot map chipset registers\n"); |
| 180 | err = -EIO; |
| 181 | goto fail_map_hermes; |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | /* Allocate network device */ |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 185 | dev = alloc_orinocodev(sizeof(*card), orinoco_nortel_cor_reset); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 186 | if (!dev) { |
| 187 | printk(KERN_ERR PFX "Cannot allocate network device\n"); |
| 188 | err = -ENOMEM; |
| 189 | goto fail_alloc; |
| 190 | } |
| 191 | |
| 192 | priv = netdev_priv(dev); |
| 193 | card = priv->card; |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 194 | card->bridge_io = bridge_io; |
| 195 | card->attr_io = attr_io; |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 196 | SET_MODULE_OWNER(dev); |
| 197 | SET_NETDEV_DEV(dev, &pdev->dev); |
| 198 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 199 | hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 200 | |
Thomas Gleixner | 1fb9df5 | 2006-07-01 19:29:39 -0700 | [diff] [blame] | 201 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 202 | dev->name, dev); |
| 203 | if (err) { |
| 204 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); |
| 205 | err = -EBUSY; |
| 206 | goto fail_irq; |
| 207 | } |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 208 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 209 | err = orinoco_nortel_hw_init(card); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 210 | if (err) { |
| 211 | printk(KERN_ERR PFX "Hardware initialization failed\n"); |
| 212 | goto fail; |
| 213 | } |
| 214 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 215 | err = orinoco_nortel_cor_reset(priv); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 216 | if (err) { |
| 217 | printk(KERN_ERR PFX "Initial reset failed\n"); |
| 218 | goto fail; |
| 219 | } |
| 220 | |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 221 | err = register_netdev(dev); |
| 222 | if (err) { |
| 223 | printk(KERN_ERR PFX "Cannot register network device\n"); |
| 224 | goto fail; |
| 225 | } |
| 226 | |
| 227 | pci_set_drvdata(pdev, dev); |
Pavel Roskin | 461c078 | 2006-05-01 02:13:33 -0400 | [diff] [blame] | 228 | printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s\n", dev->name, |
| 229 | pci_name(pdev)); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 230 | |
| 231 | return 0; |
| 232 | |
| 233 | fail: |
| 234 | free_irq(pdev->irq, dev); |
| 235 | |
| 236 | fail_irq: |
| 237 | pci_set_drvdata(pdev, NULL); |
| 238 | free_orinocodev(dev); |
| 239 | |
| 240 | fail_alloc: |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 241 | pci_iounmap(pdev, hermes_io); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 242 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 243 | fail_map_hermes: |
| 244 | pci_iounmap(pdev, attr_io); |
| 245 | |
| 246 | fail_map_attr: |
| 247 | pci_iounmap(pdev, bridge_io); |
| 248 | |
| 249 | fail_map_bridge: |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 250 | pci_release_regions(pdev); |
| 251 | |
| 252 | fail_resources: |
| 253 | pci_disable_device(pdev); |
| 254 | |
| 255 | return err; |
| 256 | } |
| 257 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 258 | static void __devexit orinoco_nortel_remove_one(struct pci_dev *pdev) |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 259 | { |
| 260 | struct net_device *dev = pci_get_drvdata(pdev); |
| 261 | struct orinoco_private *priv = netdev_priv(dev); |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 262 | struct orinoco_pci_card *card = priv->card; |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 263 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 264 | /* Clear LEDs */ |
| 265 | iowrite16(0, card->bridge_io + 10); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 266 | |
| 267 | unregister_netdev(dev); |
Pavel Roskin | 461c078 | 2006-05-01 02:13:33 -0400 | [diff] [blame] | 268 | free_irq(pdev->irq, dev); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 269 | pci_set_drvdata(pdev, NULL); |
| 270 | free_orinocodev(dev); |
| 271 | pci_iounmap(pdev, priv->hw.iobase); |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 272 | pci_iounmap(pdev, card->attr_io); |
| 273 | pci_iounmap(pdev, card->bridge_io); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 274 | pci_release_regions(pdev); |
| 275 | pci_disable_device(pdev); |
| 276 | } |
| 277 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 278 | static struct pci_device_id orinoco_nortel_id_table[] = { |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 279 | /* Nortel emobility PCI */ |
| 280 | {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,}, |
Pavel Roskin | d495657 | 2005-12-16 18:57:10 -0500 | [diff] [blame] | 281 | /* Symbol LA-4123 PCI */ |
| 282 | {0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,}, |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 283 | {0,}, |
| 284 | }; |
| 285 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 286 | MODULE_DEVICE_TABLE(pci, orinoco_nortel_id_table); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 287 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 288 | static struct pci_driver orinoco_nortel_driver = { |
Pavel Roskin | c6fb2e9 | 2006-04-07 04:10:55 -0400 | [diff] [blame] | 289 | .name = DRIVER_NAME, |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 290 | .id_table = orinoco_nortel_id_table, |
| 291 | .probe = orinoco_nortel_init_one, |
| 292 | .remove = __devexit_p(orinoco_nortel_remove_one), |
| 293 | .suspend = orinoco_pci_suspend, |
| 294 | .resume = orinoco_pci_resume, |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 295 | }; |
| 296 | |
| 297 | static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION |
| 298 | " (Tobias Hoffmann & Christoph Jungegger <disdos@traum404.de>)"; |
| 299 | MODULE_AUTHOR("Christoph Jungegger <disdos@traum404.de>"); |
| 300 | MODULE_DESCRIPTION |
| 301 | ("Driver for wireless LAN cards using the Nortel PCI bridge"); |
| 302 | MODULE_LICENSE("Dual MPL/GPL"); |
| 303 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 304 | static int __init orinoco_nortel_init(void) |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 305 | { |
| 306 | printk(KERN_DEBUG "%s\n", version); |
Jeff Garzik | 2991762 | 2006-08-19 17:48:59 -0400 | [diff] [blame] | 307 | return pci_register_driver(&orinoco_nortel_driver); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 308 | } |
| 309 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 310 | static void __exit orinoco_nortel_exit(void) |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 311 | { |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 312 | pci_unregister_driver(&orinoco_nortel_driver); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 313 | } |
| 314 | |
Pavel Roskin | b884c87 | 2006-04-07 04:10:57 -0400 | [diff] [blame] | 315 | module_init(orinoco_nortel_init); |
| 316 | module_exit(orinoco_nortel_exit); |
Pavel Roskin | ec82905 | 2005-09-01 20:08:56 -0400 | [diff] [blame] | 317 | |
| 318 | /* |
| 319 | * Local variables: |
| 320 | * c-indent-level: 8 |
| 321 | * c-basic-offset: 8 |
| 322 | * tab-width: 8 |
| 323 | * End: |
| 324 | */ |