diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-11-23 09:43:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:04:54 -0500 |
commit | 69f9032d9dfeb763b467fdbe8cf5938f5457083a (patch) | |
tree | 613598938e17e1a7514e0da3817f3cfebbe346a9 /drivers/net/wireless/libertas/join.c | |
parent | 96287ac4f7b387acbe17e24b5e1bcbf3bc0e75cd (diff) |
libertas: remove arbitrary typedefs
New typedefs are usually frowned upon. This patch changes
libertas_adapter -> struct libertas_adapter
libertas_priv -> struct libertas_priv
While passing, make everything checkpatch.pl-clean that gets touches.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/join.c')
-rw-r--r-- | drivers/net/wireless/libertas/join.c | 68 |
1 files changed, 36 insertions, 32 deletions
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c index ca67524ee8dd..d80b6e05e27d 100644 --- a/drivers/net/wireless/libertas/join.c +++ b/drivers/net/wireless/libertas/join.c | |||
@@ -30,13 +30,15 @@ | |||
30 | * NOTE: Setting the MSB of the basic rates need to be taken | 30 | * NOTE: Setting the MSB of the basic rates need to be taken |
31 | * care, either before or after calling this function | 31 | * care, either before or after calling this function |
32 | * | 32 | * |
33 | * @param adapter A pointer to lbs_adapter structure | 33 | * @param adapter A pointer to struct lbs_adapter structure |
34 | * @param rate1 the buffer which keeps input and output | 34 | * @param rate1 the buffer which keeps input and output |
35 | * @param rate1_size the size of rate1 buffer; new size of buffer on return | 35 | * @param rate1_size the size of rate1 buffer; new size of buffer on return |
36 | * | 36 | * |
37 | * @return 0 or -1 | 37 | * @return 0 or -1 |
38 | */ | 38 | */ |
39 | static int get_common_rates(lbs_adapter *adapter, u8 *rates, u16 *rates_size) | 39 | static int get_common_rates(struct lbs_adapter *adapter, |
40 | u8 *rates, | ||
41 | u16 *rates_size) | ||
40 | { | 42 | { |
41 | u8 *card_rates = lbs_bg_rates; | 43 | u8 *card_rates = lbs_bg_rates; |
42 | size_t num_card_rates = sizeof(lbs_bg_rates); | 44 | size_t num_card_rates = sizeof(lbs_bg_rates); |
@@ -116,14 +118,14 @@ void lbs_unset_basic_rate_flags(u8 *rates, size_t len) | |||
116 | /** | 118 | /** |
117 | * @brief Associate to a specific BSS discovered in a scan | 119 | * @brief Associate to a specific BSS discovered in a scan |
118 | * | 120 | * |
119 | * @param priv A pointer to lbs_private structure | 121 | * @param priv A pointer to struct lbs_private structure |
120 | * @param pbssdesc Pointer to the BSS descriptor to associate with. | 122 | * @param pbssdesc Pointer to the BSS descriptor to associate with. |
121 | * | 123 | * |
122 | * @return 0-success, otherwise fail | 124 | * @return 0-success, otherwise fail |
123 | */ | 125 | */ |
124 | int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req) | 126 | int lbs_associate(struct lbs_private *priv, struct assoc_request *assoc_req) |
125 | { | 127 | { |
126 | lbs_adapter *adapter = priv->adapter; | 128 | struct lbs_adapter *adapter = priv->adapter; |
127 | int ret; | 129 | int ret; |
128 | 130 | ||
129 | lbs_deb_enter(LBS_DEB_JOIN); | 131 | lbs_deb_enter(LBS_DEB_JOIN); |
@@ -155,13 +157,14 @@ done: | |||
155 | /** | 157 | /** |
156 | * @brief Start an Adhoc Network | 158 | * @brief Start an Adhoc Network |
157 | * | 159 | * |
158 | * @param priv A pointer to lbs_private structure | 160 | * @param priv A pointer to struct lbs_private structure |
159 | * @param adhocssid The ssid of the Adhoc Network | 161 | * @param adhocssid The ssid of the Adhoc Network |
160 | * @return 0--success, -1--fail | 162 | * @return 0--success, -1--fail |
161 | */ | 163 | */ |
162 | int lbs_start_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req) | 164 | int lbs_start_adhoc_network(struct lbs_private *priv, |
165 | struct assoc_request *assoc_req) | ||
163 | { | 166 | { |
164 | lbs_adapter *adapter = priv->adapter; | 167 | struct lbs_adapter *adapter = priv->adapter; |
165 | int ret = 0; | 168 | int ret = 0; |
166 | 169 | ||
167 | adapter->adhoccreate = 1; | 170 | adapter->adhoccreate = 1; |
@@ -188,15 +191,16 @@ int lbs_start_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req) | |||
188 | /** | 191 | /** |
189 | * @brief Join an adhoc network found in a previous scan | 192 | * @brief Join an adhoc network found in a previous scan |
190 | * | 193 | * |
191 | * @param priv A pointer to lbs_private structure | 194 | * @param priv A pointer to struct lbs_private structure |
192 | * @param pbssdesc Pointer to a BSS descriptor found in a previous scan | 195 | * @param pbssdesc Pointer to a BSS descriptor found in a previous scan |
193 | * to attempt to join | 196 | * to attempt to join |
194 | * | 197 | * |
195 | * @return 0--success, -1--fail | 198 | * @return 0--success, -1--fail |
196 | */ | 199 | */ |
197 | int lbs_join_adhoc_network(lbs_private *priv, struct assoc_request *assoc_req) | 200 | int lbs_join_adhoc_network(struct lbs_private *priv, |
201 | struct assoc_request *assoc_req) | ||
198 | { | 202 | { |
199 | lbs_adapter *adapter = priv->adapter; | 203 | struct lbs_adapter *adapter = priv->adapter; |
200 | struct bss_descriptor * bss = &assoc_req->bss; | 204 | struct bss_descriptor * bss = &assoc_req->bss; |
201 | int ret = 0; | 205 | int ret = 0; |
202 | 206 | ||
@@ -258,7 +262,7 @@ out: | |||
258 | return ret; | 262 | return ret; |
259 | } | 263 | } |
260 | 264 | ||
261 | int lbs_stop_adhoc_network(lbs_private * priv) | 265 | int lbs_stop_adhoc_network(struct lbs_private *priv) |
262 | { | 266 | { |
263 | return lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP, | 267 | return lbs_prepare_and_send_command(priv, CMD_802_11_AD_HOC_STOP, |
264 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); | 268 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); |
@@ -267,10 +271,10 @@ int lbs_stop_adhoc_network(lbs_private * priv) | |||
267 | /** | 271 | /** |
268 | * @brief Send Deauthentication Request | 272 | * @brief Send Deauthentication Request |
269 | * | 273 | * |
270 | * @param priv A pointer to lbs_private structure | 274 | * @param priv A pointer to struct lbs_private structure |
271 | * @return 0--success, -1--fail | 275 | * @return 0--success, -1--fail |
272 | */ | 276 | */ |
273 | int lbs_send_deauthentication(lbs_private *priv) | 277 | int lbs_send_deauthentication(struct lbs_private *priv) |
274 | { | 278 | { |
275 | return lbs_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE, | 279 | return lbs_prepare_and_send_command(priv, CMD_802_11_DEAUTHENTICATE, |
276 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); | 280 | 0, CMD_OPTION_WAITFORRSP, 0, NULL); |
@@ -279,17 +283,17 @@ int lbs_send_deauthentication(lbs_private *priv) | |||
279 | /** | 283 | /** |
280 | * @brief This function prepares command of authenticate. | 284 | * @brief This function prepares command of authenticate. |
281 | * | 285 | * |
282 | * @param priv A pointer to lbs_private structure | 286 | * @param priv A pointer to struct lbs_private structure |
283 | * @param cmd A pointer to cmd_ds_command structure | 287 | * @param cmd A pointer to cmd_ds_command structure |
284 | * @param pdata_buf Void cast of pointer to a BSSID to authenticate with | 288 | * @param pdata_buf Void cast of pointer to a BSSID to authenticate with |
285 | * | 289 | * |
286 | * @return 0 or -1 | 290 | * @return 0 or -1 |
287 | */ | 291 | */ |
288 | int lbs_cmd_80211_authenticate(lbs_private *priv, | 292 | int lbs_cmd_80211_authenticate(struct lbs_private *priv, |
289 | struct cmd_ds_command *cmd, | 293 | struct cmd_ds_command *cmd, |
290 | void *pdata_buf) | 294 | void *pdata_buf) |
291 | { | 295 | { |
292 | lbs_adapter *adapter = priv->adapter; | 296 | struct lbs_adapter *adapter = priv->adapter; |
293 | struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth; | 297 | struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth; |
294 | int ret = -1; | 298 | int ret = -1; |
295 | u8 *bssid = pdata_buf; | 299 | u8 *bssid = pdata_buf; |
@@ -329,10 +333,10 @@ out: | |||
329 | return ret; | 333 | return ret; |
330 | } | 334 | } |
331 | 335 | ||
332 | int lbs_cmd_80211_deauthenticate(lbs_private *priv, | 336 | int lbs_cmd_80211_deauthenticate(struct lbs_private *priv, |
333 | struct cmd_ds_command *cmd) | 337 | struct cmd_ds_command *cmd) |
334 | { | 338 | { |
335 | lbs_adapter *adapter = priv->adapter; | 339 | struct lbs_adapter *adapter = priv->adapter; |
336 | struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth; | 340 | struct cmd_ds_802_11_deauthenticate *dauth = &cmd->params.deauth; |
337 | 341 | ||
338 | lbs_deb_enter(LBS_DEB_JOIN); | 342 | lbs_deb_enter(LBS_DEB_JOIN); |
@@ -352,10 +356,10 @@ int lbs_cmd_80211_deauthenticate(lbs_private *priv, | |||
352 | return 0; | 356 | return 0; |
353 | } | 357 | } |
354 | 358 | ||
355 | int lbs_cmd_80211_associate(lbs_private *priv, | 359 | int lbs_cmd_80211_associate(struct lbs_private *priv, |
356 | struct cmd_ds_command *cmd, void *pdata_buf) | 360 | struct cmd_ds_command *cmd, void *pdata_buf) |
357 | { | 361 | { |
358 | lbs_adapter *adapter = priv->adapter; | 362 | struct lbs_adapter *adapter = priv->adapter; |
359 | struct cmd_ds_802_11_associate *passo = &cmd->params.associate; | 363 | struct cmd_ds_802_11_associate *passo = &cmd->params.associate; |
360 | int ret = 0; | 364 | int ret = 0; |
361 | struct assoc_request * assoc_req = pdata_buf; | 365 | struct assoc_request * assoc_req = pdata_buf; |
@@ -468,10 +472,10 @@ done: | |||
468 | return ret; | 472 | return ret; |
469 | } | 473 | } |
470 | 474 | ||
471 | int lbs_cmd_80211_ad_hoc_start(lbs_private *priv, | 475 | int lbs_cmd_80211_ad_hoc_start(struct lbs_private *priv, |
472 | struct cmd_ds_command *cmd, void *pdata_buf) | 476 | struct cmd_ds_command *cmd, void *pdata_buf) |
473 | { | 477 | { |
474 | lbs_adapter *adapter = priv->adapter; | 478 | struct lbs_adapter *adapter = priv->adapter; |
475 | struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads; | 479 | struct cmd_ds_802_11_ad_hoc_start *adhs = &cmd->params.ads; |
476 | int ret = 0; | 480 | int ret = 0; |
477 | int cmdappendsize = 0; | 481 | int cmdappendsize = 0; |
@@ -582,7 +586,7 @@ done: | |||
582 | return ret; | 586 | return ret; |
583 | } | 587 | } |
584 | 588 | ||
585 | int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv, | 589 | int lbs_cmd_80211_ad_hoc_stop(struct lbs_private *priv, |
586 | struct cmd_ds_command *cmd) | 590 | struct cmd_ds_command *cmd) |
587 | { | 591 | { |
588 | cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP); | 592 | cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP); |
@@ -591,10 +595,10 @@ int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv, | |||
591 | return 0; | 595 | return 0; |
592 | } | 596 | } |
593 | 597 | ||
594 | int lbs_cmd_80211_ad_hoc_join(lbs_private *priv, | 598 | int lbs_cmd_80211_ad_hoc_join(struct lbs_private *priv, |
595 | struct cmd_ds_command *cmd, void *pdata_buf) | 599 | struct cmd_ds_command *cmd, void *pdata_buf) |
596 | { | 600 | { |
597 | lbs_adapter *adapter = priv->adapter; | 601 | struct lbs_adapter *adapter = priv->adapter; |
598 | struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj; | 602 | struct cmd_ds_802_11_ad_hoc_join *join_cmd = &cmd->params.adj; |
599 | struct assoc_request * assoc_req = pdata_buf; | 603 | struct assoc_request * assoc_req = pdata_buf; |
600 | struct bss_descriptor *bss = &assoc_req->bss; | 604 | struct bss_descriptor *bss = &assoc_req->bss; |
@@ -694,10 +698,10 @@ done: | |||
694 | return ret; | 698 | return ret; |
695 | } | 699 | } |
696 | 700 | ||
697 | int lbs_ret_80211_associate(lbs_private *priv, | 701 | int lbs_ret_80211_associate(struct lbs_private *priv, |
698 | struct cmd_ds_command *resp) | 702 | struct cmd_ds_command *resp) |
699 | { | 703 | { |
700 | lbs_adapter *adapter = priv->adapter; | 704 | struct lbs_adapter *adapter = priv->adapter; |
701 | int ret = 0; | 705 | int ret = 0; |
702 | union iwreq_data wrqu; | 706 | union iwreq_data wrqu; |
703 | struct ieeetypes_assocrsp *passocrsp; | 707 | struct ieeetypes_assocrsp *passocrsp; |
@@ -807,7 +811,7 @@ done: | |||
807 | return ret; | 811 | return ret; |
808 | } | 812 | } |
809 | 813 | ||
810 | int lbs_ret_80211_disassociate(lbs_private *priv, | 814 | int lbs_ret_80211_disassociate(struct lbs_private *priv, |
811 | struct cmd_ds_command *resp) | 815 | struct cmd_ds_command *resp) |
812 | { | 816 | { |
813 | lbs_deb_enter(LBS_DEB_JOIN); | 817 | lbs_deb_enter(LBS_DEB_JOIN); |
@@ -818,10 +822,10 @@ int lbs_ret_80211_disassociate(lbs_private *priv, | |||
818 | return 0; | 822 | return 0; |
819 | } | 823 | } |
820 | 824 | ||
821 | int lbs_ret_80211_ad_hoc_start(lbs_private *priv, | 825 | int lbs_ret_80211_ad_hoc_start(struct lbs_private *priv, |
822 | struct cmd_ds_command *resp) | 826 | struct cmd_ds_command *resp) |
823 | { | 827 | { |
824 | lbs_adapter *adapter = priv->adapter; | 828 | struct lbs_adapter *adapter = priv->adapter; |
825 | int ret = 0; | 829 | int ret = 0; |
826 | u16 command = le16_to_cpu(resp->command); | 830 | u16 command = le16_to_cpu(resp->command); |
827 | u16 result = le16_to_cpu(resp->result); | 831 | u16 result = le16_to_cpu(resp->result); |
@@ -897,7 +901,7 @@ done: | |||
897 | return ret; | 901 | return ret; |
898 | } | 902 | } |
899 | 903 | ||
900 | int lbs_ret_80211_ad_hoc_stop(lbs_private *priv, | 904 | int lbs_ret_80211_ad_hoc_stop(struct lbs_private *priv, |
901 | struct cmd_ds_command *resp) | 905 | struct cmd_ds_command *resp) |
902 | { | 906 | { |
903 | lbs_deb_enter(LBS_DEB_JOIN); | 907 | lbs_deb_enter(LBS_DEB_JOIN); |