diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /drivers/net/wireless/prism54 | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/net/wireless/prism54')
-rw-r--r-- | drivers/net/wireless/prism54/isl_38xx.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/isl_38xx.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 61 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/isl_oid.h | 48 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.h | 11 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_eth.c | 28 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_eth.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_hotplug.c | 43 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_mgt.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_mgt.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/oid_mgt.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/prismcompat.h | 4 |
14 files changed, 125 insertions, 123 deletions
diff --git a/drivers/net/wireless/prism54/isl_38xx.c b/drivers/net/wireless/prism54/isl_38xx.c index 23deee69974b..02fc67bccbd0 100644 --- a/drivers/net/wireless/prism54/isl_38xx.c +++ b/drivers/net/wireless/prism54/isl_38xx.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * Copyright (C) 2003-2004 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>_ | 3 | * Copyright (C) 2003-2004 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>_ |
5 | * | 4 | * |
@@ -38,7 +37,7 @@ | |||
38 | * isl38xx_disable_interrupts - disable all interrupts | 37 | * isl38xx_disable_interrupts - disable all interrupts |
39 | * @device: pci memory base address | 38 | * @device: pci memory base address |
40 | * | 39 | * |
41 | * Instructs the device to disable all interrupt reporting by asserting | 40 | * Instructs the device to disable all interrupt reporting by asserting |
42 | * the IRQ line. New events may still show up in the interrupt identification | 41 | * the IRQ line. New events may still show up in the interrupt identification |
43 | * register located at offset %ISL38XX_INT_IDENT_REG. | 42 | * register located at offset %ISL38XX_INT_IDENT_REG. |
44 | */ | 43 | */ |
@@ -204,17 +203,19 @@ isl38xx_interface_reset(void __iomem *device_base, dma_addr_t host_address) | |||
204 | /* enable the interrupt for detecting initialization */ | 203 | /* enable the interrupt for detecting initialization */ |
205 | 204 | ||
206 | /* Note: Do not enable other interrupts here. We want the | 205 | /* Note: Do not enable other interrupts here. We want the |
207 | * device to have come up first 100% before allowing any other | 206 | * device to have come up first 100% before allowing any other |
208 | * interrupts. */ | 207 | * interrupts. */ |
209 | isl38xx_w32_flush(device_base, ISL38XX_INT_IDENT_INIT, ISL38XX_INT_EN_REG); | 208 | isl38xx_w32_flush(device_base, ISL38XX_INT_IDENT_INIT, ISL38XX_INT_EN_REG); |
210 | udelay(ISL38XX_WRITEIO_DELAY); /* allow complete full reset */ | 209 | udelay(ISL38XX_WRITEIO_DELAY); /* allow complete full reset */ |
211 | } | 210 | } |
212 | 211 | ||
213 | void | 212 | void |
214 | isl38xx_enable_common_interrupts(void __iomem *device_base) { | 213 | isl38xx_enable_common_interrupts(void __iomem *device_base) |
214 | { | ||
215 | u32 reg; | 215 | u32 reg; |
216 | reg = ( ISL38XX_INT_IDENT_UPDATE | | 216 | |
217 | ISL38XX_INT_IDENT_SLEEP | ISL38XX_INT_IDENT_WAKEUP); | 217 | reg = ISL38XX_INT_IDENT_UPDATE | ISL38XX_INT_IDENT_SLEEP | |
218 | ISL38XX_INT_IDENT_WAKEUP; | ||
218 | isl38xx_w32_flush(device_base, reg, ISL38XX_INT_EN_REG); | 219 | isl38xx_w32_flush(device_base, reg, ISL38XX_INT_EN_REG); |
219 | udelay(ISL38XX_WRITEIO_DELAY); | 220 | udelay(ISL38XX_WRITEIO_DELAY); |
220 | } | 221 | } |
@@ -234,23 +235,21 @@ isl38xx_in_queue(isl38xx_control_block *cb, int queue) | |||
234 | /* send queues */ | 235 | /* send queues */ |
235 | case ISL38XX_CB_TX_MGMTQ: | 236 | case ISL38XX_CB_TX_MGMTQ: |
236 | BUG_ON(delta > ISL38XX_CB_MGMT_QSIZE); | 237 | BUG_ON(delta > ISL38XX_CB_MGMT_QSIZE); |
238 | |||
237 | case ISL38XX_CB_TX_DATA_LQ: | 239 | case ISL38XX_CB_TX_DATA_LQ: |
238 | case ISL38XX_CB_TX_DATA_HQ: | 240 | case ISL38XX_CB_TX_DATA_HQ: |
239 | BUG_ON(delta > ISL38XX_CB_TX_QSIZE); | 241 | BUG_ON(delta > ISL38XX_CB_TX_QSIZE); |
240 | return delta; | 242 | return delta; |
241 | break; | ||
242 | 243 | ||
243 | /* receive queues */ | 244 | /* receive queues */ |
244 | case ISL38XX_CB_RX_MGMTQ: | 245 | case ISL38XX_CB_RX_MGMTQ: |
245 | BUG_ON(delta > ISL38XX_CB_MGMT_QSIZE); | 246 | BUG_ON(delta > ISL38XX_CB_MGMT_QSIZE); |
246 | return ISL38XX_CB_MGMT_QSIZE - delta; | 247 | return ISL38XX_CB_MGMT_QSIZE - delta; |
247 | break; | ||
248 | 248 | ||
249 | case ISL38XX_CB_RX_DATA_LQ: | 249 | case ISL38XX_CB_RX_DATA_LQ: |
250 | case ISL38XX_CB_RX_DATA_HQ: | 250 | case ISL38XX_CB_RX_DATA_HQ: |
251 | BUG_ON(delta > ISL38XX_CB_RX_QSIZE); | 251 | BUG_ON(delta > ISL38XX_CB_RX_QSIZE); |
252 | return ISL38XX_CB_RX_QSIZE - delta; | 252 | return ISL38XX_CB_RX_QSIZE - delta; |
253 | break; | ||
254 | } | 253 | } |
255 | BUG(); | 254 | BUG(); |
256 | return 0; | 255 | return 0; |
diff --git a/drivers/net/wireless/prism54/isl_38xx.h b/drivers/net/wireless/prism54/isl_38xx.h index 8af20980af8d..3fadcb6f5297 100644 --- a/drivers/net/wireless/prism54/isl_38xx.h +++ b/drivers/net/wireless/prism54/isl_38xx.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * | 3 | * |
5 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
@@ -67,10 +66,10 @@ | |||
67 | * @base: (host) memory base address of the device | 66 | * @base: (host) memory base address of the device |
68 | * @val: 32bit value (host order) to write | 67 | * @val: 32bit value (host order) to write |
69 | * @offset: byte offset into @base to write value to | 68 | * @offset: byte offset into @base to write value to |
70 | * | 69 | * |
71 | * This helper takes care of writing a 32bit datum to the | 70 | * This helper takes care of writing a 32bit datum to the |
72 | * specified offset into the device's pci memory space, and making sure | 71 | * specified offset into the device's pci memory space, and making sure |
73 | * the pci memory buffers get flushed by performing one harmless read | 72 | * the pci memory buffers get flushed by performing one harmless read |
74 | * from the %ISL38XX_PCI_POSTING_FLUSH offset. | 73 | * from the %ISL38XX_PCI_POSTING_FLUSH offset. |
75 | */ | 74 | */ |
76 | static inline void | 75 | static inline void |
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index e7700b4257eb..a87eb51886c8 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * (C) 2003,2004 Aurelien Alleaume <slts@free.fr> | 3 | * (C) 2003,2004 Aurelien Alleaume <slts@free.fr> |
5 | * (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> | 4 | * (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> |
@@ -55,12 +54,12 @@ static const unsigned char scan_rate_list[] = { 2, 4, 11, 22, | |||
55 | * prism54_mib_mode_helper - MIB change mode helper function | 54 | * prism54_mib_mode_helper - MIB change mode helper function |
56 | * @mib: the &struct islpci_mib object to modify | 55 | * @mib: the &struct islpci_mib object to modify |
57 | * @iw_mode: new mode (%IW_MODE_*) | 56 | * @iw_mode: new mode (%IW_MODE_*) |
58 | * | 57 | * |
59 | * This is a helper function, hence it does not lock. Make sure | 58 | * This is a helper function, hence it does not lock. Make sure |
60 | * caller deals with locking *if* necessary. This function sets the | 59 | * caller deals with locking *if* necessary. This function sets the |
61 | * mode-dependent mib values and does the mapping of the Linux | 60 | * mode-dependent mib values and does the mapping of the Linux |
62 | * Wireless API modes to Device firmware modes. It also checks for | 61 | * Wireless API modes to Device firmware modes. It also checks for |
63 | * correct valid Linux wireless modes. | 62 | * correct valid Linux wireless modes. |
64 | */ | 63 | */ |
65 | static int | 64 | static int |
66 | prism54_mib_mode_helper(islpci_private *priv, u32 iw_mode) | 65 | prism54_mib_mode_helper(islpci_private *priv, u32 iw_mode) |
@@ -118,7 +117,7 @@ prism54_mib_mode_helper(islpci_private *priv, u32 iw_mode) | |||
118 | * | 117 | * |
119 | * this function initializes the struct given as @mib with defaults, | 118 | * this function initializes the struct given as @mib with defaults, |
120 | * of which many are retrieved from the global module parameter | 119 | * of which many are retrieved from the global module parameter |
121 | * variables. | 120 | * variables. |
122 | */ | 121 | */ |
123 | 122 | ||
124 | void | 123 | void |
@@ -134,7 +133,7 @@ prism54_mib_init(islpci_private *priv) | |||
134 | authen = CARD_DEFAULT_AUTHEN; | 133 | authen = CARD_DEFAULT_AUTHEN; |
135 | wep = CARD_DEFAULT_WEP; | 134 | wep = CARD_DEFAULT_WEP; |
136 | filter = CARD_DEFAULT_FILTER; /* (0) Do not filter un-encrypted data */ | 135 | filter = CARD_DEFAULT_FILTER; /* (0) Do not filter un-encrypted data */ |
137 | dot1x = CARD_DEFAULT_DOT1X; | 136 | dot1x = CARD_DEFAULT_DOT1X; |
138 | mlme = CARD_DEFAULT_MLME_MODE; | 137 | mlme = CARD_DEFAULT_MLME_MODE; |
139 | conformance = CARD_DEFAULT_CONFORMANCE; | 138 | conformance = CARD_DEFAULT_CONFORMANCE; |
140 | power = 127; | 139 | power = 127; |
@@ -229,7 +228,7 @@ prism54_get_wireless_stats(struct net_device *ndev) | |||
229 | } else | 228 | } else |
230 | priv->iwstatistics.qual.updated = 0; | 229 | priv->iwstatistics.qual.updated = 0; |
231 | 230 | ||
232 | /* Update our wireless stats, but do not schedule to often | 231 | /* Update our wireless stats, but do not schedule to often |
233 | * (max 1 HZ) */ | 232 | * (max 1 HZ) */ |
234 | if ((priv->stats_timestamp == 0) || | 233 | if ((priv->stats_timestamp == 0) || |
235 | time_after(jiffies, priv->stats_timestamp + 1 * HZ)) { | 234 | time_after(jiffies, priv->stats_timestamp + 1 * HZ)) { |
@@ -706,7 +705,7 @@ prism54_get_scan(struct net_device *ndev, struct iw_request_info *info, | |||
706 | * Starting with WE-17, the buffer can be as big as needed. | 705 | * Starting with WE-17, the buffer can be as big as needed. |
707 | * But the device won't repport anything if you change the value | 706 | * But the device won't repport anything if you change the value |
708 | * of IWMAX_BSS=24. */ | 707 | * of IWMAX_BSS=24. */ |
709 | 708 | ||
710 | rvalue |= mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r); | 709 | rvalue |= mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r); |
711 | bsslist = r.ptr; | 710 | bsslist = r.ptr; |
712 | 711 | ||
@@ -786,7 +785,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info, | |||
786 | return rvalue; | 785 | return rvalue; |
787 | } | 786 | } |
788 | 787 | ||
789 | /* Provides no functionality, just completes the ioctl. In essence this is a | 788 | /* Provides no functionality, just completes the ioctl. In essence this is a |
790 | * just a cosmetic ioctl. | 789 | * just a cosmetic ioctl. |
791 | */ | 790 | */ |
792 | static int | 791 | static int |
@@ -1105,7 +1104,7 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info, | |||
1105 | &key); | 1104 | &key); |
1106 | } | 1105 | } |
1107 | /* | 1106 | /* |
1108 | * If a valid key is set, encryption should be enabled | 1107 | * If a valid key is set, encryption should be enabled |
1109 | * (user may turn it off later). | 1108 | * (user may turn it off later). |
1110 | * This is also how "iwconfig ethX key on" works | 1109 | * This is also how "iwconfig ethX key on" works |
1111 | */ | 1110 | */ |
@@ -1127,7 +1126,7 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info, | |||
1127 | } | 1126 | } |
1128 | /* now read the flags */ | 1127 | /* now read the flags */ |
1129 | if (dwrq->flags & IW_ENCODE_DISABLED) { | 1128 | if (dwrq->flags & IW_ENCODE_DISABLED) { |
1130 | /* Encoding disabled, | 1129 | /* Encoding disabled, |
1131 | * authen = DOT11_AUTH_OS; | 1130 | * authen = DOT11_AUTH_OS; |
1132 | * invoke = 0; | 1131 | * invoke = 0; |
1133 | * exunencrypt = 0; */ | 1132 | * exunencrypt = 0; */ |
@@ -1215,7 +1214,7 @@ prism54_get_txpower(struct net_device *ndev, struct iw_request_info *info, | |||
1215 | vwrq->value = (s32) r.u / 4; | 1214 | vwrq->value = (s32) r.u / 4; |
1216 | vwrq->fixed = 1; | 1215 | vwrq->fixed = 1; |
1217 | /* radio is not turned of | 1216 | /* radio is not turned of |
1218 | * btw: how is possible to turn off only the radio | 1217 | * btw: how is possible to turn off only the radio |
1219 | */ | 1218 | */ |
1220 | vwrq->disabled = 0; | 1219 | vwrq->disabled = 0; |
1221 | 1220 | ||
@@ -2355,17 +2354,17 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2355 | handle_request(priv, mlme, oid); | 2354 | handle_request(priv, mlme, oid); |
2356 | send_formatted_event(priv, "Authenticate request (ex)", mlme, 1); | 2355 | send_formatted_event(priv, "Authenticate request (ex)", mlme, 1); |
2357 | 2356 | ||
2358 | if (priv->iw_mode != IW_MODE_MASTER | 2357 | if (priv->iw_mode != IW_MODE_MASTER |
2359 | && mlmeex->state != DOT11_STATE_AUTHING) | 2358 | && mlmeex->state != DOT11_STATE_AUTHING) |
2360 | break; | 2359 | break; |
2361 | 2360 | ||
2362 | confirm = kmalloc(sizeof(struct obj_mlmeex) + 6, GFP_ATOMIC); | 2361 | confirm = kmalloc(sizeof(struct obj_mlmeex) + 6, GFP_ATOMIC); |
2363 | 2362 | ||
2364 | if (!confirm) | 2363 | if (!confirm) |
2365 | break; | 2364 | break; |
2366 | 2365 | ||
2367 | memcpy(&confirm->address, mlmeex->address, ETH_ALEN); | 2366 | memcpy(&confirm->address, mlmeex->address, ETH_ALEN); |
2368 | printk(KERN_DEBUG "Authenticate from: address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", | 2367 | printk(KERN_DEBUG "Authenticate from: address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", |
2369 | mlmeex->address[0], | 2368 | mlmeex->address[0], |
2370 | mlmeex->address[1], | 2369 | mlmeex->address[1], |
2371 | mlmeex->address[2], | 2370 | mlmeex->address[2], |
@@ -2399,10 +2398,10 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2399 | handle_request(priv, mlme, oid); | 2398 | handle_request(priv, mlme, oid); |
2400 | send_formatted_event(priv, "Associate request (ex)", mlme, 1); | 2399 | send_formatted_event(priv, "Associate request (ex)", mlme, 1); |
2401 | 2400 | ||
2402 | if (priv->iw_mode != IW_MODE_MASTER | 2401 | if (priv->iw_mode != IW_MODE_MASTER |
2403 | && mlmeex->state != DOT11_STATE_ASSOCING) | 2402 | && mlmeex->state != DOT11_STATE_ASSOCING) |
2404 | break; | 2403 | break; |
2405 | 2404 | ||
2406 | confirm = kmalloc(sizeof(struct obj_mlmeex), GFP_ATOMIC); | 2405 | confirm = kmalloc(sizeof(struct obj_mlmeex), GFP_ATOMIC); |
2407 | 2406 | ||
2408 | if (!confirm) | 2407 | if (!confirm) |
@@ -2418,7 +2417,7 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2418 | 2417 | ||
2419 | if (!wpa_ie_len) { | 2418 | if (!wpa_ie_len) { |
2420 | printk(KERN_DEBUG "No WPA IE found from " | 2419 | printk(KERN_DEBUG "No WPA IE found from " |
2421 | "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", | 2420 | "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", |
2422 | mlmeex->address[0], | 2421 | mlmeex->address[0], |
2423 | mlmeex->address[1], | 2422 | mlmeex->address[1], |
2424 | mlmeex->address[2], | 2423 | mlmeex->address[2], |
@@ -2436,14 +2435,14 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2436 | mgt_set_varlen(priv, oid, confirm, wpa_ie_len); | 2435 | mgt_set_varlen(priv, oid, confirm, wpa_ie_len); |
2437 | 2436 | ||
2438 | kfree(confirm); | 2437 | kfree(confirm); |
2439 | 2438 | ||
2440 | break; | 2439 | break; |
2441 | 2440 | ||
2442 | case DOT11_OID_REASSOCIATEEX: | 2441 | case DOT11_OID_REASSOCIATEEX: |
2443 | handle_request(priv, mlme, oid); | 2442 | handle_request(priv, mlme, oid); |
2444 | send_formatted_event(priv, "Reassociate request (ex)", mlme, 1); | 2443 | send_formatted_event(priv, "Reassociate request (ex)", mlme, 1); |
2445 | 2444 | ||
2446 | if (priv->iw_mode != IW_MODE_MASTER | 2445 | if (priv->iw_mode != IW_MODE_MASTER |
2447 | && mlmeex->state != DOT11_STATE_ASSOCING) | 2446 | && mlmeex->state != DOT11_STATE_ASSOCING) |
2448 | break; | 2447 | break; |
2449 | 2448 | ||
@@ -2462,7 +2461,7 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2462 | 2461 | ||
2463 | if (!wpa_ie_len) { | 2462 | if (!wpa_ie_len) { |
2464 | printk(KERN_DEBUG "No WPA IE found from " | 2463 | printk(KERN_DEBUG "No WPA IE found from " |
2465 | "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", | 2464 | "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", |
2466 | mlmeex->address[0], | 2465 | mlmeex->address[0], |
2467 | mlmeex->address[1], | 2466 | mlmeex->address[1], |
2468 | mlmeex->address[2], | 2467 | mlmeex->address[2], |
@@ -2474,13 +2473,13 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2474 | break; | 2473 | break; |
2475 | } | 2474 | } |
2476 | 2475 | ||
2477 | confirm->size = wpa_ie_len; | 2476 | confirm->size = wpa_ie_len; |
2478 | memcpy(&confirm->data, wpa_ie, wpa_ie_len); | 2477 | memcpy(&confirm->data, wpa_ie, wpa_ie_len); |
2479 | 2478 | ||
2480 | mgt_set_varlen(priv, oid, confirm, wpa_ie_len); | 2479 | mgt_set_varlen(priv, oid, confirm, wpa_ie_len); |
2481 | 2480 | ||
2482 | kfree(confirm); | 2481 | kfree(confirm); |
2483 | 2482 | ||
2484 | break; | 2483 | break; |
2485 | 2484 | ||
2486 | default: | 2485 | default: |
@@ -2547,10 +2546,10 @@ enum { | |||
2547 | #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ | 2546 | #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ |
2548 | ((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) | 2547 | ((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) |
2549 | 2548 | ||
2550 | /* Maximum length for algorithm names (-1 for nul termination) | 2549 | /* Maximum length for algorithm names (-1 for nul termination) |
2551 | * used in ioctl() */ | 2550 | * used in ioctl() */ |
2552 | #define HOSTAP_CRYPT_ALG_NAME_LEN 16 | 2551 | #define HOSTAP_CRYPT_ALG_NAME_LEN 16 |
2553 | 2552 | ||
2554 | struct prism2_hostapd_param { | 2553 | struct prism2_hostapd_param { |
2555 | u32 cmd; | 2554 | u32 cmd; |
2556 | u8 sta_addr[ETH_ALEN]; | 2555 | u8 sta_addr[ETH_ALEN]; |
@@ -2623,7 +2622,7 @@ prism2_ioctl_set_encryption(struct net_device *dev, | |||
2623 | &key); | 2622 | &key); |
2624 | } | 2623 | } |
2625 | /* | 2624 | /* |
2626 | * If a valid key is set, encryption should be enabled | 2625 | * If a valid key is set, encryption should be enabled |
2627 | * (user may turn it off later). | 2626 | * (user may turn it off later). |
2628 | * This is also how "iwconfig ethX key on" works | 2627 | * This is also how "iwconfig ethX key on" works |
2629 | */ | 2628 | */ |
@@ -2645,7 +2644,7 @@ prism2_ioctl_set_encryption(struct net_device *dev, | |||
2645 | } | 2644 | } |
2646 | /* now read the flags */ | 2645 | /* now read the flags */ |
2647 | if (param->u.crypt.flags & IW_ENCODE_DISABLED) { | 2646 | if (param->u.crypt.flags & IW_ENCODE_DISABLED) { |
2648 | /* Encoding disabled, | 2647 | /* Encoding disabled, |
2649 | * authen = DOT11_AUTH_OS; | 2648 | * authen = DOT11_AUTH_OS; |
2650 | * invoke = 0; | 2649 | * invoke = 0; |
2651 | * exunencrypt = 0; */ | 2650 | * exunencrypt = 0; */ |
@@ -2712,7 +2711,7 @@ prism2_ioctl_set_generic_element(struct net_device *ndev, | |||
2712 | 2711 | ||
2713 | ret = mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach, len); | 2712 | ret = mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach, len); |
2714 | 2713 | ||
2715 | if (ret == 0) | 2714 | if (ret == 0) |
2716 | printk(KERN_DEBUG "%s: WPA IE Attachment was set\n", | 2715 | printk(KERN_DEBUG "%s: WPA IE Attachment was set\n", |
2717 | ndev->name); | 2716 | ndev->name); |
2718 | } | 2717 | } |
@@ -2872,7 +2871,7 @@ prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info, | |||
2872 | mlme = DOT11_MLME_AUTO; | 2871 | mlme = DOT11_MLME_AUTO; |
2873 | printk("%s: Disabling WPA\n", ndev->name); | 2872 | printk("%s: Disabling WPA\n", ndev->name); |
2874 | break; | 2873 | break; |
2875 | case 2: | 2874 | case 2: |
2876 | case 1: /* WPA */ | 2875 | case 1: /* WPA */ |
2877 | printk("%s: Enabling WPA\n", ndev->name); | 2876 | printk("%s: Enabling WPA\n", ndev->name); |
2878 | break; | 2877 | break; |
diff --git a/drivers/net/wireless/prism54/isl_ioctl.h b/drivers/net/wireless/prism54/isl_ioctl.h index 0802fa64996f..bcfbfb9281d2 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.h +++ b/drivers/net/wireless/prism54/isl_ioctl.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * (C) 2003 Aurelien Alleaume <slts@free.fr> | 3 | * (C) 2003 Aurelien Alleaume <slts@free.fr> |
5 | * (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> | 4 | * (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> |
diff --git a/drivers/net/wireless/prism54/isl_oid.h b/drivers/net/wireless/prism54/isl_oid.h index 419edf7ccf1a..b7534c2869c8 100644 --- a/drivers/net/wireless/prism54/isl_oid.h +++ b/drivers/net/wireless/prism54/isl_oid.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * | ||
4 | * Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> | 2 | * Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> |
5 | * Copyright (C) 2004 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> | 3 | * Copyright (C) 2004 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> |
6 | * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr> | 4 | * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr> |
@@ -23,7 +21,7 @@ | |||
23 | #if !defined(_ISL_OID_H) | 21 | #if !defined(_ISL_OID_H) |
24 | #define _ISL_OID_H | 22 | #define _ISL_OID_H |
25 | 23 | ||
26 | /* | 24 | /* |
27 | * MIB related constant and structure definitions for communicating | 25 | * MIB related constant and structure definitions for communicating |
28 | * with the device firmware | 26 | * with the device firmware |
29 | */ | 27 | */ |
@@ -99,21 +97,21 @@ struct obj_attachment { | |||
99 | char data[0]; | 97 | char data[0]; |
100 | } __attribute__((packed)); | 98 | } __attribute__((packed)); |
101 | 99 | ||
102 | /* | 100 | /* |
103 | * in case everything's ok, the inlined function below will be | 101 | * in case everything's ok, the inlined function below will be |
104 | * optimized away by the compiler... | 102 | * optimized away by the compiler... |
105 | */ | 103 | */ |
106 | static inline void | 104 | static inline void |
107 | __bug_on_wrong_struct_sizes(void) | 105 | __bug_on_wrong_struct_sizes(void) |
108 | { | 106 | { |
109 | BUG_ON(sizeof (struct obj_ssid) != 34); | 107 | BUILD_BUG_ON(sizeof (struct obj_ssid) != 34); |
110 | BUG_ON(sizeof (struct obj_key) != 34); | 108 | BUILD_BUG_ON(sizeof (struct obj_key) != 34); |
111 | BUG_ON(sizeof (struct obj_mlme) != 12); | 109 | BUILD_BUG_ON(sizeof (struct obj_mlme) != 12); |
112 | BUG_ON(sizeof (struct obj_mlmeex) != 14); | 110 | BUILD_BUG_ON(sizeof (struct obj_mlmeex) != 14); |
113 | BUG_ON(sizeof (struct obj_buffer) != 8); | 111 | BUILD_BUG_ON(sizeof (struct obj_buffer) != 8); |
114 | BUG_ON(sizeof (struct obj_bss) != 60); | 112 | BUILD_BUG_ON(sizeof (struct obj_bss) != 60); |
115 | BUG_ON(sizeof (struct obj_bsslist) != 4); | 113 | BUILD_BUG_ON(sizeof (struct obj_bsslist) != 4); |
116 | BUG_ON(sizeof (struct obj_frequencies) != 2); | 114 | BUILD_BUG_ON(sizeof (struct obj_frequencies) != 2); |
117 | } | 115 | } |
118 | 116 | ||
119 | enum dot11_state_t { | 117 | enum dot11_state_t { |
@@ -154,13 +152,13 @@ enum dot11_priv_t { | |||
154 | 152 | ||
155 | /* Prism "Nitro" / Frameburst / "Packet Frame Grouping" | 153 | /* Prism "Nitro" / Frameburst / "Packet Frame Grouping" |
156 | * Value is in microseconds. Represents the # microseconds | 154 | * Value is in microseconds. Represents the # microseconds |
157 | * the firmware will take to group frames before sending out then out | 155 | * the firmware will take to group frames before sending out then out |
158 | * together with a CSMA contention. Without this all frames are | 156 | * together with a CSMA contention. Without this all frames are |
159 | * sent with a CSMA contention. | 157 | * sent with a CSMA contention. |
160 | * Bibliography: | 158 | * Bibliography: |
161 | * http://www.hpl.hp.com/personal/Jean_Tourrilhes/Papers/Packet.Frame.Grouping.html | 159 | * http://www.hpl.hp.com/personal/Jean_Tourrilhes/Papers/Packet.Frame.Grouping.html |
162 | */ | 160 | */ |
163 | enum dot11_maxframeburst_t { | 161 | enum dot11_maxframeburst_t { |
164 | /* Values for DOT11_OID_MAXFRAMEBURST */ | 162 | /* Values for DOT11_OID_MAXFRAMEBURST */ |
165 | DOT11_MAXFRAMEBURST_OFF = 0, /* Card firmware default */ | 163 | DOT11_MAXFRAMEBURST_OFF = 0, /* Card firmware default */ |
166 | DOT11_MAXFRAMEBURST_MIXED_SAFE = 650, /* 802.11 a,b,g safe */ | 164 | DOT11_MAXFRAMEBURST_MIXED_SAFE = 650, /* 802.11 a,b,g safe */ |
@@ -176,9 +174,9 @@ enum dot11_maxframeburst_t { | |||
176 | /* Support for 802.11 long and short frame preambles. | 174 | /* Support for 802.11 long and short frame preambles. |
177 | * Long preamble uses 128-bit sync field, 8-bit CRC | 175 | * Long preamble uses 128-bit sync field, 8-bit CRC |
178 | * Short preamble uses 56-bit sync field, 16-bit CRC | 176 | * Short preamble uses 56-bit sync field, 16-bit CRC |
179 | * | 177 | * |
180 | * 802.11a -- not sure, both optionally ? | 178 | * 802.11a -- not sure, both optionally ? |
181 | * 802.11b supports long and optionally short | 179 | * 802.11b supports long and optionally short |
182 | * 802.11g supports both */ | 180 | * 802.11g supports both */ |
183 | enum dot11_preamblesettings_t { | 181 | enum dot11_preamblesettings_t { |
184 | DOT11_PREAMBLESETTING_LONG = 0, | 182 | DOT11_PREAMBLESETTING_LONG = 0, |
@@ -194,7 +192,7 @@ enum dot11_preamblesettings_t { | |||
194 | * Long uses 802.11a slot timing (9 usec ?) | 192 | * Long uses 802.11a slot timing (9 usec ?) |
195 | * Short uses 802.11b slot timing (20 use ?) */ | 193 | * Short uses 802.11b slot timing (20 use ?) */ |
196 | enum dot11_slotsettings_t { | 194 | enum dot11_slotsettings_t { |
197 | DOT11_SLOTSETTINGS_LONG = 0, | 195 | DOT11_SLOTSETTINGS_LONG = 0, |
198 | /* Allows *only* long 802.11b slot timing */ | 196 | /* Allows *only* long 802.11b slot timing */ |
199 | DOT11_SLOTSETTINGS_SHORT = 1, | 197 | DOT11_SLOTSETTINGS_SHORT = 1, |
200 | /* Allows *only* long 802.11a slot timing */ | 198 | /* Allows *only* long 802.11a slot timing */ |
@@ -203,7 +201,7 @@ enum dot11_slotsettings_t { | |||
203 | }; | 201 | }; |
204 | 202 | ||
205 | /* All you need to know, ERP is "Extended Rate PHY". | 203 | /* All you need to know, ERP is "Extended Rate PHY". |
206 | * An Extended Rate PHY (ERP) STA or AP shall support three different | 204 | * An Extended Rate PHY (ERP) STA or AP shall support three different |
207 | * preamble and header formats: | 205 | * preamble and header formats: |
208 | * Long preamble (refer to above) | 206 | * Long preamble (refer to above) |
209 | * Short preamble (refer to above) | 207 | * Short preamble (refer to above) |
@@ -221,7 +219,7 @@ enum do11_nonerpstatus_t { | |||
221 | /* (ERP is "Extended Rate PHY") Way to read NONERP is NON-ERP-* | 219 | /* (ERP is "Extended Rate PHY") Way to read NONERP is NON-ERP-* |
222 | * The key here is DOT11 NON ERP NEVER protects against | 220 | * The key here is DOT11 NON ERP NEVER protects against |
223 | * NON ERP STA's. You *don't* want this unless | 221 | * NON ERP STA's. You *don't* want this unless |
224 | * you know what you are doing. It means you will only | 222 | * you know what you are doing. It means you will only |
225 | * get Extended Rate capabilities */ | 223 | * get Extended Rate capabilities */ |
226 | enum dot11_nonerpprotection_t { | 224 | enum dot11_nonerpprotection_t { |
227 | DOT11_NONERP_NEVER = 0, | 225 | DOT11_NONERP_NEVER = 0, |
@@ -229,13 +227,13 @@ enum dot11_nonerpprotection_t { | |||
229 | DOT11_NONERP_DYNAMIC = 2 | 227 | DOT11_NONERP_DYNAMIC = 2 |
230 | }; | 228 | }; |
231 | 229 | ||
232 | /* Preset OID configuration for 802.11 modes | 230 | /* Preset OID configuration for 802.11 modes |
233 | * Note: DOT11_OID_CW[MIN|MAX] hold the values of the | 231 | * Note: DOT11_OID_CW[MIN|MAX] hold the values of the |
234 | * DCS MIN|MAX backoff used */ | 232 | * DCS MIN|MAX backoff used */ |
235 | enum dot11_profile_t { /* And set/allowed values */ | 233 | enum dot11_profile_t { /* And set/allowed values */ |
236 | /* Allowed values for DOT11_OID_PROFILES */ | 234 | /* Allowed values for DOT11_OID_PROFILES */ |
237 | DOT11_PROFILE_B_ONLY = 0, | 235 | DOT11_PROFILE_B_ONLY = 0, |
238 | /* DOT11_OID_RATES: 1, 2, 5.5, 11Mbps | 236 | /* DOT11_OID_RATES: 1, 2, 5.5, 11Mbps |
239 | * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC | 237 | * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC |
240 | * DOT11_OID_CWMIN: 31 | 238 | * DOT11_OID_CWMIN: 31 |
241 | * DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC | 239 | * DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC |
@@ -275,7 +273,7 @@ enum oid_inl_conformance_t { | |||
275 | OID_INL_CONFORMANCE_NONE = 0, /* Perform active scanning */ | 273 | OID_INL_CONFORMANCE_NONE = 0, /* Perform active scanning */ |
276 | OID_INL_CONFORMANCE_STRICT = 1, /* Strictly adhere to 802.11d */ | 274 | OID_INL_CONFORMANCE_STRICT = 1, /* Strictly adhere to 802.11d */ |
277 | OID_INL_CONFORMANCE_FLEXIBLE = 2, /* Use passed 802.11d info to | 275 | OID_INL_CONFORMANCE_FLEXIBLE = 2, /* Use passed 802.11d info to |
278 | * determine channel AND/OR just make assumption that active | 276 | * determine channel AND/OR just make assumption that active |
279 | * channels are valid channels */ | 277 | * channels are valid channels */ |
280 | }; | 278 | }; |
281 | 279 | ||
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index e35fcb2543c4..f057fd9fcd79 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> | 3 | * Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> |
5 | * Copyright (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> | 4 | * Copyright (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> |
@@ -413,7 +412,7 @@ prism54_bring_down(islpci_private *priv) | |||
413 | islpci_set_state(priv, PRV_STATE_PREBOOT); | 412 | islpci_set_state(priv, PRV_STATE_PREBOOT); |
414 | 413 | ||
415 | /* disable all device interrupts in case they weren't */ | 414 | /* disable all device interrupts in case they weren't */ |
416 | isl38xx_disable_interrupts(priv->device_base); | 415 | isl38xx_disable_interrupts(priv->device_base); |
417 | 416 | ||
418 | /* For safety reasons, we may want to ensure that no DMA transfer is | 417 | /* For safety reasons, we may want to ensure that no DMA transfer is |
419 | * currently in progress by emptying the TX and RX queues. */ | 418 | * currently in progress by emptying the TX and RX queues. */ |
@@ -480,7 +479,7 @@ islpci_reset_if(islpci_private *priv) | |||
480 | 479 | ||
481 | DEFINE_WAIT(wait); | 480 | DEFINE_WAIT(wait); |
482 | prepare_to_wait(&priv->reset_done, &wait, TASK_UNINTERRUPTIBLE); | 481 | prepare_to_wait(&priv->reset_done, &wait, TASK_UNINTERRUPTIBLE); |
483 | 482 | ||
484 | /* now the last step is to reset the interface */ | 483 | /* now the last step is to reset the interface */ |
485 | isl38xx_interface_reset(priv->device_base, priv->device_host_address); | 484 | isl38xx_interface_reset(priv->device_base, priv->device_host_address); |
486 | islpci_set_state(priv, PRV_STATE_PREINIT); | 485 | islpci_set_state(priv, PRV_STATE_PREINIT); |
@@ -488,7 +487,7 @@ islpci_reset_if(islpci_private *priv) | |||
488 | for(count = 0; count < 2 && result; count++) { | 487 | for(count = 0; count < 2 && result; count++) { |
489 | /* The software reset acknowledge needs about 220 msec here. | 488 | /* The software reset acknowledge needs about 220 msec here. |
490 | * Be conservative and wait for up to one second. */ | 489 | * Be conservative and wait for up to one second. */ |
491 | 490 | ||
492 | remaining = schedule_timeout_uninterruptible(HZ); | 491 | remaining = schedule_timeout_uninterruptible(HZ); |
493 | 492 | ||
494 | if(remaining > 0) { | 493 | if(remaining > 0) { |
@@ -496,7 +495,7 @@ islpci_reset_if(islpci_private *priv) | |||
496 | break; | 495 | break; |
497 | } | 496 | } |
498 | 497 | ||
499 | /* If we're here it's because our IRQ hasn't yet gone through. | 498 | /* If we're here it's because our IRQ hasn't yet gone through. |
500 | * Retry a bit more... | 499 | * Retry a bit more... |
501 | */ | 500 | */ |
502 | printk(KERN_ERR "%s: no 'reset complete' IRQ seen - retrying\n", | 501 | printk(KERN_ERR "%s: no 'reset complete' IRQ seen - retrying\n", |
@@ -514,7 +513,7 @@ islpci_reset_if(islpci_private *priv) | |||
514 | 513 | ||
515 | /* Now that the device is 100% up, let's allow | 514 | /* Now that the device is 100% up, let's allow |
516 | * for the other interrupts -- | 515 | * for the other interrupts -- |
517 | * NOTE: this is not *yet* true since we've only allowed the | 516 | * NOTE: this is not *yet* true since we've only allowed the |
518 | * INIT interrupt on the IRQ line. We can perhaps poll | 517 | * INIT interrupt on the IRQ line. We can perhaps poll |
519 | * the IRQ line until we know for sure the reset went through */ | 518 | * the IRQ line until we know for sure the reset went through */ |
520 | isl38xx_enable_common_interrupts(priv->device_base); | 519 | isl38xx_enable_common_interrupts(priv->device_base); |
@@ -716,7 +715,7 @@ islpci_alloc_memory(islpci_private *priv) | |||
716 | 715 | ||
717 | prism54_acl_init(&priv->acl); | 716 | prism54_acl_init(&priv->acl); |
718 | prism54_wpa_bss_ie_init(priv); | 717 | prism54_wpa_bss_ie_init(priv); |
719 | if (mgt_init(priv)) | 718 | if (mgt_init(priv)) |
720 | goto out_free; | 719 | goto out_free; |
721 | 720 | ||
722 | return 0; | 721 | return 0; |
diff --git a/drivers/net/wireless/prism54/islpci_dev.h b/drivers/net/wireless/prism54/islpci_dev.h index 2f7e525d0cf6..a9aa1662eaa4 100644 --- a/drivers/net/wireless/prism54/islpci_dev.h +++ b/drivers/net/wireless/prism54/islpci_dev.h | |||
@@ -1,6 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
3 | * Copyright (C) 2002 Intersil Americas Inc. | ||
4 | * Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> | 3 | * Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> |
5 | * Copyright (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> | 4 | * Copyright (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> |
6 | * Copyright (C) 2003 Aurelien Alleaume <slts@free.fr> | 5 | * Copyright (C) 2003 Aurelien Alleaume <slts@free.fr> |
@@ -72,12 +71,12 @@ struct islpci_bss_wpa_ie { | |||
72 | u8 bssid[ETH_ALEN]; | 71 | u8 bssid[ETH_ALEN]; |
73 | u8 wpa_ie[MAX_WPA_IE_LEN]; | 72 | u8 wpa_ie[MAX_WPA_IE_LEN]; |
74 | size_t wpa_ie_len; | 73 | size_t wpa_ie_len; |
75 | 74 | ||
76 | }; | 75 | }; |
77 | 76 | ||
78 | typedef struct { | 77 | typedef struct { |
79 | spinlock_t slock; /* generic spinlock; */ | 78 | spinlock_t slock; /* generic spinlock; */ |
80 | 79 | ||
81 | u32 priv_oid; | 80 | u32 priv_oid; |
82 | 81 | ||
83 | /* our mib cache */ | 82 | /* our mib cache */ |
@@ -85,7 +84,7 @@ typedef struct { | |||
85 | struct rw_semaphore mib_sem; | 84 | struct rw_semaphore mib_sem; |
86 | void **mib; | 85 | void **mib; |
87 | char nickname[IW_ESSID_MAX_SIZE+1]; | 86 | char nickname[IW_ESSID_MAX_SIZE+1]; |
88 | 87 | ||
89 | /* Take care of the wireless stats */ | 88 | /* Take care of the wireless stats */ |
90 | struct work_struct stats_work; | 89 | struct work_struct stats_work; |
91 | struct semaphore stats_sem; | 90 | struct semaphore stats_sem; |
@@ -120,7 +119,7 @@ typedef struct { | |||
120 | struct net_device *ndev; | 119 | struct net_device *ndev; |
121 | 120 | ||
122 | /* device queue interface members */ | 121 | /* device queue interface members */ |
123 | struct isl38xx_cb *control_block; /* device control block | 122 | struct isl38xx_cb *control_block; /* device control block |
124 | (== driver_mem_address!) */ | 123 | (== driver_mem_address!) */ |
125 | 124 | ||
126 | /* Each queue has three indexes: | 125 | /* Each queue has three indexes: |
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index 103a37877733..b1122912ee2d 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr> | 3 | * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr> |
5 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
@@ -48,7 +47,7 @@ islpci_eth_cleanup_transmit(islpci_private *priv, | |||
48 | /* read the index of the first fragment to be freed */ | 47 | /* read the index of the first fragment to be freed */ |
49 | index = priv->free_data_tx % ISL38XX_CB_TX_QSIZE; | 48 | index = priv->free_data_tx % ISL38XX_CB_TX_QSIZE; |
50 | 49 | ||
51 | /* check for holes in the arrays caused by multi fragment frames | 50 | /* check for holes in the arrays caused by multi fragment frames |
52 | * searching for the last fragment of a frame */ | 51 | * searching for the last fragment of a frame */ |
53 | if (priv->pci_map_tx_address[index] != (dma_addr_t) NULL) { | 52 | if (priv->pci_map_tx_address[index] != (dma_addr_t) NULL) { |
54 | /* entry is the last fragment of a frame | 53 | /* entry is the last fragment of a frame |
@@ -253,6 +252,7 @@ islpci_monitor_rx(islpci_private *priv, struct sk_buff **skb) | |||
253 | * header and without the FCS. But there a is a bit that | 252 | * header and without the FCS. But there a is a bit that |
254 | * indicates if the packet is corrupted :-) */ | 253 | * indicates if the packet is corrupted :-) */ |
255 | struct rfmon_header *hdr = (struct rfmon_header *) (*skb)->data; | 254 | struct rfmon_header *hdr = (struct rfmon_header *) (*skb)->data; |
255 | |||
256 | if (hdr->flags & 0x01) | 256 | if (hdr->flags & 0x01) |
257 | /* This one is bad. Drop it ! */ | 257 | /* This one is bad. Drop it ! */ |
258 | return -1; | 258 | return -1; |
@@ -284,7 +284,7 @@ islpci_monitor_rx(islpci_private *priv, struct sk_buff **skb) | |||
284 | (struct avs_80211_1_header *) skb_push(*skb, | 284 | (struct avs_80211_1_header *) skb_push(*skb, |
285 | sizeof (struct | 285 | sizeof (struct |
286 | avs_80211_1_header)); | 286 | avs_80211_1_header)); |
287 | 287 | ||
288 | avs->version = cpu_to_be32(P80211CAPTURE_VERSION); | 288 | avs->version = cpu_to_be32(P80211CAPTURE_VERSION); |
289 | avs->length = cpu_to_be32(sizeof (struct avs_80211_1_header)); | 289 | avs->length = cpu_to_be32(sizeof (struct avs_80211_1_header)); |
290 | avs->mactime = cpu_to_be64(le64_to_cpu(clock)); | 290 | avs->mactime = cpu_to_be64(le64_to_cpu(clock)); |
@@ -390,7 +390,7 @@ islpci_eth_receive(islpci_private *priv) | |||
390 | struct rx_annex_header *annex = | 390 | struct rx_annex_header *annex = |
391 | (struct rx_annex_header *) skb->data; | 391 | (struct rx_annex_header *) skb->data; |
392 | wstats.level = annex->rfmon.rssi; | 392 | wstats.level = annex->rfmon.rssi; |
393 | /* The noise value can be a bit outdated if nobody's | 393 | /* The noise value can be a bit outdated if nobody's |
394 | * reading wireless stats... */ | 394 | * reading wireless stats... */ |
395 | wstats.noise = priv->local_iwstatistics.qual.noise; | 395 | wstats.noise = priv->local_iwstatistics.qual.noise; |
396 | wstats.qual = wstats.level - wstats.noise; | 396 | wstats.qual = wstats.level - wstats.noise; |
@@ -464,10 +464,8 @@ islpci_eth_receive(islpci_private *priv) | |||
464 | break; | 464 | break; |
465 | } | 465 | } |
466 | /* update the fragment address */ | 466 | /* update the fragment address */ |
467 | control_block->rx_data_low[index].address = cpu_to_le32((u32) | 467 | control_block->rx_data_low[index].address = |
468 | priv-> | 468 | cpu_to_le32((u32)priv->pci_map_rx_address[index]); |
469 | pci_map_rx_address | ||
470 | [index]); | ||
471 | wmb(); | 469 | wmb(); |
472 | 470 | ||
473 | /* increment the driver read pointer */ | 471 | /* increment the driver read pointer */ |
@@ -485,9 +483,11 @@ void | |||
485 | islpci_do_reset_and_wake(struct work_struct *work) | 483 | islpci_do_reset_and_wake(struct work_struct *work) |
486 | { | 484 | { |
487 | islpci_private *priv = container_of(work, islpci_private, reset_task); | 485 | islpci_private *priv = container_of(work, islpci_private, reset_task); |
486 | |||
488 | islpci_reset(priv, 1); | 487 | islpci_reset(priv, 1); |
489 | netif_wake_queue(priv->ndev); | ||
490 | priv->reset_task_pending = 0; | 488 | priv->reset_task_pending = 0; |
489 | smp_wmb(); | ||
490 | netif_wake_queue(priv->ndev); | ||
491 | } | 491 | } |
492 | 492 | ||
493 | void | 493 | void |
@@ -499,12 +499,14 @@ islpci_eth_tx_timeout(struct net_device *ndev) | |||
499 | /* increment the transmit error counter */ | 499 | /* increment the transmit error counter */ |
500 | statistics->tx_errors++; | 500 | statistics->tx_errors++; |
501 | 501 | ||
502 | printk(KERN_WARNING "%s: tx_timeout", ndev->name); | ||
503 | if (!priv->reset_task_pending) { | 502 | if (!priv->reset_task_pending) { |
504 | priv->reset_task_pending = 1; | 503 | printk(KERN_WARNING |
505 | printk(", scheduling a reset"); | 504 | "%s: tx_timeout, scheduling reset", ndev->name); |
506 | netif_stop_queue(ndev); | 505 | netif_stop_queue(ndev); |
506 | priv->reset_task_pending = 1; | ||
507 | schedule_work(&priv->reset_task); | 507 | schedule_work(&priv->reset_task); |
508 | } else { | ||
509 | printk(KERN_WARNING | ||
510 | "%s: tx_timeout, waiting for reset", ndev->name); | ||
508 | } | 511 | } |
509 | printk("\n"); | ||
510 | } | 512 | } |
diff --git a/drivers/net/wireless/prism54/islpci_eth.h b/drivers/net/wireless/prism54/islpci_eth.h index 99d37eda9f01..5bf820defbd0 100644 --- a/drivers/net/wireless/prism54/islpci_eth.h +++ b/drivers/net/wireless/prism54/islpci_eth.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * | 3 | * |
5 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c index f692dccf0d07..58257b40c043 100644 --- a/drivers/net/wireless/prism54/islpci_hotplug.c +++ b/drivers/net/wireless/prism54/islpci_hotplug.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> | 3 | * Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org> |
5 | * | 4 | * |
@@ -40,8 +39,8 @@ static int init_pcitm = 0; | |||
40 | module_param(init_pcitm, int, 0); | 39 | module_param(init_pcitm, int, 0); |
41 | 40 | ||
42 | /* In this order: vendor, device, subvendor, subdevice, class, class_mask, | 41 | /* In this order: vendor, device, subvendor, subdevice, class, class_mask, |
43 | * driver_data | 42 | * driver_data |
44 | * If you have an update for this please contact prism54-devel@prism54.org | 43 | * If you have an update for this please contact prism54-devel@prism54.org |
45 | * The latest list can be found at http://prism54.org/supported_cards.php */ | 44 | * The latest list can be found at http://prism54.org/supported_cards.php */ |
46 | static const struct pci_device_id prism54_id_tbl[] = { | 45 | static const struct pci_device_id prism54_id_tbl[] = { |
47 | /* Intersil PRISM Duette/Prism GT Wireless LAN adapter */ | 46 | /* Intersil PRISM Duette/Prism GT Wireless LAN adapter */ |
@@ -132,15 +131,15 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
132 | 131 | ||
133 | /* 0x40 is the programmable timer to configure the response timeout (TRDY_TIMEOUT) | 132 | /* 0x40 is the programmable timer to configure the response timeout (TRDY_TIMEOUT) |
134 | * 0x41 is the programmable timer to configure the retry timeout (RETRY_TIMEOUT) | 133 | * 0x41 is the programmable timer to configure the retry timeout (RETRY_TIMEOUT) |
135 | * The RETRY_TIMEOUT is used to set the number of retries that the core, as a | 134 | * The RETRY_TIMEOUT is used to set the number of retries that the core, as a |
136 | * Master, will perform before abandoning a cycle. The default value for | 135 | * Master, will perform before abandoning a cycle. The default value for |
137 | * RETRY_TIMEOUT is 0x80, which far exceeds the PCI 2.1 requirement for new | 136 | * RETRY_TIMEOUT is 0x80, which far exceeds the PCI 2.1 requirement for new |
138 | * devices. A write of zero to the RETRY_TIMEOUT register disables this | 137 | * devices. A write of zero to the RETRY_TIMEOUT register disables this |
139 | * function to allow use with any non-compliant legacy devices that may | 138 | * function to allow use with any non-compliant legacy devices that may |
140 | * execute more retries. | 139 | * execute more retries. |
141 | * | 140 | * |
142 | * Writing zero to both these two registers will disable both timeouts and | 141 | * Writing zero to both these two registers will disable both timeouts and |
143 | * *can* solve problems caused by devices that are slow to respond. | 142 | * *can* solve problems caused by devices that are slow to respond. |
144 | * Make this configurable - MSW | 143 | * Make this configurable - MSW |
145 | */ | 144 | */ |
146 | if ( init_pcitm >= 0 ) { | 145 | if ( init_pcitm >= 0 ) { |
@@ -171,14 +170,15 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
171 | pci_set_master(pdev); | 170 | pci_set_master(pdev); |
172 | 171 | ||
173 | /* enable MWI */ | 172 | /* enable MWI */ |
174 | pci_set_mwi(pdev); | 173 | if (!pci_set_mwi(pdev)) |
174 | printk(KERN_INFO "%s: pci_set_mwi(pdev) succeeded\n", DRV_NAME); | ||
175 | 175 | ||
176 | /* setup the network device interface and its structure */ | 176 | /* setup the network device interface and its structure */ |
177 | if (!(ndev = islpci_setup(pdev))) { | 177 | if (!(ndev = islpci_setup(pdev))) { |
178 | /* error configuring the driver as a network device */ | 178 | /* error configuring the driver as a network device */ |
179 | printk(KERN_ERR "%s: could not configure network device\n", | 179 | printk(KERN_ERR "%s: could not configure network device\n", |
180 | DRV_NAME); | 180 | DRV_NAME); |
181 | goto do_pci_release_regions; | 181 | goto do_pci_clear_mwi; |
182 | } | 182 | } |
183 | 183 | ||
184 | priv = netdev_priv(ndev); | 184 | priv = netdev_priv(ndev); |
@@ -208,6 +208,8 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
208 | pci_set_drvdata(pdev, NULL); | 208 | pci_set_drvdata(pdev, NULL); |
209 | free_netdev(ndev); | 209 | free_netdev(ndev); |
210 | priv = NULL; | 210 | priv = NULL; |
211 | do_pci_clear_mwi: | ||
212 | pci_clear_mwi(pdev); | ||
211 | do_pci_release_regions: | 213 | do_pci_release_regions: |
212 | pci_release_regions(pdev); | 214 | pci_release_regions(pdev); |
213 | do_pci_disable_device: | 215 | do_pci_disable_device: |
@@ -241,7 +243,7 @@ prism54_remove(struct pci_dev *pdev) | |||
241 | isl38xx_disable_interrupts(priv->device_base); | 243 | isl38xx_disable_interrupts(priv->device_base); |
242 | islpci_set_state(priv, PRV_STATE_OFF); | 244 | islpci_set_state(priv, PRV_STATE_OFF); |
243 | /* This bellow causes a lockup at rmmod time. It might be | 245 | /* This bellow causes a lockup at rmmod time. It might be |
244 | * because some interrupts still linger after rmmod time, | 246 | * because some interrupts still linger after rmmod time, |
245 | * see bug #17 */ | 247 | * see bug #17 */ |
246 | /* pci_set_power_state(pdev, 3);*/ /* try to power-off */ | 248 | /* pci_set_power_state(pdev, 3);*/ /* try to power-off */ |
247 | } | 249 | } |
@@ -255,6 +257,8 @@ prism54_remove(struct pci_dev *pdev) | |||
255 | free_netdev(ndev); | 257 | free_netdev(ndev); |
256 | priv = NULL; | 258 | priv = NULL; |
257 | 259 | ||
260 | pci_clear_mwi(pdev); | ||
261 | |||
258 | pci_release_regions(pdev); | 262 | pci_release_regions(pdev); |
259 | 263 | ||
260 | pci_disable_device(pdev); | 264 | pci_disable_device(pdev); |
@@ -288,12 +292,19 @@ prism54_resume(struct pci_dev *pdev) | |||
288 | { | 292 | { |
289 | struct net_device *ndev = pci_get_drvdata(pdev); | 293 | struct net_device *ndev = pci_get_drvdata(pdev); |
290 | islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; | 294 | islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; |
291 | BUG_ON(!priv); | 295 | int err; |
292 | 296 | ||
293 | pci_enable_device(pdev); | 297 | BUG_ON(!priv); |
294 | 298 | ||
295 | printk(KERN_NOTICE "%s: got resume request\n", ndev->name); | 299 | printk(KERN_NOTICE "%s: got resume request\n", ndev->name); |
296 | 300 | ||
301 | err = pci_enable_device(pdev); | ||
302 | if (err) { | ||
303 | printk(KERN_ERR "%s: pci_enable_device failed on resume\n", | ||
304 | ndev->name); | ||
305 | return err; | ||
306 | } | ||
307 | |||
297 | pci_restore_state(pdev); | 308 | pci_restore_state(pdev); |
298 | 309 | ||
299 | /* alright let's go into the PREBOOT state */ | 310 | /* alright let's go into the PREBOOT state */ |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index 656ec9fa7128..2246f7930b4e 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * Copyright 2004 Jens Maurer <Jens.Maurer@gmx.net> | 3 | * Copyright 2004 Jens Maurer <Jens.Maurer@gmx.net> |
5 | * | 4 | * |
@@ -502,7 +501,7 @@ islpci_mgt_transaction(struct net_device *ndev, | |||
502 | printk(KERN_WARNING "%s: timeout waiting for mgmt response\n", | 501 | printk(KERN_WARNING "%s: timeout waiting for mgmt response\n", |
503 | ndev->name); | 502 | ndev->name); |
504 | 503 | ||
505 | /* TODO: we should reset the device here */ | 504 | /* TODO: we should reset the device here */ |
506 | out: | 505 | out: |
507 | finish_wait(&priv->mgmt_wqueue, &wait); | 506 | finish_wait(&priv->mgmt_wqueue, &wait); |
508 | up(&priv->mgmt_sem); | 507 | up(&priv->mgmt_sem); |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.h b/drivers/net/wireless/prism54/islpci_mgt.h index 2982be3363ef..fc53b587b722 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.h +++ b/drivers/net/wireless/prism54/islpci_mgt.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * Copyright (C) 2002 Intersil Americas Inc. | 2 | * Copyright (C) 2002 Intersil Americas Inc. |
4 | * Copyright (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> | 3 | * Copyright (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu> |
5 | * | 4 | * |
@@ -36,8 +35,8 @@ extern int pc_debug; | |||
36 | 35 | ||
37 | 36 | ||
38 | /* General driver definitions */ | 37 | /* General driver definitions */ |
39 | #define PCIDEVICE_LATENCY_TIMER_MIN 0x40 | 38 | #define PCIDEVICE_LATENCY_TIMER_MIN 0x40 |
40 | #define PCIDEVICE_LATENCY_TIMER_VAL 0x50 | 39 | #define PCIDEVICE_LATENCY_TIMER_VAL 0x50 |
41 | 40 | ||
42 | /* Debugging verbose definitions */ | 41 | /* Debugging verbose definitions */ |
43 | #define SHOW_NOTHING 0x00 /* overrules everything */ | 42 | #define SHOW_NOTHING 0x00 /* overrules everything */ |
diff --git a/drivers/net/wireless/prism54/oid_mgt.c b/drivers/net/wireless/prism54/oid_mgt.c index ebb238785839..fbc52b6a3024 100644 --- a/drivers/net/wireless/prism54/oid_mgt.c +++ b/drivers/net/wireless/prism54/oid_mgt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2003,2004 Aurelien Alleaume <slts@free.fr> | 2 | * Copyright (C) 2003,2004 Aurelien Alleaume <slts@free.fr> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
@@ -503,7 +503,7 @@ mgt_set_varlen(islpci_private *priv, enum oid_num_t n, void *data, int extra_len | |||
503 | } | 503 | } |
504 | if (ret || response_op == PIMFOR_OP_ERROR) | 504 | if (ret || response_op == PIMFOR_OP_ERROR) |
505 | ret = -EIO; | 505 | ret = -EIO; |
506 | } else | 506 | } else |
507 | ret = -EIO; | 507 | ret = -EIO; |
508 | 508 | ||
509 | /* re-set given data to what it was */ | 509 | /* re-set given data to what it was */ |
@@ -727,7 +727,7 @@ mgt_commit(islpci_private *priv) | |||
727 | * MEDIUMLIMIT,BEACONPERIOD,DTIMPERIOD,ATIMWINDOW,LISTENINTERVAL | 727 | * MEDIUMLIMIT,BEACONPERIOD,DTIMPERIOD,ATIMWINDOW,LISTENINTERVAL |
728 | * FREQUENCY,EXTENDEDRATES. | 728 | * FREQUENCY,EXTENDEDRATES. |
729 | * | 729 | * |
730 | * The way to do this is to set ESSID. Note though that they may get | 730 | * The way to do this is to set ESSID. Note though that they may get |
731 | * unlatch before though by setting another OID. */ | 731 | * unlatch before though by setting another OID. */ |
732 | #if 0 | 732 | #if 0 |
733 | void | 733 | void |
diff --git a/drivers/net/wireless/prism54/prismcompat.h b/drivers/net/wireless/prism54/prismcompat.h index d71eca55a302..aa1d1747784f 100644 --- a/drivers/net/wireless/prism54/prismcompat.h +++ b/drivers/net/wireless/prism54/prismcompat.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * (C) 2004 Margit Schubert-While <margitsw@t-online.de> | 2 | * (C) 2004 Margit Schubert-While <margitsw@t-online.de> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
@@ -16,7 +16,7 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Compatibility header file to aid support of different kernel versions | 20 | * Compatibility header file to aid support of different kernel versions |
21 | */ | 21 | */ |
22 | 22 | ||