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 | |
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>
23 files changed, 606 insertions, 565 deletions
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c index d16f566e878b..377dcb5b8f0c 100644 --- a/drivers/net/wireless/libertas/11d.c +++ b/drivers/net/wireless/libertas/11d.c | |||
@@ -430,7 +430,7 @@ u8 lbs_get_scan_type_11d(u8 chan, | |||
430 | 430 | ||
431 | } | 431 | } |
432 | 432 | ||
433 | void lbs_init_11d(lbs_private * priv) | 433 | void lbs_init_11d(struct lbs_private *priv) |
434 | { | 434 | { |
435 | priv->adapter->enable11d = 0; | 435 | priv->adapter->enable11d = 0; |
436 | memset(&(priv->adapter->parsed_region_chan), 0, | 436 | memset(&(priv->adapter->parsed_region_chan), 0, |
@@ -440,10 +440,10 @@ void lbs_init_11d(lbs_private * priv) | |||
440 | 440 | ||
441 | /** | 441 | /** |
442 | * @brief This function sets DOMAIN INFO to FW | 442 | * @brief This function sets DOMAIN INFO to FW |
443 | * @param priv pointer to lbs_private | 443 | * @param priv pointer to struct lbs_private |
444 | * @return 0; -1 | 444 | * @return 0; -1 |
445 | */ | 445 | */ |
446 | static int set_domain_info_11d(lbs_private * priv) | 446 | static int set_domain_info_11d(struct lbs_private *priv) |
447 | { | 447 | { |
448 | int ret; | 448 | int ret; |
449 | 449 | ||
@@ -463,13 +463,13 @@ static int set_domain_info_11d(lbs_private * priv) | |||
463 | 463 | ||
464 | /** | 464 | /** |
465 | * @brief This function setups scan channels | 465 | * @brief This function setups scan channels |
466 | * @param priv pointer to lbs_private | 466 | * @param priv pointer to struct lbs_private |
467 | * @param band band | 467 | * @param band band |
468 | * @return 0 | 468 | * @return 0 |
469 | */ | 469 | */ |
470 | int lbs_set_universaltable(lbs_private * priv, u8 band) | 470 | int lbs_set_universaltable(struct lbs_private *priv, u8 band) |
471 | { | 471 | { |
472 | lbs_adapter *adapter = priv->adapter; | 472 | struct lbs_adapter *adapter = priv->adapter; |
473 | u16 size = sizeof(struct chan_freq_power); | 473 | u16 size = sizeof(struct chan_freq_power); |
474 | u16 i = 0; | 474 | u16 i = 0; |
475 | 475 | ||
@@ -492,20 +492,20 @@ int lbs_set_universaltable(lbs_private * priv, u8 band) | |||
492 | 492 | ||
493 | /** | 493 | /** |
494 | * @brief This function implements command CMD_802_11D_DOMAIN_INFO | 494 | * @brief This function implements command CMD_802_11D_DOMAIN_INFO |
495 | * @param priv pointer to lbs_private | 495 | * @param priv pointer to struct lbs_private |
496 | * @param cmd pointer to cmd buffer | 496 | * @param cmd pointer to cmd buffer |
497 | * @param cmdno cmd ID | 497 | * @param cmdno cmd ID |
498 | * @param cmdOption cmd action | 498 | * @param cmdOption cmd action |
499 | * @return 0 | 499 | * @return 0 |
500 | */ | 500 | */ |
501 | int lbs_cmd_802_11d_domain_info(lbs_private * priv, | 501 | int lbs_cmd_802_11d_domain_info(struct lbs_private *priv, |
502 | struct cmd_ds_command *cmd, u16 cmdno, | 502 | struct cmd_ds_command *cmd, u16 cmdno, |
503 | u16 cmdoption) | 503 | u16 cmdoption) |
504 | { | 504 | { |
505 | struct cmd_ds_802_11d_domain_info *pdomaininfo = | 505 | struct cmd_ds_802_11d_domain_info *pdomaininfo = |
506 | &cmd->params.domaininfo; | 506 | &cmd->params.domaininfo; |
507 | struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain; | 507 | struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain; |
508 | lbs_adapter *adapter = priv->adapter; | 508 | struct lbs_adapter *adapter = priv->adapter; |
509 | u8 nr_subband = adapter->domainreg.nr_subband; | 509 | u8 nr_subband = adapter->domainreg.nr_subband; |
510 | 510 | ||
511 | lbs_deb_enter(LBS_DEB_11D); | 511 | lbs_deb_enter(LBS_DEB_11D); |
@@ -552,11 +552,11 @@ done: | |||
552 | 552 | ||
553 | /** | 553 | /** |
554 | * @brief This function parses countryinfo from AP and download country info to FW | 554 | * @brief This function parses countryinfo from AP and download country info to FW |
555 | * @param priv pointer to lbs_private | 555 | * @param priv pointer to struct lbs_private |
556 | * @param resp pointer to command response buffer | 556 | * @param resp pointer to command response buffer |
557 | * @return 0; -1 | 557 | * @return 0; -1 |
558 | */ | 558 | */ |
559 | int lbs_ret_802_11d_domain_info(lbs_private * priv, | 559 | int lbs_ret_802_11d_domain_info(struct lbs_private *priv, |
560 | struct cmd_ds_command *resp) | 560 | struct cmd_ds_command *resp) |
561 | { | 561 | { |
562 | struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp; | 562 | struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp; |
@@ -598,14 +598,14 @@ int lbs_ret_802_11d_domain_info(lbs_private * priv, | |||
598 | 598 | ||
599 | /** | 599 | /** |
600 | * @brief This function parses countryinfo from AP and download country info to FW | 600 | * @brief This function parses countryinfo from AP and download country info to FW |
601 | * @param priv pointer to lbs_private | 601 | * @param priv pointer to struct lbs_private |
602 | * @return 0; -1 | 602 | * @return 0; -1 |
603 | */ | 603 | */ |
604 | int lbs_parse_dnld_countryinfo_11d(lbs_private * priv, | 604 | int lbs_parse_dnld_countryinfo_11d(struct lbs_private *priv, |
605 | struct bss_descriptor * bss) | 605 | struct bss_descriptor * bss) |
606 | { | 606 | { |
607 | int ret; | 607 | int ret; |
608 | lbs_adapter *adapter = priv->adapter; | 608 | struct lbs_adapter *adapter = priv->adapter; |
609 | 609 | ||
610 | lbs_deb_enter(LBS_DEB_11D); | 610 | lbs_deb_enter(LBS_DEB_11D); |
611 | if (priv->adapter->enable11d) { | 611 | if (priv->adapter->enable11d) { |
@@ -640,13 +640,13 @@ done: | |||
640 | 640 | ||
641 | /** | 641 | /** |
642 | * @brief This function generates 11D info from user specified regioncode and download to FW | 642 | * @brief This function generates 11D info from user specified regioncode and download to FW |
643 | * @param priv pointer to lbs_private | 643 | * @param priv pointer to struct lbs_private |
644 | * @return 0; -1 | 644 | * @return 0; -1 |
645 | */ | 645 | */ |
646 | int lbs_create_dnld_countryinfo_11d(lbs_private * priv) | 646 | int lbs_create_dnld_countryinfo_11d(struct lbs_private *priv) |
647 | { | 647 | { |
648 | int ret; | 648 | int ret; |
649 | lbs_adapter *adapter = priv->adapter; | 649 | struct lbs_adapter *adapter = priv->adapter; |
650 | struct region_channel *region_chan; | 650 | struct region_channel *region_chan; |
651 | u8 j; | 651 | u8 j; |
652 | 652 | ||
diff --git a/drivers/net/wireless/libertas/11d.h b/drivers/net/wireless/libertas/11d.h index 4f7f0deb6c84..811eea2cfba3 100644 --- a/drivers/net/wireless/libertas/11d.h +++ b/drivers/net/wireless/libertas/11d.h | |||
@@ -78,26 +78,28 @@ struct region_code_mapping { | |||
78 | u8 code; | 78 | u8 code; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | struct lbs_private; | ||
82 | |||
81 | u8 lbs_get_scan_type_11d(u8 chan, | 83 | u8 lbs_get_scan_type_11d(u8 chan, |
82 | struct parsed_region_chan_11d *parsed_region_chan); | 84 | struct parsed_region_chan_11d *parsed_region_chan); |
83 | 85 | ||
84 | u32 lbs_chan_2_freq(u8 chan, u8 band); | 86 | u32 lbs_chan_2_freq(u8 chan, u8 band); |
85 | 87 | ||
86 | void lbs_init_11d(lbs_private * priv); | 88 | void lbs_init_11d(struct lbs_private *priv); |
87 | 89 | ||
88 | int lbs_set_universaltable(lbs_private * priv, u8 band); | 90 | int lbs_set_universaltable(struct lbs_private *priv, u8 band); |
89 | 91 | ||
90 | int lbs_cmd_802_11d_domain_info(lbs_private * priv, | 92 | int lbs_cmd_802_11d_domain_info(struct lbs_private *priv, |
91 | struct cmd_ds_command *cmd, u16 cmdno, | 93 | struct cmd_ds_command *cmd, u16 cmdno, |
92 | u16 cmdOption); | 94 | u16 cmdOption); |
93 | 95 | ||
94 | int lbs_ret_802_11d_domain_info(lbs_private * priv, | 96 | int lbs_ret_802_11d_domain_info(struct lbs_private *priv, |
95 | struct cmd_ds_command *resp); | 97 | struct cmd_ds_command *resp); |
96 | 98 | ||
97 | struct bss_descriptor; | 99 | struct bss_descriptor; |
98 | int lbs_parse_dnld_countryinfo_11d(lbs_private * priv, | 100 | int lbs_parse_dnld_countryinfo_11d(struct lbs_private *priv, |
99 | struct bss_descriptor * bss); | 101 | struct bss_descriptor * bss); |
100 | 102 | ||
101 | int lbs_create_dnld_countryinfo_11d(lbs_private * priv); | 103 | int lbs_create_dnld_countryinfo_11d(struct lbs_private *priv); |
102 | 104 | ||
103 | #endif | 105 | #endif |
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index f634c9496ec2..b529e54151d6 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c | |||
@@ -15,10 +15,10 @@ static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; | |||
15 | static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | 15 | static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
16 | 16 | ||
17 | 17 | ||
18 | static int assoc_helper_essid(lbs_private *priv, | 18 | static int assoc_helper_essid(struct lbs_private *priv, |
19 | struct assoc_request * assoc_req) | 19 | struct assoc_request * assoc_req) |
20 | { | 20 | { |
21 | lbs_adapter *adapter = priv->adapter; | 21 | struct lbs_adapter *adapter = priv->adapter; |
22 | int ret = 0; | 22 | int ret = 0; |
23 | struct bss_descriptor * bss; | 23 | struct bss_descriptor * bss; |
24 | int channel = -1; | 24 | int channel = -1; |
@@ -75,10 +75,10 @@ static int assoc_helper_essid(lbs_private *priv, | |||
75 | } | 75 | } |
76 | 76 | ||
77 | 77 | ||
78 | static int assoc_helper_bssid(lbs_private *priv, | 78 | static int assoc_helper_bssid(struct lbs_private *priv, |
79 | struct assoc_request * assoc_req) | 79 | struct assoc_request * assoc_req) |
80 | { | 80 | { |
81 | lbs_adapter *adapter = priv->adapter; | 81 | struct lbs_adapter *adapter = priv->adapter; |
82 | int ret = 0; | 82 | int ret = 0; |
83 | struct bss_descriptor * bss; | 83 | struct bss_descriptor * bss; |
84 | DECLARE_MAC_BUF(mac); | 84 | DECLARE_MAC_BUF(mac); |
@@ -109,7 +109,7 @@ out: | |||
109 | } | 109 | } |
110 | 110 | ||
111 | 111 | ||
112 | static int assoc_helper_associate(lbs_private *priv, | 112 | static int assoc_helper_associate(struct lbs_private *priv, |
113 | struct assoc_request * assoc_req) | 113 | struct assoc_request * assoc_req) |
114 | { | 114 | { |
115 | int ret = 0, done = 0; | 115 | int ret = 0, done = 0; |
@@ -135,10 +135,10 @@ static int assoc_helper_associate(lbs_private *priv, | |||
135 | } | 135 | } |
136 | 136 | ||
137 | 137 | ||
138 | static int assoc_helper_mode(lbs_private *priv, | 138 | static int assoc_helper_mode(struct lbs_private *priv, |
139 | struct assoc_request * assoc_req) | 139 | struct assoc_request * assoc_req) |
140 | { | 140 | { |
141 | lbs_adapter *adapter = priv->adapter; | 141 | struct lbs_adapter *adapter = priv->adapter; |
142 | int ret = 0; | 142 | int ret = 0; |
143 | 143 | ||
144 | lbs_deb_enter(LBS_DEB_ASSOC); | 144 | lbs_deb_enter(LBS_DEB_ASSOC); |
@@ -165,7 +165,7 @@ done: | |||
165 | } | 165 | } |
166 | 166 | ||
167 | 167 | ||
168 | static int update_channel(lbs_private * priv) | 168 | static int update_channel(struct lbs_private *priv) |
169 | { | 169 | { |
170 | int ret; | 170 | int ret; |
171 | /* the channel in f/w could be out of sync, get the current channel */ | 171 | /* the channel in f/w could be out of sync, get the current channel */ |
@@ -179,7 +179,8 @@ static int update_channel(lbs_private * priv) | |||
179 | 179 | ||
180 | void lbs_sync_channel(struct work_struct *work) | 180 | void lbs_sync_channel(struct work_struct *work) |
181 | { | 181 | { |
182 | lbs_private *priv = container_of(work, lbs_private, sync_channel); | 182 | struct lbs_private *priv = container_of(work, struct lbs_private, |
183 | sync_channel); | ||
183 | 184 | ||
184 | lbs_deb_enter(LBS_DEB_ASSOC); | 185 | lbs_deb_enter(LBS_DEB_ASSOC); |
185 | if (update_channel(priv) != 0) | 186 | if (update_channel(priv) != 0) |
@@ -187,10 +188,10 @@ void lbs_sync_channel(struct work_struct *work) | |||
187 | lbs_deb_leave(LBS_DEB_ASSOC); | 188 | lbs_deb_leave(LBS_DEB_ASSOC); |
188 | } | 189 | } |
189 | 190 | ||
190 | static int assoc_helper_channel(lbs_private *priv, | 191 | static int assoc_helper_channel(struct lbs_private *priv, |
191 | struct assoc_request * assoc_req) | 192 | struct assoc_request * assoc_req) |
192 | { | 193 | { |
193 | lbs_adapter *adapter = priv->adapter; | 194 | struct lbs_adapter *adapter = priv->adapter; |
194 | int ret = 0; | 195 | int ret = 0; |
195 | 196 | ||
196 | lbs_deb_enter(LBS_DEB_ASSOC); | 197 | lbs_deb_enter(LBS_DEB_ASSOC); |
@@ -242,10 +243,10 @@ done: | |||
242 | } | 243 | } |
243 | 244 | ||
244 | 245 | ||
245 | static int assoc_helper_wep_keys(lbs_private *priv, | 246 | static int assoc_helper_wep_keys(struct lbs_private *priv, |
246 | struct assoc_request * assoc_req) | 247 | struct assoc_request * assoc_req) |
247 | { | 248 | { |
248 | lbs_adapter *adapter = priv->adapter; | 249 | struct lbs_adapter *adapter = priv->adapter; |
249 | int i; | 250 | int i; |
250 | int ret = 0; | 251 | int ret = 0; |
251 | 252 | ||
@@ -297,10 +298,10 @@ out: | |||
297 | return ret; | 298 | return ret; |
298 | } | 299 | } |
299 | 300 | ||
300 | static int assoc_helper_secinfo(lbs_private *priv, | 301 | static int assoc_helper_secinfo(struct lbs_private *priv, |
301 | struct assoc_request * assoc_req) | 302 | struct assoc_request * assoc_req) |
302 | { | 303 | { |
303 | lbs_adapter *adapter = priv->adapter; | 304 | struct lbs_adapter *adapter = priv->adapter; |
304 | int ret = 0; | 305 | int ret = 0; |
305 | u32 do_wpa; | 306 | u32 do_wpa; |
306 | u32 rsn = 0; | 307 | u32 rsn = 0; |
@@ -349,7 +350,7 @@ out: | |||
349 | } | 350 | } |
350 | 351 | ||
351 | 352 | ||
352 | static int assoc_helper_wpa_keys(lbs_private *priv, | 353 | static int assoc_helper_wpa_keys(struct lbs_private *priv, |
353 | struct assoc_request * assoc_req) | 354 | struct assoc_request * assoc_req) |
354 | { | 355 | { |
355 | int ret = 0; | 356 | int ret = 0; |
@@ -392,10 +393,10 @@ out: | |||
392 | } | 393 | } |
393 | 394 | ||
394 | 395 | ||
395 | static int assoc_helper_wpa_ie(lbs_private *priv, | 396 | static int assoc_helper_wpa_ie(struct lbs_private *priv, |
396 | struct assoc_request * assoc_req) | 397 | struct assoc_request * assoc_req) |
397 | { | 398 | { |
398 | lbs_adapter *adapter = priv->adapter; | 399 | struct lbs_adapter *adapter = priv->adapter; |
399 | int ret = 0; | 400 | int ret = 0; |
400 | 401 | ||
401 | lbs_deb_enter(LBS_DEB_ASSOC); | 402 | lbs_deb_enter(LBS_DEB_ASSOC); |
@@ -413,7 +414,7 @@ static int assoc_helper_wpa_ie(lbs_private *priv, | |||
413 | } | 414 | } |
414 | 415 | ||
415 | 416 | ||
416 | static int should_deauth_infrastructure(lbs_adapter *adapter, | 417 | static int should_deauth_infrastructure(struct lbs_adapter *adapter, |
417 | struct assoc_request * assoc_req) | 418 | struct assoc_request * assoc_req) |
418 | { | 419 | { |
419 | int ret = 0; | 420 | int ret = 0; |
@@ -465,7 +466,7 @@ out: | |||
465 | } | 466 | } |
466 | 467 | ||
467 | 468 | ||
468 | static int should_stop_adhoc(lbs_adapter *adapter, | 469 | static int should_stop_adhoc(struct lbs_adapter *adapter, |
469 | struct assoc_request * assoc_req) | 470 | struct assoc_request * assoc_req) |
470 | { | 471 | { |
471 | lbs_deb_enter(LBS_DEB_ASSOC); | 472 | lbs_deb_enter(LBS_DEB_ASSOC); |
@@ -496,8 +497,9 @@ static int should_stop_adhoc(lbs_adapter *adapter, | |||
496 | 497 | ||
497 | void lbs_association_worker(struct work_struct *work) | 498 | void lbs_association_worker(struct work_struct *work) |
498 | { | 499 | { |
499 | lbs_private *priv = container_of(work, lbs_private, assoc_work.work); | 500 | struct lbs_private *priv = container_of(work, struct lbs_private, |
500 | lbs_adapter *adapter = priv->adapter; | 501 | assoc_work.work); |
502 | struct lbs_adapter *adapter = priv->adapter; | ||
501 | struct assoc_request * assoc_req = NULL; | 503 | struct assoc_request * assoc_req = NULL; |
502 | int ret = 0; | 504 | int ret = 0; |
503 | int find_any_ssid = 0; | 505 | int find_any_ssid = 0; |
@@ -684,7 +686,7 @@ done: | |||
684 | /* | 686 | /* |
685 | * Caller MUST hold any necessary locks | 687 | * Caller MUST hold any necessary locks |
686 | */ | 688 | */ |
687 | struct assoc_request *lbs_get_association_request(lbs_adapter *adapter) | 689 | struct assoc_request *lbs_get_association_request(struct lbs_adapter *adapter) |
688 | { | 690 | { |
689 | struct assoc_request * assoc_req; | 691 | struct assoc_request * assoc_req; |
690 | 692 | ||
diff --git a/drivers/net/wireless/libertas/assoc.h b/drivers/net/wireless/libertas/assoc.h index 462931cbf3be..fad00ae0d00d 100644 --- a/drivers/net/wireless/libertas/assoc.h +++ b/drivers/net/wireless/libertas/assoc.h | |||
@@ -6,9 +6,7 @@ | |||
6 | #include "dev.h" | 6 | #include "dev.h" |
7 | 7 | ||
8 | void lbs_association_worker(struct work_struct *work); | 8 | void lbs_association_worker(struct work_struct *work); |
9 | 9 | struct assoc_request *lbs_get_association_request(struct lbs_adapter *adapter); | |
10 | struct assoc_request * lbs_get_association_request(lbs_adapter *adapter); | ||
11 | |||
12 | void lbs_sync_channel(struct work_struct *work); | 10 | void lbs_sync_channel(struct work_struct *work); |
13 | 11 | ||
14 | #endif /* _LBS_ASSOC_H */ | 12 | #endif /* _LBS_ASSOC_H */ |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 3702c5da1f6f..dde17c65bccd 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -37,7 +37,7 @@ static u8 is_command_allowed_in_ps(__le16 command) | |||
37 | return 0; | 37 | return 0; |
38 | } | 38 | } |
39 | 39 | ||
40 | static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd) | 40 | static int lbs_cmd_hw_spec(struct lbs_private *priv, struct cmd_ds_command *cmd) |
41 | { | 41 | { |
42 | struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec; | 42 | struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec; |
43 | 43 | ||
@@ -51,7 +51,7 @@ static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd) | |||
51 | return 0; | 51 | return 0; |
52 | } | 52 | } |
53 | 53 | ||
54 | static int lbs_cmd_802_11_ps_mode(lbs_private * priv, | 54 | static int lbs_cmd_802_11_ps_mode(struct lbs_private *priv, |
55 | struct cmd_ds_command *cmd, | 55 | struct cmd_ds_command *cmd, |
56 | u16 cmd_action) | 56 | u16 cmd_action) |
57 | { | 57 | { |
@@ -90,7 +90,7 @@ static int lbs_cmd_802_11_ps_mode(lbs_private * priv, | |||
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
92 | 92 | ||
93 | static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv, | 93 | static int lbs_cmd_802_11_inactivity_timeout(struct lbs_private *priv, |
94 | struct cmd_ds_command *cmd, | 94 | struct cmd_ds_command *cmd, |
95 | u16 cmd_action, void *pdata_buf) | 95 | u16 cmd_action, void *pdata_buf) |
96 | { | 96 | { |
@@ -114,11 +114,11 @@ static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv, | |||
114 | return 0; | 114 | return 0; |
115 | } | 115 | } |
116 | 116 | ||
117 | static int lbs_cmd_802_11_sleep_params(lbs_private * priv, | 117 | static int lbs_cmd_802_11_sleep_params(struct lbs_private *priv, |
118 | struct cmd_ds_command *cmd, | 118 | struct cmd_ds_command *cmd, |
119 | u16 cmd_action) | 119 | u16 cmd_action) |
120 | { | 120 | { |
121 | lbs_adapter *adapter = priv->adapter; | 121 | struct lbs_adapter *adapter = priv->adapter; |
122 | struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params; | 122 | struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params; |
123 | 123 | ||
124 | lbs_deb_enter(LBS_DEB_CMD); | 124 | lbs_deb_enter(LBS_DEB_CMD); |
@@ -145,13 +145,13 @@ static int lbs_cmd_802_11_sleep_params(lbs_private * priv, | |||
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
147 | 147 | ||
148 | static int lbs_cmd_802_11_set_wep(lbs_private * priv, | 148 | static int lbs_cmd_802_11_set_wep(struct lbs_private *priv, |
149 | struct cmd_ds_command *cmd, | 149 | struct cmd_ds_command *cmd, |
150 | u32 cmd_act, | 150 | u32 cmd_act, |
151 | void * pdata_buf) | 151 | void * pdata_buf) |
152 | { | 152 | { |
153 | struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep; | 153 | struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep; |
154 | lbs_adapter *adapter = priv->adapter; | 154 | struct lbs_adapter *adapter = priv->adapter; |
155 | int ret = 0; | 155 | int ret = 0; |
156 | struct assoc_request * assoc_req = pdata_buf; | 156 | struct assoc_request * assoc_req = pdata_buf; |
157 | 157 | ||
@@ -219,7 +219,7 @@ done: | |||
219 | return ret; | 219 | return ret; |
220 | } | 220 | } |
221 | 221 | ||
222 | static int lbs_cmd_802_11_enable_rsn(lbs_private * priv, | 222 | static int lbs_cmd_802_11_enable_rsn(struct lbs_private *priv, |
223 | struct cmd_ds_command *cmd, | 223 | struct cmd_ds_command *cmd, |
224 | u16 cmd_action, | 224 | u16 cmd_action, |
225 | void * pdata_buf) | 225 | void * pdata_buf) |
@@ -272,7 +272,7 @@ static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset, | |||
272 | lbs_deb_leave(LBS_DEB_CMD); | 272 | lbs_deb_leave(LBS_DEB_CMD); |
273 | } | 273 | } |
274 | 274 | ||
275 | static int lbs_cmd_802_11_key_material(lbs_private * priv, | 275 | static int lbs_cmd_802_11_key_material(struct lbs_private *priv, |
276 | struct cmd_ds_command *cmd, | 276 | struct cmd_ds_command *cmd, |
277 | u16 cmd_action, | 277 | u16 cmd_action, |
278 | u32 cmd_oid, void *pdata_buf) | 278 | u32 cmd_oid, void *pdata_buf) |
@@ -319,7 +319,7 @@ done: | |||
319 | return ret; | 319 | return ret; |
320 | } | 320 | } |
321 | 321 | ||
322 | static int lbs_cmd_802_11_reset(lbs_private * priv, | 322 | static int lbs_cmd_802_11_reset(struct lbs_private *priv, |
323 | struct cmd_ds_command *cmd, int cmd_action) | 323 | struct cmd_ds_command *cmd, int cmd_action) |
324 | { | 324 | { |
325 | struct cmd_ds_802_11_reset *reset = &cmd->params.reset; | 325 | struct cmd_ds_802_11_reset *reset = &cmd->params.reset; |
@@ -334,7 +334,7 @@ static int lbs_cmd_802_11_reset(lbs_private * priv, | |||
334 | return 0; | 334 | return 0; |
335 | } | 335 | } |
336 | 336 | ||
337 | static int lbs_cmd_802_11_get_log(lbs_private * priv, | 337 | static int lbs_cmd_802_11_get_log(struct lbs_private *priv, |
338 | struct cmd_ds_command *cmd) | 338 | struct cmd_ds_command *cmd) |
339 | { | 339 | { |
340 | lbs_deb_enter(LBS_DEB_CMD); | 340 | lbs_deb_enter(LBS_DEB_CMD); |
@@ -346,7 +346,7 @@ static int lbs_cmd_802_11_get_log(lbs_private * priv, | |||
346 | return 0; | 346 | return 0; |
347 | } | 347 | } |
348 | 348 | ||
349 | static int lbs_cmd_802_11_get_stat(lbs_private * priv, | 349 | static int lbs_cmd_802_11_get_stat(struct lbs_private *priv, |
350 | struct cmd_ds_command *cmd) | 350 | struct cmd_ds_command *cmd) |
351 | { | 351 | { |
352 | lbs_deb_enter(LBS_DEB_CMD); | 352 | lbs_deb_enter(LBS_DEB_CMD); |
@@ -358,13 +358,13 @@ static int lbs_cmd_802_11_get_stat(lbs_private * priv, | |||
358 | return 0; | 358 | return 0; |
359 | } | 359 | } |
360 | 360 | ||
361 | static int lbs_cmd_802_11_snmp_mib(lbs_private * priv, | 361 | static int lbs_cmd_802_11_snmp_mib(struct lbs_private *priv, |
362 | struct cmd_ds_command *cmd, | 362 | struct cmd_ds_command *cmd, |
363 | int cmd_action, | 363 | int cmd_action, |
364 | int cmd_oid, void *pdata_buf) | 364 | int cmd_oid, void *pdata_buf) |
365 | { | 365 | { |
366 | struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib; | 366 | struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib; |
367 | lbs_adapter *adapter = priv->adapter; | 367 | struct lbs_adapter *adapter = priv->adapter; |
368 | u8 ucTemp; | 368 | u8 ucTemp; |
369 | 369 | ||
370 | lbs_deb_enter(LBS_DEB_CMD); | 370 | lbs_deb_enter(LBS_DEB_CMD); |
@@ -479,11 +479,11 @@ static int lbs_cmd_802_11_snmp_mib(lbs_private * priv, | |||
479 | return 0; | 479 | return 0; |
480 | } | 480 | } |
481 | 481 | ||
482 | static int lbs_cmd_802_11_radio_control(lbs_private * priv, | 482 | static int lbs_cmd_802_11_radio_control(struct lbs_private *priv, |
483 | struct cmd_ds_command *cmd, | 483 | struct cmd_ds_command *cmd, |
484 | int cmd_action) | 484 | int cmd_action) |
485 | { | 485 | { |
486 | lbs_adapter *adapter = priv->adapter; | 486 | struct lbs_adapter *adapter = priv->adapter; |
487 | struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio; | 487 | struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio; |
488 | 488 | ||
489 | lbs_deb_enter(LBS_DEB_CMD); | 489 | lbs_deb_enter(LBS_DEB_CMD); |
@@ -519,7 +519,7 @@ static int lbs_cmd_802_11_radio_control(lbs_private * priv, | |||
519 | return 0; | 519 | return 0; |
520 | } | 520 | } |
521 | 521 | ||
522 | static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv, | 522 | static int lbs_cmd_802_11_rf_tx_power(struct lbs_private *priv, |
523 | struct cmd_ds_command *cmd, | 523 | struct cmd_ds_command *cmd, |
524 | u16 cmd_action, void *pdata_buf) | 524 | u16 cmd_action, void *pdata_buf) |
525 | { | 525 | { |
@@ -563,7 +563,7 @@ static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv, | |||
563 | return 0; | 563 | return 0; |
564 | } | 564 | } |
565 | 565 | ||
566 | static int lbs_cmd_802_11_monitor_mode(lbs_private * priv, | 566 | static int lbs_cmd_802_11_monitor_mode(struct lbs_private *priv, |
567 | struct cmd_ds_command *cmd, | 567 | struct cmd_ds_command *cmd, |
568 | u16 cmd_action, void *pdata_buf) | 568 | u16 cmd_action, void *pdata_buf) |
569 | { | 569 | { |
@@ -583,13 +583,13 @@ static int lbs_cmd_802_11_monitor_mode(lbs_private * priv, | |||
583 | return 0; | 583 | return 0; |
584 | } | 584 | } |
585 | 585 | ||
586 | static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv, | 586 | static int lbs_cmd_802_11_rate_adapt_rateset(struct lbs_private *priv, |
587 | struct cmd_ds_command *cmd, | 587 | struct cmd_ds_command *cmd, |
588 | u16 cmd_action) | 588 | u16 cmd_action) |
589 | { | 589 | { |
590 | struct cmd_ds_802_11_rate_adapt_rateset | 590 | struct cmd_ds_802_11_rate_adapt_rateset |
591 | *rateadapt = &cmd->params.rateset; | 591 | *rateadapt = &cmd->params.rateset; |
592 | lbs_adapter *adapter = priv->adapter; | 592 | struct lbs_adapter *adapter = priv->adapter; |
593 | 593 | ||
594 | lbs_deb_enter(LBS_DEB_CMD); | 594 | lbs_deb_enter(LBS_DEB_CMD); |
595 | cmd->size = | 595 | cmd->size = |
@@ -605,12 +605,12 @@ static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv, | |||
605 | return 0; | 605 | return 0; |
606 | } | 606 | } |
607 | 607 | ||
608 | static int lbs_cmd_802_11_data_rate(lbs_private * priv, | 608 | static int lbs_cmd_802_11_data_rate(struct lbs_private *priv, |
609 | struct cmd_ds_command *cmd, | 609 | struct cmd_ds_command *cmd, |
610 | u16 cmd_action) | 610 | u16 cmd_action) |
611 | { | 611 | { |
612 | struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate; | 612 | struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate; |
613 | lbs_adapter *adapter = priv->adapter; | 613 | struct lbs_adapter *adapter = priv->adapter; |
614 | 614 | ||
615 | lbs_deb_enter(LBS_DEB_CMD); | 615 | lbs_deb_enter(LBS_DEB_CMD); |
616 | 616 | ||
@@ -632,12 +632,12 @@ static int lbs_cmd_802_11_data_rate(lbs_private * priv, | |||
632 | return 0; | 632 | return 0; |
633 | } | 633 | } |
634 | 634 | ||
635 | static int lbs_cmd_mac_multicast_adr(lbs_private * priv, | 635 | static int lbs_cmd_mac_multicast_adr(struct lbs_private *priv, |
636 | struct cmd_ds_command *cmd, | 636 | struct cmd_ds_command *cmd, |
637 | u16 cmd_action) | 637 | u16 cmd_action) |
638 | { | 638 | { |
639 | struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr; | 639 | struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr; |
640 | lbs_adapter *adapter = priv->adapter; | 640 | struct lbs_adapter *adapter = priv->adapter; |
641 | 641 | ||
642 | lbs_deb_enter(LBS_DEB_CMD); | 642 | lbs_deb_enter(LBS_DEB_CMD); |
643 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) + | 643 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) + |
@@ -655,7 +655,7 @@ static int lbs_cmd_mac_multicast_adr(lbs_private * priv, | |||
655 | return 0; | 655 | return 0; |
656 | } | 656 | } |
657 | 657 | ||
658 | static int lbs_cmd_802_11_rf_channel(lbs_private * priv, | 658 | static int lbs_cmd_802_11_rf_channel(struct lbs_private *priv, |
659 | struct cmd_ds_command *cmd, | 659 | struct cmd_ds_command *cmd, |
660 | int option, void *pdata_buf) | 660 | int option, void *pdata_buf) |
661 | { | 661 | { |
@@ -676,10 +676,10 @@ static int lbs_cmd_802_11_rf_channel(lbs_private * priv, | |||
676 | return 0; | 676 | return 0; |
677 | } | 677 | } |
678 | 678 | ||
679 | static int lbs_cmd_802_11_rssi(lbs_private * priv, | 679 | static int lbs_cmd_802_11_rssi(struct lbs_private *priv, |
680 | struct cmd_ds_command *cmd) | 680 | struct cmd_ds_command *cmd) |
681 | { | 681 | { |
682 | lbs_adapter *adapter = priv->adapter; | 682 | struct lbs_adapter *adapter = priv->adapter; |
683 | 683 | ||
684 | lbs_deb_enter(LBS_DEB_CMD); | 684 | lbs_deb_enter(LBS_DEB_CMD); |
685 | cmd->command = cpu_to_le16(CMD_802_11_RSSI); | 685 | cmd->command = cpu_to_le16(CMD_802_11_RSSI); |
@@ -698,7 +698,7 @@ static int lbs_cmd_802_11_rssi(lbs_private * priv, | |||
698 | return 0; | 698 | return 0; |
699 | } | 699 | } |
700 | 700 | ||
701 | static int lbs_cmd_reg_access(lbs_private * priv, | 701 | static int lbs_cmd_reg_access(struct lbs_private *priv, |
702 | struct cmd_ds_command *cmdptr, | 702 | struct cmd_ds_command *cmdptr, |
703 | u8 cmd_action, void *pdata_buf) | 703 | u8 cmd_action, void *pdata_buf) |
704 | { | 704 | { |
@@ -773,11 +773,11 @@ static int lbs_cmd_reg_access(lbs_private * priv, | |||
773 | return 0; | 773 | return 0; |
774 | } | 774 | } |
775 | 775 | ||
776 | static int lbs_cmd_802_11_mac_address(lbs_private * priv, | 776 | static int lbs_cmd_802_11_mac_address(struct lbs_private *priv, |
777 | struct cmd_ds_command *cmd, | 777 | struct cmd_ds_command *cmd, |
778 | u16 cmd_action) | 778 | u16 cmd_action) |
779 | { | 779 | { |
780 | lbs_adapter *adapter = priv->adapter; | 780 | struct lbs_adapter *adapter = priv->adapter; |
781 | 781 | ||
782 | lbs_deb_enter(LBS_DEB_CMD); | 782 | lbs_deb_enter(LBS_DEB_CMD); |
783 | cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS); | 783 | cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS); |
@@ -797,7 +797,7 @@ static int lbs_cmd_802_11_mac_address(lbs_private * priv, | |||
797 | return 0; | 797 | return 0; |
798 | } | 798 | } |
799 | 799 | ||
800 | static int lbs_cmd_802_11_eeprom_access(lbs_private * priv, | 800 | static int lbs_cmd_802_11_eeprom_access(struct lbs_private *priv, |
801 | struct cmd_ds_command *cmd, | 801 | struct cmd_ds_command *cmd, |
802 | int cmd_action, void *pdata_buf) | 802 | int cmd_action, void *pdata_buf) |
803 | { | 803 | { |
@@ -819,7 +819,7 @@ static int lbs_cmd_802_11_eeprom_access(lbs_private * priv, | |||
819 | return 0; | 819 | return 0; |
820 | } | 820 | } |
821 | 821 | ||
822 | static int lbs_cmd_bt_access(lbs_private * priv, | 822 | static int lbs_cmd_bt_access(struct lbs_private *priv, |
823 | struct cmd_ds_command *cmd, | 823 | struct cmd_ds_command *cmd, |
824 | u16 cmd_action, void *pdata_buf) | 824 | u16 cmd_action, void *pdata_buf) |
825 | { | 825 | { |
@@ -857,7 +857,7 @@ static int lbs_cmd_bt_access(lbs_private * priv, | |||
857 | return 0; | 857 | return 0; |
858 | } | 858 | } |
859 | 859 | ||
860 | static int lbs_cmd_fwt_access(lbs_private * priv, | 860 | static int lbs_cmd_fwt_access(struct lbs_private *priv, |
861 | struct cmd_ds_command *cmd, | 861 | struct cmd_ds_command *cmd, |
862 | u16 cmd_action, void *pdata_buf) | 862 | u16 cmd_action, void *pdata_buf) |
863 | { | 863 | { |
@@ -879,7 +879,7 @@ static int lbs_cmd_fwt_access(lbs_private * priv, | |||
879 | return 0; | 879 | return 0; |
880 | } | 880 | } |
881 | 881 | ||
882 | static int lbs_cmd_mesh_access(lbs_private * priv, | 882 | static int lbs_cmd_mesh_access(struct lbs_private *priv, |
883 | struct cmd_ds_command *cmd, | 883 | struct cmd_ds_command *cmd, |
884 | u16 cmd_action, void *pdata_buf) | 884 | u16 cmd_action, void *pdata_buf) |
885 | { | 885 | { |
@@ -923,7 +923,7 @@ static int lbs_cmd_bcn_ctrl(struct lbs_private * priv, | |||
923 | return 0; | 923 | return 0; |
924 | } | 924 | } |
925 | 925 | ||
926 | static int lbs_cmd_set_boot2_ver(lbs_private * priv, | 926 | static int lbs_cmd_set_boot2_ver(struct lbs_private *priv, |
927 | struct cmd_ds_command *cmd, | 927 | struct cmd_ds_command *cmd, |
928 | u16 cmd_action, void *pdata_buf) | 928 | u16 cmd_action, void *pdata_buf) |
929 | { | 929 | { |
@@ -938,7 +938,9 @@ static int lbs_cmd_set_boot2_ver(lbs_private * priv, | |||
938 | * Note: NEVER use lbs_queue_cmd() with addtail==0 other than for | 938 | * Note: NEVER use lbs_queue_cmd() with addtail==0 other than for |
939 | * the command timer, because it does not account for queued commands. | 939 | * the command timer, because it does not account for queued commands. |
940 | */ | 940 | */ |
941 | void lbs_queue_cmd(lbs_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail) | 941 | void lbs_queue_cmd(struct lbs_adapter *adapter, |
942 | struct cmd_ctrl_node *cmdnode, | ||
943 | u8 addtail) | ||
942 | { | 944 | { |
943 | unsigned long flags; | 945 | unsigned long flags; |
944 | struct cmd_ds_command *cmdptr; | 946 | struct cmd_ds_command *cmdptr; |
@@ -990,12 +992,12 @@ done: | |||
990 | * For now - we are not performing the endian conversion the second time - but | 992 | * For now - we are not performing the endian conversion the second time - but |
991 | * for PS and DEEP_SLEEP we need to worry | 993 | * for PS and DEEP_SLEEP we need to worry |
992 | */ | 994 | */ |
993 | static int DownloadcommandToStation(lbs_private * priv, | 995 | static int DownloadcommandToStation(struct lbs_private *priv, |
994 | struct cmd_ctrl_node *cmdnode) | 996 | struct cmd_ctrl_node *cmdnode) |
995 | { | 997 | { |
996 | unsigned long flags; | 998 | unsigned long flags; |
997 | struct cmd_ds_command *cmdptr; | 999 | struct cmd_ds_command *cmdptr; |
998 | lbs_adapter *adapter = priv->adapter; | 1000 | struct lbs_adapter *adapter = priv->adapter; |
999 | int ret = -1; | 1001 | int ret = -1; |
1000 | u16 cmdsize; | 1002 | u16 cmdsize; |
1001 | u16 command; | 1003 | u16 command; |
@@ -1060,7 +1062,7 @@ done: | |||
1060 | return ret; | 1062 | return ret; |
1061 | } | 1063 | } |
1062 | 1064 | ||
1063 | static int lbs_cmd_mac_control(lbs_private * priv, | 1065 | static int lbs_cmd_mac_control(struct lbs_private *priv, |
1064 | struct cmd_ds_command *cmd) | 1066 | struct cmd_ds_command *cmd) |
1065 | { | 1067 | { |
1066 | struct cmd_ds_mac_control *mac = &cmd->params.macctrl; | 1068 | struct cmd_ds_mac_control *mac = &cmd->params.macctrl; |
@@ -1082,9 +1084,10 @@ static int lbs_cmd_mac_control(lbs_private * priv, | |||
1082 | * This function inserts command node to cmdfreeq | 1084 | * This function inserts command node to cmdfreeq |
1083 | * after cleans it. Requires adapter->driver_lock held. | 1085 | * after cleans it. Requires adapter->driver_lock held. |
1084 | */ | 1086 | */ |
1085 | void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd) | 1087 | void __lbs_cleanup_and_insert_cmd(struct lbs_private *priv, |
1088 | struct cmd_ctrl_node *ptempcmd) | ||
1086 | { | 1089 | { |
1087 | lbs_adapter *adapter = priv->adapter; | 1090 | struct lbs_adapter *adapter = priv->adapter; |
1088 | 1091 | ||
1089 | if (!ptempcmd) | 1092 | if (!ptempcmd) |
1090 | return; | 1093 | return; |
@@ -1093,7 +1096,8 @@ void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptem | |||
1093 | list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq); | 1096 | list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq); |
1094 | } | 1097 | } |
1095 | 1098 | ||
1096 | static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd) | 1099 | static void lbs_cleanup_and_insert_cmd(struct lbs_private *priv, |
1100 | struct cmd_ctrl_node *ptempcmd) | ||
1097 | { | 1101 | { |
1098 | unsigned long flags; | 1102 | unsigned long flags; |
1099 | 1103 | ||
@@ -1102,7 +1106,7 @@ static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node | |||
1102 | spin_unlock_irqrestore(&priv->adapter->driver_lock, flags); | 1106 | spin_unlock_irqrestore(&priv->adapter->driver_lock, flags); |
1103 | } | 1107 | } |
1104 | 1108 | ||
1105 | int lbs_set_radio_control(lbs_private * priv) | 1109 | int lbs_set_radio_control(struct lbs_private *priv) |
1106 | { | 1110 | { |
1107 | int ret = 0; | 1111 | int ret = 0; |
1108 | 1112 | ||
@@ -1120,7 +1124,7 @@ int lbs_set_radio_control(lbs_private * priv) | |||
1120 | return ret; | 1124 | return ret; |
1121 | } | 1125 | } |
1122 | 1126 | ||
1123 | int lbs_set_mac_packet_filter(lbs_private * priv) | 1127 | int lbs_set_mac_packet_filter(struct lbs_private *priv) |
1124 | { | 1128 | { |
1125 | int ret = 0; | 1129 | int ret = 0; |
1126 | 1130 | ||
@@ -1137,7 +1141,7 @@ int lbs_set_mac_packet_filter(lbs_private * priv) | |||
1137 | /** | 1141 | /** |
1138 | * @brief This function prepare the command before send to firmware. | 1142 | * @brief This function prepare the command before send to firmware. |
1139 | * | 1143 | * |
1140 | * @param priv A pointer to lbs_private structure | 1144 | * @param priv A pointer to struct lbs_private structure |
1141 | * @param cmd_no command number | 1145 | * @param cmd_no command number |
1142 | * @param cmd_action command action: GET or SET | 1146 | * @param cmd_action command action: GET or SET |
1143 | * @param wait_option wait option: wait response or not | 1147 | * @param wait_option wait option: wait response or not |
@@ -1145,13 +1149,13 @@ int lbs_set_mac_packet_filter(lbs_private * priv) | |||
1145 | * @param pdata_buf A pointer to informaion buffer | 1149 | * @param pdata_buf A pointer to informaion buffer |
1146 | * @return 0 or -1 | 1150 | * @return 0 or -1 |
1147 | */ | 1151 | */ |
1148 | int lbs_prepare_and_send_command(lbs_private * priv, | 1152 | int lbs_prepare_and_send_command(struct lbs_private *priv, |
1149 | u16 cmd_no, | 1153 | u16 cmd_no, |
1150 | u16 cmd_action, | 1154 | u16 cmd_action, |
1151 | u16 wait_option, u32 cmd_oid, void *pdata_buf) | 1155 | u16 wait_option, u32 cmd_oid, void *pdata_buf) |
1152 | { | 1156 | { |
1153 | int ret = 0; | 1157 | int ret = 0; |
1154 | lbs_adapter *adapter = priv->adapter; | 1158 | struct lbs_adapter *adapter = priv->adapter; |
1155 | struct cmd_ctrl_node *cmdnode; | 1159 | struct cmd_ctrl_node *cmdnode; |
1156 | struct cmd_ds_command *cmdptr; | 1160 | struct cmd_ds_command *cmdptr; |
1157 | unsigned long flags; | 1161 | unsigned long flags; |
@@ -1470,17 +1474,17 @@ EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command); | |||
1470 | * @brief This function allocates the command buffer and link | 1474 | * @brief This function allocates the command buffer and link |
1471 | * it to command free queue. | 1475 | * it to command free queue. |
1472 | * | 1476 | * |
1473 | * @param priv A pointer to lbs_private structure | 1477 | * @param priv A pointer to struct lbs_private structure |
1474 | * @return 0 or -1 | 1478 | * @return 0 or -1 |
1475 | */ | 1479 | */ |
1476 | int lbs_allocate_cmd_buffer(lbs_private * priv) | 1480 | int lbs_allocate_cmd_buffer(struct lbs_private *priv) |
1477 | { | 1481 | { |
1478 | int ret = 0; | 1482 | int ret = 0; |
1479 | u32 ulbufsize; | 1483 | u32 ulbufsize; |
1480 | u32 i; | 1484 | u32 i; |
1481 | struct cmd_ctrl_node *tempcmd_array; | 1485 | struct cmd_ctrl_node *tempcmd_array; |
1482 | u8 *ptempvirtualaddr; | 1486 | u8 *ptempvirtualaddr; |
1483 | lbs_adapter *adapter = priv->adapter; | 1487 | struct lbs_adapter *adapter = priv->adapter; |
1484 | 1488 | ||
1485 | lbs_deb_enter(LBS_DEB_HOST); | 1489 | lbs_deb_enter(LBS_DEB_HOST); |
1486 | 1490 | ||
@@ -1522,15 +1526,15 @@ done: | |||
1522 | /** | 1526 | /** |
1523 | * @brief This function frees the command buffer. | 1527 | * @brief This function frees the command buffer. |
1524 | * | 1528 | * |
1525 | * @param priv A pointer to lbs_private structure | 1529 | * @param priv A pointer to struct lbs_private structure |
1526 | * @return 0 or -1 | 1530 | * @return 0 or -1 |
1527 | */ | 1531 | */ |
1528 | int lbs_free_cmd_buffer(lbs_private * priv) | 1532 | int lbs_free_cmd_buffer(struct lbs_private *priv) |
1529 | { | 1533 | { |
1530 | u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */ | 1534 | u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */ |
1531 | unsigned int i; | 1535 | unsigned int i; |
1532 | struct cmd_ctrl_node *tempcmd_array; | 1536 | struct cmd_ctrl_node *tempcmd_array; |
1533 | lbs_adapter *adapter = priv->adapter; | 1537 | struct lbs_adapter *adapter = priv->adapter; |
1534 | 1538 | ||
1535 | lbs_deb_enter(LBS_DEB_HOST); | 1539 | lbs_deb_enter(LBS_DEB_HOST); |
1536 | 1540 | ||
@@ -1566,13 +1570,13 @@ done: | |||
1566 | * @brief This function gets a free command node if available in | 1570 | * @brief This function gets a free command node if available in |
1567 | * command free queue. | 1571 | * command free queue. |
1568 | * | 1572 | * |
1569 | * @param priv A pointer to lbs_private structure | 1573 | * @param priv A pointer to struct lbs_private structure |
1570 | * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL | 1574 | * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL |
1571 | */ | 1575 | */ |
1572 | struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv) | 1576 | struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(struct lbs_private *priv) |
1573 | { | 1577 | { |
1574 | struct cmd_ctrl_node *tempnode; | 1578 | struct cmd_ctrl_node *tempnode; |
1575 | lbs_adapter *adapter = priv->adapter; | 1579 | struct lbs_adapter *adapter = priv->adapter; |
1576 | unsigned long flags; | 1580 | unsigned long flags; |
1577 | 1581 | ||
1578 | lbs_deb_enter(LBS_DEB_HOST); | 1582 | lbs_deb_enter(LBS_DEB_HOST); |
@@ -1627,14 +1631,14 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode) | |||
1627 | /** | 1631 | /** |
1628 | * @brief This function initializes the command node. | 1632 | * @brief This function initializes the command node. |
1629 | * | 1633 | * |
1630 | * @param priv A pointer to lbs_private structure | 1634 | * @param priv A pointer to struct lbs_private structure |
1631 | * @param ptempnode A pointer to cmd_ctrl_node structure | 1635 | * @param ptempnode A pointer to cmd_ctrl_node structure |
1632 | * @param cmd_oid cmd oid: treated as sub command | 1636 | * @param cmd_oid cmd oid: treated as sub command |
1633 | * @param wait_option wait option: wait response or not | 1637 | * @param wait_option wait option: wait response or not |
1634 | * @param pdata_buf A pointer to informaion buffer | 1638 | * @param pdata_buf A pointer to informaion buffer |
1635 | * @return 0 or -1 | 1639 | * @return 0 or -1 |
1636 | */ | 1640 | */ |
1637 | void lbs_set_cmd_ctrl_node(lbs_private * priv, | 1641 | void lbs_set_cmd_ctrl_node(struct lbs_private *priv, |
1638 | struct cmd_ctrl_node *ptempnode, | 1642 | struct cmd_ctrl_node *ptempnode, |
1639 | u32 cmd_oid, u16 wait_option, void *pdata_buf) | 1643 | u32 cmd_oid, u16 wait_option, void *pdata_buf) |
1640 | { | 1644 | { |
@@ -1655,12 +1659,12 @@ void lbs_set_cmd_ctrl_node(lbs_private * priv, | |||
1655 | * pending queue. It will put fimware back to PS mode | 1659 | * pending queue. It will put fimware back to PS mode |
1656 | * if applicable. | 1660 | * if applicable. |
1657 | * | 1661 | * |
1658 | * @param priv A pointer to lbs_private structure | 1662 | * @param priv A pointer to struct lbs_private structure |
1659 | * @return 0 or -1 | 1663 | * @return 0 or -1 |
1660 | */ | 1664 | */ |
1661 | int lbs_execute_next_command(lbs_private * priv) | 1665 | int lbs_execute_next_command(struct lbs_private *priv) |
1662 | { | 1666 | { |
1663 | lbs_adapter *adapter = priv->adapter; | 1667 | struct lbs_adapter *adapter = priv->adapter; |
1664 | struct cmd_ctrl_node *cmdnode = NULL; | 1668 | struct cmd_ctrl_node *cmdnode = NULL; |
1665 | struct cmd_ds_command *cmdptr; | 1669 | struct cmd_ds_command *cmdptr; |
1666 | unsigned long flags; | 1670 | unsigned long flags; |
@@ -1807,7 +1811,7 @@ done: | |||
1807 | return ret; | 1811 | return ret; |
1808 | } | 1812 | } |
1809 | 1813 | ||
1810 | void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str) | 1814 | void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str) |
1811 | { | 1815 | { |
1812 | union iwreq_data iwrq; | 1816 | union iwreq_data iwrq; |
1813 | u8 buf[50]; | 1817 | u8 buf[50]; |
@@ -1831,10 +1835,10 @@ void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str) | |||
1831 | lbs_deb_leave(LBS_DEB_WEXT); | 1835 | lbs_deb_leave(LBS_DEB_WEXT); |
1832 | } | 1836 | } |
1833 | 1837 | ||
1834 | static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size) | 1838 | static int sendconfirmsleep(struct lbs_private *priv, u8 *cmdptr, u16 size) |
1835 | { | 1839 | { |
1836 | unsigned long flags; | 1840 | unsigned long flags; |
1837 | lbs_adapter *adapter = priv->adapter; | 1841 | struct lbs_adapter *adapter = priv->adapter; |
1838 | int ret = 0; | 1842 | int ret = 0; |
1839 | 1843 | ||
1840 | lbs_deb_enter(LBS_DEB_HOST); | 1844 | lbs_deb_enter(LBS_DEB_HOST); |
@@ -1873,7 +1877,7 @@ static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size) | |||
1873 | return ret; | 1877 | return ret; |
1874 | } | 1878 | } |
1875 | 1879 | ||
1876 | void lbs_ps_sleep(lbs_private * priv, int wait_option) | 1880 | void lbs_ps_sleep(struct lbs_private *priv, int wait_option) |
1877 | { | 1881 | { |
1878 | lbs_deb_enter(LBS_DEB_HOST); | 1882 | lbs_deb_enter(LBS_DEB_HOST); |
1879 | 1883 | ||
@@ -1891,11 +1895,11 @@ void lbs_ps_sleep(lbs_private * priv, int wait_option) | |||
1891 | /** | 1895 | /** |
1892 | * @brief This function sends Exit_PS command to firmware. | 1896 | * @brief This function sends Exit_PS command to firmware. |
1893 | * | 1897 | * |
1894 | * @param priv A pointer to lbs_private structure | 1898 | * @param priv A pointer to struct lbs_private structure |
1895 | * @param wait_option wait response or not | 1899 | * @param wait_option wait response or not |
1896 | * @return n/a | 1900 | * @return n/a |
1897 | */ | 1901 | */ |
1898 | void lbs_ps_wakeup(lbs_private * priv, int wait_option) | 1902 | void lbs_ps_wakeup(struct lbs_private *priv, int wait_option) |
1899 | { | 1903 | { |
1900 | __le32 Localpsmode; | 1904 | __le32 Localpsmode; |
1901 | 1905 | ||
@@ -1914,14 +1918,14 @@ void lbs_ps_wakeup(lbs_private * priv, int wait_option) | |||
1914 | * @brief This function checks condition and prepares to | 1918 | * @brief This function checks condition and prepares to |
1915 | * send sleep confirm command to firmware if ok. | 1919 | * send sleep confirm command to firmware if ok. |
1916 | * | 1920 | * |
1917 | * @param priv A pointer to lbs_private structure | 1921 | * @param priv A pointer to struct lbs_private structure |
1918 | * @param psmode Power Saving mode | 1922 | * @param psmode Power Saving mode |
1919 | * @return n/a | 1923 | * @return n/a |
1920 | */ | 1924 | */ |
1921 | void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode) | 1925 | void lbs_ps_confirm_sleep(struct lbs_private *priv, u16 psmode) |
1922 | { | 1926 | { |
1923 | unsigned long flags =0; | 1927 | unsigned long flags =0; |
1924 | lbs_adapter *adapter = priv->adapter; | 1928 | struct lbs_adapter *adapter = priv->adapter; |
1925 | u8 allowed = 1; | 1929 | u8 allowed = 1; |
1926 | 1930 | ||
1927 | lbs_deb_enter(LBS_DEB_HOST); | 1931 | lbs_deb_enter(LBS_DEB_HOST); |
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 1f74810a5e15..3596957f1d5a 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -20,12 +20,12 @@ | |||
20 | * reports disconnect to upper layer, clean tx/rx packets, | 20 | * reports disconnect to upper layer, clean tx/rx packets, |
21 | * reset link state etc. | 21 | * reset link state etc. |
22 | * | 22 | * |
23 | * @param priv A pointer to lbs_private structure | 23 | * @param priv A pointer to struct lbs_private structure |
24 | * @return n/a | 24 | * @return n/a |
25 | */ | 25 | */ |
26 | void lbs_mac_event_disconnected(lbs_private * priv) | 26 | void lbs_mac_event_disconnected(struct lbs_private *priv) |
27 | { | 27 | { |
28 | lbs_adapter *adapter = priv->adapter; | 28 | struct lbs_adapter *adapter = priv->adapter; |
29 | union iwreq_data wrqu; | 29 | union iwreq_data wrqu; |
30 | 30 | ||
31 | if (adapter->connect_status != LBS_CONNECTED) | 31 | if (adapter->connect_status != LBS_CONNECTED) |
@@ -85,11 +85,11 @@ void lbs_mac_event_disconnected(lbs_private * priv) | |||
85 | /** | 85 | /** |
86 | * @brief This function handles MIC failure event. | 86 | * @brief This function handles MIC failure event. |
87 | * | 87 | * |
88 | * @param priv A pointer to lbs_private structure | 88 | * @param priv A pointer to struct lbs_private structure |
89 | * @para event the event id | 89 | * @para event the event id |
90 | * @return n/a | 90 | * @return n/a |
91 | */ | 91 | */ |
92 | static void handle_mic_failureevent(lbs_private * priv, u32 event) | 92 | static void handle_mic_failureevent(struct lbs_private *priv, u32 event) |
93 | { | 93 | { |
94 | char buf[50]; | 94 | char buf[50]; |
95 | 95 | ||
@@ -108,11 +108,11 @@ static void handle_mic_failureevent(lbs_private * priv, u32 event) | |||
108 | lbs_deb_leave(LBS_DEB_CMD); | 108 | lbs_deb_leave(LBS_DEB_CMD); |
109 | } | 109 | } |
110 | 110 | ||
111 | static int lbs_ret_reg_access(lbs_private * priv, | 111 | static int lbs_ret_reg_access(struct lbs_private *priv, |
112 | u16 type, struct cmd_ds_command *resp) | 112 | u16 type, struct cmd_ds_command *resp) |
113 | { | 113 | { |
114 | int ret = 0; | 114 | int ret = 0; |
115 | lbs_adapter *adapter = priv->adapter; | 115 | struct lbs_adapter *adapter = priv->adapter; |
116 | 116 | ||
117 | lbs_deb_enter(LBS_DEB_CMD); | 117 | lbs_deb_enter(LBS_DEB_CMD); |
118 | 118 | ||
@@ -152,12 +152,12 @@ static int lbs_ret_reg_access(lbs_private * priv, | |||
152 | return ret; | 152 | return ret; |
153 | } | 153 | } |
154 | 154 | ||
155 | static int lbs_ret_get_hw_spec(lbs_private * priv, | 155 | static int lbs_ret_get_hw_spec(struct lbs_private *priv, |
156 | struct cmd_ds_command *resp) | 156 | struct cmd_ds_command *resp) |
157 | { | 157 | { |
158 | u32 i; | 158 | u32 i; |
159 | struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec; | 159 | struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec; |
160 | lbs_adapter *adapter = priv->adapter; | 160 | struct lbs_adapter *adapter = priv->adapter; |
161 | int ret = 0; | 161 | int ret = 0; |
162 | DECLARE_MAC_BUF(mac); | 162 | DECLARE_MAC_BUF(mac); |
163 | 163 | ||
@@ -216,11 +216,11 @@ done: | |||
216 | return ret; | 216 | return ret; |
217 | } | 217 | } |
218 | 218 | ||
219 | static int lbs_ret_802_11_sleep_params(lbs_private * priv, | 219 | static int lbs_ret_802_11_sleep_params(struct lbs_private *priv, |
220 | struct cmd_ds_command *resp) | 220 | struct cmd_ds_command *resp) |
221 | { | 221 | { |
222 | struct cmd_ds_802_11_sleep_params *sp = &resp->params.sleep_params; | 222 | struct cmd_ds_802_11_sleep_params *sp = &resp->params.sleep_params; |
223 | lbs_adapter *adapter = priv->adapter; | 223 | struct lbs_adapter *adapter = priv->adapter; |
224 | 224 | ||
225 | lbs_deb_enter(LBS_DEB_CMD); | 225 | lbs_deb_enter(LBS_DEB_CMD); |
226 | 226 | ||
@@ -240,14 +240,14 @@ static int lbs_ret_802_11_sleep_params(lbs_private * priv, | |||
240 | return 0; | 240 | return 0; |
241 | } | 241 | } |
242 | 242 | ||
243 | static int lbs_ret_802_11_stat(lbs_private * priv, | 243 | static int lbs_ret_802_11_stat(struct lbs_private *priv, |
244 | struct cmd_ds_command *resp) | 244 | struct cmd_ds_command *resp) |
245 | { | 245 | { |
246 | lbs_deb_enter(LBS_DEB_CMD); | 246 | lbs_deb_enter(LBS_DEB_CMD); |
247 | /* currently adapter->wlan802_11Stat is unused | 247 | /* currently adapter->wlan802_11Stat is unused |
248 | 248 | ||
249 | struct cmd_ds_802_11_get_stat *p11Stat = &resp->params.gstat; | 249 | struct cmd_ds_802_11_get_stat *p11Stat = &resp->params.gstat; |
250 | lbs_adapter *adapter = priv->adapter; | 250 | struct lbs_adapter *adapter = priv->adapter; |
251 | 251 | ||
252 | // TODO Convert it to Big endian befor copy | 252 | // TODO Convert it to Big endian befor copy |
253 | memcpy(&adapter->wlan802_11Stat, | 253 | memcpy(&adapter->wlan802_11Stat, |
@@ -257,7 +257,7 @@ static int lbs_ret_802_11_stat(lbs_private * priv, | |||
257 | return 0; | 257 | return 0; |
258 | } | 258 | } |
259 | 259 | ||
260 | static int lbs_ret_802_11_snmp_mib(lbs_private * priv, | 260 | static int lbs_ret_802_11_snmp_mib(struct lbs_private *priv, |
261 | struct cmd_ds_command *resp) | 261 | struct cmd_ds_command *resp) |
262 | { | 262 | { |
263 | struct cmd_ds_802_11_snmp_mib *smib = &resp->params.smib; | 263 | struct cmd_ds_802_11_snmp_mib *smib = &resp->params.smib; |
@@ -299,12 +299,12 @@ static int lbs_ret_802_11_snmp_mib(lbs_private * priv, | |||
299 | return 0; | 299 | return 0; |
300 | } | 300 | } |
301 | 301 | ||
302 | static int lbs_ret_802_11_key_material(lbs_private * priv, | 302 | static int lbs_ret_802_11_key_material(struct lbs_private *priv, |
303 | struct cmd_ds_command *resp) | 303 | struct cmd_ds_command *resp) |
304 | { | 304 | { |
305 | struct cmd_ds_802_11_key_material *pkeymaterial = | 305 | struct cmd_ds_802_11_key_material *pkeymaterial = |
306 | &resp->params.keymaterial; | 306 | &resp->params.keymaterial; |
307 | lbs_adapter *adapter = priv->adapter; | 307 | struct lbs_adapter *adapter = priv->adapter; |
308 | u16 action = le16_to_cpu(pkeymaterial->action); | 308 | u16 action = le16_to_cpu(pkeymaterial->action); |
309 | 309 | ||
310 | lbs_deb_enter(LBS_DEB_CMD); | 310 | lbs_deb_enter(LBS_DEB_CMD); |
@@ -355,11 +355,11 @@ static int lbs_ret_802_11_key_material(lbs_private * priv, | |||
355 | return 0; | 355 | return 0; |
356 | } | 356 | } |
357 | 357 | ||
358 | static int lbs_ret_802_11_mac_address(lbs_private * priv, | 358 | static int lbs_ret_802_11_mac_address(struct lbs_private *priv, |
359 | struct cmd_ds_command *resp) | 359 | struct cmd_ds_command *resp) |
360 | { | 360 | { |
361 | struct cmd_ds_802_11_mac_address *macadd = &resp->params.macadd; | 361 | struct cmd_ds_802_11_mac_address *macadd = &resp->params.macadd; |
362 | lbs_adapter *adapter = priv->adapter; | 362 | struct lbs_adapter *adapter = priv->adapter; |
363 | 363 | ||
364 | lbs_deb_enter(LBS_DEB_CMD); | 364 | lbs_deb_enter(LBS_DEB_CMD); |
365 | 365 | ||
@@ -369,11 +369,11 @@ static int lbs_ret_802_11_mac_address(lbs_private * priv, | |||
369 | return 0; | 369 | return 0; |
370 | } | 370 | } |
371 | 371 | ||
372 | static int lbs_ret_802_11_rf_tx_power(lbs_private * priv, | 372 | static int lbs_ret_802_11_rf_tx_power(struct lbs_private *priv, |
373 | struct cmd_ds_command *resp) | 373 | struct cmd_ds_command *resp) |
374 | { | 374 | { |
375 | struct cmd_ds_802_11_rf_tx_power *rtp = &resp->params.txp; | 375 | struct cmd_ds_802_11_rf_tx_power *rtp = &resp->params.txp; |
376 | lbs_adapter *adapter = priv->adapter; | 376 | struct lbs_adapter *adapter = priv->adapter; |
377 | 377 | ||
378 | lbs_deb_enter(LBS_DEB_CMD); | 378 | lbs_deb_enter(LBS_DEB_CMD); |
379 | 379 | ||
@@ -385,11 +385,11 @@ static int lbs_ret_802_11_rf_tx_power(lbs_private * priv, | |||
385 | return 0; | 385 | return 0; |
386 | } | 386 | } |
387 | 387 | ||
388 | static int lbs_ret_802_11_rate_adapt_rateset(lbs_private * priv, | 388 | static int lbs_ret_802_11_rate_adapt_rateset(struct lbs_private *priv, |
389 | struct cmd_ds_command *resp) | 389 | struct cmd_ds_command *resp) |
390 | { | 390 | { |
391 | struct cmd_ds_802_11_rate_adapt_rateset *rates = &resp->params.rateset; | 391 | struct cmd_ds_802_11_rate_adapt_rateset *rates = &resp->params.rateset; |
392 | lbs_adapter *adapter = priv->adapter; | 392 | struct lbs_adapter *adapter = priv->adapter; |
393 | 393 | ||
394 | lbs_deb_enter(LBS_DEB_CMD); | 394 | lbs_deb_enter(LBS_DEB_CMD); |
395 | 395 | ||
@@ -402,11 +402,11 @@ static int lbs_ret_802_11_rate_adapt_rateset(lbs_private * priv, | |||
402 | return 0; | 402 | return 0; |
403 | } | 403 | } |
404 | 404 | ||
405 | static int lbs_ret_802_11_data_rate(lbs_private * priv, | 405 | static int lbs_ret_802_11_data_rate(struct lbs_private *priv, |
406 | struct cmd_ds_command *resp) | 406 | struct cmd_ds_command *resp) |
407 | { | 407 | { |
408 | struct cmd_ds_802_11_data_rate *pdatarate = &resp->params.drate; | 408 | struct cmd_ds_802_11_data_rate *pdatarate = &resp->params.drate; |
409 | lbs_adapter *adapter = priv->adapter; | 409 | struct lbs_adapter *adapter = priv->adapter; |
410 | 410 | ||
411 | lbs_deb_enter(LBS_DEB_CMD); | 411 | lbs_deb_enter(LBS_DEB_CMD); |
412 | 412 | ||
@@ -423,11 +423,11 @@ static int lbs_ret_802_11_data_rate(lbs_private * priv, | |||
423 | return 0; | 423 | return 0; |
424 | } | 424 | } |
425 | 425 | ||
426 | static int lbs_ret_802_11_rf_channel(lbs_private * priv, | 426 | static int lbs_ret_802_11_rf_channel(struct lbs_private *priv, |
427 | struct cmd_ds_command *resp) | 427 | struct cmd_ds_command *resp) |
428 | { | 428 | { |
429 | struct cmd_ds_802_11_rf_channel *rfchannel = &resp->params.rfchannel; | 429 | struct cmd_ds_802_11_rf_channel *rfchannel = &resp->params.rfchannel; |
430 | lbs_adapter *adapter = priv->adapter; | 430 | struct lbs_adapter *adapter = priv->adapter; |
431 | u16 action = le16_to_cpu(rfchannel->action); | 431 | u16 action = le16_to_cpu(rfchannel->action); |
432 | u16 newchannel = le16_to_cpu(rfchannel->currentchannel); | 432 | u16 newchannel = le16_to_cpu(rfchannel->currentchannel); |
433 | 433 | ||
@@ -446,11 +446,11 @@ static int lbs_ret_802_11_rf_channel(lbs_private * priv, | |||
446 | return 0; | 446 | return 0; |
447 | } | 447 | } |
448 | 448 | ||
449 | static int lbs_ret_802_11_rssi(lbs_private * priv, | 449 | static int lbs_ret_802_11_rssi(struct lbs_private *priv, |
450 | struct cmd_ds_command *resp) | 450 | struct cmd_ds_command *resp) |
451 | { | 451 | { |
452 | struct cmd_ds_802_11_rssi_rsp *rssirsp = &resp->params.rssirsp; | 452 | struct cmd_ds_802_11_rssi_rsp *rssirsp = &resp->params.rssirsp; |
453 | lbs_adapter *adapter = priv->adapter; | 453 | struct lbs_adapter *adapter = priv->adapter; |
454 | 454 | ||
455 | lbs_deb_enter(LBS_DEB_CMD); | 455 | lbs_deb_enter(LBS_DEB_CMD); |
456 | 456 | ||
@@ -477,10 +477,10 @@ static int lbs_ret_802_11_rssi(lbs_private * priv, | |||
477 | return 0; | 477 | return 0; |
478 | } | 478 | } |
479 | 479 | ||
480 | static int lbs_ret_802_11_eeprom_access(lbs_private * priv, | 480 | static int lbs_ret_802_11_eeprom_access(struct lbs_private *priv, |
481 | struct cmd_ds_command *resp) | 481 | struct cmd_ds_command *resp) |
482 | { | 482 | { |
483 | lbs_adapter *adapter = priv->adapter; | 483 | struct lbs_adapter *adapter = priv->adapter; |
484 | struct lbs_ioctl_regrdwr *pbuf; | 484 | struct lbs_ioctl_regrdwr *pbuf; |
485 | pbuf = (struct lbs_ioctl_regrdwr *) adapter->prdeeprom; | 485 | pbuf = (struct lbs_ioctl_regrdwr *) adapter->prdeeprom; |
486 | 486 | ||
@@ -503,11 +503,11 @@ static int lbs_ret_802_11_eeprom_access(lbs_private * priv, | |||
503 | return 0; | 503 | return 0; |
504 | } | 504 | } |
505 | 505 | ||
506 | static int lbs_ret_get_log(lbs_private * priv, | 506 | static int lbs_ret_get_log(struct lbs_private *priv, |
507 | struct cmd_ds_command *resp) | 507 | struct cmd_ds_command *resp) |
508 | { | 508 | { |
509 | struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog; | 509 | struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog; |
510 | lbs_adapter *adapter = priv->adapter; | 510 | struct lbs_adapter *adapter = priv->adapter; |
511 | 511 | ||
512 | lbs_deb_enter(LBS_DEB_CMD); | 512 | lbs_deb_enter(LBS_DEB_CMD); |
513 | 513 | ||
@@ -518,11 +518,11 @@ static int lbs_ret_get_log(lbs_private * priv, | |||
518 | return 0; | 518 | return 0; |
519 | } | 519 | } |
520 | 520 | ||
521 | static int lbs_ret_802_11_enable_rsn(lbs_private * priv, | 521 | static int lbs_ret_802_11_enable_rsn(struct lbs_private *priv, |
522 | struct cmd_ds_command *resp) | 522 | struct cmd_ds_command *resp) |
523 | { | 523 | { |
524 | struct cmd_ds_802_11_enable_rsn *enable_rsn = &resp->params.enbrsn; | 524 | struct cmd_ds_802_11_enable_rsn *enable_rsn = &resp->params.enbrsn; |
525 | lbs_adapter *adapter = priv->adapter; | 525 | struct lbs_adapter *adapter = priv->adapter; |
526 | u32 * pdata_buf = adapter->cur_cmd->pdata_buf; | 526 | u32 * pdata_buf = adapter->cur_cmd->pdata_buf; |
527 | 527 | ||
528 | lbs_deb_enter(LBS_DEB_CMD); | 528 | lbs_deb_enter(LBS_DEB_CMD); |
@@ -556,11 +556,11 @@ static int lbs_ret_802_11_bcn_ctrl(struct lbs_private * priv, | |||
556 | 556 | ||
557 | static inline int handle_cmd_response(u16 respcmd, | 557 | static inline int handle_cmd_response(u16 respcmd, |
558 | struct cmd_ds_command *resp, | 558 | struct cmd_ds_command *resp, |
559 | lbs_private *priv) | 559 | struct lbs_private *priv) |
560 | { | 560 | { |
561 | int ret = 0; | 561 | int ret = 0; |
562 | unsigned long flags; | 562 | unsigned long flags; |
563 | lbs_adapter *adapter = priv->adapter; | 563 | struct lbs_adapter *adapter = priv->adapter; |
564 | 564 | ||
565 | lbs_deb_enter(LBS_DEB_HOST); | 565 | lbs_deb_enter(LBS_DEB_HOST); |
566 | 566 | ||
@@ -735,11 +735,11 @@ static inline int handle_cmd_response(u16 respcmd, | |||
735 | return ret; | 735 | return ret; |
736 | } | 736 | } |
737 | 737 | ||
738 | int lbs_process_rx_command(lbs_private * priv) | 738 | int lbs_process_rx_command(struct lbs_private *priv) |
739 | { | 739 | { |
740 | u16 respcmd; | 740 | u16 respcmd; |
741 | struct cmd_ds_command *resp; | 741 | struct cmd_ds_command *resp; |
742 | lbs_adapter *adapter = priv->adapter; | 742 | struct lbs_adapter *adapter = priv->adapter; |
743 | int ret = 0; | 743 | int ret = 0; |
744 | ulong flags; | 744 | ulong flags; |
745 | u16 result; | 745 | u16 result; |
@@ -888,10 +888,10 @@ done: | |||
888 | return ret; | 888 | return ret; |
889 | } | 889 | } |
890 | 890 | ||
891 | int lbs_process_event(lbs_private * priv) | 891 | int lbs_process_event(struct lbs_private *priv) |
892 | { | 892 | { |
893 | int ret = 0; | 893 | int ret = 0; |
894 | lbs_adapter *adapter = priv->adapter; | 894 | struct lbs_adapter *adapter = priv->adapter; |
895 | u32 eventcause; | 895 | u32 eventcause; |
896 | 896 | ||
897 | lbs_deb_enter(LBS_DEB_CMD); | 897 | lbs_deb_enter(LBS_DEB_CMD); |
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c index 1b382cfaf37a..2e1842474f8e 100644 --- a/drivers/net/wireless/libertas/debugfs.c +++ b/drivers/net/wireless/libertas/debugfs.c | |||
@@ -18,7 +18,7 @@ static char *szStates[] = { | |||
18 | }; | 18 | }; |
19 | 19 | ||
20 | #ifdef PROC_DEBUG | 20 | #ifdef PROC_DEBUG |
21 | static void lbs_debug_init(lbs_private * priv, struct net_device *dev); | 21 | static void lbs_debug_init(struct lbs_private *priv, struct net_device *dev); |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | static int open_file_generic(struct inode *inode, struct file *file) | 24 | static int open_file_generic(struct inode *inode, struct file *file) |
@@ -38,7 +38,7 @@ static const size_t len = PAGE_SIZE; | |||
38 | static ssize_t lbs_dev_info(struct file *file, char __user *userbuf, | 38 | static ssize_t lbs_dev_info(struct file *file, char __user *userbuf, |
39 | size_t count, loff_t *ppos) | 39 | size_t count, loff_t *ppos) |
40 | { | 40 | { |
41 | lbs_private *priv = file->private_data; | 41 | struct lbs_private *priv = file->private_data; |
42 | size_t pos = 0; | 42 | size_t pos = 0; |
43 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 43 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
44 | char *buf = (char *)addr; | 44 | char *buf = (char *)addr; |
@@ -59,7 +59,7 @@ static ssize_t lbs_dev_info(struct file *file, char __user *userbuf, | |||
59 | static ssize_t lbs_getscantable(struct file *file, char __user *userbuf, | 59 | static ssize_t lbs_getscantable(struct file *file, char __user *userbuf, |
60 | size_t count, loff_t *ppos) | 60 | size_t count, loff_t *ppos) |
61 | { | 61 | { |
62 | lbs_private *priv = file->private_data; | 62 | struct lbs_private *priv = file->private_data; |
63 | size_t pos = 0; | 63 | size_t pos = 0; |
64 | int numscansdone = 0, res; | 64 | int numscansdone = 0, res; |
65 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 65 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
@@ -102,7 +102,7 @@ static ssize_t lbs_sleepparams_write(struct file *file, | |||
102 | const char __user *user_buf, size_t count, | 102 | const char __user *user_buf, size_t count, |
103 | loff_t *ppos) | 103 | loff_t *ppos) |
104 | { | 104 | { |
105 | lbs_private *priv = file->private_data; | 105 | struct lbs_private *priv = file->private_data; |
106 | ssize_t buf_size, res; | 106 | ssize_t buf_size, res; |
107 | int p1, p2, p3, p4, p5, p6; | 107 | int p1, p2, p3, p4, p5, p6; |
108 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 108 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
@@ -143,8 +143,8 @@ out_unlock: | |||
143 | static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf, | 143 | static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf, |
144 | size_t count, loff_t *ppos) | 144 | size_t count, loff_t *ppos) |
145 | { | 145 | { |
146 | lbs_private *priv = file->private_data; | 146 | struct lbs_private *priv = file->private_data; |
147 | lbs_adapter *adapter = priv->adapter; | 147 | struct lbs_adapter *adapter = priv->adapter; |
148 | ssize_t res; | 148 | ssize_t res; |
149 | size_t pos = 0; | 149 | size_t pos = 0; |
150 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 150 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
@@ -174,7 +174,7 @@ out_unlock: | |||
174 | static ssize_t lbs_extscan(struct file *file, const char __user *userbuf, | 174 | static ssize_t lbs_extscan(struct file *file, const char __user *userbuf, |
175 | size_t count, loff_t *ppos) | 175 | size_t count, loff_t *ppos) |
176 | { | 176 | { |
177 | lbs_private *priv = file->private_data; | 177 | struct lbs_private *priv = file->private_data; |
178 | ssize_t res, buf_size; | 178 | ssize_t res, buf_size; |
179 | union iwreq_data wrqu; | 179 | union iwreq_data wrqu; |
180 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 180 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
@@ -342,7 +342,7 @@ static ssize_t lbs_setuserscan(struct file *file, | |||
342 | const char __user *userbuf, | 342 | const char __user *userbuf, |
343 | size_t count, loff_t *ppos) | 343 | size_t count, loff_t *ppos) |
344 | { | 344 | { |
345 | lbs_private *priv = file->private_data; | 345 | struct lbs_private *priv = file->private_data; |
346 | ssize_t res, buf_size; | 346 | ssize_t res, buf_size; |
347 | struct lbs_ioctl_user_scan_cfg *scan_cfg; | 347 | struct lbs_ioctl_user_scan_cfg *scan_cfg; |
348 | union iwreq_data wrqu; | 348 | union iwreq_data wrqu; |
@@ -384,7 +384,7 @@ out_unlock: | |||
384 | return count; | 384 | return count; |
385 | } | 385 | } |
386 | 386 | ||
387 | static int lbs_event_initcmd(lbs_private *priv, void **response_buf, | 387 | static int lbs_event_initcmd(struct lbs_private *priv, void **response_buf, |
388 | struct cmd_ctrl_node **cmdnode, | 388 | struct cmd_ctrl_node **cmdnode, |
389 | struct cmd_ds_command **cmd) | 389 | struct cmd_ds_command **cmd) |
390 | { | 390 | { |
@@ -413,8 +413,8 @@ static int lbs_event_initcmd(lbs_private *priv, void **response_buf, | |||
413 | static ssize_t lbs_lowrssi_read(struct file *file, char __user *userbuf, | 413 | static ssize_t lbs_lowrssi_read(struct file *file, char __user *userbuf, |
414 | size_t count, loff_t *ppos) | 414 | size_t count, loff_t *ppos) |
415 | { | 415 | { |
416 | lbs_private *priv = file->private_data; | 416 | struct lbs_private *priv = file->private_data; |
417 | lbs_adapter *adapter = priv->adapter; | 417 | struct lbs_adapter *adapter = priv->adapter; |
418 | struct cmd_ctrl_node *pcmdnode; | 418 | struct cmd_ctrl_node *pcmdnode; |
419 | struct cmd_ds_command *pcmdptr; | 419 | struct cmd_ds_command *pcmdptr; |
420 | struct cmd_ds_802_11_subscribe_event *event; | 420 | struct cmd_ds_802_11_subscribe_event *event; |
@@ -480,9 +480,9 @@ static ssize_t lbs_lowrssi_read(struct file *file, char __user *userbuf, | |||
480 | return res; | 480 | return res; |
481 | } | 481 | } |
482 | 482 | ||
483 | static u16 lbs_get_events_bitmap(lbs_private *priv) | 483 | static u16 lbs_get_events_bitmap(struct lbs_private *priv) |
484 | { | 484 | { |
485 | lbs_adapter *adapter = priv->adapter; | 485 | struct lbs_adapter *adapter = priv->adapter; |
486 | struct cmd_ctrl_node *pcmdnode; | 486 | struct cmd_ctrl_node *pcmdnode; |
487 | struct cmd_ds_command *pcmdptr; | 487 | struct cmd_ds_command *pcmdptr; |
488 | struct cmd_ds_802_11_subscribe_event *event; | 488 | struct cmd_ds_802_11_subscribe_event *event; |
@@ -529,8 +529,8 @@ static ssize_t lbs_lowrssi_write(struct file *file, | |||
529 | const char __user *userbuf, | 529 | const char __user *userbuf, |
530 | size_t count, loff_t *ppos) | 530 | size_t count, loff_t *ppos) |
531 | { | 531 | { |
532 | lbs_private *priv = file->private_data; | 532 | struct lbs_private *priv = file->private_data; |
533 | lbs_adapter *adapter = priv->adapter; | 533 | struct lbs_adapter *adapter = priv->adapter; |
534 | ssize_t res, buf_size; | 534 | ssize_t res, buf_size; |
535 | int value, freq, subscribed, cmd_len; | 535 | int value, freq, subscribed, cmd_len; |
536 | struct cmd_ctrl_node *pcmdnode; | 536 | struct cmd_ctrl_node *pcmdnode; |
@@ -609,8 +609,8 @@ out_unlock: | |||
609 | static ssize_t lbs_lowsnr_read(struct file *file, char __user *userbuf, | 609 | static ssize_t lbs_lowsnr_read(struct file *file, char __user *userbuf, |
610 | size_t count, loff_t *ppos) | 610 | size_t count, loff_t *ppos) |
611 | { | 611 | { |
612 | lbs_private *priv = file->private_data; | 612 | struct lbs_private *priv = file->private_data; |
613 | lbs_adapter *adapter = priv->adapter; | 613 | struct lbs_adapter *adapter = priv->adapter; |
614 | struct cmd_ctrl_node *pcmdnode; | 614 | struct cmd_ctrl_node *pcmdnode; |
615 | struct cmd_ds_command *pcmdptr; | 615 | struct cmd_ds_command *pcmdptr; |
616 | struct cmd_ds_802_11_subscribe_event *event; | 616 | struct cmd_ds_802_11_subscribe_event *event; |
@@ -682,8 +682,8 @@ static ssize_t lbs_lowsnr_write(struct file *file, | |||
682 | const char __user *userbuf, | 682 | const char __user *userbuf, |
683 | size_t count, loff_t *ppos) | 683 | size_t count, loff_t *ppos) |
684 | { | 684 | { |
685 | lbs_private *priv = file->private_data; | 685 | struct lbs_private *priv = file->private_data; |
686 | lbs_adapter *adapter = priv->adapter; | 686 | struct lbs_adapter *adapter = priv->adapter; |
687 | ssize_t res, buf_size; | 687 | ssize_t res, buf_size; |
688 | int value, freq, subscribed, cmd_len; | 688 | int value, freq, subscribed, cmd_len; |
689 | struct cmd_ctrl_node *pcmdnode; | 689 | struct cmd_ctrl_node *pcmdnode; |
@@ -762,8 +762,8 @@ out_unlock: | |||
762 | static ssize_t lbs_failcount_read(struct file *file, char __user *userbuf, | 762 | static ssize_t lbs_failcount_read(struct file *file, char __user *userbuf, |
763 | size_t count, loff_t *ppos) | 763 | size_t count, loff_t *ppos) |
764 | { | 764 | { |
765 | lbs_private *priv = file->private_data; | 765 | struct lbs_private *priv = file->private_data; |
766 | lbs_adapter *adapter = priv->adapter; | 766 | struct lbs_adapter *adapter = priv->adapter; |
767 | struct cmd_ctrl_node *pcmdnode; | 767 | struct cmd_ctrl_node *pcmdnode; |
768 | struct cmd_ds_command *pcmdptr; | 768 | struct cmd_ds_command *pcmdptr; |
769 | struct cmd_ds_802_11_subscribe_event *event; | 769 | struct cmd_ds_802_11_subscribe_event *event; |
@@ -834,8 +834,8 @@ static ssize_t lbs_failcount_write(struct file *file, | |||
834 | const char __user *userbuf, | 834 | const char __user *userbuf, |
835 | size_t count, loff_t *ppos) | 835 | size_t count, loff_t *ppos) |
836 | { | 836 | { |
837 | lbs_private *priv = file->private_data; | 837 | struct lbs_private *priv = file->private_data; |
838 | lbs_adapter *adapter = priv->adapter; | 838 | struct lbs_adapter *adapter = priv->adapter; |
839 | ssize_t res, buf_size; | 839 | ssize_t res, buf_size; |
840 | int value, freq, subscribed, cmd_len; | 840 | int value, freq, subscribed, cmd_len; |
841 | struct cmd_ctrl_node *pcmdnode; | 841 | struct cmd_ctrl_node *pcmdnode; |
@@ -913,8 +913,8 @@ out_unlock: | |||
913 | static ssize_t lbs_bcnmiss_read(struct file *file, char __user *userbuf, | 913 | static ssize_t lbs_bcnmiss_read(struct file *file, char __user *userbuf, |
914 | size_t count, loff_t *ppos) | 914 | size_t count, loff_t *ppos) |
915 | { | 915 | { |
916 | lbs_private *priv = file->private_data; | 916 | struct lbs_private *priv = file->private_data; |
917 | lbs_adapter *adapter = priv->adapter; | 917 | struct lbs_adapter *adapter = priv->adapter; |
918 | struct cmd_ctrl_node *pcmdnode; | 918 | struct cmd_ctrl_node *pcmdnode; |
919 | struct cmd_ds_command *pcmdptr; | 919 | struct cmd_ds_command *pcmdptr; |
920 | struct cmd_ds_802_11_subscribe_event *event; | 920 | struct cmd_ds_802_11_subscribe_event *event; |
@@ -985,8 +985,8 @@ static ssize_t lbs_bcnmiss_write(struct file *file, | |||
985 | const char __user *userbuf, | 985 | const char __user *userbuf, |
986 | size_t count, loff_t *ppos) | 986 | size_t count, loff_t *ppos) |
987 | { | 987 | { |
988 | lbs_private *priv = file->private_data; | 988 | struct lbs_private *priv = file->private_data; |
989 | lbs_adapter *adapter = priv->adapter; | 989 | struct lbs_adapter *adapter = priv->adapter; |
990 | ssize_t res, buf_size; | 990 | ssize_t res, buf_size; |
991 | int value, freq, subscribed, cmd_len; | 991 | int value, freq, subscribed, cmd_len; |
992 | struct cmd_ctrl_node *pcmdnode; | 992 | struct cmd_ctrl_node *pcmdnode; |
@@ -1063,8 +1063,8 @@ out_unlock: | |||
1063 | static ssize_t lbs_highrssi_read(struct file *file, char __user *userbuf, | 1063 | static ssize_t lbs_highrssi_read(struct file *file, char __user *userbuf, |
1064 | size_t count, loff_t *ppos) | 1064 | size_t count, loff_t *ppos) |
1065 | { | 1065 | { |
1066 | lbs_private *priv = file->private_data; | 1066 | struct lbs_private *priv = file->private_data; |
1067 | lbs_adapter *adapter = priv->adapter; | 1067 | struct lbs_adapter *adapter = priv->adapter; |
1068 | struct cmd_ctrl_node *pcmdnode; | 1068 | struct cmd_ctrl_node *pcmdnode; |
1069 | struct cmd_ds_command *pcmdptr; | 1069 | struct cmd_ds_command *pcmdptr; |
1070 | struct cmd_ds_802_11_subscribe_event *event; | 1070 | struct cmd_ds_802_11_subscribe_event *event; |
@@ -1136,8 +1136,8 @@ static ssize_t lbs_highrssi_write(struct file *file, | |||
1136 | const char __user *userbuf, | 1136 | const char __user *userbuf, |
1137 | size_t count, loff_t *ppos) | 1137 | size_t count, loff_t *ppos) |
1138 | { | 1138 | { |
1139 | lbs_private *priv = file->private_data; | 1139 | struct lbs_private *priv = file->private_data; |
1140 | lbs_adapter *adapter = priv->adapter; | 1140 | struct lbs_adapter *adapter = priv->adapter; |
1141 | ssize_t res, buf_size; | 1141 | ssize_t res, buf_size; |
1142 | int value, freq, subscribed, cmd_len; | 1142 | int value, freq, subscribed, cmd_len; |
1143 | struct cmd_ctrl_node *pcmdnode; | 1143 | struct cmd_ctrl_node *pcmdnode; |
@@ -1213,8 +1213,8 @@ out_unlock: | |||
1213 | static ssize_t lbs_highsnr_read(struct file *file, char __user *userbuf, | 1213 | static ssize_t lbs_highsnr_read(struct file *file, char __user *userbuf, |
1214 | size_t count, loff_t *ppos) | 1214 | size_t count, loff_t *ppos) |
1215 | { | 1215 | { |
1216 | lbs_private *priv = file->private_data; | 1216 | struct lbs_private *priv = file->private_data; |
1217 | lbs_adapter *adapter = priv->adapter; | 1217 | struct lbs_adapter *adapter = priv->adapter; |
1218 | struct cmd_ctrl_node *pcmdnode; | 1218 | struct cmd_ctrl_node *pcmdnode; |
1219 | struct cmd_ds_command *pcmdptr; | 1219 | struct cmd_ds_command *pcmdptr; |
1220 | struct cmd_ds_802_11_subscribe_event *event; | 1220 | struct cmd_ds_802_11_subscribe_event *event; |
@@ -1286,8 +1286,8 @@ static ssize_t lbs_highsnr_write(struct file *file, | |||
1286 | const char __user *userbuf, | 1286 | const char __user *userbuf, |
1287 | size_t count, loff_t *ppos) | 1287 | size_t count, loff_t *ppos) |
1288 | { | 1288 | { |
1289 | lbs_private *priv = file->private_data; | 1289 | struct lbs_private *priv = file->private_data; |
1290 | lbs_adapter *adapter = priv->adapter; | 1290 | struct lbs_adapter *adapter = priv->adapter; |
1291 | ssize_t res, buf_size; | 1291 | ssize_t res, buf_size; |
1292 | int value, freq, subscribed, cmd_len; | 1292 | int value, freq, subscribed, cmd_len; |
1293 | struct cmd_ctrl_node *pcmdnode; | 1293 | struct cmd_ctrl_node *pcmdnode; |
@@ -1365,8 +1365,8 @@ out_unlock: | |||
1365 | static ssize_t lbs_rdmac_read(struct file *file, char __user *userbuf, | 1365 | static ssize_t lbs_rdmac_read(struct file *file, char __user *userbuf, |
1366 | size_t count, loff_t *ppos) | 1366 | size_t count, loff_t *ppos) |
1367 | { | 1367 | { |
1368 | lbs_private *priv = file->private_data; | 1368 | struct lbs_private *priv = file->private_data; |
1369 | lbs_adapter *adapter = priv->adapter; | 1369 | struct lbs_adapter *adapter = priv->adapter; |
1370 | struct lbs_offset_value offval; | 1370 | struct lbs_offset_value offval; |
1371 | ssize_t pos = 0; | 1371 | ssize_t pos = 0; |
1372 | int ret; | 1372 | int ret; |
@@ -1392,7 +1392,7 @@ static ssize_t lbs_rdmac_write(struct file *file, | |||
1392 | const char __user *userbuf, | 1392 | const char __user *userbuf, |
1393 | size_t count, loff_t *ppos) | 1393 | size_t count, loff_t *ppos) |
1394 | { | 1394 | { |
1395 | lbs_private *priv = file->private_data; | 1395 | struct lbs_private *priv = file->private_data; |
1396 | ssize_t res, buf_size; | 1396 | ssize_t res, buf_size; |
1397 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 1397 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
1398 | char *buf = (char *)addr; | 1398 | char *buf = (char *)addr; |
@@ -1414,7 +1414,7 @@ static ssize_t lbs_wrmac_write(struct file *file, | |||
1414 | size_t count, loff_t *ppos) | 1414 | size_t count, loff_t *ppos) |
1415 | { | 1415 | { |
1416 | 1416 | ||
1417 | lbs_private *priv = file->private_data; | 1417 | struct lbs_private *priv = file->private_data; |
1418 | ssize_t res, buf_size; | 1418 | ssize_t res, buf_size; |
1419 | u32 offset, value; | 1419 | u32 offset, value; |
1420 | struct lbs_offset_value offval; | 1420 | struct lbs_offset_value offval; |
@@ -1448,8 +1448,8 @@ out_unlock: | |||
1448 | static ssize_t lbs_rdbbp_read(struct file *file, char __user *userbuf, | 1448 | static ssize_t lbs_rdbbp_read(struct file *file, char __user *userbuf, |
1449 | size_t count, loff_t *ppos) | 1449 | size_t count, loff_t *ppos) |
1450 | { | 1450 | { |
1451 | lbs_private *priv = file->private_data; | 1451 | struct lbs_private *priv = file->private_data; |
1452 | lbs_adapter *adapter = priv->adapter; | 1452 | struct lbs_adapter *adapter = priv->adapter; |
1453 | struct lbs_offset_value offval; | 1453 | struct lbs_offset_value offval; |
1454 | ssize_t pos = 0; | 1454 | ssize_t pos = 0; |
1455 | int ret; | 1455 | int ret; |
@@ -1476,7 +1476,7 @@ static ssize_t lbs_rdbbp_write(struct file *file, | |||
1476 | const char __user *userbuf, | 1476 | const char __user *userbuf, |
1477 | size_t count, loff_t *ppos) | 1477 | size_t count, loff_t *ppos) |
1478 | { | 1478 | { |
1479 | lbs_private *priv = file->private_data; | 1479 | struct lbs_private *priv = file->private_data; |
1480 | ssize_t res, buf_size; | 1480 | ssize_t res, buf_size; |
1481 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 1481 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
1482 | char *buf = (char *)addr; | 1482 | char *buf = (char *)addr; |
@@ -1498,7 +1498,7 @@ static ssize_t lbs_wrbbp_write(struct file *file, | |||
1498 | size_t count, loff_t *ppos) | 1498 | size_t count, loff_t *ppos) |
1499 | { | 1499 | { |
1500 | 1500 | ||
1501 | lbs_private *priv = file->private_data; | 1501 | struct lbs_private *priv = file->private_data; |
1502 | ssize_t res, buf_size; | 1502 | ssize_t res, buf_size; |
1503 | u32 offset, value; | 1503 | u32 offset, value; |
1504 | struct lbs_offset_value offval; | 1504 | struct lbs_offset_value offval; |
@@ -1532,8 +1532,8 @@ out_unlock: | |||
1532 | static ssize_t lbs_rdrf_read(struct file *file, char __user *userbuf, | 1532 | static ssize_t lbs_rdrf_read(struct file *file, char __user *userbuf, |
1533 | size_t count, loff_t *ppos) | 1533 | size_t count, loff_t *ppos) |
1534 | { | 1534 | { |
1535 | lbs_private *priv = file->private_data; | 1535 | struct lbs_private *priv = file->private_data; |
1536 | lbs_adapter *adapter = priv->adapter; | 1536 | struct lbs_adapter *adapter = priv->adapter; |
1537 | struct lbs_offset_value offval; | 1537 | struct lbs_offset_value offval; |
1538 | ssize_t pos = 0; | 1538 | ssize_t pos = 0; |
1539 | int ret; | 1539 | int ret; |
@@ -1560,7 +1560,7 @@ static ssize_t lbs_rdrf_write(struct file *file, | |||
1560 | const char __user *userbuf, | 1560 | const char __user *userbuf, |
1561 | size_t count, loff_t *ppos) | 1561 | size_t count, loff_t *ppos) |
1562 | { | 1562 | { |
1563 | lbs_private *priv = file->private_data; | 1563 | struct lbs_private *priv = file->private_data; |
1564 | ssize_t res, buf_size; | 1564 | ssize_t res, buf_size; |
1565 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 1565 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
1566 | char *buf = (char *)addr; | 1566 | char *buf = (char *)addr; |
@@ -1582,7 +1582,7 @@ static ssize_t lbs_wrrf_write(struct file *file, | |||
1582 | size_t count, loff_t *ppos) | 1582 | size_t count, loff_t *ppos) |
1583 | { | 1583 | { |
1584 | 1584 | ||
1585 | lbs_private *priv = file->private_data; | 1585 | struct lbs_private *priv = file->private_data; |
1586 | ssize_t res, buf_size; | 1586 | ssize_t res, buf_size; |
1587 | u32 offset, value; | 1587 | u32 offset, value; |
1588 | struct lbs_offset_value offval; | 1588 | struct lbs_offset_value offval; |
@@ -1675,7 +1675,7 @@ void lbs_debugfs_remove(void) | |||
1675 | return; | 1675 | return; |
1676 | } | 1676 | } |
1677 | 1677 | ||
1678 | void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev) | 1678 | void lbs_debugfs_init_one(struct lbs_private *priv, struct net_device *dev) |
1679 | { | 1679 | { |
1680 | int i; | 1680 | int i; |
1681 | struct lbs_debugfs_files *files; | 1681 | struct lbs_debugfs_files *files; |
@@ -1728,7 +1728,7 @@ exit: | |||
1728 | return; | 1728 | return; |
1729 | } | 1729 | } |
1730 | 1730 | ||
1731 | void lbs_debugfs_remove_one(lbs_private *priv) | 1731 | void lbs_debugfs_remove_one(struct lbs_private *priv) |
1732 | { | 1732 | { |
1733 | int i; | 1733 | int i; |
1734 | 1734 | ||
@@ -1755,8 +1755,8 @@ void lbs_debugfs_remove_one(lbs_private *priv) | |||
1755 | 1755 | ||
1756 | #ifdef PROC_DEBUG | 1756 | #ifdef PROC_DEBUG |
1757 | 1757 | ||
1758 | #define item_size(n) (FIELD_SIZEOF(lbs_adapter, n)) | 1758 | #define item_size(n) (FIELD_SIZEOF(struct lbs_adapter, n)) |
1759 | #define item_addr(n) (offsetof(lbs_adapter, n)) | 1759 | #define item_addr(n) (offsetof(struct lbs_adapter, n)) |
1760 | 1760 | ||
1761 | 1761 | ||
1762 | struct debug_data { | 1762 | struct debug_data { |
@@ -1765,7 +1765,7 @@ struct debug_data { | |||
1765 | size_t addr; | 1765 | size_t addr; |
1766 | }; | 1766 | }; |
1767 | 1767 | ||
1768 | /* To debug any member of lbs_adapter, simply add one line here. | 1768 | /* To debug any member of struct lbs_adapter, simply add one line here. |
1769 | */ | 1769 | */ |
1770 | static struct debug_data items[] = { | 1770 | static struct debug_data items[] = { |
1771 | {"intcounter", item_size(intcounter), item_addr(intcounter)}, | 1771 | {"intcounter", item_size(intcounter), item_addr(intcounter)}, |
@@ -1892,11 +1892,11 @@ static struct file_operations lbs_debug_fops = { | |||
1892 | /** | 1892 | /** |
1893 | * @brief create debug proc file | 1893 | * @brief create debug proc file |
1894 | * | 1894 | * |
1895 | * @param priv pointer lbs_private | 1895 | * @param priv pointer struct lbs_private |
1896 | * @param dev pointer net_device | 1896 | * @param dev pointer net_device |
1897 | * @return N/A | 1897 | * @return N/A |
1898 | */ | 1898 | */ |
1899 | static void lbs_debug_init(lbs_private * priv, struct net_device *dev) | 1899 | static void lbs_debug_init(struct lbs_private *priv, struct net_device *dev) |
1900 | { | 1900 | { |
1901 | int i; | 1901 | int i; |
1902 | 1902 | ||
diff --git a/drivers/net/wireless/libertas/debugfs.h b/drivers/net/wireless/libertas/debugfs.h index c97584581980..f2b9c7ffe0fd 100644 --- a/drivers/net/wireless/libertas/debugfs.h +++ b/drivers/net/wireless/libertas/debugfs.h | |||
@@ -4,7 +4,7 @@ | |||
4 | void lbs_debugfs_init(void); | 4 | void lbs_debugfs_init(void); |
5 | void lbs_debugfs_remove(void); | 5 | void lbs_debugfs_remove(void); |
6 | 6 | ||
7 | void lbs_debugfs_init_one(lbs_private *priv, struct net_device *dev); | 7 | void lbs_debugfs_init_one(struct lbs_private *priv, struct net_device *dev); |
8 | void lbs_debugfs_remove_one(lbs_private *priv); | 8 | void lbs_debugfs_remove_one(struct lbs_private *priv); |
9 | 9 | ||
10 | #endif | 10 | #endif |
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h index 7dd76f8e8d2d..74187f34666f 100644 --- a/drivers/net/wireless/libertas/decl.h +++ b/drivers/net/wireless/libertas/decl.h | |||
@@ -12,71 +12,79 @@ | |||
12 | 12 | ||
13 | /** Function Prototype Declaration */ | 13 | /** Function Prototype Declaration */ |
14 | struct lbs_private; | 14 | struct lbs_private; |
15 | struct lbs_adapter; | ||
15 | struct sk_buff; | 16 | struct sk_buff; |
16 | struct net_device; | 17 | struct net_device; |
17 | 18 | ||
18 | int lbs_set_mac_packet_filter(lbs_private * priv); | 19 | int lbs_set_mac_packet_filter(struct lbs_private *priv); |
19 | 20 | ||
20 | void lbs_send_tx_feedback(lbs_private * priv); | 21 | void lbs_send_tx_feedback(struct lbs_private *priv); |
21 | 22 | ||
22 | int lbs_free_cmd_buffer(lbs_private * priv); | 23 | int lbs_free_cmd_buffer(struct lbs_private *priv); |
23 | struct cmd_ctrl_node; | 24 | struct cmd_ctrl_node; |
24 | struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv); | 25 | struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(struct lbs_private *priv); |
25 | 26 | ||
26 | void lbs_set_cmd_ctrl_node(lbs_private * priv, | 27 | void lbs_set_cmd_ctrl_node(struct lbs_private *priv, |
27 | struct cmd_ctrl_node *ptempnode, | 28 | struct cmd_ctrl_node *ptempnode, |
28 | u32 cmd_oid, u16 wait_option, void *pdata_buf); | 29 | u32 cmd_oid, u16 wait_option, void *pdata_buf); |
29 | 30 | ||
30 | int lbs_prepare_and_send_command(lbs_private * priv, | 31 | int lbs_prepare_and_send_command(struct lbs_private *priv, |
31 | u16 cmd_no, | 32 | u16 cmd_no, |
32 | u16 cmd_action, | 33 | u16 cmd_action, |
33 | u16 wait_option, u32 cmd_oid, void *pdata_buf); | 34 | u16 wait_option, u32 cmd_oid, void *pdata_buf); |
34 | 35 | ||
35 | void lbs_queue_cmd(lbs_adapter *adapter, struct cmd_ctrl_node *cmdnode, u8 addtail); | 36 | void lbs_queue_cmd(struct lbs_adapter *adapter, |
37 | struct cmd_ctrl_node *cmdnode, | ||
38 | u8 addtail); | ||
36 | 39 | ||
37 | int lbs_allocate_cmd_buffer(lbs_private * priv); | 40 | int lbs_allocate_cmd_buffer(struct lbs_private *priv); |
38 | int lbs_execute_next_command(lbs_private * priv); | 41 | int lbs_execute_next_command(struct lbs_private *priv); |
39 | int lbs_process_event(lbs_private * priv); | 42 | int lbs_process_event(struct lbs_private *priv); |
40 | void lbs_interrupt(struct net_device *); | 43 | void lbs_interrupt(struct net_device *); |
41 | int lbs_set_radio_control(lbs_private * priv); | 44 | int lbs_set_radio_control(struct lbs_private *priv); |
42 | u32 lbs_fw_index_to_data_rate(u8 index); | 45 | u32 lbs_fw_index_to_data_rate(u8 index); |
43 | u8 lbs_data_rate_to_fw_index(u32 rate); | 46 | u8 lbs_data_rate_to_fw_index(u32 rate); |
44 | void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen); | 47 | void lbs_get_fwversion(struct lbs_adapter *adapter, |
48 | char *fwversion, | ||
49 | int maxlen); | ||
45 | 50 | ||
46 | void lbs_upload_rx_packet(lbs_private * priv, struct sk_buff *skb); | 51 | void lbs_upload_rx_packet(struct lbs_private *priv, struct sk_buff *skb); |
47 | 52 | ||
48 | /** The proc fs interface */ | 53 | /** The proc fs interface */ |
49 | int lbs_process_rx_command(lbs_private * priv); | 54 | int lbs_process_rx_command(struct lbs_private *priv); |
50 | int lbs_process_tx(lbs_private * priv, struct sk_buff *skb); | 55 | int lbs_process_tx(struct lbs_private *priv, struct sk_buff *skb); |
51 | void __lbs_cleanup_and_insert_cmd(lbs_private * priv, | 56 | void __lbs_cleanup_and_insert_cmd(struct lbs_private *priv, |
52 | struct cmd_ctrl_node *ptempcmd); | 57 | struct cmd_ctrl_node *ptempcmd); |
53 | 58 | ||
54 | int lbs_set_regiontable(lbs_private * priv, u8 region, u8 band); | 59 | int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band); |
55 | 60 | ||
56 | int lbs_process_rxed_packet(lbs_private * priv, struct sk_buff *); | 61 | int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *); |
57 | 62 | ||
58 | void lbs_ps_sleep(lbs_private * priv, int wait_option); | 63 | void lbs_ps_sleep(struct lbs_private *priv, int wait_option); |
59 | void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode); | 64 | void lbs_ps_confirm_sleep(struct lbs_private *priv, u16 psmode); |
60 | void lbs_ps_wakeup(lbs_private * priv, int wait_option); | 65 | void lbs_ps_wakeup(struct lbs_private *priv, int wait_option); |
61 | 66 | ||
62 | void lbs_tx_runqueue(lbs_private *priv); | 67 | void lbs_tx_runqueue(struct lbs_private *priv); |
63 | 68 | ||
64 | struct chan_freq_power *lbs_find_cfp_by_band_and_channel( | 69 | struct chan_freq_power *lbs_find_cfp_by_band_and_channel( |
65 | lbs_adapter *adapter, u8 band, u16 channel); | 70 | struct lbs_adapter *adapter, |
71 | u8 band, | ||
72 | u16 channel); | ||
66 | 73 | ||
67 | void lbs_mac_event_disconnected(lbs_private * priv); | 74 | void lbs_mac_event_disconnected(struct lbs_private *priv); |
68 | 75 | ||
69 | void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str); | 76 | void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str); |
70 | 77 | ||
71 | /* main.c */ | 78 | /* main.c */ |
72 | struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, | 79 | struct chan_freq_power *lbs_get_region_cfp_table(u8 region, |
73 | int *cfp_no); | 80 | u8 band, |
74 | lbs_private *lbs_add_card(void *card, struct device *dmdev); | 81 | int *cfp_no); |
75 | int lbs_remove_card(lbs_private *priv); | 82 | struct lbs_private *lbs_add_card(void *card, struct device *dmdev); |
76 | int lbs_start_card(lbs_private *priv); | 83 | int lbs_remove_card(struct lbs_private *priv); |
77 | int lbs_stop_card(lbs_private *priv); | 84 | int lbs_start_card(struct lbs_private *priv); |
78 | int lbs_add_mesh(lbs_private *priv, struct device *dev); | 85 | int lbs_stop_card(struct lbs_private *priv); |
79 | void lbs_remove_mesh(lbs_private *priv); | 86 | int lbs_add_mesh(struct lbs_private *priv, struct device *dev); |
80 | int lbs_reset_device(lbs_private *priv); | 87 | void lbs_remove_mesh(struct lbs_private *priv); |
88 | int lbs_reset_device(struct lbs_private *priv); | ||
81 | 89 | ||
82 | #endif | 90 | #endif |
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h index 81ab99c3f49f..82423842a705 100644 --- a/drivers/net/wireless/libertas/defs.h +++ b/drivers/net/wireless/libertas/defs.h | |||
@@ -262,8 +262,6 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in | |||
262 | #define UNSET_MESH_FRAME(x) (x->cb[6]=0) | 262 | #define UNSET_MESH_FRAME(x) (x->cb[6]=0) |
263 | 263 | ||
264 | /** Global Variable Declaration */ | 264 | /** Global Variable Declaration */ |
265 | typedef struct _lbs_private lbs_private; | ||
266 | typedef struct _lbs_adapter lbs_adapter; | ||
267 | extern const char lbs_driver_version[]; | 265 | extern const char lbs_driver_version[]; |
268 | extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE]; | 266 | extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE]; |
269 | 267 | ||
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 53776bca86f1..1efea63c6691 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /** | 1 | /** |
2 | * This file contains definitions and data structures specific | 2 | * This file contains definitions and data structures specific |
3 | * to Marvell 802.11 NIC. It contains the Device Information | 3 | * to Marvell 802.11 NIC. It contains the Device Information |
4 | * structure lbs_adapter. | 4 | * structure struct lbs_adapter. |
5 | */ | 5 | */ |
6 | #ifndef _LBS_DEV_H_ | 6 | #ifndef _LBS_DEV_H_ |
7 | #define _LBS_DEV_H_ | 7 | #define _LBS_DEV_H_ |
@@ -99,7 +99,7 @@ struct lbs_mesh_stats { | |||
99 | }; | 99 | }; |
100 | 100 | ||
101 | /** Private structure for the MV device */ | 101 | /** Private structure for the MV device */ |
102 | struct _lbs_private { | 102 | struct lbs_private { |
103 | int open; | 103 | int open; |
104 | int mesh_open; | 104 | int mesh_open; |
105 | int infra_open; | 105 | int infra_open; |
@@ -109,7 +109,7 @@ struct _lbs_private { | |||
109 | char name[DEV_NAME_LEN]; | 109 | char name[DEV_NAME_LEN]; |
110 | 110 | ||
111 | void *card; | 111 | void *card; |
112 | lbs_adapter *adapter; | 112 | struct lbs_adapter *adapter; |
113 | struct net_device *dev; | 113 | struct net_device *dev; |
114 | 114 | ||
115 | struct net_device_stats stats; | 115 | struct net_device_stats stats; |
@@ -155,9 +155,9 @@ struct _lbs_private { | |||
155 | struct work_struct sync_channel; | 155 | struct work_struct sync_channel; |
156 | 156 | ||
157 | /** Hardware access */ | 157 | /** Hardware access */ |
158 | int (*hw_host_to_card) (lbs_private *priv, u8 type, u8 *payload, u16 nb); | 158 | int (*hw_host_to_card) (struct lbs_private *priv, u8 type, u8 *payload, u16 nb); |
159 | int (*hw_get_int_status) (lbs_private *priv, u8 *); | 159 | int (*hw_get_int_status) (struct lbs_private *priv, u8 *); |
160 | int (*hw_read_event_cause) (lbs_private *); | 160 | int (*hw_read_event_cause) (struct lbs_private *); |
161 | }; | 161 | }; |
162 | 162 | ||
163 | /** Association request | 163 | /** Association request |
@@ -205,7 +205,7 @@ struct assoc_request { | |||
205 | }; | 205 | }; |
206 | 206 | ||
207 | /** Wlan adapter data structure*/ | 207 | /** Wlan adapter data structure*/ |
208 | struct _lbs_adapter { | 208 | struct lbs_adapter { |
209 | /** STATUS variables */ | 209 | /** STATUS variables */ |
210 | u8 fwreleasenumber[4]; | 210 | u8 fwreleasenumber[4]; |
211 | u32 fwcapinfo; | 211 | u32 fwcapinfo; |
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c index 8121399f4b90..f32fb00129e7 100644 --- a/drivers/net/wireless/libertas/ethtool.c +++ b/drivers/net/wireless/libertas/ethtool.c | |||
@@ -22,7 +22,7 @@ static const char * mesh_stat_strings[]= { | |||
22 | static void lbs_ethtool_get_drvinfo(struct net_device *dev, | 22 | static void lbs_ethtool_get_drvinfo(struct net_device *dev, |
23 | struct ethtool_drvinfo *info) | 23 | struct ethtool_drvinfo *info) |
24 | { | 24 | { |
25 | lbs_private *priv = (lbs_private *) dev->priv; | 25 | struct lbs_private *priv = (struct lbs_private *) dev->priv; |
26 | char fwver[32]; | 26 | char fwver[32]; |
27 | 27 | ||
28 | lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1); | 28 | lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1); |
@@ -45,8 +45,8 @@ static int lbs_ethtool_get_eeprom_len(struct net_device *dev) | |||
45 | static int lbs_ethtool_get_eeprom(struct net_device *dev, | 45 | static int lbs_ethtool_get_eeprom(struct net_device *dev, |
46 | struct ethtool_eeprom *eeprom, u8 * bytes) | 46 | struct ethtool_eeprom *eeprom, u8 * bytes) |
47 | { | 47 | { |
48 | lbs_private *priv = (lbs_private *) dev->priv; | 48 | struct lbs_private *priv = (struct lbs_private *) dev->priv; |
49 | lbs_adapter *adapter = priv->adapter; | 49 | struct lbs_adapter *adapter = priv->adapter; |
50 | struct lbs_ioctl_regrdwr regctrl; | 50 | struct lbs_ioctl_regrdwr regctrl; |
51 | char *ptr; | 51 | char *ptr; |
52 | int ret; | 52 | int ret; |
@@ -108,7 +108,7 @@ done: | |||
108 | static void lbs_ethtool_get_stats(struct net_device * dev, | 108 | static void lbs_ethtool_get_stats(struct net_device * dev, |
109 | struct ethtool_stats * stats, u64 * data) | 109 | struct ethtool_stats * stats, u64 * data) |
110 | { | 110 | { |
111 | lbs_private *priv = dev->priv; | 111 | struct lbs_private *priv = dev->priv; |
112 | struct cmd_ds_mesh_access mesh_access; | 112 | struct cmd_ds_mesh_access mesh_access; |
113 | int ret; | 113 | int ret; |
114 | 114 | ||
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index b0b95cf2e7c9..5fadcc03eea5 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
@@ -57,7 +57,7 @@ MODULE_LICENSE("GPL"); | |||
57 | 57 | ||
58 | struct if_cs_card { | 58 | struct if_cs_card { |
59 | struct pcmcia_device *p_dev; | 59 | struct pcmcia_device *p_dev; |
60 | lbs_private *priv; | 60 | struct lbs_private *priv; |
61 | void __iomem *iobase; | 61 | void __iomem *iobase; |
62 | }; | 62 | }; |
63 | 63 | ||
@@ -286,7 +286,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data) | |||
286 | /* | 286 | /* |
287 | * Called from if_cs_host_to_card to send a command to the hardware | 287 | * Called from if_cs_host_to_card to send a command to the hardware |
288 | */ | 288 | */ |
289 | static int if_cs_send_cmd(lbs_private *priv, u8 *buf, u16 nb) | 289 | static int if_cs_send_cmd(struct lbs_private *priv, u8 *buf, u16 nb) |
290 | { | 290 | { |
291 | struct if_cs_card *card = (struct if_cs_card *)priv->card; | 291 | struct if_cs_card *card = (struct if_cs_card *)priv->card; |
292 | int ret = -1; | 292 | int ret = -1; |
@@ -331,7 +331,7 @@ done: | |||
331 | /* | 331 | /* |
332 | * Called from if_cs_host_to_card to send a data to the hardware | 332 | * Called from if_cs_host_to_card to send a data to the hardware |
333 | */ | 333 | */ |
334 | static void if_cs_send_data(lbs_private *priv, u8 *buf, u16 nb) | 334 | static void if_cs_send_data(struct lbs_private *priv, u8 *buf, u16 nb) |
335 | { | 335 | { |
336 | struct if_cs_card *card = (struct if_cs_card *)priv->card; | 336 | struct if_cs_card *card = (struct if_cs_card *)priv->card; |
337 | 337 | ||
@@ -354,7 +354,7 @@ static void if_cs_send_data(lbs_private *priv, u8 *buf, u16 nb) | |||
354 | /* | 354 | /* |
355 | * Get the command result out of the card. | 355 | * Get the command result out of the card. |
356 | */ | 356 | */ |
357 | static int if_cs_receive_cmdres(lbs_private *priv, u8 *data, u32 *len) | 357 | static int if_cs_receive_cmdres(struct lbs_private *priv, u8 *data, u32 *len) |
358 | { | 358 | { |
359 | int ret = -1; | 359 | int ret = -1; |
360 | u16 val; | 360 | u16 val; |
@@ -386,7 +386,7 @@ out: | |||
386 | } | 386 | } |
387 | 387 | ||
388 | 388 | ||
389 | static struct sk_buff *if_cs_receive_data(lbs_private *priv) | 389 | static struct sk_buff *if_cs_receive_data(struct lbs_private *priv) |
390 | { | 390 | { |
391 | struct sk_buff *skb = NULL; | 391 | struct sk_buff *skb = NULL; |
392 | u16 len; | 392 | u16 len; |
@@ -616,7 +616,10 @@ done: | |||
616 | /********************************************************************/ | 616 | /********************************************************************/ |
617 | 617 | ||
618 | /* Send commands or data packets to the card */ | 618 | /* Send commands or data packets to the card */ |
619 | static int if_cs_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb) | 619 | static int if_cs_host_to_card(struct lbs_private *priv, |
620 | u8 type, | ||
621 | u8 *buf, | ||
622 | u16 nb) | ||
620 | { | 623 | { |
621 | int ret = -1; | 624 | int ret = -1; |
622 | 625 | ||
@@ -641,10 +644,10 @@ static int if_cs_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb) | |||
641 | } | 644 | } |
642 | 645 | ||
643 | 646 | ||
644 | static int if_cs_get_int_status(lbs_private *priv, u8 *ireg) | 647 | static int if_cs_get_int_status(struct lbs_private *priv, u8 *ireg) |
645 | { | 648 | { |
646 | struct if_cs_card *card = (struct if_cs_card *)priv->card; | 649 | struct if_cs_card *card = (struct if_cs_card *)priv->card; |
647 | /* lbs_adapter *adapter = priv->adapter; */ | 650 | /* struct lbs_adapter *adapter = priv->adapter; */ |
648 | int ret = 0; | 651 | int ret = 0; |
649 | u16 int_cause; | 652 | u16 int_cause; |
650 | u8 *cmdbuf; | 653 | u8 *cmdbuf; |
@@ -698,7 +701,7 @@ out: | |||
698 | } | 701 | } |
699 | 702 | ||
700 | 703 | ||
701 | static int if_cs_read_event_cause(lbs_private *priv) | 704 | static int if_cs_read_event_cause(struct lbs_private *priv) |
702 | { | 705 | { |
703 | lbs_deb_enter(LBS_DEB_CS); | 706 | lbs_deb_enter(LBS_DEB_CS); |
704 | 707 | ||
@@ -746,7 +749,7 @@ static void if_cs_release(struct pcmcia_device *p_dev) | |||
746 | static int if_cs_probe(struct pcmcia_device *p_dev) | 749 | static int if_cs_probe(struct pcmcia_device *p_dev) |
747 | { | 750 | { |
748 | int ret = -ENOMEM; | 751 | int ret = -ENOMEM; |
749 | lbs_private *priv; | 752 | struct lbs_private *priv; |
750 | struct if_cs_card *card; | 753 | struct if_cs_card *card; |
751 | /* CIS parsing */ | 754 | /* CIS parsing */ |
752 | tuple_t tuple; | 755 | tuple_t tuple; |
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index de4ad57fae49..7a7037bdd37c 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c | |||
@@ -82,7 +82,7 @@ struct if_sdio_packet { | |||
82 | 82 | ||
83 | struct if_sdio_card { | 83 | struct if_sdio_card { |
84 | struct sdio_func *func; | 84 | struct sdio_func *func; |
85 | lbs_private *priv; | 85 | struct lbs_private *priv; |
86 | 86 | ||
87 | int model; | 87 | int model; |
88 | unsigned long ioport; | 88 | unsigned long ioport; |
@@ -694,7 +694,8 @@ out: | |||
694 | /* Libertas callbacks */ | 694 | /* Libertas callbacks */ |
695 | /*******************************************************************/ | 695 | /*******************************************************************/ |
696 | 696 | ||
697 | static int if_sdio_host_to_card(lbs_private *priv, u8 type, u8 *buf, u16 nb) | 697 | static int if_sdio_host_to_card(struct lbs_private *priv, |
698 | u8 type, u8 *buf, u16 nb) | ||
698 | { | 699 | { |
699 | int ret; | 700 | int ret; |
700 | struct if_sdio_card *card; | 701 | struct if_sdio_card *card; |
@@ -775,7 +776,7 @@ out: | |||
775 | return ret; | 776 | return ret; |
776 | } | 777 | } |
777 | 778 | ||
778 | static int if_sdio_get_int_status(lbs_private *priv, u8 *ireg) | 779 | static int if_sdio_get_int_status(struct lbs_private *priv, u8 *ireg) |
779 | { | 780 | { |
780 | struct if_sdio_card *card; | 781 | struct if_sdio_card *card; |
781 | 782 | ||
@@ -791,7 +792,7 @@ static int if_sdio_get_int_status(lbs_private *priv, u8 *ireg) | |||
791 | return 0; | 792 | return 0; |
792 | } | 793 | } |
793 | 794 | ||
794 | static int if_sdio_read_event_cause(lbs_private *priv) | 795 | static int if_sdio_read_event_cause(struct lbs_private *priv) |
795 | { | 796 | { |
796 | struct if_sdio_card *card; | 797 | struct if_sdio_card *card; |
797 | 798 | ||
@@ -857,7 +858,7 @@ static int if_sdio_probe(struct sdio_func *func, | |||
857 | const struct sdio_device_id *id) | 858 | const struct sdio_device_id *id) |
858 | { | 859 | { |
859 | struct if_sdio_card *card; | 860 | struct if_sdio_card *card; |
860 | lbs_private *priv; | 861 | struct lbs_private *priv; |
861 | int ret, i; | 862 | int ret, i; |
862 | unsigned int model; | 863 | unsigned int model; |
863 | struct if_sdio_packet *packet; | 864 | struct if_sdio_packet *packet; |
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 26176d54c576..4fce0baa0711 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -32,9 +32,12 @@ MODULE_DEVICE_TABLE(usb, if_usb_table); | |||
32 | static void if_usb_receive(struct urb *urb); | 32 | static void if_usb_receive(struct urb *urb); |
33 | static void if_usb_receive_fwload(struct urb *urb); | 33 | static void if_usb_receive_fwload(struct urb *urb); |
34 | static int if_usb_prog_firmware(struct usb_card_rec *cardp); | 34 | static int if_usb_prog_firmware(struct usb_card_rec *cardp); |
35 | static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb); | 35 | static int if_usb_host_to_card(struct lbs_private *priv, |
36 | static int if_usb_get_int_status(lbs_private *priv, u8 *); | 36 | u8 type, |
37 | static int if_usb_read_event_cause(lbs_private *); | 37 | u8 *payload, |
38 | u16 nb); | ||
39 | static int if_usb_get_int_status(struct lbs_private *priv, u8 *); | ||
40 | static int if_usb_read_event_cause(struct lbs_private *); | ||
38 | static int usb_tx_block(struct usb_card_rec *cardp, u8 *payload, u16 nb); | 41 | static int usb_tx_block(struct usb_card_rec *cardp, u8 *payload, u16 nb); |
39 | static void if_usb_free(struct usb_card_rec *cardp); | 42 | static void if_usb_free(struct usb_card_rec *cardp); |
40 | static int if_usb_submit_rx_urb(struct usb_card_rec *cardp); | 43 | static int if_usb_submit_rx_urb(struct usb_card_rec *cardp); |
@@ -52,7 +55,7 @@ static void if_usb_write_bulk_callback(struct urb *urb) | |||
52 | /* handle the transmission complete validations */ | 55 | /* handle the transmission complete validations */ |
53 | 56 | ||
54 | if (urb->status == 0) { | 57 | if (urb->status == 0) { |
55 | lbs_private *priv = cardp->priv; | 58 | struct lbs_private *priv = cardp->priv; |
56 | 59 | ||
57 | /* | 60 | /* |
58 | lbs_deb_usbd(&urb->dev->dev, "URB status is successfull\n"); | 61 | lbs_deb_usbd(&urb->dev->dev, "URB status is successfull\n"); |
@@ -64,7 +67,7 @@ static void if_usb_write_bulk_callback(struct urb *urb) | |||
64 | * valid at firmware load time. | 67 | * valid at firmware load time. |
65 | */ | 68 | */ |
66 | if (priv) { | 69 | if (priv) { |
67 | lbs_adapter *adapter = priv->adapter; | 70 | struct lbs_adapter *adapter = priv->adapter; |
68 | struct net_device *dev = priv->dev; | 71 | struct net_device *dev = priv->dev; |
69 | 72 | ||
70 | priv->dnld_sent = DNLD_RES_RECEIVED; | 73 | priv->dnld_sent = DNLD_RES_RECEIVED; |
@@ -124,7 +127,7 @@ static int if_usb_probe(struct usb_interface *intf, | |||
124 | struct usb_device *udev; | 127 | struct usb_device *udev; |
125 | struct usb_host_interface *iface_desc; | 128 | struct usb_host_interface *iface_desc; |
126 | struct usb_endpoint_descriptor *endpoint; | 129 | struct usb_endpoint_descriptor *endpoint; |
127 | lbs_private *priv; | 130 | struct lbs_private *priv; |
128 | struct usb_card_rec *cardp; | 131 | struct usb_card_rec *cardp; |
129 | int i; | 132 | int i; |
130 | 133 | ||
@@ -259,7 +262,7 @@ error: | |||
259 | static void if_usb_disconnect(struct usb_interface *intf) | 262 | static void if_usb_disconnect(struct usb_interface *intf) |
260 | { | 263 | { |
261 | struct usb_card_rec *cardp = usb_get_intfdata(intf); | 264 | struct usb_card_rec *cardp = usb_get_intfdata(intf); |
262 | lbs_private *priv = (lbs_private *) cardp->priv; | 265 | struct lbs_private *priv = (struct lbs_private *) cardp->priv; |
263 | 266 | ||
264 | lbs_deb_enter(LBS_DEB_MAIN); | 267 | lbs_deb_enter(LBS_DEB_MAIN); |
265 | 268 | ||
@@ -267,7 +270,7 @@ static void if_usb_disconnect(struct usb_interface *intf) | |||
267 | cardp->surprise_removed = 1; | 270 | cardp->surprise_removed = 1; |
268 | 271 | ||
269 | if (priv) { | 272 | if (priv) { |
270 | lbs_adapter *adapter = priv->adapter; | 273 | struct lbs_adapter *adapter = priv->adapter; |
271 | 274 | ||
272 | adapter->surpriseremoved = 1; | 275 | adapter->surpriseremoved = 1; |
273 | lbs_stop_card(priv); | 276 | lbs_stop_card(priv); |
@@ -290,7 +293,7 @@ static void if_usb_disconnect(struct usb_interface *intf) | |||
290 | 293 | ||
291 | /** | 294 | /** |
292 | * @brief This function download FW | 295 | * @brief This function download FW |
293 | * @param priv pointer to lbs_private | 296 | * @param priv pointer to struct lbs_private |
294 | * @return 0 | 297 | * @return 0 |
295 | */ | 298 | */ |
296 | static int if_prog_firmware(struct usb_card_rec *cardp) | 299 | static int if_prog_firmware(struct usb_card_rec *cardp) |
@@ -373,7 +376,7 @@ static int if_prog_firmware(struct usb_card_rec *cardp) | |||
373 | static int if_usb_reset_device(struct usb_card_rec *cardp) | 376 | static int if_usb_reset_device(struct usb_card_rec *cardp) |
374 | { | 377 | { |
375 | int ret; | 378 | int ret; |
376 | lbs_private * priv = cardp->priv; | 379 | struct lbs_private *priv = cardp->priv; |
377 | 380 | ||
378 | lbs_deb_enter(LBS_DEB_USB); | 381 | lbs_deb_enter(LBS_DEB_USB); |
379 | 382 | ||
@@ -394,7 +397,7 @@ static int if_usb_reset_device(struct usb_card_rec *cardp) | |||
394 | 397 | ||
395 | /** | 398 | /** |
396 | * @brief This function transfer the data to the device. | 399 | * @brief This function transfer the data to the device. |
397 | * @param priv pointer to lbs_private | 400 | * @param priv pointer to struct lbs_private |
398 | * @param payload pointer to payload data | 401 | * @param payload pointer to payload data |
399 | * @param nb data length | 402 | * @param nb data length |
400 | * @return 0 or -1 | 403 | * @return 0 or -1 |
@@ -571,7 +574,7 @@ exit: | |||
571 | 574 | ||
572 | static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb, | 575 | static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb, |
573 | struct usb_card_rec *cardp, | 576 | struct usb_card_rec *cardp, |
574 | lbs_private *priv) | 577 | struct lbs_private *priv) |
575 | { | 578 | { |
576 | if (recvlength > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE + | 579 | if (recvlength > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE + |
577 | MESSAGE_HEADER_LEN || recvlength < MRVDRV_MIN_PKT_LEN) { | 580 | MESSAGE_HEADER_LEN || recvlength < MRVDRV_MIN_PKT_LEN) { |
@@ -591,7 +594,7 @@ static inline void process_cmdtypedata(int recvlength, struct sk_buff *skb, | |||
591 | static inline void process_cmdrequest(int recvlength, u8 *recvbuff, | 594 | static inline void process_cmdrequest(int recvlength, u8 *recvbuff, |
592 | struct sk_buff *skb, | 595 | struct sk_buff *skb, |
593 | struct usb_card_rec *cardp, | 596 | struct usb_card_rec *cardp, |
594 | lbs_private *priv) | 597 | struct lbs_private *priv) |
595 | { | 598 | { |
596 | u8 *cmdbuf; | 599 | u8 *cmdbuf; |
597 | if (recvlength > MRVDRV_SIZE_OF_CMD_BUFFER) { | 600 | if (recvlength > MRVDRV_SIZE_OF_CMD_BUFFER) { |
@@ -640,7 +643,7 @@ static void if_usb_receive(struct urb *urb) | |||
640 | struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; | 643 | struct read_cb_info *rinfo = (struct read_cb_info *)urb->context; |
641 | struct sk_buff *skb = rinfo->skb; | 644 | struct sk_buff *skb = rinfo->skb; |
642 | struct usb_card_rec *cardp = (struct usb_card_rec *) rinfo->cardp; | 645 | struct usb_card_rec *cardp = (struct usb_card_rec *) rinfo->cardp; |
643 | lbs_private * priv = cardp->priv; | 646 | struct lbs_private *priv = cardp->priv; |
644 | 647 | ||
645 | int recvlength = urb->actual_length; | 648 | int recvlength = urb->actual_length; |
646 | u8 *recvbuff = NULL; | 649 | u8 *recvbuff = NULL; |
@@ -708,13 +711,16 @@ rx_exit: | |||
708 | 711 | ||
709 | /** | 712 | /** |
710 | * @brief This function downloads data to FW | 713 | * @brief This function downloads data to FW |
711 | * @param priv pointer to lbs_private structure | 714 | * @param priv pointer to struct lbs_private structure |
712 | * @param type type of data | 715 | * @param type type of data |
713 | * @param buf pointer to data buffer | 716 | * @param buf pointer to data buffer |
714 | * @param len number of bytes | 717 | * @param len number of bytes |
715 | * @return 0 or -1 | 718 | * @return 0 or -1 |
716 | */ | 719 | */ |
717 | static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb) | 720 | static int if_usb_host_to_card(struct lbs_private *priv, |
721 | u8 type, | ||
722 | u8 *payload, | ||
723 | u16 nb) | ||
718 | { | 724 | { |
719 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card; | 725 | struct usb_card_rec *cardp = (struct usb_card_rec *)priv->card; |
720 | 726 | ||
@@ -741,7 +747,7 @@ static int if_usb_host_to_card(lbs_private *priv, u8 type, u8 *payload, u16 nb) | |||
741 | } | 747 | } |
742 | 748 | ||
743 | /* called with adapter->driver_lock held */ | 749 | /* called with adapter->driver_lock held */ |
744 | static int if_usb_get_int_status(lbs_private *priv, u8 *ireg) | 750 | static int if_usb_get_int_status(struct lbs_private *priv, u8 *ireg) |
745 | { | 751 | { |
746 | struct usb_card_rec *cardp = priv->card; | 752 | struct usb_card_rec *cardp = priv->card; |
747 | 753 | ||
@@ -753,7 +759,7 @@ static int if_usb_get_int_status(lbs_private *priv, u8 *ireg) | |||
753 | return 0; | 759 | return 0; |
754 | } | 760 | } |
755 | 761 | ||
756 | static int if_usb_read_event_cause(lbs_private * priv) | 762 | static int if_usb_read_event_cause(struct lbs_private *priv) |
757 | { | 763 | { |
758 | struct usb_card_rec *cardp = priv->card; | 764 | struct usb_card_rec *cardp = priv->card; |
759 | 765 | ||
@@ -928,7 +934,7 @@ done: | |||
928 | static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) | 934 | static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) |
929 | { | 935 | { |
930 | struct usb_card_rec *cardp = usb_get_intfdata(intf); | 936 | struct usb_card_rec *cardp = usb_get_intfdata(intf); |
931 | lbs_private *priv = cardp->priv; | 937 | struct lbs_private *priv = cardp->priv; |
932 | 938 | ||
933 | lbs_deb_enter(LBS_DEB_USB); | 939 | lbs_deb_enter(LBS_DEB_USB); |
934 | 940 | ||
@@ -964,7 +970,7 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) | |||
964 | static int if_usb_resume(struct usb_interface *intf) | 970 | static int if_usb_resume(struct usb_interface *intf) |
965 | { | 971 | { |
966 | struct usb_card_rec *cardp = usb_get_intfdata(intf); | 972 | struct usb_card_rec *cardp = usb_get_intfdata(intf); |
967 | lbs_private *priv = cardp->priv; | 973 | struct lbs_private *priv = cardp->priv; |
968 | 974 | ||
969 | lbs_deb_enter(LBS_DEB_USB); | 975 | lbs_deb_enter(LBS_DEB_USB); |
970 | 976 | ||
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); |
diff --git a/drivers/net/wireless/libertas/join.h b/drivers/net/wireless/libertas/join.h index 5c2b2df5e577..c617d071f781 100644 --- a/drivers/net/wireless/libertas/join.h +++ b/drivers/net/wireless/libertas/join.h | |||
@@ -12,41 +12,41 @@ | |||
12 | #include "dev.h" | 12 | #include "dev.h" |
13 | 13 | ||
14 | struct cmd_ds_command; | 14 | struct cmd_ds_command; |
15 | int lbs_cmd_80211_authenticate(lbs_private *priv, | 15 | int lbs_cmd_80211_authenticate(struct lbs_private *priv, |
16 | struct cmd_ds_command *cmd, | 16 | struct cmd_ds_command *cmd, |
17 | void *pdata_buf); | 17 | void *pdata_buf); |
18 | int lbs_cmd_80211_ad_hoc_join(lbs_private *priv, | 18 | int lbs_cmd_80211_ad_hoc_join(struct lbs_private *priv, |
19 | struct cmd_ds_command *cmd, | 19 | struct cmd_ds_command *cmd, |
20 | void *pdata_buf); | 20 | void *pdata_buf); |
21 | int lbs_cmd_80211_ad_hoc_stop(lbs_private *priv, | 21 | int lbs_cmd_80211_ad_hoc_stop(struct lbs_private *priv, |
22 | struct cmd_ds_command *cmd); | 22 | struct cmd_ds_command *cmd); |
23 | int lbs_cmd_80211_ad_hoc_start(lbs_private *priv, | 23 | int lbs_cmd_80211_ad_hoc_start(struct lbs_private *priv, |
24 | struct cmd_ds_command *cmd, | 24 | struct cmd_ds_command *cmd, |
25 | void *pdata_buf); | 25 | void *pdata_buf); |
26 | int lbs_cmd_80211_deauthenticate(lbs_private *priv, | 26 | int lbs_cmd_80211_deauthenticate(struct lbs_private *priv, |
27 | struct cmd_ds_command *cmd); | 27 | struct cmd_ds_command *cmd); |
28 | int lbs_cmd_80211_associate(lbs_private *priv, | 28 | int lbs_cmd_80211_associate(struct lbs_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 | int lbs_ret_80211_ad_hoc_start(lbs_private *priv, | 32 | int lbs_ret_80211_ad_hoc_start(struct lbs_private *priv, |
33 | struct cmd_ds_command *resp); | 33 | struct cmd_ds_command *resp); |
34 | int lbs_ret_80211_ad_hoc_stop(lbs_private *priv, | 34 | int lbs_ret_80211_ad_hoc_stop(struct lbs_private *priv, |
35 | struct cmd_ds_command *resp); | 35 | struct cmd_ds_command *resp); |
36 | int lbs_ret_80211_disassociate(lbs_private *priv, | 36 | int lbs_ret_80211_disassociate(struct lbs_private *priv, |
37 | struct cmd_ds_command *resp); | 37 | struct cmd_ds_command *resp); |
38 | int lbs_ret_80211_associate(lbs_private *priv, | 38 | int lbs_ret_80211_associate(struct lbs_private *priv, |
39 | struct cmd_ds_command *resp); | 39 | struct cmd_ds_command *resp); |
40 | 40 | ||
41 | int lbs_start_adhoc_network(lbs_private *priv, | 41 | int lbs_start_adhoc_network(struct lbs_private *priv, |
42 | struct assoc_request * assoc_req); | 42 | struct assoc_request * assoc_req); |
43 | int lbs_join_adhoc_network(lbs_private *priv, | 43 | int lbs_join_adhoc_network(struct lbs_private *priv, |
44 | struct assoc_request * assoc_req); | 44 | struct assoc_request * assoc_req); |
45 | int lbs_stop_adhoc_network(lbs_private *priv); | 45 | int lbs_stop_adhoc_network(struct lbs_private *priv); |
46 | 46 | ||
47 | int lbs_send_deauthentication(lbs_private *priv); | 47 | int lbs_send_deauthentication(struct lbs_private *priv); |
48 | 48 | ||
49 | int lbs_associate(lbs_private *priv, struct assoc_request *assoc_req); | 49 | int lbs_associate(struct lbs_private *priv, struct assoc_request *assoc_req); |
50 | 50 | ||
51 | void lbs_unset_basic_rate_flags(u8 *rates, size_t len); | 51 | void lbs_unset_basic_rate_flags(u8 *rates, size_t len); |
52 | 52 | ||
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 769117916fb3..a3957698edbd 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -247,8 +247,8 @@ static ssize_t lbs_anycast_set(struct device *dev, | |||
247 | return strlen(buf); | 247 | return strlen(buf); |
248 | } | 248 | } |
249 | 249 | ||
250 | int lbs_add_rtap(lbs_private *priv); | 250 | int lbs_add_rtap(struct lbs_private *priv); |
251 | void lbs_remove_rtap(lbs_private *priv); | 251 | void lbs_remove_rtap(struct lbs_private *priv); |
252 | 252 | ||
253 | /** | 253 | /** |
254 | * Get function for sysfs attribute rtap | 254 | * Get function for sysfs attribute rtap |
@@ -256,8 +256,9 @@ void lbs_remove_rtap(lbs_private *priv); | |||
256 | static ssize_t lbs_rtap_get(struct device *dev, | 256 | static ssize_t lbs_rtap_get(struct device *dev, |
257 | struct device_attribute *attr, char * buf) | 257 | struct device_attribute *attr, char * buf) |
258 | { | 258 | { |
259 | lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv; | 259 | struct lbs_private *priv = (struct lbs_private *) |
260 | lbs_adapter *adapter = priv->adapter; | 260 | (to_net_dev(dev))->priv; |
261 | struct lbs_adapter *adapter = priv->adapter; | ||
261 | return snprintf(buf, 5, "0x%X\n", adapter->monitormode); | 262 | return snprintf(buf, 5, "0x%X\n", adapter->monitormode); |
262 | } | 263 | } |
263 | 264 | ||
@@ -268,8 +269,9 @@ static ssize_t lbs_rtap_set(struct device *dev, | |||
268 | struct device_attribute *attr, const char * buf, size_t count) | 269 | struct device_attribute *attr, const char * buf, size_t count) |
269 | { | 270 | { |
270 | int monitor_mode; | 271 | int monitor_mode; |
271 | lbs_private *priv = (lbs_private *) (to_net_dev(dev))->priv; | 272 | struct lbs_private *priv = (struct lbs_private *) |
272 | lbs_adapter *adapter = priv->adapter; | 273 | (to_net_dev(dev))->priv; |
274 | struct lbs_adapter *adapter = priv->adapter; | ||
273 | 275 | ||
274 | sscanf(buf, "%x", &monitor_mode); | 276 | sscanf(buf, "%x", &monitor_mode); |
275 | if (monitor_mode != LBS_MONITOR_OFF) { | 277 | if (monitor_mode != LBS_MONITOR_OFF) { |
@@ -332,7 +334,7 @@ static ssize_t lbs_autostart_enabled_set(struct device *dev, | |||
332 | { | 334 | { |
333 | struct cmd_ds_mesh_access mesh_access; | 335 | struct cmd_ds_mesh_access mesh_access; |
334 | uint32_t datum; | 336 | uint32_t datum; |
335 | lbs_private *priv = (to_net_dev(dev))->priv; | 337 | struct lbs_private *priv = (to_net_dev(dev))->priv; |
336 | int ret; | 338 | int ret; |
337 | 339 | ||
338 | memset(&mesh_access, 0, sizeof(mesh_access)); | 340 | memset(&mesh_access, 0, sizeof(mesh_access)); |
@@ -375,8 +377,8 @@ static struct attribute_group lbs_mesh_attr_group = { | |||
375 | */ | 377 | */ |
376 | static int pre_open_check(struct net_device *dev) | 378 | static int pre_open_check(struct net_device *dev) |
377 | { | 379 | { |
378 | lbs_private *priv = (lbs_private *) dev->priv; | 380 | struct lbs_private *priv = (struct lbs_private *) dev->priv; |
379 | lbs_adapter *adapter = priv->adapter; | 381 | struct lbs_adapter *adapter = priv->adapter; |
380 | int i = 0; | 382 | int i = 0; |
381 | 383 | ||
382 | while (!adapter->fw_ready && i < 20) { | 384 | while (!adapter->fw_ready && i < 20) { |
@@ -399,8 +401,8 @@ static int pre_open_check(struct net_device *dev) | |||
399 | */ | 401 | */ |
400 | static int lbs_dev_open(struct net_device *dev) | 402 | static int lbs_dev_open(struct net_device *dev) |
401 | { | 403 | { |
402 | lbs_private *priv = (lbs_private *) dev->priv; | 404 | struct lbs_private *priv = (struct lbs_private *) dev->priv; |
403 | lbs_adapter *adapter = priv->adapter; | 405 | struct lbs_adapter *adapter = priv->adapter; |
404 | 406 | ||
405 | lbs_deb_enter(LBS_DEB_NET); | 407 | lbs_deb_enter(LBS_DEB_NET); |
406 | 408 | ||
@@ -429,7 +431,7 @@ static int lbs_dev_open(struct net_device *dev) | |||
429 | */ | 431 | */ |
430 | static int lbs_mesh_open(struct net_device *dev) | 432 | static int lbs_mesh_open(struct net_device *dev) |
431 | { | 433 | { |
432 | lbs_private *priv = (lbs_private *) dev->priv ; | 434 | struct lbs_private *priv = (struct lbs_private *) dev->priv ; |
433 | 435 | ||
434 | if (pre_open_check(dev) == -1) | 436 | if (pre_open_check(dev) == -1) |
435 | return -1; | 437 | return -1; |
@@ -453,7 +455,7 @@ static int lbs_mesh_open(struct net_device *dev) | |||
453 | */ | 455 | */ |
454 | static int lbs_open(struct net_device *dev) | 456 | static int lbs_open(struct net_device *dev) |
455 | { | 457 | { |
456 | lbs_private *priv = (lbs_private *) dev->priv ; | 458 | struct lbs_private *priv = (struct lbs_private *) dev->priv ; |
457 | 459 | ||
458 | if(pre_open_check(dev) == -1) | 460 | if(pre_open_check(dev) == -1) |
459 | return -1; | 461 | return -1; |
@@ -466,7 +468,7 @@ static int lbs_open(struct net_device *dev) | |||
466 | 468 | ||
467 | static int lbs_dev_close(struct net_device *dev) | 469 | static int lbs_dev_close(struct net_device *dev) |
468 | { | 470 | { |
469 | lbs_private *priv = dev->priv; | 471 | struct lbs_private *priv = dev->priv; |
470 | 472 | ||
471 | lbs_deb_enter(LBS_DEB_NET); | 473 | lbs_deb_enter(LBS_DEB_NET); |
472 | 474 | ||
@@ -485,7 +487,7 @@ static int lbs_dev_close(struct net_device *dev) | |||
485 | */ | 487 | */ |
486 | static int lbs_mesh_close(struct net_device *dev) | 488 | static int lbs_mesh_close(struct net_device *dev) |
487 | { | 489 | { |
488 | lbs_private *priv = (lbs_private *) (dev->priv); | 490 | struct lbs_private *priv = (struct lbs_private *) (dev->priv); |
489 | 491 | ||
490 | priv->mesh_open = 0; | 492 | priv->mesh_open = 0; |
491 | netif_stop_queue(priv->mesh_dev); | 493 | netif_stop_queue(priv->mesh_dev); |
@@ -503,7 +505,7 @@ static int lbs_mesh_close(struct net_device *dev) | |||
503 | */ | 505 | */ |
504 | static int lbs_close(struct net_device *dev) | 506 | static int lbs_close(struct net_device *dev) |
505 | { | 507 | { |
506 | lbs_private *priv = (lbs_private *) dev->priv; | 508 | struct lbs_private *priv = (struct lbs_private *) dev->priv; |
507 | 509 | ||
508 | netif_stop_queue(dev); | 510 | netif_stop_queue(dev); |
509 | priv->infra_open = 0; | 511 | priv->infra_open = 0; |
@@ -517,7 +519,7 @@ static int lbs_close(struct net_device *dev) | |||
517 | static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | 519 | static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) |
518 | { | 520 | { |
519 | int ret = 0; | 521 | int ret = 0; |
520 | lbs_private *priv = dev->priv; | 522 | struct lbs_private *priv = dev->priv; |
521 | 523 | ||
522 | lbs_deb_enter(LBS_DEB_NET); | 524 | lbs_deb_enter(LBS_DEB_NET); |
523 | 525 | ||
@@ -544,7 +546,7 @@ done: | |||
544 | static int lbs_mesh_pre_start_xmit(struct sk_buff *skb, | 546 | static int lbs_mesh_pre_start_xmit(struct sk_buff *skb, |
545 | struct net_device *dev) | 547 | struct net_device *dev) |
546 | { | 548 | { |
547 | lbs_private *priv = dev->priv; | 549 | struct lbs_private *priv = dev->priv; |
548 | int ret; | 550 | int ret; |
549 | 551 | ||
550 | lbs_deb_enter(LBS_DEB_MESH); | 552 | lbs_deb_enter(LBS_DEB_MESH); |
@@ -566,7 +568,7 @@ static int lbs_mesh_pre_start_xmit(struct sk_buff *skb, | |||
566 | */ | 568 | */ |
567 | static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) | 569 | static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) |
568 | { | 570 | { |
569 | lbs_private *priv = dev->priv; | 571 | struct lbs_private *priv = dev->priv; |
570 | int ret; | 572 | int ret; |
571 | 573 | ||
572 | lbs_deb_enter(LBS_DEB_NET); | 574 | lbs_deb_enter(LBS_DEB_NET); |
@@ -585,7 +587,7 @@ static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
585 | 587 | ||
586 | static void lbs_tx_timeout(struct net_device *dev) | 588 | static void lbs_tx_timeout(struct net_device *dev) |
587 | { | 589 | { |
588 | lbs_private *priv = (lbs_private *) dev->priv; | 590 | struct lbs_private *priv = (struct lbs_private *) dev->priv; |
589 | 591 | ||
590 | lbs_deb_enter(LBS_DEB_TX); | 592 | lbs_deb_enter(LBS_DEB_TX); |
591 | 593 | ||
@@ -617,12 +619,12 @@ static void lbs_tx_timeout(struct net_device *dev) | |||
617 | /** | 619 | /** |
618 | * @brief This function returns the network statistics | 620 | * @brief This function returns the network statistics |
619 | * | 621 | * |
620 | * @param dev A pointer to lbs_private structure | 622 | * @param dev A pointer to struct lbs_private structure |
621 | * @return A pointer to net_device_stats structure | 623 | * @return A pointer to net_device_stats structure |
622 | */ | 624 | */ |
623 | static struct net_device_stats *lbs_get_stats(struct net_device *dev) | 625 | static struct net_device_stats *lbs_get_stats(struct net_device *dev) |
624 | { | 626 | { |
625 | lbs_private *priv = (lbs_private *) dev->priv; | 627 | struct lbs_private *priv = (struct lbs_private *) dev->priv; |
626 | 628 | ||
627 | return &priv->stats; | 629 | return &priv->stats; |
628 | } | 630 | } |
@@ -630,8 +632,8 @@ static struct net_device_stats *lbs_get_stats(struct net_device *dev) | |||
630 | static int lbs_set_mac_address(struct net_device *dev, void *addr) | 632 | static int lbs_set_mac_address(struct net_device *dev, void *addr) |
631 | { | 633 | { |
632 | int ret = 0; | 634 | int ret = 0; |
633 | lbs_private *priv = (lbs_private *) dev->priv; | 635 | struct lbs_private *priv = (struct lbs_private *) dev->priv; |
634 | lbs_adapter *adapter = priv->adapter; | 636 | struct lbs_adapter *adapter = priv->adapter; |
635 | struct sockaddr *phwaddr = addr; | 637 | struct sockaddr *phwaddr = addr; |
636 | 638 | ||
637 | lbs_deb_enter(LBS_DEB_NET); | 639 | lbs_deb_enter(LBS_DEB_NET); |
@@ -667,7 +669,7 @@ done: | |||
667 | return ret; | 669 | return ret; |
668 | } | 670 | } |
669 | 671 | ||
670 | static int lbs_copy_multicast_address(lbs_adapter *adapter, | 672 | static int lbs_copy_multicast_address(struct lbs_adapter *adapter, |
671 | struct net_device *dev) | 673 | struct net_device *dev) |
672 | { | 674 | { |
673 | int i = 0; | 675 | int i = 0; |
@@ -684,8 +686,8 @@ static int lbs_copy_multicast_address(lbs_adapter *adapter, | |||
684 | 686 | ||
685 | static void lbs_set_multicast_list(struct net_device *dev) | 687 | static void lbs_set_multicast_list(struct net_device *dev) |
686 | { | 688 | { |
687 | lbs_private *priv = dev->priv; | 689 | struct lbs_private *priv = dev->priv; |
688 | lbs_adapter *adapter = priv->adapter; | 690 | struct lbs_adapter *adapter = priv->adapter; |
689 | int oldpacketfilter; | 691 | int oldpacketfilter; |
690 | DECLARE_MAC_BUF(mac); | 692 | DECLARE_MAC_BUF(mac); |
691 | 693 | ||
@@ -765,8 +767,8 @@ static void lbs_set_multicast_list(struct net_device *dev) | |||
765 | static int lbs_thread(void *data) | 767 | static int lbs_thread(void *data) |
766 | { | 768 | { |
767 | struct net_device *dev = data; | 769 | struct net_device *dev = data; |
768 | lbs_private *priv = dev->priv; | 770 | struct lbs_private *priv = dev->priv; |
769 | lbs_adapter *adapter = priv->adapter; | 771 | struct lbs_adapter *adapter = priv->adapter; |
770 | wait_queue_t wait; | 772 | wait_queue_t wait; |
771 | u8 ireg = 0; | 773 | u8 ireg = 0; |
772 | 774 | ||
@@ -928,13 +930,13 @@ static int lbs_thread(void *data) | |||
928 | * HW spec from firmware and set basic parameters to | 930 | * HW spec from firmware and set basic parameters to |
929 | * firmware. | 931 | * firmware. |
930 | * | 932 | * |
931 | * @param priv A pointer to lbs_private structure | 933 | * @param priv A pointer to struct lbs_private structure |
932 | * @return 0 or -1 | 934 | * @return 0 or -1 |
933 | */ | 935 | */ |
934 | static int lbs_setup_firmware(lbs_private *priv) | 936 | static int lbs_setup_firmware(struct lbs_private *priv) |
935 | { | 937 | { |
936 | int ret = -1; | 938 | int ret = -1; |
937 | lbs_adapter *adapter = priv->adapter; | 939 | struct lbs_adapter *adapter = priv->adapter; |
938 | struct cmd_ds_mesh_access mesh_access; | 940 | struct cmd_ds_mesh_access mesh_access; |
939 | 941 | ||
940 | lbs_deb_enter(LBS_DEB_FW); | 942 | lbs_deb_enter(LBS_DEB_FW); |
@@ -995,8 +997,8 @@ done: | |||
995 | */ | 997 | */ |
996 | static void command_timer_fn(unsigned long data) | 998 | static void command_timer_fn(unsigned long data) |
997 | { | 999 | { |
998 | lbs_private *priv = (lbs_private *)data; | 1000 | struct lbs_private *priv = (struct lbs_private *)data; |
999 | lbs_adapter *adapter = priv->adapter; | 1001 | struct lbs_adapter *adapter = priv->adapter; |
1000 | struct cmd_ctrl_node *ptempnode; | 1002 | struct cmd_ctrl_node *ptempnode; |
1001 | struct cmd_ds_command *cmd; | 1003 | struct cmd_ds_command *cmd; |
1002 | unsigned long flags; | 1004 | unsigned long flags; |
@@ -1030,9 +1032,9 @@ static void command_timer_fn(unsigned long data) | |||
1030 | return; | 1032 | return; |
1031 | } | 1033 | } |
1032 | 1034 | ||
1033 | static int lbs_init_adapter(lbs_private *priv) | 1035 | static int lbs_init_adapter(struct lbs_private *priv) |
1034 | { | 1036 | { |
1035 | lbs_adapter *adapter = priv->adapter; | 1037 | struct lbs_adapter *adapter = priv->adapter; |
1036 | size_t bufsize; | 1038 | size_t bufsize; |
1037 | int i, ret = 0; | 1039 | int i, ret = 0; |
1038 | 1040 | ||
@@ -1101,9 +1103,9 @@ out: | |||
1101 | return ret; | 1103 | return ret; |
1102 | } | 1104 | } |
1103 | 1105 | ||
1104 | static void lbs_free_adapter(lbs_private *priv) | 1106 | static void lbs_free_adapter(struct lbs_private *priv) |
1105 | { | 1107 | { |
1106 | lbs_adapter *adapter = priv->adapter; | 1108 | struct lbs_adapter *adapter = priv->adapter; |
1107 | 1109 | ||
1108 | if (!adapter) { | 1110 | if (!adapter) { |
1109 | lbs_deb_fw("why double free adapter?\n"); | 1111 | lbs_deb_fw("why double free adapter?\n"); |
@@ -1131,25 +1133,27 @@ static void lbs_free_adapter(lbs_private *priv) | |||
1131 | * card, allocate the lbs_priv and initialize the device. | 1133 | * card, allocate the lbs_priv and initialize the device. |
1132 | * | 1134 | * |
1133 | * @param card A pointer to card | 1135 | * @param card A pointer to card |
1134 | * @return A pointer to lbs_private structure | 1136 | * @return A pointer to struct lbs_private structure |
1135 | */ | 1137 | */ |
1136 | lbs_private *lbs_add_card(void *card, struct device *dmdev) | 1138 | struct lbs_private *lbs_add_card(void *card, struct device *dmdev) |
1137 | { | 1139 | { |
1138 | struct net_device *dev = NULL; | 1140 | struct net_device *dev = NULL; |
1139 | lbs_private *priv = NULL; | 1141 | struct lbs_private *priv = NULL; |
1140 | 1142 | ||
1141 | lbs_deb_enter(LBS_DEB_NET); | 1143 | lbs_deb_enter(LBS_DEB_NET); |
1142 | 1144 | ||
1143 | /* Allocate an Ethernet device and register it */ | 1145 | /* Allocate an Ethernet device and register it */ |
1144 | if (!(dev = alloc_etherdev(sizeof(lbs_private)))) { | 1146 | dev = alloc_etherdev(sizeof(struct lbs_private)); |
1147 | if (!dev) { | ||
1145 | lbs_pr_err("init ethX device failed\n"); | 1148 | lbs_pr_err("init ethX device failed\n"); |
1146 | goto done; | 1149 | goto done; |
1147 | } | 1150 | } |
1148 | priv = dev->priv; | 1151 | priv = dev->priv; |
1149 | 1152 | ||
1150 | /* allocate buffer for lbs_adapter */ | 1153 | /* allocate buffer for struct lbs_adapter */ |
1151 | if (!(priv->adapter = kzalloc(sizeof(lbs_adapter), GFP_KERNEL))) { | 1154 | priv->adapter = kzalloc(sizeof(struct lbs_adapter), GFP_KERNEL); |
1152 | lbs_pr_err("allocate buffer for lbs_adapter failed\n"); | 1155 | if (!priv->adapter) { |
1156 | lbs_pr_err("allocate buffer for struct lbs_adapter failed\n"); | ||
1153 | goto err_kzalloc; | 1157 | goto err_kzalloc; |
1154 | } | 1158 | } |
1155 | 1159 | ||
@@ -1217,9 +1221,9 @@ done: | |||
1217 | EXPORT_SYMBOL_GPL(lbs_add_card); | 1221 | EXPORT_SYMBOL_GPL(lbs_add_card); |
1218 | 1222 | ||
1219 | 1223 | ||
1220 | int lbs_remove_card(lbs_private *priv) | 1224 | int lbs_remove_card(struct lbs_private *priv) |
1221 | { | 1225 | { |
1222 | lbs_adapter *adapter = priv->adapter; | 1226 | struct lbs_adapter *adapter = priv->adapter; |
1223 | struct net_device *dev = priv->dev; | 1227 | struct net_device *dev = priv->dev; |
1224 | union iwreq_data wrqu; | 1228 | union iwreq_data wrqu; |
1225 | 1229 | ||
@@ -1258,7 +1262,7 @@ int lbs_remove_card(lbs_private *priv) | |||
1258 | EXPORT_SYMBOL_GPL(lbs_remove_card); | 1262 | EXPORT_SYMBOL_GPL(lbs_remove_card); |
1259 | 1263 | ||
1260 | 1264 | ||
1261 | int lbs_start_card(lbs_private *priv) | 1265 | int lbs_start_card(struct lbs_private *priv) |
1262 | { | 1266 | { |
1263 | struct net_device *dev = priv->dev; | 1267 | struct net_device *dev = priv->dev; |
1264 | int ret = -1; | 1268 | int ret = -1; |
@@ -1291,7 +1295,7 @@ done: | |||
1291 | EXPORT_SYMBOL_GPL(lbs_start_card); | 1295 | EXPORT_SYMBOL_GPL(lbs_start_card); |
1292 | 1296 | ||
1293 | 1297 | ||
1294 | int lbs_stop_card(lbs_private *priv) | 1298 | int lbs_stop_card(struct lbs_private *priv) |
1295 | { | 1299 | { |
1296 | struct net_device *dev = priv->dev; | 1300 | struct net_device *dev = priv->dev; |
1297 | int ret = -1; | 1301 | int ret = -1; |
@@ -1324,10 +1328,10 @@ EXPORT_SYMBOL_GPL(lbs_stop_card); | |||
1324 | /** | 1328 | /** |
1325 | * @brief This function adds mshX interface | 1329 | * @brief This function adds mshX interface |
1326 | * | 1330 | * |
1327 | * @param priv A pointer to the lbs_private structure | 1331 | * @param priv A pointer to the struct lbs_private structure |
1328 | * @return 0 if successful, -X otherwise | 1332 | * @return 0 if successful, -X otherwise |
1329 | */ | 1333 | */ |
1330 | int lbs_add_mesh(lbs_private *priv, struct device *dev) | 1334 | int lbs_add_mesh(struct lbs_private *priv, struct device *dev) |
1331 | { | 1335 | { |
1332 | struct net_device *mesh_dev = NULL; | 1336 | struct net_device *mesh_dev = NULL; |
1333 | int ret = 0; | 1337 | int ret = 0; |
@@ -1385,7 +1389,7 @@ done: | |||
1385 | EXPORT_SYMBOL_GPL(lbs_add_mesh); | 1389 | EXPORT_SYMBOL_GPL(lbs_add_mesh); |
1386 | 1390 | ||
1387 | 1391 | ||
1388 | void lbs_remove_mesh(lbs_private *priv) | 1392 | void lbs_remove_mesh(struct lbs_private *priv) |
1389 | { | 1393 | { |
1390 | struct net_device *mesh_dev; | 1394 | struct net_device *mesh_dev; |
1391 | 1395 | ||
@@ -1441,9 +1445,9 @@ struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, int *cfp_no | |||
1441 | return NULL; | 1445 | return NULL; |
1442 | } | 1446 | } |
1443 | 1447 | ||
1444 | int lbs_set_regiontable(lbs_private *priv, u8 region, u8 band) | 1448 | int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band) |
1445 | { | 1449 | { |
1446 | lbs_adapter *adapter = priv->adapter; | 1450 | struct lbs_adapter *adapter = priv->adapter; |
1447 | int ret = 0; | 1451 | int ret = 0; |
1448 | int i = 0; | 1452 | int i = 0; |
1449 | 1453 | ||
@@ -1485,7 +1489,7 @@ out: | |||
1485 | */ | 1489 | */ |
1486 | void lbs_interrupt(struct net_device *dev) | 1490 | void lbs_interrupt(struct net_device *dev) |
1487 | { | 1491 | { |
1488 | lbs_private *priv = dev->priv; | 1492 | struct lbs_private *priv = dev->priv; |
1489 | 1493 | ||
1490 | lbs_deb_enter(LBS_DEB_THREAD); | 1494 | lbs_deb_enter(LBS_DEB_THREAD); |
1491 | 1495 | ||
@@ -1507,7 +1511,7 @@ void lbs_interrupt(struct net_device *dev) | |||
1507 | } | 1511 | } |
1508 | EXPORT_SYMBOL_GPL(lbs_interrupt); | 1512 | EXPORT_SYMBOL_GPL(lbs_interrupt); |
1509 | 1513 | ||
1510 | int lbs_reset_device(lbs_private *priv) | 1514 | int lbs_reset_device(struct lbs_private *priv) |
1511 | { | 1515 | { |
1512 | int ret; | 1516 | int ret; |
1513 | 1517 | ||
@@ -1562,12 +1566,12 @@ static int lbs_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1562 | 1566 | ||
1563 | static struct net_device_stats *lbs_rtap_get_stats(struct net_device *dev) | 1567 | static struct net_device_stats *lbs_rtap_get_stats(struct net_device *dev) |
1564 | { | 1568 | { |
1565 | lbs_private *priv = dev->priv; | 1569 | struct lbs_private *priv = dev->priv; |
1566 | return &priv->ieee->stats; | 1570 | return &priv->ieee->stats; |
1567 | } | 1571 | } |
1568 | 1572 | ||
1569 | 1573 | ||
1570 | void lbs_remove_rtap(lbs_private *priv) | 1574 | void lbs_remove_rtap(struct lbs_private *priv) |
1571 | { | 1575 | { |
1572 | if (priv->rtap_net_dev == NULL) | 1576 | if (priv->rtap_net_dev == NULL) |
1573 | return; | 1577 | return; |
@@ -1576,7 +1580,7 @@ void lbs_remove_rtap(lbs_private *priv) | |||
1576 | priv->rtap_net_dev = NULL; | 1580 | priv->rtap_net_dev = NULL; |
1577 | } | 1581 | } |
1578 | 1582 | ||
1579 | int lbs_add_rtap(lbs_private *priv) | 1583 | int lbs_add_rtap(struct lbs_private *priv) |
1580 | { | 1584 | { |
1581 | int rc = 0; | 1585 | int rc = 0; |
1582 | 1586 | ||
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index 204955904340..fa467dfef003 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -35,19 +35,20 @@ struct rx80211packethdr { | |||
35 | void *eth80211_hdr; | 35 | void *eth80211_hdr; |
36 | } __attribute__ ((packed)); | 36 | } __attribute__ ((packed)); |
37 | 37 | ||
38 | static int process_rxed_802_11_packet(lbs_private *priv, struct sk_buff *skb); | 38 | static int process_rxed_802_11_packet(struct lbs_private *priv, |
39 | struct sk_buff *skb); | ||
39 | 40 | ||
40 | /** | 41 | /** |
41 | * @brief This function computes the avgSNR . | 42 | * @brief This function computes the avgSNR . |
42 | * | 43 | * |
43 | * @param priv A pointer to lbs_private structure | 44 | * @param priv A pointer to struct lbs_private structure |
44 | * @return avgSNR | 45 | * @return avgSNR |
45 | */ | 46 | */ |
46 | static u8 lbs_getavgsnr(lbs_private *priv) | 47 | static u8 lbs_getavgsnr(struct lbs_private *priv) |
47 | { | 48 | { |
48 | u8 i; | 49 | u8 i; |
49 | u16 temp = 0; | 50 | u16 temp = 0; |
50 | lbs_adapter *adapter = priv->adapter; | 51 | struct lbs_adapter *adapter = priv->adapter; |
51 | if (adapter->numSNRNF == 0) | 52 | if (adapter->numSNRNF == 0) |
52 | return 0; | 53 | return 0; |
53 | for (i = 0; i < adapter->numSNRNF; i++) | 54 | for (i = 0; i < adapter->numSNRNF; i++) |
@@ -59,14 +60,14 @@ static u8 lbs_getavgsnr(lbs_private *priv) | |||
59 | /** | 60 | /** |
60 | * @brief This function computes the AvgNF | 61 | * @brief This function computes the AvgNF |
61 | * | 62 | * |
62 | * @param priv A pointer to lbs_private structure | 63 | * @param priv A pointer to struct lbs_private structure |
63 | * @return AvgNF | 64 | * @return AvgNF |
64 | */ | 65 | */ |
65 | static u8 lbs_getavgnf(lbs_private *priv) | 66 | static u8 lbs_getavgnf(struct lbs_private *priv) |
66 | { | 67 | { |
67 | u8 i; | 68 | u8 i; |
68 | u16 temp = 0; | 69 | u16 temp = 0; |
69 | lbs_adapter *adapter = priv->adapter; | 70 | struct lbs_adapter *adapter = priv->adapter; |
70 | if (adapter->numSNRNF == 0) | 71 | if (adapter->numSNRNF == 0) |
71 | return 0; | 72 | return 0; |
72 | for (i = 0; i < adapter->numSNRNF; i++) | 73 | for (i = 0; i < adapter->numSNRNF; i++) |
@@ -78,13 +79,13 @@ static u8 lbs_getavgnf(lbs_private *priv) | |||
78 | /** | 79 | /** |
79 | * @brief This function save the raw SNR/NF to our internel buffer | 80 | * @brief This function save the raw SNR/NF to our internel buffer |
80 | * | 81 | * |
81 | * @param priv A pointer to lbs_private structure | 82 | * @param priv A pointer to struct lbs_private structure |
82 | * @param prxpd A pointer to rxpd structure of received packet | 83 | * @param prxpd A pointer to rxpd structure of received packet |
83 | * @return n/a | 84 | * @return n/a |
84 | */ | 85 | */ |
85 | static void lbs_save_rawSNRNF(lbs_private *priv, struct rxpd *p_rx_pd) | 86 | static void lbs_save_rawSNRNF(struct lbs_private *priv, struct rxpd *p_rx_pd) |
86 | { | 87 | { |
87 | lbs_adapter *adapter = priv->adapter; | 88 | struct lbs_adapter *adapter = priv->adapter; |
88 | if (adapter->numSNRNF < DEFAULT_DATA_AVG_FACTOR) | 89 | if (adapter->numSNRNF < DEFAULT_DATA_AVG_FACTOR) |
89 | adapter->numSNRNF++; | 90 | adapter->numSNRNF++; |
90 | adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr; | 91 | adapter->rawSNR[adapter->nextSNRNF] = p_rx_pd->snr; |
@@ -98,13 +99,13 @@ static void lbs_save_rawSNRNF(lbs_private *priv, struct rxpd *p_rx_pd) | |||
98 | /** | 99 | /** |
99 | * @brief This function computes the RSSI in received packet. | 100 | * @brief This function computes the RSSI in received packet. |
100 | * | 101 | * |
101 | * @param priv A pointer to lbs_private structure | 102 | * @param priv A pointer to struct lbs_private structure |
102 | * @param prxpd A pointer to rxpd structure of received packet | 103 | * @param prxpd A pointer to rxpd structure of received packet |
103 | * @return n/a | 104 | * @return n/a |
104 | */ | 105 | */ |
105 | static void lbs_compute_rssi(lbs_private *priv, struct rxpd *p_rx_pd) | 106 | static void lbs_compute_rssi(struct lbs_private *priv, struct rxpd *p_rx_pd) |
106 | { | 107 | { |
107 | lbs_adapter *adapter = priv->adapter; | 108 | struct lbs_adapter *adapter = priv->adapter; |
108 | 109 | ||
109 | lbs_deb_enter(LBS_DEB_RX); | 110 | lbs_deb_enter(LBS_DEB_RX); |
110 | 111 | ||
@@ -134,7 +135,7 @@ static void lbs_compute_rssi(lbs_private *priv, struct rxpd *p_rx_pd) | |||
134 | lbs_deb_leave(LBS_DEB_RX); | 135 | lbs_deb_leave(LBS_DEB_RX); |
135 | } | 136 | } |
136 | 137 | ||
137 | void lbs_upload_rx_packet(lbs_private *priv, struct sk_buff *skb) | 138 | void lbs_upload_rx_packet(struct lbs_private *priv, struct sk_buff *skb) |
138 | { | 139 | { |
139 | lbs_deb_rx("skb->data %p\n", skb->data); | 140 | lbs_deb_rx("skb->data %p\n", skb->data); |
140 | 141 | ||
@@ -154,13 +155,13 @@ void lbs_upload_rx_packet(lbs_private *priv, struct sk_buff *skb) | |||
154 | * @brief This function processes received packet and forwards it | 155 | * @brief This function processes received packet and forwards it |
155 | * to kernel/upper layer | 156 | * to kernel/upper layer |
156 | * | 157 | * |
157 | * @param priv A pointer to lbs_private | 158 | * @param priv A pointer to struct lbs_private |
158 | * @param skb A pointer to skb which includes the received packet | 159 | * @param skb A pointer to skb which includes the received packet |
159 | * @return 0 or -1 | 160 | * @return 0 or -1 |
160 | */ | 161 | */ |
161 | int lbs_process_rxed_packet(lbs_private *priv, struct sk_buff *skb) | 162 | int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) |
162 | { | 163 | { |
163 | lbs_adapter *adapter = priv->adapter; | 164 | struct lbs_adapter *adapter = priv->adapter; |
164 | int ret = 0; | 165 | int ret = 0; |
165 | 166 | ||
166 | struct rxpackethdr *p_rx_pkt; | 167 | struct rxpackethdr *p_rx_pkt; |
@@ -319,13 +320,14 @@ static u8 convert_mv_rate_to_radiotap(u8 rate) | |||
319 | * @brief This function processes a received 802.11 packet and forwards it | 320 | * @brief This function processes a received 802.11 packet and forwards it |
320 | * to kernel/upper layer | 321 | * to kernel/upper layer |
321 | * | 322 | * |
322 | * @param priv A pointer to lbs_private | 323 | * @param priv A pointer to struct lbs_private |
323 | * @param skb A pointer to skb which includes the received packet | 324 | * @param skb A pointer to skb which includes the received packet |
324 | * @return 0 or -1 | 325 | * @return 0 or -1 |
325 | */ | 326 | */ |
326 | static int process_rxed_802_11_packet(lbs_private *priv, struct sk_buff *skb) | 327 | static int process_rxed_802_11_packet(struct lbs_private *priv, |
328 | struct sk_buff *skb) | ||
327 | { | 329 | { |
328 | lbs_adapter *adapter = priv->adapter; | 330 | struct lbs_adapter *adapter = priv->adapter; |
329 | int ret = 0; | 331 | int ret = 0; |
330 | 332 | ||
331 | struct rx80211packethdr *p_rx_pkt; | 333 | struct rx80211packethdr *p_rx_pkt; |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 13a0838aa1e6..4e465bb4fd6f 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -163,13 +163,13 @@ static inline int match_bss_dynamic_wep(struct lbs_802_11_security *secinfo, | |||
163 | * 0 0 0 0 !=NONE 1 0 0 yes Dynamic WEP | 163 | * 0 0 0 0 !=NONE 1 0 0 yes Dynamic WEP |
164 | * | 164 | * |
165 | * | 165 | * |
166 | * @param adapter A pointer to lbs_adapter | 166 | * @param adapter A pointer to struct lbs_adapter |
167 | * @param index Index in scantable to check against current driver settings | 167 | * @param index Index in scantable to check against current driver settings |
168 | * @param mode Network mode: Infrastructure or IBSS | 168 | * @param mode Network mode: Infrastructure or IBSS |
169 | * | 169 | * |
170 | * @return Index in scantable, or error code if negative | 170 | * @return Index in scantable, or error code if negative |
171 | */ | 171 | */ |
172 | static int is_network_compatible(lbs_adapter *adapter, | 172 | static int is_network_compatible(struct lbs_adapter *adapter, |
173 | struct bss_descriptor * bss, u8 mode) | 173 | struct bss_descriptor * bss, u8 mode) |
174 | { | 174 | { |
175 | int matched = 0; | 175 | int matched = 0; |
@@ -262,7 +262,7 @@ int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len) | |||
262 | * of channels to scan. This routine is used for any scan that is not | 262 | * of channels to scan. This routine is used for any scan that is not |
263 | * provided a specific channel list to scan. | 263 | * provided a specific channel list to scan. |
264 | * | 264 | * |
265 | * @param priv A pointer to lbs_private structure | 265 | * @param priv A pointer to struct lbs_private structure |
266 | * @param scanchanlist Output parameter: resulting channel list to scan | 266 | * @param scanchanlist Output parameter: resulting channel list to scan |
267 | * @param filteredscan Flag indicating whether or not a BSSID or SSID filter | 267 | * @param filteredscan Flag indicating whether or not a BSSID or SSID filter |
268 | * is being sent in the command to firmware. Used to | 268 | * is being sent in the command to firmware. Used to |
@@ -272,12 +272,12 @@ int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len) | |||
272 | * | 272 | * |
273 | * @return void | 273 | * @return void |
274 | */ | 274 | */ |
275 | static void lbs_scan_create_channel_list(lbs_private *priv, | 275 | static void lbs_scan_create_channel_list(struct lbs_private *priv, |
276 | struct chanscanparamset * scanchanlist, | 276 | struct chanscanparamset * scanchanlist, |
277 | u8 filteredscan) | 277 | u8 filteredscan) |
278 | { | 278 | { |
279 | 279 | ||
280 | lbs_adapter *adapter = priv->adapter; | 280 | struct lbs_adapter *adapter = priv->adapter; |
281 | struct region_channel *scanregion; | 281 | struct region_channel *scanregion; |
282 | struct chan_freq_power *cfp; | 282 | struct chan_freq_power *cfp; |
283 | int rgnidx; | 283 | int rgnidx; |
@@ -360,7 +360,9 @@ static void lbs_scan_create_channel_list(lbs_private *priv, | |||
360 | /* Delayed partial scan worker */ | 360 | /* Delayed partial scan worker */ |
361 | void lbs_scan_worker(struct work_struct *work) | 361 | void lbs_scan_worker(struct work_struct *work) |
362 | { | 362 | { |
363 | lbs_private *priv = container_of(work, lbs_private, scan_work.work); | 363 | struct lbs_private *priv = container_of(work, |
364 | struct lbs_private, | ||
365 | scan_work.work); | ||
364 | 366 | ||
365 | lbs_scan_networks(priv, NULL, 0); | 367 | lbs_scan_networks(priv, NULL, 0); |
366 | } | 368 | } |
@@ -386,7 +388,7 @@ void lbs_scan_worker(struct work_struct *work) | |||
386 | * If the number of probes is not set, use the adapter default setting | 388 | * If the number of probes is not set, use the adapter default setting |
387 | * Qualify the channel | 389 | * Qualify the channel |
388 | * | 390 | * |
389 | * @param priv A pointer to lbs_private structure | 391 | * @param priv A pointer to struct lbs_private structure |
390 | * @param puserscanin NULL or pointer to scan configuration parameters | 392 | * @param puserscanin NULL or pointer to scan configuration parameters |
391 | * @param ppchantlvout Output parameter: Pointer to the start of the | 393 | * @param ppchantlvout Output parameter: Pointer to the start of the |
392 | * channel TLV portion of the output scan config | 394 | * channel TLV portion of the output scan config |
@@ -405,7 +407,7 @@ void lbs_scan_worker(struct work_struct *work) | |||
405 | * @return resulting scan configuration | 407 | * @return resulting scan configuration |
406 | */ | 408 | */ |
407 | static struct lbs_scan_cmd_config * | 409 | static struct lbs_scan_cmd_config * |
408 | lbs_scan_setup_scan_config(lbs_private *priv, | 410 | lbs_scan_setup_scan_config(struct lbs_private *priv, |
409 | const struct lbs_ioctl_user_scan_cfg *puserscanin, | 411 | const struct lbs_ioctl_user_scan_cfg *puserscanin, |
410 | struct mrvlietypes_chanlistparamset ** ppchantlvout, | 412 | struct mrvlietypes_chanlistparamset ** ppchantlvout, |
411 | struct chanscanparamset * pscanchanlist, | 413 | struct chanscanparamset * pscanchanlist, |
@@ -587,7 +589,7 @@ out: | |||
587 | * and sends the portion of the channel TLV along with the other TLVs | 589 | * and sends the portion of the channel TLV along with the other TLVs |
588 | * to the lbs_cmd routines for execution in the firmware. | 590 | * to the lbs_cmd routines for execution in the firmware. |
589 | * | 591 | * |
590 | * @param priv A pointer to lbs_private structure | 592 | * @param priv A pointer to struct lbs_private structure |
591 | * @param maxchanperscan Maximum number channels to be included in each | 593 | * @param maxchanperscan Maximum number channels to be included in each |
592 | * scan command sent to firmware | 594 | * scan command sent to firmware |
593 | * @param filteredscan Flag indicating whether or not a BSSID or SSID | 595 | * @param filteredscan Flag indicating whether or not a BSSID or SSID |
@@ -601,7 +603,7 @@ out: | |||
601 | * | 603 | * |
602 | * @return 0 or error return otherwise | 604 | * @return 0 or error return otherwise |
603 | */ | 605 | */ |
604 | static int lbs_scan_channel_list(lbs_private *priv, | 606 | static int lbs_scan_channel_list(struct lbs_private *priv, |
605 | int maxchanperscan, | 607 | int maxchanperscan, |
606 | u8 filteredscan, | 608 | u8 filteredscan, |
607 | struct lbs_scan_cmd_config *pscancfgout, | 609 | struct lbs_scan_cmd_config *pscancfgout, |
@@ -754,7 +756,7 @@ out: | |||
754 | /* | 756 | /* |
755 | * Only used from lbs_scan_networks() | 757 | * Only used from lbs_scan_networks() |
756 | */ | 758 | */ |
757 | static void clear_selected_scan_list_entries(lbs_adapter *adapter, | 759 | static void clear_selected_scan_list_entries(struct lbs_adapter *adapter, |
758 | const struct lbs_ioctl_user_scan_cfg *scan_cfg) | 760 | const struct lbs_ioctl_user_scan_cfg *scan_cfg) |
759 | { | 761 | { |
760 | struct bss_descriptor *bss; | 762 | struct bss_descriptor *bss; |
@@ -813,18 +815,18 @@ out: | |||
813 | * order to send the appropriate scan commands to firmware to populate or | 815 | * order to send the appropriate scan commands to firmware to populate or |
814 | * update the internal driver scan table | 816 | * update the internal driver scan table |
815 | * | 817 | * |
816 | * @param priv A pointer to lbs_private structure | 818 | * @param priv A pointer to struct lbs_private structure |
817 | * @param puserscanin Pointer to the input configuration for the requested | 819 | * @param puserscanin Pointer to the input configuration for the requested |
818 | * scan. | 820 | * scan. |
819 | * @param full_scan ??? | 821 | * @param full_scan ??? |
820 | * | 822 | * |
821 | * @return 0 or < 0 if error | 823 | * @return 0 or < 0 if error |
822 | */ | 824 | */ |
823 | int lbs_scan_networks(lbs_private *priv, | 825 | int lbs_scan_networks(struct lbs_private *priv, |
824 | const struct lbs_ioctl_user_scan_cfg *puserscanin, | 826 | const struct lbs_ioctl_user_scan_cfg *puserscanin, |
825 | int full_scan) | 827 | int full_scan) |
826 | { | 828 | { |
827 | lbs_adapter *adapter = priv->adapter; | 829 | struct lbs_adapter *adapter = priv->adapter; |
828 | struct mrvlietypes_chanlistparamset *pchantlvout; | 830 | struct mrvlietypes_chanlistparamset *pchantlvout; |
829 | struct chanscanparamset * scan_chan_list = NULL; | 831 | struct chanscanparamset * scan_chan_list = NULL; |
830 | struct lbs_scan_cmd_config *scan_cfg = NULL; | 832 | struct lbs_scan_cmd_config *scan_cfg = NULL; |
@@ -1155,13 +1157,13 @@ done: | |||
1155 | * | 1157 | * |
1156 | * Used in association code | 1158 | * Used in association code |
1157 | * | 1159 | * |
1158 | * @param adapter A pointer to lbs_adapter | 1160 | * @param adapter A pointer to struct lbs_adapter |
1159 | * @param bssid BSSID to find in the scan list | 1161 | * @param bssid BSSID to find in the scan list |
1160 | * @param mode Network mode: Infrastructure or IBSS | 1162 | * @param mode Network mode: Infrastructure or IBSS |
1161 | * | 1163 | * |
1162 | * @return index in BSSID list, or error return code (< 0) | 1164 | * @return index in BSSID list, or error return code (< 0) |
1163 | */ | 1165 | */ |
1164 | struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter, | 1166 | struct bss_descriptor *lbs_find_bssid_in_list(struct lbs_adapter *adapter, |
1165 | u8 * bssid, u8 mode) | 1167 | u8 * bssid, u8 mode) |
1166 | { | 1168 | { |
1167 | struct bss_descriptor * iter_bss; | 1169 | struct bss_descriptor * iter_bss; |
@@ -1207,14 +1209,14 @@ out: | |||
1207 | * | 1209 | * |
1208 | * Used in association code | 1210 | * Used in association code |
1209 | * | 1211 | * |
1210 | * @param adapter A pointer to lbs_adapter | 1212 | * @param adapter A pointer to struct lbs_adapter |
1211 | * @param ssid SSID to find in the list | 1213 | * @param ssid SSID to find in the list |
1212 | * @param bssid BSSID to qualify the SSID selection (if provided) | 1214 | * @param bssid BSSID to qualify the SSID selection (if provided) |
1213 | * @param mode Network mode: Infrastructure or IBSS | 1215 | * @param mode Network mode: Infrastructure or IBSS |
1214 | * | 1216 | * |
1215 | * @return index in BSSID list | 1217 | * @return index in BSSID list |
1216 | */ | 1218 | */ |
1217 | struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter, | 1219 | struct bss_descriptor *lbs_find_ssid_in_list(struct lbs_adapter *adapter, |
1218 | u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode, | 1220 | u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode, |
1219 | int channel) | 1221 | int channel) |
1220 | { | 1222 | { |
@@ -1279,12 +1281,13 @@ out: | |||
1279 | * Search the scan table for the best SSID that also matches the current | 1281 | * Search the scan table for the best SSID that also matches the current |
1280 | * adapter network preference (infrastructure or adhoc) | 1282 | * adapter network preference (infrastructure or adhoc) |
1281 | * | 1283 | * |
1282 | * @param adapter A pointer to lbs_adapter | 1284 | * @param adapter A pointer to struct lbs_adapter |
1283 | * | 1285 | * |
1284 | * @return index in BSSID list | 1286 | * @return index in BSSID list |
1285 | */ | 1287 | */ |
1286 | static struct bss_descriptor *lbs_find_best_ssid_in_list(lbs_adapter *adapter, | 1288 | static struct bss_descriptor *lbs_find_best_ssid_in_list( |
1287 | u8 mode) | 1289 | struct lbs_adapter *adapter, |
1290 | u8 mode) | ||
1288 | { | 1291 | { |
1289 | u8 bestrssi = 0; | 1292 | u8 bestrssi = 0; |
1290 | struct bss_descriptor * iter_bss; | 1293 | struct bss_descriptor * iter_bss; |
@@ -1325,15 +1328,15 @@ static struct bss_descriptor *lbs_find_best_ssid_in_list(lbs_adapter *adapter, | |||
1325 | * | 1328 | * |
1326 | * Used from association worker. | 1329 | * Used from association worker. |
1327 | * | 1330 | * |
1328 | * @param priv A pointer to lbs_private structure | 1331 | * @param priv A pointer to struct lbs_private structure |
1329 | * @param pSSID A pointer to AP's ssid | 1332 | * @param pSSID A pointer to AP's ssid |
1330 | * | 1333 | * |
1331 | * @return 0--success, otherwise--fail | 1334 | * @return 0--success, otherwise--fail |
1332 | */ | 1335 | */ |
1333 | int lbs_find_best_network_ssid(lbs_private *priv, | 1336 | int lbs_find_best_network_ssid(struct lbs_private *priv, |
1334 | u8 *out_ssid, u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode) | 1337 | u8 *out_ssid, u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode) |
1335 | { | 1338 | { |
1336 | lbs_adapter *adapter = priv->adapter; | 1339 | struct lbs_adapter *adapter = priv->adapter; |
1337 | int ret = -1; | 1340 | int ret = -1; |
1338 | struct bss_descriptor * found; | 1341 | struct bss_descriptor * found; |
1339 | 1342 | ||
@@ -1371,8 +1374,8 @@ out: | |||
1371 | int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, | 1374 | int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, |
1372 | struct iw_param *vwrq, char *extra) | 1375 | struct iw_param *vwrq, char *extra) |
1373 | { | 1376 | { |
1374 | lbs_private *priv = dev->priv; | 1377 | struct lbs_private *priv = dev->priv; |
1375 | lbs_adapter *adapter = priv->adapter; | 1378 | struct lbs_adapter *adapter = priv->adapter; |
1376 | 1379 | ||
1377 | lbs_deb_enter(LBS_DEB_SCAN); | 1380 | lbs_deb_enter(LBS_DEB_SCAN); |
1378 | 1381 | ||
@@ -1394,7 +1397,7 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, | |||
1394 | * | 1397 | * |
1395 | * Used in association code and from debugfs | 1398 | * Used in association code and from debugfs |
1396 | * | 1399 | * |
1397 | * @param priv A pointer to lbs_private structure | 1400 | * @param priv A pointer to struct lbs_private structure |
1398 | * @param ssid A pointer to the SSID to scan for | 1401 | * @param ssid A pointer to the SSID to scan for |
1399 | * @param ssid_len Length of the SSID | 1402 | * @param ssid_len Length of the SSID |
1400 | * @param clear_ssid Should existing scan results with this SSID | 1403 | * @param clear_ssid Should existing scan results with this SSID |
@@ -1404,10 +1407,10 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, | |||
1404 | * | 1407 | * |
1405 | * @return 0-success, otherwise fail | 1408 | * @return 0-success, otherwise fail |
1406 | */ | 1409 | */ |
1407 | int lbs_send_specific_ssid_scan(lbs_private *priv, | 1410 | int lbs_send_specific_ssid_scan(struct lbs_private *priv, |
1408 | u8 *ssid, u8 ssid_len, u8 clear_ssid) | 1411 | u8 *ssid, u8 ssid_len, u8 clear_ssid) |
1409 | { | 1412 | { |
1410 | lbs_adapter *adapter = priv->adapter; | 1413 | struct lbs_adapter *adapter = priv->adapter; |
1411 | struct lbs_ioctl_user_scan_cfg scancfg; | 1414 | struct lbs_ioctl_user_scan_cfg scancfg; |
1412 | int ret = 0; | 1415 | int ret = 0; |
1413 | 1416 | ||
@@ -1445,11 +1448,11 @@ out: | |||
1445 | 1448 | ||
1446 | #define MAX_CUSTOM_LEN 64 | 1449 | #define MAX_CUSTOM_LEN 64 |
1447 | 1450 | ||
1448 | static inline char *lbs_translate_scan(lbs_private *priv, | 1451 | static inline char *lbs_translate_scan(struct lbs_private *priv, |
1449 | char *start, char *stop, | 1452 | char *start, char *stop, |
1450 | struct bss_descriptor *bss) | 1453 | struct bss_descriptor *bss) |
1451 | { | 1454 | { |
1452 | lbs_adapter *adapter = priv->adapter; | 1455 | struct lbs_adapter *adapter = priv->adapter; |
1453 | struct chan_freq_power *cfp; | 1456 | struct chan_freq_power *cfp; |
1454 | char *current_val; /* For rates */ | 1457 | char *current_val; /* For rates */ |
1455 | struct iw_event iwe; /* Temporary buffer */ | 1458 | struct iw_event iwe; /* Temporary buffer */ |
@@ -1612,8 +1615,8 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, | |||
1612 | struct iw_point *dwrq, char *extra) | 1615 | struct iw_point *dwrq, char *extra) |
1613 | { | 1616 | { |
1614 | #define SCAN_ITEM_SIZE 128 | 1617 | #define SCAN_ITEM_SIZE 128 |
1615 | lbs_private *priv = dev->priv; | 1618 | struct lbs_private *priv = dev->priv; |
1616 | lbs_adapter *adapter = priv->adapter; | 1619 | struct lbs_adapter *adapter = priv->adapter; |
1617 | int err = 0; | 1620 | int err = 0; |
1618 | char *ev = extra; | 1621 | char *ev = extra; |
1619 | char *stop = ev + dwrq->length; | 1622 | char *stop = ev + dwrq->length; |
@@ -1684,7 +1687,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, | |||
1684 | * Sends a fixed lenght data part (specifying the BSS type and BSSID filters) | 1687 | * Sends a fixed lenght data part (specifying the BSS type and BSSID filters) |
1685 | * as well as a variable number/length of TLVs to the firmware. | 1688 | * as well as a variable number/length of TLVs to the firmware. |
1686 | * | 1689 | * |
1687 | * @param priv A pointer to lbs_private structure | 1690 | * @param priv A pointer to struct lbs_private structure |
1688 | * @param cmd A pointer to cmd_ds_command structure to be sent to | 1691 | * @param cmd A pointer to cmd_ds_command structure to be sent to |
1689 | * firmware with the cmd_DS_801_11_SCAN structure | 1692 | * firmware with the cmd_DS_801_11_SCAN structure |
1690 | * @param pdata_buf Void pointer cast of a lbs_scan_cmd_config struct used | 1693 | * @param pdata_buf Void pointer cast of a lbs_scan_cmd_config struct used |
@@ -1692,7 +1695,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, | |||
1692 | * | 1695 | * |
1693 | * @return 0 or -1 | 1696 | * @return 0 or -1 |
1694 | */ | 1697 | */ |
1695 | int lbs_cmd_80211_scan(lbs_private *priv, | 1698 | int lbs_cmd_80211_scan(struct lbs_private *priv, |
1696 | struct cmd_ds_command *cmd, void *pdata_buf) | 1699 | struct cmd_ds_command *cmd, void *pdata_buf) |
1697 | { | 1700 | { |
1698 | struct cmd_ds_802_11_scan *pscan = &cmd->params.scan; | 1701 | struct cmd_ds_802_11_scan *pscan = &cmd->params.scan; |
@@ -1752,14 +1755,14 @@ static inline int is_same_network(struct bss_descriptor *src, | |||
1752 | * | bufsize and sizeof the fixed fields above) | | 1755 | * | bufsize and sizeof the fixed fields above) | |
1753 | * .-----------------------------------------------------------. | 1756 | * .-----------------------------------------------------------. |
1754 | * | 1757 | * |
1755 | * @param priv A pointer to lbs_private structure | 1758 | * @param priv A pointer to struct lbs_private structure |
1756 | * @param resp A pointer to cmd_ds_command | 1759 | * @param resp A pointer to cmd_ds_command |
1757 | * | 1760 | * |
1758 | * @return 0 or -1 | 1761 | * @return 0 or -1 |
1759 | */ | 1762 | */ |
1760 | int lbs_ret_80211_scan(lbs_private *priv, struct cmd_ds_command *resp) | 1763 | int lbs_ret_80211_scan(struct lbs_private *priv, struct cmd_ds_command *resp) |
1761 | { | 1764 | { |
1762 | lbs_adapter *adapter = priv->adapter; | 1765 | struct lbs_adapter *adapter = priv->adapter; |
1763 | struct cmd_ds_802_11_scan_rsp *pscan; | 1766 | struct cmd_ds_802_11_scan_rsp *pscan; |
1764 | struct bss_descriptor * iter_bss; | 1767 | struct bss_descriptor * iter_bss; |
1765 | struct bss_descriptor * safe; | 1768 | struct bss_descriptor * safe; |
diff --git a/drivers/net/wireless/libertas/scan.h b/drivers/net/wireless/libertas/scan.h index 7ed66f40d181..b23144814677 100644 --- a/drivers/net/wireless/libertas/scan.h +++ b/drivers/net/wireless/libertas/scan.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <net/ieee80211.h> | 10 | #include <net/ieee80211.h> |
11 | #include "hostcmd.h" | 11 | #include "hostcmd.h" |
12 | 12 | ||
13 | struct lbs_adapter; | ||
14 | |||
13 | /** | 15 | /** |
14 | * @brief Maximum number of channels that can be sent in a setuserscan ioctl | 16 | * @brief Maximum number of channels that can be sent in a setuserscan ioctl |
15 | * | 17 | * |
@@ -176,27 +178,27 @@ struct bss_descriptor { | |||
176 | 178 | ||
177 | int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len); | 179 | int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len); |
178 | 180 | ||
179 | struct bss_descriptor *lbs_find_ssid_in_list(lbs_adapter *adapter, | 181 | struct bss_descriptor *lbs_find_ssid_in_list(struct lbs_adapter *adapter, |
180 | u8 *ssid, u8 ssid_len, u8 *bssid, u8 mode, | 182 | u8 *ssid, u8 ssid_len, u8 *bssid, u8 mode, |
181 | int channel); | 183 | int channel); |
182 | 184 | ||
183 | struct bss_descriptor *lbs_find_bssid_in_list(lbs_adapter *adapter, | 185 | struct bss_descriptor *lbs_find_bssid_in_list(struct lbs_adapter *adapter, |
184 | u8 *bssid, u8 mode); | 186 | u8 *bssid, u8 mode); |
185 | 187 | ||
186 | int lbs_find_best_network_ssid(lbs_private *priv, u8 *out_ssid, | 188 | int lbs_find_best_network_ssid(struct lbs_private *priv, u8 *out_ssid, |
187 | u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode); | 189 | u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode); |
188 | 190 | ||
189 | int lbs_send_specific_ssid_scan(lbs_private *priv, u8 *ssid, | 191 | int lbs_send_specific_ssid_scan(struct lbs_private *priv, u8 *ssid, |
190 | u8 ssid_len, u8 clear_ssid); | 192 | u8 ssid_len, u8 clear_ssid); |
191 | 193 | ||
192 | int lbs_cmd_80211_scan(lbs_private *priv, | 194 | int lbs_cmd_80211_scan(struct lbs_private *priv, |
193 | struct cmd_ds_command *cmd, | 195 | struct cmd_ds_command *cmd, |
194 | void *pdata_buf); | 196 | void *pdata_buf); |
195 | 197 | ||
196 | int lbs_ret_80211_scan(lbs_private *priv, | 198 | int lbs_ret_80211_scan(struct lbs_private *priv, |
197 | struct cmd_ds_command *resp); | 199 | struct cmd_ds_command *resp); |
198 | 200 | ||
199 | int lbs_scan_networks(lbs_private *priv, | 201 | int lbs_scan_networks(struct lbs_private *priv, |
200 | const struct lbs_ioctl_user_scan_cfg *puserscanin, | 202 | const struct lbs_ioctl_user_scan_cfg *puserscanin, |
201 | int full_scan); | 203 | int full_scan); |
202 | 204 | ||
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index 267274b804c8..b423ce1ff42b 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -52,11 +52,11 @@ static u32 convert_radiotap_rate_to_mv(u8 rate) | |||
52 | * @brief This function processes a single packet and sends | 52 | * @brief This function processes a single packet and sends |
53 | * to IF layer | 53 | * to IF layer |
54 | * | 54 | * |
55 | * @param priv A pointer to lbs_private structure | 55 | * @param priv A pointer to struct lbs_private structure |
56 | * @param skb A pointer to skb which includes TX packet | 56 | * @param skb A pointer to skb which includes TX packet |
57 | * @return 0 or -1 | 57 | * @return 0 or -1 |
58 | */ | 58 | */ |
59 | static int SendSinglePacket(lbs_private *priv, struct sk_buff *skb) | 59 | static int SendSinglePacket(struct lbs_private *priv, struct sk_buff *skb) |
60 | { | 60 | { |
61 | int ret = 0; | 61 | int ret = 0; |
62 | struct txpd localtxpd; | 62 | struct txpd localtxpd; |
@@ -164,9 +164,9 @@ done: | |||
164 | } | 164 | } |
165 | 165 | ||
166 | 166 | ||
167 | void lbs_tx_runqueue(lbs_private *priv) | 167 | void lbs_tx_runqueue(struct lbs_private *priv) |
168 | { | 168 | { |
169 | lbs_adapter *adapter = priv->adapter; | 169 | struct lbs_adapter *adapter = priv->adapter; |
170 | int i; | 170 | int i; |
171 | 171 | ||
172 | spin_lock(&adapter->txqueue_lock); | 172 | spin_lock(&adapter->txqueue_lock); |
@@ -180,9 +180,9 @@ void lbs_tx_runqueue(lbs_private *priv) | |||
180 | spin_unlock(&adapter->txqueue_lock); | 180 | spin_unlock(&adapter->txqueue_lock); |
181 | } | 181 | } |
182 | 182 | ||
183 | static void lbs_tx_queue(lbs_private *priv, struct sk_buff *skb) | 183 | static void lbs_tx_queue(struct lbs_private *priv, struct sk_buff *skb) |
184 | { | 184 | { |
185 | lbs_adapter *adapter = priv->adapter; | 185 | struct lbs_adapter *adapter = priv->adapter; |
186 | 186 | ||
187 | spin_lock(&adapter->txqueue_lock); | 187 | spin_lock(&adapter->txqueue_lock); |
188 | 188 | ||
@@ -205,10 +205,10 @@ static void lbs_tx_queue(lbs_private *priv, struct sk_buff *skb) | |||
205 | * @brief This function checks the conditions and sends packet to IF | 205 | * @brief This function checks the conditions and sends packet to IF |
206 | * layer if everything is ok. | 206 | * layer if everything is ok. |
207 | * | 207 | * |
208 | * @param priv A pointer to lbs_private structure | 208 | * @param priv A pointer to struct lbs_private structure |
209 | * @return n/a | 209 | * @return n/a |
210 | */ | 210 | */ |
211 | int lbs_process_tx(lbs_private *priv, struct sk_buff *skb) | 211 | int lbs_process_tx(struct lbs_private *priv, struct sk_buff *skb) |
212 | { | 212 | { |
213 | int ret = -1; | 213 | int ret = -1; |
214 | 214 | ||
@@ -239,14 +239,14 @@ done: | |||
239 | * @brief This function sends to the host the last transmitted packet, | 239 | * @brief This function sends to the host the last transmitted packet, |
240 | * filling the radiotap headers with transmission information. | 240 | * filling the radiotap headers with transmission information. |
241 | * | 241 | * |
242 | * @param priv A pointer to lbs_private structure | 242 | * @param priv A pointer to struct lbs_private structure |
243 | * @param status A 32 bit value containing transmission status. | 243 | * @param status A 32 bit value containing transmission status. |
244 | * | 244 | * |
245 | * @returns void | 245 | * @returns void |
246 | */ | 246 | */ |
247 | void lbs_send_tx_feedback(lbs_private *priv) | 247 | void lbs_send_tx_feedback(struct lbs_private *priv) |
248 | { | 248 | { |
249 | lbs_adapter *adapter = priv->adapter; | 249 | struct lbs_adapter *adapter = priv->adapter; |
250 | struct tx_radiotap_hdr *radiotap_hdr; | 250 | struct tx_radiotap_hdr *radiotap_hdr; |
251 | u32 status = adapter->eventcause; | 251 | u32 status = adapter->eventcause; |
252 | int txfail; | 252 | int txfail; |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index 2231a65a537d..b8c93c0adb2e 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "assoc.h" | 21 | #include "assoc.h" |
22 | 22 | ||
23 | 23 | ||
24 | static inline void lbs_postpone_association_work(lbs_private *priv) | 24 | static inline void lbs_postpone_association_work(struct lbs_private *priv) |
25 | { | 25 | { |
26 | if (priv->adapter->surpriseremoved) | 26 | if (priv->adapter->surpriseremoved) |
27 | return; | 27 | return; |
@@ -29,7 +29,7 @@ static inline void lbs_postpone_association_work(lbs_private *priv) | |||
29 | queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2); | 29 | queue_delayed_work(priv->work_thread, &priv->assoc_work, HZ / 2); |
30 | } | 30 | } |
31 | 31 | ||
32 | static inline void lbs_cancel_association_work(lbs_private *priv) | 32 | static inline void lbs_cancel_association_work(struct lbs_private *priv) |
33 | { | 33 | { |
34 | cancel_delayed_work(&priv->assoc_work); | 34 | cancel_delayed_work(&priv->assoc_work); |
35 | kfree(priv->adapter->pending_assoc_req); | 35 | kfree(priv->adapter->pending_assoc_req); |
@@ -40,13 +40,15 @@ static inline void lbs_cancel_association_work(lbs_private *priv) | |||
40 | /** | 40 | /** |
41 | * @brief Find the channel frequency power info with specific channel | 41 | * @brief Find the channel frequency power info with specific channel |
42 | * | 42 | * |
43 | * @param adapter A pointer to lbs_adapter structure | 43 | * @param adapter A pointer to struct lbs_adapter structure |
44 | * @param band it can be BAND_A, BAND_G or BAND_B | 44 | * @param band it can be BAND_A, BAND_G or BAND_B |
45 | * @param channel the channel for looking | 45 | * @param channel the channel for looking |
46 | * @return A pointer to struct chan_freq_power structure or NULL if not find. | 46 | * @return A pointer to struct chan_freq_power structure or NULL if not find. |
47 | */ | 47 | */ |
48 | struct chan_freq_power *lbs_find_cfp_by_band_and_channel(lbs_adapter *adapter, | 48 | struct chan_freq_power *lbs_find_cfp_by_band_and_channel( |
49 | u8 band, u16 channel) | 49 | struct lbs_adapter *adapter, |
50 | u8 band, | ||
51 | u16 channel) | ||
50 | { | 52 | { |
51 | struct chan_freq_power *cfp = NULL; | 53 | struct chan_freq_power *cfp = NULL; |
52 | struct region_channel *rc; | 54 | struct region_channel *rc; |
@@ -79,13 +81,15 @@ struct chan_freq_power *lbs_find_cfp_by_band_and_channel(lbs_adapter *adapter, | |||
79 | /** | 81 | /** |
80 | * @brief Find the channel frequency power info with specific frequency | 82 | * @brief Find the channel frequency power info with specific frequency |
81 | * | 83 | * |
82 | * @param adapter A pointer to lbs_adapter structure | 84 | * @param adapter A pointer to struct lbs_adapter structure |
83 | * @param band it can be BAND_A, BAND_G or BAND_B | 85 | * @param band it can be BAND_A, BAND_G or BAND_B |
84 | * @param freq the frequency for looking | 86 | * @param freq the frequency for looking |
85 | * @return A pointer to struct chan_freq_power structure or NULL if not find. | 87 | * @return A pointer to struct chan_freq_power structure or NULL if not find. |
86 | */ | 88 | */ |
87 | static struct chan_freq_power *find_cfp_by_band_and_freq(lbs_adapter *adapter, | 89 | static struct chan_freq_power *find_cfp_by_band_and_freq( |
88 | u8 band, u32 freq) | 90 | struct lbs_adapter *adapter, |
91 | u8 band, | ||
92 | u32 freq) | ||
89 | { | 93 | { |
90 | struct chan_freq_power *cfp = NULL; | 94 | struct chan_freq_power *cfp = NULL; |
91 | struct region_channel *rc; | 95 | struct region_channel *rc; |
@@ -119,14 +123,14 @@ static struct chan_freq_power *find_cfp_by_band_and_freq(lbs_adapter *adapter, | |||
119 | /** | 123 | /** |
120 | * @brief Set Radio On/OFF | 124 | * @brief Set Radio On/OFF |
121 | * | 125 | * |
122 | * @param priv A pointer to lbs_private structure | 126 | * @param priv A pointer to struct lbs_private structure |
123 | * @option Radio Option | 127 | * @option Radio Option |
124 | * @return 0 --success, otherwise fail | 128 | * @return 0 --success, otherwise fail |
125 | */ | 129 | */ |
126 | static int lbs_radio_ioctl(lbs_private *priv, u8 option) | 130 | static int lbs_radio_ioctl(struct lbs_private *priv, u8 option) |
127 | { | 131 | { |
128 | int ret = 0; | 132 | int ret = 0; |
129 | lbs_adapter *adapter = priv->adapter; | 133 | struct lbs_adapter *adapter = priv->adapter; |
130 | 134 | ||
131 | lbs_deb_enter(LBS_DEB_WEXT); | 135 | lbs_deb_enter(LBS_DEB_WEXT); |
132 | 136 | ||
@@ -147,10 +151,10 @@ static int lbs_radio_ioctl(lbs_private *priv, u8 option) | |||
147 | /** | 151 | /** |
148 | * @brief Copy active data rates based on adapter mode and status | 152 | * @brief Copy active data rates based on adapter mode and status |
149 | * | 153 | * |
150 | * @param adapter A pointer to lbs_adapter structure | 154 | * @param adapter A pointer to struct lbs_adapter structure |
151 | * @param rate The buf to return the active rates | 155 | * @param rate The buf to return the active rates |
152 | */ | 156 | */ |
153 | static void copy_active_data_rates(lbs_adapter *adapter, u8 *rates) | 157 | static void copy_active_data_rates(struct lbs_adapter *adapter, u8 *rates) |
154 | { | 158 | { |
155 | lbs_deb_enter(LBS_DEB_WEXT); | 159 | lbs_deb_enter(LBS_DEB_WEXT); |
156 | 160 | ||
@@ -179,8 +183,8 @@ static int lbs_get_name(struct net_device *dev, struct iw_request_info *info, | |||
179 | static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, | 183 | static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, |
180 | struct iw_freq *fwrq, char *extra) | 184 | struct iw_freq *fwrq, char *extra) |
181 | { | 185 | { |
182 | lbs_private *priv = dev->priv; | 186 | struct lbs_private *priv = dev->priv; |
183 | lbs_adapter *adapter = priv->adapter; | 187 | struct lbs_adapter *adapter = priv->adapter; |
184 | struct chan_freq_power *cfp; | 188 | struct chan_freq_power *cfp; |
185 | 189 | ||
186 | lbs_deb_enter(LBS_DEB_WEXT); | 190 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -206,8 +210,8 @@ static int lbs_get_freq(struct net_device *dev, struct iw_request_info *info, | |||
206 | static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, | 210 | static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, |
207 | struct sockaddr *awrq, char *extra) | 211 | struct sockaddr *awrq, char *extra) |
208 | { | 212 | { |
209 | lbs_private *priv = dev->priv; | 213 | struct lbs_private *priv = dev->priv; |
210 | lbs_adapter *adapter = priv->adapter; | 214 | struct lbs_adapter *adapter = priv->adapter; |
211 | 215 | ||
212 | lbs_deb_enter(LBS_DEB_WEXT); | 216 | lbs_deb_enter(LBS_DEB_WEXT); |
213 | 217 | ||
@@ -225,8 +229,8 @@ static int lbs_get_wap(struct net_device *dev, struct iw_request_info *info, | |||
225 | static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, | 229 | static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, |
226 | struct iw_point *dwrq, char *extra) | 230 | struct iw_point *dwrq, char *extra) |
227 | { | 231 | { |
228 | lbs_private *priv = dev->priv; | 232 | struct lbs_private *priv = dev->priv; |
229 | lbs_adapter *adapter = priv->adapter; | 233 | struct lbs_adapter *adapter = priv->adapter; |
230 | 234 | ||
231 | lbs_deb_enter(LBS_DEB_WEXT); | 235 | lbs_deb_enter(LBS_DEB_WEXT); |
232 | 236 | ||
@@ -250,8 +254,8 @@ static int lbs_set_nick(struct net_device *dev, struct iw_request_info *info, | |||
250 | static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, | 254 | static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, |
251 | struct iw_point *dwrq, char *extra) | 255 | struct iw_point *dwrq, char *extra) |
252 | { | 256 | { |
253 | lbs_private *priv = dev->priv; | 257 | struct lbs_private *priv = dev->priv; |
254 | lbs_adapter *adapter = priv->adapter; | 258 | struct lbs_adapter *adapter = priv->adapter; |
255 | 259 | ||
256 | lbs_deb_enter(LBS_DEB_WEXT); | 260 | lbs_deb_enter(LBS_DEB_WEXT); |
257 | 261 | ||
@@ -268,8 +272,8 @@ static int lbs_get_nick(struct net_device *dev, struct iw_request_info *info, | |||
268 | static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, | 272 | static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, |
269 | struct iw_point *dwrq, char *extra) | 273 | struct iw_point *dwrq, char *extra) |
270 | { | 274 | { |
271 | lbs_private *priv = dev->priv; | 275 | struct lbs_private *priv = dev->priv; |
272 | lbs_adapter *adapter = priv->adapter; | 276 | struct lbs_adapter *adapter = priv->adapter; |
273 | 277 | ||
274 | lbs_deb_enter(LBS_DEB_WEXT); | 278 | lbs_deb_enter(LBS_DEB_WEXT); |
275 | 279 | ||
@@ -294,8 +298,8 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info, | |||
294 | struct iw_param *vwrq, char *extra) | 298 | struct iw_param *vwrq, char *extra) |
295 | { | 299 | { |
296 | int ret = 0; | 300 | int ret = 0; |
297 | lbs_private *priv = dev->priv; | 301 | struct lbs_private *priv = dev->priv; |
298 | lbs_adapter *adapter = priv->adapter; | 302 | struct lbs_adapter *adapter = priv->adapter; |
299 | u32 rthr = vwrq->value; | 303 | u32 rthr = vwrq->value; |
300 | 304 | ||
301 | lbs_deb_enter(LBS_DEB_WEXT); | 305 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -320,8 +324,8 @@ static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info, | |||
320 | struct iw_param *vwrq, char *extra) | 324 | struct iw_param *vwrq, char *extra) |
321 | { | 325 | { |
322 | int ret = 0; | 326 | int ret = 0; |
323 | lbs_private *priv = dev->priv; | 327 | struct lbs_private *priv = dev->priv; |
324 | lbs_adapter *adapter = priv->adapter; | 328 | struct lbs_adapter *adapter = priv->adapter; |
325 | 329 | ||
326 | lbs_deb_enter(LBS_DEB_WEXT); | 330 | lbs_deb_enter(LBS_DEB_WEXT); |
327 | 331 | ||
@@ -347,8 +351,8 @@ static int lbs_set_frag(struct net_device *dev, struct iw_request_info *info, | |||
347 | { | 351 | { |
348 | int ret = 0; | 352 | int ret = 0; |
349 | u32 fthr = vwrq->value; | 353 | u32 fthr = vwrq->value; |
350 | lbs_private *priv = dev->priv; | 354 | struct lbs_private *priv = dev->priv; |
351 | lbs_adapter *adapter = priv->adapter; | 355 | struct lbs_adapter *adapter = priv->adapter; |
352 | 356 | ||
353 | lbs_deb_enter(LBS_DEB_WEXT); | 357 | lbs_deb_enter(LBS_DEB_WEXT); |
354 | 358 | ||
@@ -373,8 +377,8 @@ static int lbs_get_frag(struct net_device *dev, struct iw_request_info *info, | |||
373 | struct iw_param *vwrq, char *extra) | 377 | struct iw_param *vwrq, char *extra) |
374 | { | 378 | { |
375 | int ret = 0; | 379 | int ret = 0; |
376 | lbs_private *priv = dev->priv; | 380 | struct lbs_private *priv = dev->priv; |
377 | lbs_adapter *adapter = priv->adapter; | 381 | struct lbs_adapter *adapter = priv->adapter; |
378 | 382 | ||
379 | lbs_deb_enter(LBS_DEB_WEXT); | 383 | lbs_deb_enter(LBS_DEB_WEXT); |
380 | 384 | ||
@@ -399,8 +403,8 @@ out: | |||
399 | static int lbs_get_mode(struct net_device *dev, | 403 | static int lbs_get_mode(struct net_device *dev, |
400 | struct iw_request_info *info, u32 * uwrq, char *extra) | 404 | struct iw_request_info *info, u32 * uwrq, char *extra) |
401 | { | 405 | { |
402 | lbs_private *priv = dev->priv; | 406 | struct lbs_private *priv = dev->priv; |
403 | lbs_adapter *adapter = priv->adapter; | 407 | struct lbs_adapter *adapter = priv->adapter; |
404 | 408 | ||
405 | lbs_deb_enter(LBS_DEB_WEXT); | 409 | lbs_deb_enter(LBS_DEB_WEXT); |
406 | 410 | ||
@@ -427,8 +431,8 @@ static int lbs_get_txpow(struct net_device *dev, | |||
427 | struct iw_param *vwrq, char *extra) | 431 | struct iw_param *vwrq, char *extra) |
428 | { | 432 | { |
429 | int ret = 0; | 433 | int ret = 0; |
430 | lbs_private *priv = dev->priv; | 434 | struct lbs_private *priv = dev->priv; |
431 | lbs_adapter *adapter = priv->adapter; | 435 | struct lbs_adapter *adapter = priv->adapter; |
432 | 436 | ||
433 | lbs_deb_enter(LBS_DEB_WEXT); | 437 | lbs_deb_enter(LBS_DEB_WEXT); |
434 | 438 | ||
@@ -459,8 +463,8 @@ static int lbs_set_retry(struct net_device *dev, struct iw_request_info *info, | |||
459 | struct iw_param *vwrq, char *extra) | 463 | struct iw_param *vwrq, char *extra) |
460 | { | 464 | { |
461 | int ret = 0; | 465 | int ret = 0; |
462 | lbs_private *priv = dev->priv; | 466 | struct lbs_private *priv = dev->priv; |
463 | lbs_adapter *adapter = priv->adapter; | 467 | struct lbs_adapter *adapter = priv->adapter; |
464 | 468 | ||
465 | lbs_deb_enter(LBS_DEB_WEXT); | 469 | lbs_deb_enter(LBS_DEB_WEXT); |
466 | 470 | ||
@@ -494,8 +498,8 @@ out: | |||
494 | static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info, | 498 | static int lbs_get_retry(struct net_device *dev, struct iw_request_info *info, |
495 | struct iw_param *vwrq, char *extra) | 499 | struct iw_param *vwrq, char *extra) |
496 | { | 500 | { |
497 | lbs_private *priv = dev->priv; | 501 | struct lbs_private *priv = dev->priv; |
498 | lbs_adapter *adapter = priv->adapter; | 502 | struct lbs_adapter *adapter = priv->adapter; |
499 | int ret = 0; | 503 | int ret = 0; |
500 | 504 | ||
501 | lbs_deb_enter(LBS_DEB_WEXT); | 505 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -563,8 +567,8 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, | |||
563 | struct iw_point *dwrq, char *extra) | 567 | struct iw_point *dwrq, char *extra) |
564 | { | 568 | { |
565 | int i, j; | 569 | int i, j; |
566 | lbs_private *priv = dev->priv; | 570 | struct lbs_private *priv = dev->priv; |
567 | lbs_adapter *adapter = priv->adapter; | 571 | struct lbs_adapter *adapter = priv->adapter; |
568 | struct iw_range *range = (struct iw_range *)extra; | 572 | struct iw_range *range = (struct iw_range *)extra; |
569 | struct chan_freq_power *cfp; | 573 | struct chan_freq_power *cfp; |
570 | u8 rates[MAX_RATES + 1]; | 574 | u8 rates[MAX_RATES + 1]; |
@@ -740,8 +744,8 @@ out: | |||
740 | static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, | 744 | static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, |
741 | struct iw_param *vwrq, char *extra) | 745 | struct iw_param *vwrq, char *extra) |
742 | { | 746 | { |
743 | lbs_private *priv = dev->priv; | 747 | struct lbs_private *priv = dev->priv; |
744 | lbs_adapter *adapter = priv->adapter; | 748 | struct lbs_adapter *adapter = priv->adapter; |
745 | 749 | ||
746 | lbs_deb_enter(LBS_DEB_WEXT); | 750 | lbs_deb_enter(LBS_DEB_WEXT); |
747 | 751 | ||
@@ -784,8 +788,8 @@ static int lbs_set_power(struct net_device *dev, struct iw_request_info *info, | |||
784 | static int lbs_get_power(struct net_device *dev, struct iw_request_info *info, | 788 | static int lbs_get_power(struct net_device *dev, struct iw_request_info *info, |
785 | struct iw_param *vwrq, char *extra) | 789 | struct iw_param *vwrq, char *extra) |
786 | { | 790 | { |
787 | lbs_private *priv = dev->priv; | 791 | struct lbs_private *priv = dev->priv; |
788 | lbs_adapter *adapter = priv->adapter; | 792 | struct lbs_adapter *adapter = priv->adapter; |
789 | int mode; | 793 | int mode; |
790 | 794 | ||
791 | lbs_deb_enter(LBS_DEB_WEXT); | 795 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -815,8 +819,8 @@ static struct iw_statistics *lbs_get_wireless_stats(struct net_device *dev) | |||
815 | EXCELLENT = 95, | 819 | EXCELLENT = 95, |
816 | PERFECT = 100 | 820 | PERFECT = 100 |
817 | }; | 821 | }; |
818 | lbs_private *priv = dev->priv; | 822 | struct lbs_private *priv = dev->priv; |
819 | lbs_adapter *adapter = priv->adapter; | 823 | struct lbs_adapter *adapter = priv->adapter; |
820 | u32 rssi_qual; | 824 | u32 rssi_qual; |
821 | u32 tx_qual; | 825 | u32 tx_qual; |
822 | u32 quality = 0; | 826 | u32 quality = 0; |
@@ -919,8 +923,8 @@ static int lbs_set_freq(struct net_device *dev, struct iw_request_info *info, | |||
919 | struct iw_freq *fwrq, char *extra) | 923 | struct iw_freq *fwrq, char *extra) |
920 | { | 924 | { |
921 | int ret = -EINVAL; | 925 | int ret = -EINVAL; |
922 | lbs_private *priv = dev->priv; | 926 | struct lbs_private *priv = dev->priv; |
923 | lbs_adapter *adapter = priv->adapter; | 927 | struct lbs_adapter *adapter = priv->adapter; |
924 | struct chan_freq_power *cfp; | 928 | struct chan_freq_power *cfp; |
925 | struct assoc_request * assoc_req; | 929 | struct assoc_request * assoc_req; |
926 | 930 | ||
@@ -976,8 +980,8 @@ out: | |||
976 | static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info, | 980 | static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info, |
977 | struct iw_param *vwrq, char *extra) | 981 | struct iw_param *vwrq, char *extra) |
978 | { | 982 | { |
979 | lbs_private *priv = dev->priv; | 983 | struct lbs_private *priv = dev->priv; |
980 | lbs_adapter *adapter = priv->adapter; | 984 | struct lbs_adapter *adapter = priv->adapter; |
981 | u32 new_rate; | 985 | u32 new_rate; |
982 | u16 action; | 986 | u16 action; |
983 | int ret = -EINVAL; | 987 | int ret = -EINVAL; |
@@ -1020,8 +1024,8 @@ out: | |||
1020 | static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info, | 1024 | static int lbs_get_rate(struct net_device *dev, struct iw_request_info *info, |
1021 | struct iw_param *vwrq, char *extra) | 1025 | struct iw_param *vwrq, char *extra) |
1022 | { | 1026 | { |
1023 | lbs_private *priv = dev->priv; | 1027 | struct lbs_private *priv = dev->priv; |
1024 | lbs_adapter *adapter = priv->adapter; | 1028 | struct lbs_adapter *adapter = priv->adapter; |
1025 | 1029 | ||
1026 | lbs_deb_enter(LBS_DEB_WEXT); | 1030 | lbs_deb_enter(LBS_DEB_WEXT); |
1027 | 1031 | ||
@@ -1046,8 +1050,8 @@ static int lbs_set_mode(struct net_device *dev, | |||
1046 | struct iw_request_info *info, u32 * uwrq, char *extra) | 1050 | struct iw_request_info *info, u32 * uwrq, char *extra) |
1047 | { | 1051 | { |
1048 | int ret = 0; | 1052 | int ret = 0; |
1049 | lbs_private *priv = dev->priv; | 1053 | struct lbs_private *priv = dev->priv; |
1050 | lbs_adapter *adapter = priv->adapter; | 1054 | struct lbs_adapter *adapter = priv->adapter; |
1051 | struct assoc_request * assoc_req; | 1055 | struct assoc_request * assoc_req; |
1052 | 1056 | ||
1053 | lbs_deb_enter(LBS_DEB_WEXT); | 1057 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1092,8 +1096,8 @@ static int lbs_get_encode(struct net_device *dev, | |||
1092 | struct iw_request_info *info, | 1096 | struct iw_request_info *info, |
1093 | struct iw_point *dwrq, u8 * extra) | 1097 | struct iw_point *dwrq, u8 * extra) |
1094 | { | 1098 | { |
1095 | lbs_private *priv = dev->priv; | 1099 | struct lbs_private *priv = dev->priv; |
1096 | lbs_adapter *adapter = priv->adapter; | 1100 | struct lbs_adapter *adapter = priv->adapter; |
1097 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; | 1101 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; |
1098 | 1102 | ||
1099 | lbs_deb_enter(LBS_DEB_WEXT); | 1103 | lbs_deb_enter(LBS_DEB_WEXT); |
@@ -1297,8 +1301,8 @@ static int lbs_set_encode(struct net_device *dev, | |||
1297 | struct iw_point *dwrq, char *extra) | 1301 | struct iw_point *dwrq, char *extra) |
1298 | { | 1302 | { |
1299 | int ret = 0; | 1303 | int ret = 0; |
1300 | lbs_private *priv = dev->priv; | 1304 | struct lbs_private *priv = dev->priv; |
1301 | lbs_adapter *adapter = priv->adapter; | 1305 | struct lbs_adapter *adapter = priv->adapter; |
1302 | struct assoc_request * assoc_req; | 1306 | struct assoc_request * assoc_req; |
1303 | u16 is_default = 0, index = 0, set_tx_key = 0; | 1307 | u16 is_default = 0, index = 0, set_tx_key = 0; |
1304 | 1308 | ||
@@ -1374,8 +1378,8 @@ static int lbs_get_encodeext(struct net_device *dev, | |||
1374 | char *extra) | 1378 | char *extra) |
1375 | { | 1379 | { |
1376 | int ret = -EINVAL; | 1380 | int ret = -EINVAL; |
1377 | lbs_private *priv = dev->priv; | 1381 | struct lbs_private *priv = dev->priv; |
1378 | lbs_adapter *adapter = priv->adapter; | 1382 | struct lbs_adapter *adapter = priv->adapter; |
1379 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1383 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1380 | int index, max_key_len; | 1384 | int index, max_key_len; |
1381 | 1385 | ||
@@ -1481,8 +1485,8 @@ static int lbs_set_encodeext(struct net_device *dev, | |||
1481 | char *extra) | 1485 | char *extra) |
1482 | { | 1486 | { |
1483 | int ret = 0; | 1487 | int ret = 0; |
1484 | lbs_private *priv = dev->priv; | 1488 | struct lbs_private *priv = dev->priv; |
1485 | lbs_adapter *adapter = priv->adapter; | 1489 | struct lbs_adapter *adapter = priv->adapter; |
1486 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1490 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1487 | int alg = ext->alg; | 1491 | int alg = ext->alg; |
1488 | struct assoc_request * assoc_req; | 1492 | struct assoc_request * assoc_req; |
@@ -1606,8 +1610,8 @@ static int lbs_set_genie(struct net_device *dev, | |||
1606 | struct iw_point *dwrq, | 1610 | struct iw_point *dwrq, |
1607 | char *extra) | 1611 | char *extra) |
1608 | { | 1612 | { |
1609 | lbs_private *priv = dev->priv; | 1613 | struct lbs_private *priv = dev->priv; |
1610 | lbs_adapter *adapter = priv->adapter; | 1614 | struct lbs_adapter *adapter = priv->adapter; |
1611 | int ret = 0; | 1615 | int ret = 0; |
1612 | struct assoc_request * assoc_req; | 1616 | struct assoc_request * assoc_req; |
1613 | 1617 | ||
@@ -1653,8 +1657,8 @@ static int lbs_get_genie(struct net_device *dev, | |||
1653 | char *extra) | 1657 | char *extra) |
1654 | { | 1658 | { |
1655 | int ret = 0; | 1659 | int ret = 0; |
1656 | lbs_private *priv = dev->priv; | 1660 | struct lbs_private *priv = dev->priv; |
1657 | lbs_adapter *adapter = priv->adapter; | 1661 | struct lbs_adapter *adapter = priv->adapter; |
1658 | 1662 | ||
1659 | lbs_deb_enter(LBS_DEB_WEXT); | 1663 | lbs_deb_enter(LBS_DEB_WEXT); |
1660 | 1664 | ||
@@ -1682,8 +1686,8 @@ static int lbs_set_auth(struct net_device *dev, | |||
1682 | struct iw_param *dwrq, | 1686 | struct iw_param *dwrq, |
1683 | char *extra) | 1687 | char *extra) |
1684 | { | 1688 | { |
1685 | lbs_private *priv = dev->priv; | 1689 | struct lbs_private *priv = dev->priv; |
1686 | lbs_adapter *adapter = priv->adapter; | 1690 | struct lbs_adapter *adapter = priv->adapter; |
1687 | struct assoc_request * assoc_req; | 1691 | struct assoc_request * assoc_req; |
1688 | int ret = 0; | 1692 | int ret = 0; |
1689 | int updated = 0; | 1693 | int updated = 0; |
@@ -1782,8 +1786,8 @@ static int lbs_get_auth(struct net_device *dev, | |||
1782 | char *extra) | 1786 | char *extra) |
1783 | { | 1787 | { |
1784 | int ret = 0; | 1788 | int ret = 0; |
1785 | lbs_private *priv = dev->priv; | 1789 | struct lbs_private *priv = dev->priv; |
1786 | lbs_adapter *adapter = priv->adapter; | 1790 | struct lbs_adapter *adapter = priv->adapter; |
1787 | 1791 | ||
1788 | lbs_deb_enter(LBS_DEB_WEXT); | 1792 | lbs_deb_enter(LBS_DEB_WEXT); |
1789 | 1793 | ||
@@ -1820,8 +1824,8 @@ static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info, | |||
1820 | struct iw_param *vwrq, char *extra) | 1824 | struct iw_param *vwrq, char *extra) |
1821 | { | 1825 | { |
1822 | int ret = 0; | 1826 | int ret = 0; |
1823 | lbs_private *priv = dev->priv; | 1827 | struct lbs_private *priv = dev->priv; |
1824 | lbs_adapter *adapter = priv->adapter; | 1828 | struct lbs_adapter *adapter = priv->adapter; |
1825 | 1829 | ||
1826 | u16 dbm; | 1830 | u16 dbm; |
1827 | 1831 | ||
@@ -1862,8 +1866,8 @@ static int lbs_set_txpow(struct net_device *dev, struct iw_request_info *info, | |||
1862 | static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, | 1866 | static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, |
1863 | struct iw_point *dwrq, char *extra) | 1867 | struct iw_point *dwrq, char *extra) |
1864 | { | 1868 | { |
1865 | lbs_private *priv = dev->priv; | 1869 | struct lbs_private *priv = dev->priv; |
1866 | lbs_adapter *adapter = priv->adapter; | 1870 | struct lbs_adapter *adapter = priv->adapter; |
1867 | 1871 | ||
1868 | lbs_deb_enter(LBS_DEB_WEXT); | 1872 | lbs_deb_enter(LBS_DEB_WEXT); |
1869 | 1873 | ||
@@ -1898,8 +1902,8 @@ static int lbs_get_essid(struct net_device *dev, struct iw_request_info *info, | |||
1898 | static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info, | 1902 | static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info, |
1899 | struct iw_point *dwrq, char *extra) | 1903 | struct iw_point *dwrq, char *extra) |
1900 | { | 1904 | { |
1901 | lbs_private *priv = dev->priv; | 1905 | struct lbs_private *priv = dev->priv; |
1902 | lbs_adapter *adapter = priv->adapter; | 1906 | struct lbs_adapter *adapter = priv->adapter; |
1903 | int ret = 0; | 1907 | int ret = 0; |
1904 | u8 ssid[IW_ESSID_MAX_SIZE]; | 1908 | u8 ssid[IW_ESSID_MAX_SIZE]; |
1905 | u8 ssid_len = 0; | 1909 | u8 ssid_len = 0; |
@@ -1970,8 +1974,8 @@ out: | |||
1970 | static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, | 1974 | static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, |
1971 | struct sockaddr *awrq, char *extra) | 1975 | struct sockaddr *awrq, char *extra) |
1972 | { | 1976 | { |
1973 | lbs_private *priv = dev->priv; | 1977 | struct lbs_private *priv = dev->priv; |
1974 | lbs_adapter *adapter = priv->adapter; | 1978 | struct lbs_adapter *adapter = priv->adapter; |
1975 | struct assoc_request * assoc_req; | 1979 | struct assoc_request * assoc_req; |
1976 | int ret = 0; | 1980 | int ret = 0; |
1977 | DECLARE_MAC_BUF(mac); | 1981 | DECLARE_MAC_BUF(mac); |
@@ -2002,7 +2006,7 @@ static int lbs_set_wap(struct net_device *dev, struct iw_request_info *info, | |||
2002 | return ret; | 2006 | return ret; |
2003 | } | 2007 | } |
2004 | 2008 | ||
2005 | void lbs_get_fwversion(lbs_adapter *adapter, char *fwversion, int maxlen) | 2009 | void lbs_get_fwversion(struct lbs_adapter *adapter, char *fwversion, int maxlen) |
2006 | { | 2010 | { |
2007 | char fwver[32]; | 2011 | char fwver[32]; |
2008 | 2012 | ||