diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-08-02 11:49:06 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:49 -0400 |
commit | ac558ca2ae878bd7a77831cda684702a2fa23d95 (patch) | |
tree | 10cfbf76cc842b265a9e8f7e4850e04e8e7fb136 /drivers/net/wireless | |
parent | c23a24f6ae083e058ed1e9472979df09915ffdf5 (diff) |
[PATCH] libertas: make more functions static & remove unused functions
Some functions where declared in header files, but used only once. They are
now static functions.
After doing this, I found out that some functions weren't used at all. I
removed this dead code.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/libertas/11d.c | 44 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/11d.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/decl.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/join.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/join.h | 33 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 50 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 35 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.h | 19 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.h | 4 |
13 files changed, 54 insertions, 171 deletions
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c index 26d85ec37d9e..ba4cbcb59113 100644 --- a/drivers/net/wireless/libertas/11d.c +++ b/drivers/net/wireless/libertas/11d.c | |||
@@ -446,25 +446,6 @@ void libertas_init_11d(wlan_private * priv) | |||
446 | return; | 446 | return; |
447 | } | 447 | } |
448 | 448 | ||
449 | static int wlan_enable_11d(wlan_private * priv, u8 flag) | ||
450 | { | ||
451 | int ret; | ||
452 | |||
453 | priv->adapter->enable11d = flag; | ||
454 | |||
455 | /* send cmd to FW to enable/disable 11D function in FW */ | ||
456 | ret = libertas_prepare_and_send_command(priv, | ||
457 | CMD_802_11_SNMP_MIB, | ||
458 | CMD_ACT_SET, | ||
459 | CMD_OPTION_WAITFORRSP, | ||
460 | OID_802_11D_ENABLE, | ||
461 | &priv->adapter->enable11d); | ||
462 | if (ret) | ||
463 | lbs_deb_11d("11D: Fail to enable 11D \n"); | ||
464 | |||
465 | return 0; | ||
466 | } | ||
467 | |||
468 | /** | 449 | /** |
469 | * @brief This function sets DOMAIN INFO to FW | 450 | * @brief This function sets DOMAIN INFO to FW |
470 | * @param priv pointer to wlan_private | 451 | * @param priv pointer to wlan_private |
@@ -578,31 +559,6 @@ done: | |||
578 | } | 559 | } |
579 | 560 | ||
580 | /** | 561 | /** |
581 | * @brief This function implements private cmd: enable/disable 11D | ||
582 | * @param priv pointer to wlan_private | ||
583 | * @param wrq pointer to user data | ||
584 | * @return 0 or -1 | ||
585 | */ | ||
586 | int libertas_cmd_enable_11d(wlan_private * priv, struct iwreq *wrq) | ||
587 | { | ||
588 | int data = 0; | ||
589 | int *val; | ||
590 | |||
591 | lbs_deb_enter(LBS_DEB_11D); | ||
592 | data = SUBCMD_DATA(wrq); | ||
593 | |||
594 | lbs_deb_11d("enable 11D: %s\n", | ||
595 | (data == 1) ? "enable" : "Disable"); | ||
596 | |||
597 | wlan_enable_11d(priv, data); | ||
598 | val = (int *)wrq->u.name; | ||
599 | *val = priv->adapter->enable11d; | ||
600 | |||
601 | lbs_deb_enter(LBS_DEB_11D); | ||
602 | return 0; | ||
603 | } | ||
604 | |||
605 | /** | ||
606 | * @brief This function parses countryinfo from AP and download country info to FW | 562 | * @brief This function parses countryinfo from AP and download country info to FW |
607 | * @param priv pointer to wlan_private | 563 | * @param priv pointer to wlan_private |
608 | * @param resp pointer to command response buffer | 564 | * @param resp pointer to command response buffer |
diff --git a/drivers/net/wireless/libertas/11d.h b/drivers/net/wireless/libertas/11d.h index 73e42e712911..3a6d1f8db78f 100644 --- a/drivers/net/wireless/libertas/11d.h +++ b/drivers/net/wireless/libertas/11d.h | |||
@@ -83,8 +83,6 @@ u8 libertas_get_scan_type_11d(u8 chan, | |||
83 | 83 | ||
84 | u32 libertas_chan_2_freq(u8 chan, u8 band); | 84 | u32 libertas_chan_2_freq(u8 chan, u8 band); |
85 | 85 | ||
86 | enum state_11d libertas_get_state_11d(wlan_private * priv); | ||
87 | |||
88 | void libertas_init_11d(wlan_private * priv); | 86 | void libertas_init_11d(wlan_private * priv); |
89 | 87 | ||
90 | int libertas_set_universaltable(wlan_private * priv, u8 band); | 88 | int libertas_set_universaltable(wlan_private * priv, u8 band); |
@@ -93,8 +91,6 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv, | |||
93 | struct cmd_ds_command *cmd, u16 cmdno, | 91 | struct cmd_ds_command *cmd, u16 cmdno, |
94 | u16 cmdOption); | 92 | u16 cmdOption); |
95 | 93 | ||
96 | int libertas_cmd_enable_11d(wlan_private * priv, struct iwreq *wrq); | ||
97 | |||
98 | int libertas_ret_802_11d_domain_info(wlan_private * priv, | 94 | int libertas_ret_802_11d_domain_info(wlan_private * priv, |
99 | struct cmd_ds_command *resp); | 95 | struct cmd_ds_command *resp); |
100 | 96 | ||
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index c3fc074b6e3a..85b573770704 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1045,7 +1045,7 @@ done: | |||
1045 | return; | 1045 | return; |
1046 | } | 1046 | } |
1047 | 1047 | ||
1048 | void libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node *ptempcmd) | 1048 | static void libertas_cleanup_and_insert_cmd(wlan_private * priv, struct cmd_ctrl_node *ptempcmd) |
1049 | { | 1049 | { |
1050 | unsigned long flags; | 1050 | unsigned long flags; |
1051 | 1051 | ||
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h index 113cfc1395e3..095edf6a4c29 100644 --- a/drivers/net/wireless/libertas/decl.h +++ b/drivers/net/wireless/libertas/decl.h | |||
@@ -15,14 +15,9 @@ struct wlan_private; | |||
15 | struct sk_buff; | 15 | struct sk_buff; |
16 | struct net_device; | 16 | struct net_device; |
17 | 17 | ||
18 | extern char *libertas_fw_name; | ||
19 | |||
20 | void libertas_free_adapter(wlan_private * priv); | ||
21 | int libertas_set_mac_packet_filter(wlan_private * priv); | 18 | int libertas_set_mac_packet_filter(wlan_private * priv); |
22 | 19 | ||
23 | int libertas_send_null_packet(wlan_private * priv, u8 pwr_mgmt); | ||
24 | void libertas_send_tx_feedback(wlan_private * priv); | 20 | void libertas_send_tx_feedback(wlan_private * priv); |
25 | u8 libertas_check_last_packet_indication(wlan_private * priv); | ||
26 | 21 | ||
27 | int libertas_free_cmd_buffer(wlan_private * priv); | 22 | int libertas_free_cmd_buffer(wlan_private * priv); |
28 | struct cmd_ctrl_node; | 23 | struct cmd_ctrl_node; |
@@ -53,8 +48,6 @@ void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb); | |||
53 | /** The proc fs interface */ | 48 | /** The proc fs interface */ |
54 | int libertas_process_rx_command(wlan_private * priv); | 49 | int libertas_process_rx_command(wlan_private * priv); |
55 | int libertas_process_tx(wlan_private * priv, struct sk_buff *skb); | 50 | int libertas_process_tx(wlan_private * priv, struct sk_buff *skb); |
56 | void libertas_cleanup_and_insert_cmd(wlan_private * priv, | ||
57 | struct cmd_ctrl_node *ptempcmd); | ||
58 | void __libertas_cleanup_and_insert_cmd(wlan_private * priv, | 51 | void __libertas_cleanup_and_insert_cmd(wlan_private * priv, |
59 | struct cmd_ctrl_node *ptempcmd); | 52 | struct cmd_ctrl_node *ptempcmd); |
60 | 53 | ||
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index ac1cfc253fdc..c28d9747b865 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -22,7 +22,7 @@ | |||
22 | static const char usbdriver_name[] = "usb8xxx"; | 22 | static const char usbdriver_name[] = "usb8xxx"; |
23 | static u8 *default_fw_name = "usb8388.bin"; | 23 | static u8 *default_fw_name = "usb8388.bin"; |
24 | 24 | ||
25 | char *libertas_fw_name = NULL; | 25 | static char *libertas_fw_name = NULL; |
26 | module_param_named(fw_name, libertas_fw_name, charp, 0644); | 26 | module_param_named(fw_name, libertas_fw_name, charp, 0644); |
27 | 27 | ||
28 | /* | 28 | /* |
@@ -51,6 +51,8 @@ static int if_usb_prog_firmware(wlan_private *); | |||
51 | static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb); | 51 | static int if_usb_host_to_card(wlan_private * priv, u8 type, u8 * payload, u16 nb); |
52 | static int if_usb_get_int_status(wlan_private * priv, u8 *); | 52 | static int if_usb_get_int_status(wlan_private * priv, u8 *); |
53 | static int if_usb_read_event_cause(wlan_private *); | 53 | static int if_usb_read_event_cause(wlan_private *); |
54 | static int usb_tx_block(wlan_private *priv, u8 *payload, u16 nb); | ||
55 | static void if_usb_free(struct usb_card_rec *cardp); | ||
54 | 56 | ||
55 | /** | 57 | /** |
56 | * @brief call back function to handle the status of the URB | 58 | * @brief call back function to handle the status of the URB |
@@ -92,7 +94,7 @@ static void if_usb_write_bulk_callback(struct urb *urb) | |||
92 | * @param cardp pointer usb_card_rec | 94 | * @param cardp pointer usb_card_rec |
93 | * @return N/A | 95 | * @return N/A |
94 | */ | 96 | */ |
95 | void if_usb_free(struct usb_card_rec *cardp) | 97 | static void if_usb_free(struct usb_card_rec *cardp) |
96 | { | 98 | { |
97 | lbs_deb_enter(LBS_DEB_USB); | 99 | lbs_deb_enter(LBS_DEB_USB); |
98 | 100 | ||
@@ -384,7 +386,7 @@ static int if_usb_reset_device(wlan_private *priv) | |||
384 | * @param nb data length | 386 | * @param nb data length |
385 | * @return 0 or -1 | 387 | * @return 0 or -1 |
386 | */ | 388 | */ |
387 | int usb_tx_block(wlan_private * priv, u8 * payload, u16 nb) | 389 | static int usb_tx_block(wlan_private * priv, u8 * payload, u16 nb) |
388 | { | 390 | { |
389 | /* pointer to card structure */ | 391 | /* pointer to card structure */ |
390 | struct usb_card_rec *cardp = priv->card; | 392 | struct usb_card_rec *cardp = priv->card; |
diff --git a/drivers/net/wireless/libertas/if_usb.h b/drivers/net/wireless/libertas/if_usb.h index 5da8c94ca4c5..8b3b4f1e47f6 100644 --- a/drivers/net/wireless/libertas/if_usb.h +++ b/drivers/net/wireless/libertas/if_usb.h | |||
@@ -102,7 +102,4 @@ struct fwsyncheader { | |||
102 | #define FW_DATA_XMIT_SIZE \ | 102 | #define FW_DATA_XMIT_SIZE \ |
103 | sizeof(struct fwheader) + le32_to_cpu(fwdata->fwheader.datalength) + sizeof(u32) | 103 | sizeof(struct fwheader) + le32_to_cpu(fwdata->fwheader.datalength) + sizeof(u32) |
104 | 104 | ||
105 | int usb_tx_block(wlan_private *priv, u8 *payload, u16 nb); | ||
106 | void if_usb_free(struct usb_card_rec *cardp); | ||
107 | |||
108 | #endif | 105 | #endif |
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c index f71c172101a8..f9799c3b81c2 100644 --- a/drivers/net/wireless/libertas/join.c +++ b/drivers/net/wireless/libertas/join.c | |||
@@ -112,20 +112,6 @@ void libertas_unset_basic_rate_flags(u8 * rates, size_t len) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | 114 | ||
115 | int libertas_send_deauth(wlan_private * priv) | ||
116 | { | ||
117 | wlan_adapter *adapter = priv->adapter; | ||
118 | int ret = 0; | ||
119 | |||
120 | if (adapter->mode == IW_MODE_INFRA && | ||
121 | adapter->connect_status == LIBERTAS_CONNECTED) | ||
122 | ret = libertas_send_deauthentication(priv); | ||
123 | else | ||
124 | ret = -ENOTSUPP; | ||
125 | |||
126 | return ret; | ||
127 | } | ||
128 | |||
129 | /** | 115 | /** |
130 | * @brief Associate to a specific BSS discovered in a scan | 116 | * @brief Associate to a specific BSS discovered in a scan |
131 | * | 117 | * |
diff --git a/drivers/net/wireless/libertas/join.h b/drivers/net/wireless/libertas/join.h index 8ea5ae30f4ab..894a072b9f8d 100644 --- a/drivers/net/wireless/libertas/join.h +++ b/drivers/net/wireless/libertas/join.h | |||
@@ -12,44 +12,39 @@ | |||
12 | #include "dev.h" | 12 | #include "dev.h" |
13 | 13 | ||
14 | struct cmd_ds_command; | 14 | struct cmd_ds_command; |
15 | extern int libertas_cmd_80211_authenticate(wlan_private * priv, | 15 | int libertas_cmd_80211_authenticate(wlan_private * priv, |
16 | struct cmd_ds_command *cmd, | 16 | struct cmd_ds_command *cmd, |
17 | void *pdata_buf); | 17 | void *pdata_buf); |
18 | extern int libertas_cmd_80211_ad_hoc_join(wlan_private * priv, | 18 | int libertas_cmd_80211_ad_hoc_join(wlan_private * priv, |
19 | struct cmd_ds_command *cmd, | 19 | struct cmd_ds_command *cmd, |
20 | void *pdata_buf); | 20 | void *pdata_buf); |
21 | extern int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv, | 21 | int libertas_cmd_80211_ad_hoc_stop(wlan_private * priv, |
22 | struct cmd_ds_command *cmd); | 22 | struct cmd_ds_command *cmd); |
23 | extern int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, | 23 | int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, |
24 | struct cmd_ds_command *cmd, | 24 | struct cmd_ds_command *cmd, |
25 | void *pdata_buf); | 25 | void *pdata_buf); |
26 | extern int libertas_cmd_80211_deauthenticate(wlan_private * priv, | 26 | int libertas_cmd_80211_deauthenticate(wlan_private * priv, |
27 | struct cmd_ds_command *cmd); | 27 | struct cmd_ds_command *cmd); |
28 | extern int libertas_cmd_80211_associate(wlan_private * priv, | 28 | int libertas_cmd_80211_associate(wlan_private * priv, |
29 | struct cmd_ds_command *cmd, | 29 | struct cmd_ds_command *cmd, |
30 | void *pdata_buf); | 30 | void *pdata_buf); |
31 | 31 | ||
32 | extern int libertas_ret_80211_ad_hoc_start(wlan_private * priv, | 32 | int libertas_ret_80211_ad_hoc_start(wlan_private * priv, |
33 | struct cmd_ds_command *resp); | 33 | struct cmd_ds_command *resp); |
34 | extern int libertas_ret_80211_ad_hoc_stop(wlan_private * priv, | 34 | int libertas_ret_80211_ad_hoc_stop(wlan_private * priv, |
35 | struct cmd_ds_command *resp); | 35 | struct cmd_ds_command *resp); |
36 | extern int libertas_ret_80211_disassociate(wlan_private * priv, | 36 | int libertas_ret_80211_disassociate(wlan_private * priv, |
37 | struct cmd_ds_command *resp); | 37 | struct cmd_ds_command *resp); |
38 | extern int libertas_ret_80211_associate(wlan_private * priv, | 38 | int libertas_ret_80211_associate(wlan_private * priv, |
39 | struct cmd_ds_command *resp); | 39 | struct cmd_ds_command *resp); |
40 | 40 | ||
41 | extern int libertas_reassociation_thread(void *data); | 41 | int libertas_start_adhoc_network(wlan_private * priv, |
42 | |||
43 | extern int libertas_start_adhoc_network(wlan_private * priv, | ||
44 | struct assoc_request * assoc_req); | 42 | struct assoc_request * assoc_req); |
45 | extern int libertas_join_adhoc_network(wlan_private * priv, | 43 | int libertas_join_adhoc_network(wlan_private * priv, |
46 | struct assoc_request * assoc_req); | 44 | struct assoc_request * assoc_req); |
47 | extern int libertas_stop_adhoc_network(wlan_private * priv); | 45 | int libertas_stop_adhoc_network(wlan_private * priv); |
48 | |||
49 | extern int libertas_send_deauthentication(wlan_private * priv); | ||
50 | extern int libertas_send_deauth(wlan_private * priv); | ||
51 | 46 | ||
52 | extern int libertas_do_adhocstop_ioctl(wlan_private * priv); | 47 | int libertas_send_deauthentication(wlan_private * priv); |
53 | 48 | ||
54 | int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req); | 49 | int wlan_associate(wlan_private * priv, struct assoc_request * assoc_req); |
55 | 50 | ||
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 7e417eacbc77..e8555de65762 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -890,6 +890,31 @@ static void command_timer_fn(unsigned long data) | |||
890 | return; | 890 | return; |
891 | } | 891 | } |
892 | 892 | ||
893 | static void libertas_free_adapter(wlan_private * priv) | ||
894 | { | ||
895 | wlan_adapter *adapter = priv->adapter; | ||
896 | |||
897 | if (!adapter) { | ||
898 | lbs_deb_fw("why double free adapter?\n"); | ||
899 | return; | ||
900 | } | ||
901 | |||
902 | lbs_deb_fw("free command buffer\n"); | ||
903 | libertas_free_cmd_buffer(priv); | ||
904 | |||
905 | lbs_deb_fw("free command_timer\n"); | ||
906 | del_timer(&adapter->command_timer); | ||
907 | |||
908 | lbs_deb_fw("free scan results table\n"); | ||
909 | kfree(adapter->networks); | ||
910 | adapter->networks = NULL; | ||
911 | |||
912 | /* Free the adapter object itself */ | ||
913 | lbs_deb_fw("free adapter\n"); | ||
914 | kfree(adapter); | ||
915 | priv->adapter = NULL; | ||
916 | } | ||
917 | |||
893 | static int wlan_allocate_adapter(wlan_private * priv) | 918 | static int wlan_allocate_adapter(wlan_private * priv) |
894 | { | 919 | { |
895 | size_t bufsize; | 920 | size_t bufsize; |
@@ -1009,31 +1034,6 @@ static void wlan_init_adapter(wlan_private * priv) | |||
1009 | return; | 1034 | return; |
1010 | } | 1035 | } |
1011 | 1036 | ||
1012 | void libertas_free_adapter(wlan_private * priv) | ||
1013 | { | ||
1014 | wlan_adapter *adapter = priv->adapter; | ||
1015 | |||
1016 | if (!adapter) { | ||
1017 | lbs_deb_fw("why double free adapter?\n"); | ||
1018 | return; | ||
1019 | } | ||
1020 | |||
1021 | lbs_deb_fw("free command buffer\n"); | ||
1022 | libertas_free_cmd_buffer(priv); | ||
1023 | |||
1024 | lbs_deb_fw("free command_timer\n"); | ||
1025 | del_timer(&adapter->command_timer); | ||
1026 | |||
1027 | lbs_deb_fw("free scan results table\n"); | ||
1028 | kfree(adapter->networks); | ||
1029 | adapter->networks = NULL; | ||
1030 | |||
1031 | /* Free the adapter object itself */ | ||
1032 | lbs_deb_fw("free adapter\n"); | ||
1033 | kfree(adapter); | ||
1034 | priv->adapter = NULL; | ||
1035 | } | ||
1036 | |||
1037 | static int libertas_init_fw(wlan_private * priv) | 1037 | static int libertas_init_fw(wlan_private * priv) |
1038 | { | 1038 | { |
1039 | int ret = -1; | 1039 | int ret = -1; |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 790e9888ea2b..683fa1ba5cac 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -1254,7 +1254,7 @@ out: | |||
1254 | * | 1254 | * |
1255 | * @return index in BSSID list | 1255 | * @return index in BSSID list |
1256 | */ | 1256 | */ |
1257 | struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * adapter, | 1257 | static struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * adapter, |
1258 | u8 mode) | 1258 | u8 mode) |
1259 | { | 1259 | { |
1260 | u8 bestrssi = 0; | 1260 | u8 bestrssi = 0; |
@@ -1386,39 +1386,6 @@ out: | |||
1386 | return ret; | 1386 | return ret; |
1387 | } | 1387 | } |
1388 | 1388 | ||
1389 | /** | ||
1390 | * @brief scan an AP with specific BSSID | ||
1391 | * | ||
1392 | * @param priv A pointer to wlan_private structure | ||
1393 | * @param bssid A pointer to AP's bssid | ||
1394 | * @param keeppreviousscan Flag used to save/clear scan table before scan | ||
1395 | * | ||
1396 | * @return 0-success, otherwise fail | ||
1397 | */ | ||
1398 | int libertas_send_specific_bssid_scan(wlan_private * priv, u8 * bssid, u8 clear_bssid) | ||
1399 | { | ||
1400 | struct wlan_ioctl_user_scan_cfg scancfg; | ||
1401 | |||
1402 | lbs_deb_enter(LBS_DEB_ASSOC); | ||
1403 | |||
1404 | if (bssid == NULL) | ||
1405 | goto out; | ||
1406 | |||
1407 | memset(&scancfg, 0x00, sizeof(scancfg)); | ||
1408 | memcpy(scancfg.bssid, bssid, ETH_ALEN); | ||
1409 | scancfg.clear_bssid = clear_bssid; | ||
1410 | |||
1411 | wlan_scan_networks(priv, &scancfg, 1); | ||
1412 | if (priv->adapter->surpriseremoved) | ||
1413 | return -1; | ||
1414 | wait_event_interruptible(priv->adapter->cmd_pending, | ||
1415 | !priv->adapter->nr_cmd_pending); | ||
1416 | |||
1417 | out: | ||
1418 | lbs_deb_leave(LBS_DEB_ASSOC); | ||
1419 | return 0; | ||
1420 | } | ||
1421 | |||
1422 | static inline char *libertas_translate_scan(wlan_private *priv, | 1389 | static inline char *libertas_translate_scan(wlan_private *priv, |
1423 | char *start, char *stop, | 1390 | char *start, char *stop, |
1424 | struct bss_descriptor *bss) | 1391 | struct bss_descriptor *bss) |
diff --git a/drivers/net/wireless/libertas/scan.h b/drivers/net/wireless/libertas/scan.h index 8c3508b3257f..def0db5c4e61 100644 --- a/drivers/net/wireless/libertas/scan.h +++ b/drivers/net/wireless/libertas/scan.h | |||
@@ -175,31 +175,26 @@ struct bss_descriptor { | |||
175 | struct list_head list; | 175 | struct list_head list; |
176 | }; | 176 | }; |
177 | 177 | ||
178 | extern int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len); | 178 | int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len); |
179 | 179 | ||
180 | struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter, | 180 | struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter, |
181 | u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode, | 181 | u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode, |
182 | int channel); | 182 | int channel); |
183 | 183 | ||
184 | struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * adapter, | 184 | struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter, |
185 | u8 mode); | ||
186 | |||
187 | extern struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter, | ||
188 | u8 * bssid, u8 mode); | 185 | u8 * bssid, u8 mode); |
189 | 186 | ||
190 | int libertas_find_best_network_ssid(wlan_private * priv, u8 *out_ssid, | 187 | int libertas_find_best_network_ssid(wlan_private * priv, u8 *out_ssid, |
191 | u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode); | 188 | u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode); |
192 | 189 | ||
193 | extern int libertas_send_specific_ssid_scan(wlan_private * priv, u8 *ssid, | 190 | int libertas_send_specific_ssid_scan(wlan_private * priv, u8 *ssid, |
194 | u8 ssid_len, u8 clear_ssid); | 191 | u8 ssid_len, u8 clear_ssid); |
195 | extern int libertas_send_specific_bssid_scan(wlan_private * priv, | ||
196 | u8 * bssid, u8 clear_bssid); | ||
197 | 192 | ||
198 | extern int libertas_cmd_80211_scan(wlan_private * priv, | 193 | int libertas_cmd_80211_scan(wlan_private * priv, |
199 | struct cmd_ds_command *cmd, | 194 | struct cmd_ds_command *cmd, |
200 | void *pdata_buf); | 195 | void *pdata_buf); |
201 | 196 | ||
202 | extern int libertas_ret_80211_scan(wlan_private * priv, | 197 | int libertas_ret_80211_scan(wlan_private * priv, |
203 | struct cmd_ds_command *resp); | 198 | struct cmd_ds_command *resp); |
204 | 199 | ||
205 | int wlan_scan_networks(wlan_private * priv, | 200 | int wlan_scan_networks(wlan_private * priv, |
@@ -211,9 +206,9 @@ struct ifreq; | |||
211 | struct iw_point; | 206 | struct iw_point; |
212 | struct iw_param; | 207 | struct iw_param; |
213 | struct iw_request_info; | 208 | struct iw_request_info; |
214 | extern int libertas_get_scan(struct net_device *dev, struct iw_request_info *info, | 209 | int libertas_get_scan(struct net_device *dev, struct iw_request_info *info, |
215 | struct iw_point *dwrq, char *extra); | 210 | struct iw_point *dwrq, char *extra); |
216 | extern int libertas_set_scan(struct net_device *dev, struct iw_request_info *info, | 211 | int libertas_set_scan(struct net_device *dev, struct iw_request_info *info, |
217 | struct iw_param *vwrq, char *extra); | 212 | struct iw_param *vwrq, char *extra); |
218 | 213 | ||
219 | #endif /* _WLAN_SCAN_H */ | 214 | #endif /* _WLAN_SCAN_H */ |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index 0b805e32993a..e8c0629f9a4b 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -157,7 +157,7 @@ static struct chan_freq_power *find_cfp_by_band_and_freq(wlan_adapter * adapter, | |||
157 | * @option Radio Option | 157 | * @option Radio Option |
158 | * @return 0 --success, otherwise fail | 158 | * @return 0 --success, otherwise fail |
159 | */ | 159 | */ |
160 | int wlan_radio_ioctl(wlan_private * priv, u8 option) | 160 | static int wlan_radio_ioctl(wlan_private * priv, u8 option) |
161 | { | 161 | { |
162 | int ret = 0; | 162 | int ret = 0; |
163 | wlan_adapter *adapter = priv->adapter; | 163 | wlan_adapter *adapter = priv->adapter; |
diff --git a/drivers/net/wireless/libertas/wext.h b/drivers/net/wireless/libertas/wext.h index 3d5196c9553a..5b0bbc99a21e 100644 --- a/drivers/net/wireless/libertas/wext.h +++ b/drivers/net/wireless/libertas/wext.h | |||
@@ -4,9 +4,6 @@ | |||
4 | #ifndef _WLAN_WEXT_H_ | 4 | #ifndef _WLAN_WEXT_H_ |
5 | #define _WLAN_WEXT_H_ | 5 | #define _WLAN_WEXT_H_ |
6 | 6 | ||
7 | #define SUBCMD_OFFSET 4 | ||
8 | #define SUBCMD_DATA(x) *((int *)(x->u.name + SUBCMD_OFFSET)) | ||
9 | |||
10 | /** wlan_ioctl_regrdwr */ | 7 | /** wlan_ioctl_regrdwr */ |
11 | struct wlan_ioctl_regrdwr { | 8 | struct wlan_ioctl_regrdwr { |
12 | /** Which register to access */ | 9 | /** Which register to access */ |
@@ -25,6 +22,5 @@ struct wlan_ioctl_regrdwr { | |||
25 | 22 | ||
26 | extern struct iw_handler_def libertas_handler_def; | 23 | extern struct iw_handler_def libertas_handler_def; |
27 | extern struct iw_handler_def mesh_handler_def; | 24 | extern struct iw_handler_def mesh_handler_def; |
28 | int wlan_radio_ioctl(wlan_private * priv, u8 option); | ||
29 | 25 | ||
30 | #endif /* _WLAN_WEXT_H_ */ | 26 | #endif /* _WLAN_WEXT_H_ */ |