diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-10-08 00:38:15 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-02 00:11:57 -0500 |
commit | 93b2dd12049d1adb0d76fb918fcd4c1030445433 (patch) | |
tree | 1116c50dbe9cdc16c36e541eb17cc5cdc97dc773 /drivers/net/wireless/prism54/isl_ioctl.c | |
parent | d18e0c4a5434f02586b5fdcbcc72f1fe61ab49e6 (diff) |
[PATCH] prism54: whitespace cleanup
NET: prism54 - whitespace cleanup
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/prism54/isl_ioctl.c')
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 286325ca3293..4a20e45de3ca 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; |
@@ -228,7 +227,7 @@ prism54_get_wireless_stats(struct net_device *ndev) | |||
228 | } else | 227 | } else |
229 | priv->iwstatistics.qual.updated = 0; | 228 | priv->iwstatistics.qual.updated = 0; |
230 | 229 | ||
231 | /* Update our wireless stats, but do not schedule to often | 230 | /* Update our wireless stats, but do not schedule to often |
232 | * (max 1 HZ) */ | 231 | * (max 1 HZ) */ |
233 | if ((priv->stats_timestamp == 0) || | 232 | if ((priv->stats_timestamp == 0) || |
234 | time_after(jiffies, priv->stats_timestamp + 1 * HZ)) { | 233 | time_after(jiffies, priv->stats_timestamp + 1 * HZ)) { |
@@ -705,7 +704,7 @@ prism54_get_scan(struct net_device *ndev, struct iw_request_info *info, | |||
705 | * Starting with WE-17, the buffer can be as big as needed. | 704 | * Starting with WE-17, the buffer can be as big as needed. |
706 | * But the device won't repport anything if you change the value | 705 | * But the device won't repport anything if you change the value |
707 | * of IWMAX_BSS=24. */ | 706 | * of IWMAX_BSS=24. */ |
708 | 707 | ||
709 | rvalue |= mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r); | 708 | rvalue |= mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r); |
710 | bsslist = r.ptr; | 709 | bsslist = r.ptr; |
711 | 710 | ||
@@ -785,7 +784,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info, | |||
785 | return rvalue; | 784 | return rvalue; |
786 | } | 785 | } |
787 | 786 | ||
788 | /* Provides no functionality, just completes the ioctl. In essence this is a | 787 | /* Provides no functionality, just completes the ioctl. In essence this is a |
789 | * just a cosmetic ioctl. | 788 | * just a cosmetic ioctl. |
790 | */ | 789 | */ |
791 | static int | 790 | static int |
@@ -1104,7 +1103,7 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info, | |||
1104 | &key); | 1103 | &key); |
1105 | } | 1104 | } |
1106 | /* | 1105 | /* |
1107 | * If a valid key is set, encryption should be enabled | 1106 | * If a valid key is set, encryption should be enabled |
1108 | * (user may turn it off later). | 1107 | * (user may turn it off later). |
1109 | * This is also how "iwconfig ethX key on" works | 1108 | * This is also how "iwconfig ethX key on" works |
1110 | */ | 1109 | */ |
@@ -1126,7 +1125,7 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info, | |||
1126 | } | 1125 | } |
1127 | /* now read the flags */ | 1126 | /* now read the flags */ |
1128 | if (dwrq->flags & IW_ENCODE_DISABLED) { | 1127 | if (dwrq->flags & IW_ENCODE_DISABLED) { |
1129 | /* Encoding disabled, | 1128 | /* Encoding disabled, |
1130 | * authen = DOT11_AUTH_OS; | 1129 | * authen = DOT11_AUTH_OS; |
1131 | * invoke = 0; | 1130 | * invoke = 0; |
1132 | * exunencrypt = 0; */ | 1131 | * exunencrypt = 0; */ |
@@ -1214,7 +1213,7 @@ prism54_get_txpower(struct net_device *ndev, struct iw_request_info *info, | |||
1214 | vwrq->value = (s32) r.u / 4; | 1213 | vwrq->value = (s32) r.u / 4; |
1215 | vwrq->fixed = 1; | 1214 | vwrq->fixed = 1; |
1216 | /* radio is not turned of | 1215 | /* radio is not turned of |
1217 | * btw: how is possible to turn off only the radio | 1216 | * btw: how is possible to turn off only the radio |
1218 | */ | 1217 | */ |
1219 | vwrq->disabled = 0; | 1218 | vwrq->disabled = 0; |
1220 | 1219 | ||
@@ -2354,17 +2353,17 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2354 | handle_request(priv, mlme, oid); | 2353 | handle_request(priv, mlme, oid); |
2355 | send_formatted_event(priv, "Authenticate request (ex)", mlme, 1); | 2354 | send_formatted_event(priv, "Authenticate request (ex)", mlme, 1); |
2356 | 2355 | ||
2357 | if (priv->iw_mode != IW_MODE_MASTER | 2356 | if (priv->iw_mode != IW_MODE_MASTER |
2358 | && mlmeex->state != DOT11_STATE_AUTHING) | 2357 | && mlmeex->state != DOT11_STATE_AUTHING) |
2359 | break; | 2358 | break; |
2360 | 2359 | ||
2361 | confirm = kmalloc(sizeof(struct obj_mlmeex) + 6, GFP_ATOMIC); | 2360 | confirm = kmalloc(sizeof(struct obj_mlmeex) + 6, GFP_ATOMIC); |
2362 | 2361 | ||
2363 | if (!confirm) | 2362 | if (!confirm) |
2364 | break; | 2363 | break; |
2365 | 2364 | ||
2366 | memcpy(&confirm->address, mlmeex->address, ETH_ALEN); | 2365 | memcpy(&confirm->address, mlmeex->address, ETH_ALEN); |
2367 | printk(KERN_DEBUG "Authenticate from: address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", | 2366 | printk(KERN_DEBUG "Authenticate from: address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", |
2368 | mlmeex->address[0], | 2367 | mlmeex->address[0], |
2369 | mlmeex->address[1], | 2368 | mlmeex->address[1], |
2370 | mlmeex->address[2], | 2369 | mlmeex->address[2], |
@@ -2398,10 +2397,10 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2398 | handle_request(priv, mlme, oid); | 2397 | handle_request(priv, mlme, oid); |
2399 | send_formatted_event(priv, "Associate request (ex)", mlme, 1); | 2398 | send_formatted_event(priv, "Associate request (ex)", mlme, 1); |
2400 | 2399 | ||
2401 | if (priv->iw_mode != IW_MODE_MASTER | 2400 | if (priv->iw_mode != IW_MODE_MASTER |
2402 | && mlmeex->state != DOT11_STATE_ASSOCING) | 2401 | && mlmeex->state != DOT11_STATE_ASSOCING) |
2403 | break; | 2402 | break; |
2404 | 2403 | ||
2405 | confirm = kmalloc(sizeof(struct obj_mlmeex), GFP_ATOMIC); | 2404 | confirm = kmalloc(sizeof(struct obj_mlmeex), GFP_ATOMIC); |
2406 | 2405 | ||
2407 | if (!confirm) | 2406 | if (!confirm) |
@@ -2417,7 +2416,7 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2417 | 2416 | ||
2418 | if (!wpa_ie_len) { | 2417 | if (!wpa_ie_len) { |
2419 | printk(KERN_DEBUG "No WPA IE found from " | 2418 | printk(KERN_DEBUG "No WPA IE found from " |
2420 | "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", | 2419 | "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", |
2421 | mlmeex->address[0], | 2420 | mlmeex->address[0], |
2422 | mlmeex->address[1], | 2421 | mlmeex->address[1], |
2423 | mlmeex->address[2], | 2422 | mlmeex->address[2], |
@@ -2435,14 +2434,14 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2435 | mgt_set_varlen(priv, oid, confirm, wpa_ie_len); | 2434 | mgt_set_varlen(priv, oid, confirm, wpa_ie_len); |
2436 | 2435 | ||
2437 | kfree(confirm); | 2436 | kfree(confirm); |
2438 | 2437 | ||
2439 | break; | 2438 | break; |
2440 | 2439 | ||
2441 | case DOT11_OID_REASSOCIATEEX: | 2440 | case DOT11_OID_REASSOCIATEEX: |
2442 | handle_request(priv, mlme, oid); | 2441 | handle_request(priv, mlme, oid); |
2443 | send_formatted_event(priv, "Reassociate request (ex)", mlme, 1); | 2442 | send_formatted_event(priv, "Reassociate request (ex)", mlme, 1); |
2444 | 2443 | ||
2445 | if (priv->iw_mode != IW_MODE_MASTER | 2444 | if (priv->iw_mode != IW_MODE_MASTER |
2446 | && mlmeex->state != DOT11_STATE_ASSOCING) | 2445 | && mlmeex->state != DOT11_STATE_ASSOCING) |
2447 | break; | 2446 | break; |
2448 | 2447 | ||
@@ -2461,7 +2460,7 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2461 | 2460 | ||
2462 | if (!wpa_ie_len) { | 2461 | if (!wpa_ie_len) { |
2463 | printk(KERN_DEBUG "No WPA IE found from " | 2462 | printk(KERN_DEBUG "No WPA IE found from " |
2464 | "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", | 2463 | "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", |
2465 | mlmeex->address[0], | 2464 | mlmeex->address[0], |
2466 | mlmeex->address[1], | 2465 | mlmeex->address[1], |
2467 | mlmeex->address[2], | 2466 | mlmeex->address[2], |
@@ -2473,13 +2472,13 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2473 | break; | 2472 | break; |
2474 | } | 2473 | } |
2475 | 2474 | ||
2476 | confirm->size = wpa_ie_len; | 2475 | confirm->size = wpa_ie_len; |
2477 | memcpy(&confirm->data, wpa_ie, wpa_ie_len); | 2476 | memcpy(&confirm->data, wpa_ie, wpa_ie_len); |
2478 | 2477 | ||
2479 | mgt_set_varlen(priv, oid, confirm, wpa_ie_len); | 2478 | mgt_set_varlen(priv, oid, confirm, wpa_ie_len); |
2480 | 2479 | ||
2481 | kfree(confirm); | 2480 | kfree(confirm); |
2482 | 2481 | ||
2483 | break; | 2482 | break; |
2484 | 2483 | ||
2485 | default: | 2484 | default: |
@@ -2545,10 +2544,10 @@ enum { | |||
2545 | #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ | 2544 | #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ |
2546 | ((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) | 2545 | ((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) |
2547 | 2546 | ||
2548 | /* Maximum length for algorithm names (-1 for nul termination) | 2547 | /* Maximum length for algorithm names (-1 for nul termination) |
2549 | * used in ioctl() */ | 2548 | * used in ioctl() */ |
2550 | #define HOSTAP_CRYPT_ALG_NAME_LEN 16 | 2549 | #define HOSTAP_CRYPT_ALG_NAME_LEN 16 |
2551 | 2550 | ||
2552 | struct prism2_hostapd_param { | 2551 | struct prism2_hostapd_param { |
2553 | u32 cmd; | 2552 | u32 cmd; |
2554 | u8 sta_addr[ETH_ALEN]; | 2553 | u8 sta_addr[ETH_ALEN]; |
@@ -2621,7 +2620,7 @@ prism2_ioctl_set_encryption(struct net_device *dev, | |||
2621 | &key); | 2620 | &key); |
2622 | } | 2621 | } |
2623 | /* | 2622 | /* |
2624 | * If a valid key is set, encryption should be enabled | 2623 | * If a valid key is set, encryption should be enabled |
2625 | * (user may turn it off later). | 2624 | * (user may turn it off later). |
2626 | * This is also how "iwconfig ethX key on" works | 2625 | * This is also how "iwconfig ethX key on" works |
2627 | */ | 2626 | */ |
@@ -2643,7 +2642,7 @@ prism2_ioctl_set_encryption(struct net_device *dev, | |||
2643 | } | 2642 | } |
2644 | /* now read the flags */ | 2643 | /* now read the flags */ |
2645 | if (param->u.crypt.flags & IW_ENCODE_DISABLED) { | 2644 | if (param->u.crypt.flags & IW_ENCODE_DISABLED) { |
2646 | /* Encoding disabled, | 2645 | /* Encoding disabled, |
2647 | * authen = DOT11_AUTH_OS; | 2646 | * authen = DOT11_AUTH_OS; |
2648 | * invoke = 0; | 2647 | * invoke = 0; |
2649 | * exunencrypt = 0; */ | 2648 | * exunencrypt = 0; */ |
@@ -2710,7 +2709,7 @@ prism2_ioctl_set_generic_element(struct net_device *ndev, | |||
2710 | 2709 | ||
2711 | ret = mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach, len); | 2710 | ret = mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach, len); |
2712 | 2711 | ||
2713 | if (ret == 0) | 2712 | if (ret == 0) |
2714 | printk(KERN_DEBUG "%s: WPA IE Attachment was set\n", | 2713 | printk(KERN_DEBUG "%s: WPA IE Attachment was set\n", |
2715 | ndev->name); | 2714 | ndev->name); |
2716 | } | 2715 | } |
@@ -2870,7 +2869,7 @@ prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info, | |||
2870 | mlme = DOT11_MLME_AUTO; | 2869 | mlme = DOT11_MLME_AUTO; |
2871 | printk("%s: Disabling WPA\n", ndev->name); | 2870 | printk("%s: Disabling WPA\n", ndev->name); |
2872 | break; | 2871 | break; |
2873 | case 2: | 2872 | case 2: |
2874 | case 1: /* WPA */ | 2873 | case 1: /* WPA */ |
2875 | printk("%s: Enabling WPA\n", ndev->name); | 2874 | printk("%s: Enabling WPA\n", ndev->name); |
2876 | break; | 2875 | break; |