diff options
Diffstat (limited to 'drivers/net/wireless/libertas/11d.c')
-rw-r--r-- | drivers/net/wireless/libertas/11d.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c index 8bbd3227e6fb..d16f566e878b 100644 --- a/drivers/net/wireless/libertas/11d.c +++ b/drivers/net/wireless/libertas/11d.c | |||
@@ -43,7 +43,7 @@ static struct chan_freq_power channel_freq_power_UN_BG[] = { | |||
43 | {14, 2484, TX_PWR_DEFAULT} | 43 | {14, 2484, TX_PWR_DEFAULT} |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static u8 wlan_region_2_code(u8 * region) | 46 | static u8 lbs_region_2_code(u8 *region) |
47 | { | 47 | { |
48 | u8 i; | 48 | u8 i; |
49 | 49 | ||
@@ -60,7 +60,7 @@ static u8 wlan_region_2_code(u8 * region) | |||
60 | return (region_code_mapping[0].code); | 60 | return (region_code_mapping[0].code); |
61 | } | 61 | } |
62 | 62 | ||
63 | static u8 *wlan_code_2_region(u8 code) | 63 | static u8 *lbs_code_2_region(u8 code) |
64 | { | 64 | { |
65 | u8 i; | 65 | u8 i; |
66 | 66 | ||
@@ -79,7 +79,7 @@ static u8 *wlan_code_2_region(u8 code) | |||
79 | * @param nrchan number of channels | 79 | * @param nrchan number of channels |
80 | * @return the nrchan-th chan number | 80 | * @return the nrchan-th chan number |
81 | */ | 81 | */ |
82 | static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan) | 82 | static u8 lbs_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 *chan) |
83 | /*find the nrchan-th chan after the firstchan*/ | 83 | /*find the nrchan-th chan after the firstchan*/ |
84 | { | 84 | { |
85 | u8 i; | 85 | u8 i; |
@@ -113,7 +113,7 @@ static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan) | |||
113 | * @param parsed_region_chan pointer to parsed_region_chan_11d | 113 | * @param parsed_region_chan pointer to parsed_region_chan_11d |
114 | * @return TRUE; FALSE | 114 | * @return TRUE; FALSE |
115 | */ | 115 | */ |
116 | static u8 wlan_channel_known_11d(u8 chan, | 116 | static u8 lbs_channel_known_11d(u8 chan, |
117 | struct parsed_region_chan_11d * parsed_region_chan) | 117 | struct parsed_region_chan_11d * parsed_region_chan) |
118 | { | 118 | { |
119 | struct chan_power_11d *chanpwr = parsed_region_chan->chanpwr; | 119 | struct chan_power_11d *chanpwr = parsed_region_chan->chanpwr; |
@@ -134,7 +134,7 @@ static u8 wlan_channel_known_11d(u8 chan, | |||
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | 136 | ||
137 | u32 libertas_chan_2_freq(u8 chan, u8 band) | 137 | u32 lbs_chan_2_freq(u8 chan, u8 band) |
138 | { | 138 | { |
139 | struct chan_freq_power *cf; | 139 | struct chan_freq_power *cf; |
140 | u16 i; | 140 | u16 i; |
@@ -152,7 +152,7 @@ u32 libertas_chan_2_freq(u8 chan, u8 band) | |||
152 | 152 | ||
153 | static int generate_domain_info_11d(struct parsed_region_chan_11d | 153 | static int generate_domain_info_11d(struct parsed_region_chan_11d |
154 | *parsed_region_chan, | 154 | *parsed_region_chan, |
155 | struct wlan_802_11d_domain_reg * domaininfo) | 155 | struct lbs_802_11d_domain_reg *domaininfo) |
156 | { | 156 | { |
157 | u8 nr_subband = 0; | 157 | u8 nr_subband = 0; |
158 | 158 | ||
@@ -217,7 +217,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d | |||
217 | * @param *parsed_region_chan pointer to parsed_region_chan_11d | 217 | * @param *parsed_region_chan pointer to parsed_region_chan_11d |
218 | * @return N/A | 218 | * @return N/A |
219 | */ | 219 | */ |
220 | static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_chan, | 220 | static void lbs_generate_parsed_region_chan_11d(struct region_channel *region_chan, |
221 | struct parsed_region_chan_11d * | 221 | struct parsed_region_chan_11d * |
222 | parsed_region_chan) | 222 | parsed_region_chan) |
223 | { | 223 | { |
@@ -238,7 +238,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_ | |||
238 | parsed_region_chan->band = region_chan->band; | 238 | parsed_region_chan->band = region_chan->band; |
239 | parsed_region_chan->region = region_chan->region; | 239 | parsed_region_chan->region = region_chan->region; |
240 | memcpy(parsed_region_chan->countrycode, | 240 | memcpy(parsed_region_chan->countrycode, |
241 | wlan_code_2_region(region_chan->region), COUNTRY_CODE_LEN); | 241 | lbs_code_2_region(region_chan->region), COUNTRY_CODE_LEN); |
242 | 242 | ||
243 | lbs_deb_11d("region 0x%x, band %d\n", parsed_region_chan->region, | 243 | lbs_deb_11d("region 0x%x, band %d\n", parsed_region_chan->region, |
244 | parsed_region_chan->band); | 244 | parsed_region_chan->band); |
@@ -264,7 +264,7 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_ | |||
264 | * @param chan chan | 264 | * @param chan chan |
265 | * @return TRUE;FALSE | 265 | * @return TRUE;FALSE |
266 | */ | 266 | */ |
267 | static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan) | 267 | static u8 lbs_region_chan_supported_11d(u8 region, u8 band, u8 chan) |
268 | { | 268 | { |
269 | struct chan_freq_power *cfp; | 269 | struct chan_freq_power *cfp; |
270 | int cfp_no; | 270 | int cfp_no; |
@@ -273,7 +273,7 @@ static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan) | |||
273 | 273 | ||
274 | lbs_deb_enter(LBS_DEB_11D); | 274 | lbs_deb_enter(LBS_DEB_11D); |
275 | 275 | ||
276 | cfp = libertas_get_region_cfp_table(region, band, &cfp_no); | 276 | cfp = lbs_get_region_cfp_table(region, band, &cfp_no); |
277 | if (cfp == NULL) | 277 | if (cfp == NULL) |
278 | return 0; | 278 | return 0; |
279 | 279 | ||
@@ -338,7 +338,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
338 | 338 | ||
339 | /*Step1: check region_code */ | 339 | /*Step1: check region_code */ |
340 | parsed_region_chan->region = region = | 340 | parsed_region_chan->region = region = |
341 | wlan_region_2_code(countryinfo->countrycode); | 341 | lbs_region_2_code(countryinfo->countrycode); |
342 | 342 | ||
343 | lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region); | 343 | lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region); |
344 | lbs_deb_hex(LBS_DEB_11D, "countrycode", (char *)countryinfo->countrycode, | 344 | lbs_deb_hex(LBS_DEB_11D, "countrycode", (char *)countryinfo->countrycode, |
@@ -367,7 +367,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
367 | for (i = 0; idx < MAX_NO_OF_CHAN && i < nrchan; i++) { | 367 | for (i = 0; idx < MAX_NO_OF_CHAN && i < nrchan; i++) { |
368 | /*step4: channel is supported? */ | 368 | /*step4: channel is supported? */ |
369 | 369 | ||
370 | if (!wlan_get_chan_11d(band, firstchan, i, &curchan)) { | 370 | if (!lbs_get_chan_11d(band, firstchan, i, &curchan)) { |
371 | /* Chan is not found in UN table */ | 371 | /* Chan is not found in UN table */ |
372 | lbs_deb_11d("chan is not supported: %d \n", i); | 372 | lbs_deb_11d("chan is not supported: %d \n", i); |
373 | break; | 373 | break; |
@@ -375,7 +375,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
375 | 375 | ||
376 | lastchan = curchan; | 376 | lastchan = curchan; |
377 | 377 | ||
378 | if (wlan_region_chan_supported_11d | 378 | if (lbs_region_chan_supported_11d |
379 | (region, band, curchan)) { | 379 | (region, band, curchan)) { |
380 | /*step5: Check if curchan is supported by mrvl in region */ | 380 | /*step5: Check if curchan is supported by mrvl in region */ |
381 | parsed_region_chan->chanpwr[idx].chan = curchan; | 381 | parsed_region_chan->chanpwr[idx].chan = curchan; |
@@ -411,14 +411,14 @@ done: | |||
411 | * @param parsed_region_chan pointer to parsed_region_chan_11d | 411 | * @param parsed_region_chan pointer to parsed_region_chan_11d |
412 | * @return PASSIVE if chan is unknown; ACTIVE if chan is known | 412 | * @return PASSIVE if chan is unknown; ACTIVE if chan is known |
413 | */ | 413 | */ |
414 | u8 libertas_get_scan_type_11d(u8 chan, | 414 | u8 lbs_get_scan_type_11d(u8 chan, |
415 | struct parsed_region_chan_11d * parsed_region_chan) | 415 | struct parsed_region_chan_11d * parsed_region_chan) |
416 | { | 416 | { |
417 | u8 scan_type = CMD_SCAN_TYPE_PASSIVE; | 417 | u8 scan_type = CMD_SCAN_TYPE_PASSIVE; |
418 | 418 | ||
419 | lbs_deb_enter(LBS_DEB_11D); | 419 | lbs_deb_enter(LBS_DEB_11D); |
420 | 420 | ||
421 | if (wlan_channel_known_11d(chan, parsed_region_chan)) { | 421 | if (lbs_channel_known_11d(chan, parsed_region_chan)) { |
422 | lbs_deb_11d("found, do active scan\n"); | 422 | lbs_deb_11d("found, do active scan\n"); |
423 | scan_type = CMD_SCAN_TYPE_ACTIVE; | 423 | scan_type = CMD_SCAN_TYPE_ACTIVE; |
424 | } else { | 424 | } else { |
@@ -430,7 +430,7 @@ u8 libertas_get_scan_type_11d(u8 chan, | |||
430 | 430 | ||
431 | } | 431 | } |
432 | 432 | ||
433 | void libertas_init_11d(wlan_private * priv) | 433 | void lbs_init_11d(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 libertas_init_11d(wlan_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 wlan_private | 443 | * @param priv pointer to lbs_private |
444 | * @return 0; -1 | 444 | * @return 0; -1 |
445 | */ | 445 | */ |
446 | static int set_domain_info_11d(wlan_private * priv) | 446 | static int set_domain_info_11d(lbs_private * priv) |
447 | { | 447 | { |
448 | int ret; | 448 | int ret; |
449 | 449 | ||
@@ -452,7 +452,7 @@ static int set_domain_info_11d(wlan_private * priv) | |||
452 | return 0; | 452 | return 0; |
453 | } | 453 | } |
454 | 454 | ||
455 | ret = libertas_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO, | 455 | ret = lbs_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO, |
456 | CMD_ACT_SET, | 456 | CMD_ACT_SET, |
457 | CMD_OPTION_WAITFORRSP, 0, NULL); | 457 | CMD_OPTION_WAITFORRSP, 0, NULL); |
458 | if (ret) | 458 | if (ret) |
@@ -463,13 +463,13 @@ static int set_domain_info_11d(wlan_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 wlan_private | 466 | * @param priv pointer to lbs_private |
467 | * @param band band | 467 | * @param band band |
468 | * @return 0 | 468 | * @return 0 |
469 | */ | 469 | */ |
470 | int libertas_set_universaltable(wlan_private * priv, u8 band) | 470 | int lbs_set_universaltable(lbs_private * priv, u8 band) |
471 | { | 471 | { |
472 | wlan_adapter *adapter = priv->adapter; | 472 | 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 libertas_set_universaltable(wlan_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 wlan_private | 495 | * @param priv pointer to 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 libertas_cmd_802_11d_domain_info(wlan_private * priv, | 501 | int lbs_cmd_802_11d_domain_info(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 | wlan_adapter *adapter = priv->adapter; | 508 | 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 wlan_private | 555 | * @param priv pointer to 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 libertas_ret_802_11d_domain_info(wlan_private * priv, | 559 | int lbs_ret_802_11d_domain_info(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 libertas_ret_802_11d_domain_info(wlan_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 wlan_private | 601 | * @param priv pointer to lbs_private |
602 | * @return 0; -1 | 602 | * @return 0; -1 |
603 | */ | 603 | */ |
604 | int libertas_parse_dnld_countryinfo_11d(wlan_private * priv, | 604 | int lbs_parse_dnld_countryinfo_11d(lbs_private * priv, |
605 | struct bss_descriptor * bss) | 605 | struct bss_descriptor * bss) |
606 | { | 606 | { |
607 | int ret; | 607 | int ret; |
608 | wlan_adapter *adapter = priv->adapter; | 608 | 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) { |
@@ -620,7 +620,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv, | |||
620 | } | 620 | } |
621 | 621 | ||
622 | memset(&adapter->domainreg, 0, | 622 | memset(&adapter->domainreg, 0, |
623 | sizeof(struct wlan_802_11d_domain_reg)); | 623 | sizeof(struct lbs_802_11d_domain_reg)); |
624 | generate_domain_info_11d(&adapter->parsed_region_chan, | 624 | generate_domain_info_11d(&adapter->parsed_region_chan, |
625 | &adapter->domainreg); | 625 | &adapter->domainreg); |
626 | 626 | ||
@@ -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 wlan_private | 643 | * @param priv pointer to lbs_private |
644 | * @return 0; -1 | 644 | * @return 0; -1 |
645 | */ | 645 | */ |
646 | int libertas_create_dnld_countryinfo_11d(wlan_private * priv) | 646 | int lbs_create_dnld_countryinfo_11d(lbs_private * priv) |
647 | { | 647 | { |
648 | int ret; | 648 | int ret; |
649 | wlan_adapter *adapter = priv->adapter; | 649 | 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 | ||
@@ -679,12 +679,12 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv) | |||
679 | 679 | ||
680 | memset(&adapter->parsed_region_chan, 0, | 680 | memset(&adapter->parsed_region_chan, 0, |
681 | sizeof(struct parsed_region_chan_11d)); | 681 | sizeof(struct parsed_region_chan_11d)); |
682 | wlan_generate_parsed_region_chan_11d(region_chan, | 682 | lbs_generate_parsed_region_chan_11d(region_chan, |
683 | &adapter-> | 683 | &adapter-> |
684 | parsed_region_chan); | 684 | parsed_region_chan); |
685 | 685 | ||
686 | memset(&adapter->domainreg, 0, | 686 | memset(&adapter->domainreg, 0, |
687 | sizeof(struct wlan_802_11d_domain_reg)); | 687 | sizeof(struct lbs_802_11d_domain_reg)); |
688 | generate_domain_info_11d(&adapter->parsed_region_chan, | 688 | generate_domain_info_11d(&adapter->parsed_region_chan, |
689 | &adapter->domainreg); | 689 | &adapter->domainreg); |
690 | 690 | ||