aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/11d.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-05-25 11:27:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-06-11 14:28:37 -0400
commit9012b28a407511fb355f6d2176a12d4653489672 (patch)
tree771b0f7adb9dbab5c907981bd4fa3a7f6219587d /drivers/net/wireless/libertas/11d.c
parent46868202b2dd22156460a220553a223f406f4f22 (diff)
[PATCH] libertas: make debug configurable
The debug output of libertas was either not present or it was overwhelming. This patch adds the possibility to specify a bitmask for the area of interest. One should then only get the desired output. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/11d.c')
-rw-r--r--drivers/net/wireless/libertas/11d.c137
1 files changed, 71 insertions, 66 deletions
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c
index e0ecc4d483bb..ab76798df0eb 100644
--- a/drivers/net/wireless/libertas/11d.c
+++ b/drivers/net/wireless/libertas/11d.c
@@ -95,7 +95,7 @@ static u8 wlan_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 * chan)
95 95
96 for (i = 0; i < cfp_no; i++) { 96 for (i = 0; i < cfp_no; i++) {
97 if ((cfp + i)->channel == firstchan) { 97 if ((cfp + i)->channel == firstchan) {
98 lbs_pr_debug(1, "firstchan found\n"); 98 lbs_deb_11d("firstchan found\n");
99 break; 99 break;
100 } 100 }
101 } 101 }
@@ -129,12 +129,12 @@ static u8 wlan_channel_known_11d(u8 chan,
129 129
130 for (i = 0; i < nr_chan; i++) { 130 for (i = 0; i < nr_chan; i++) {
131 if (chan == chanpwr[i].chan) { 131 if (chan == chanpwr[i].chan) {
132 lbs_pr_debug(1, "11D: Found Chan:%d\n", chan); 132 lbs_deb_11d("11D: Found Chan:%d\n", chan);
133 return 1; 133 return 1;
134 } 134 }
135 } 135 }
136 136
137 lbs_pr_debug(1, "11D: Not Find Chan:%d\n", chan); 137 lbs_deb_11d("11D: Not Find Chan:%d\n", chan);
138 return 0; 138 return 0;
139} 139}
140 140
@@ -174,7 +174,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
174 memcpy(domaininfo->countrycode, parsed_region_chan->countrycode, 174 memcpy(domaininfo->countrycode, parsed_region_chan->countrycode,
175 COUNTRY_CODE_LEN); 175 COUNTRY_CODE_LEN);
176 176
177 lbs_pr_debug(1, "11D:nrchan=%d\n", nr_chan); 177 lbs_deb_11d("11D:nrchan=%d\n", nr_chan);
178 lbs_dbg_hex("11D:parsed_region_chan:", (char *)parsed_region_chan, 178 lbs_dbg_hex("11D:parsed_region_chan:", (char *)parsed_region_chan,
179 sizeof(struct parsed_region_chan_11d)); 179 sizeof(struct parsed_region_chan_11d));
180 180
@@ -212,7 +212,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
212 } 212 }
213 domaininfo->nr_subband = nr_subband; 213 domaininfo->nr_subband = nr_subband;
214 214
215 lbs_pr_debug(1, "nr_subband=%x\n", domaininfo->nr_subband); 215 lbs_deb_11d("nr_subband=%x\n", domaininfo->nr_subband);
216 lbs_dbg_hex("11D:domaininfo:", (char *)domaininfo, 216 lbs_dbg_hex("11D:domaininfo:", (char *)domaininfo,
217 COUNTRY_CODE_LEN + 1 + 217 COUNTRY_CODE_LEN + 1 +
218 sizeof(struct ieeetypes_subbandset) * nr_subband); 218 sizeof(struct ieeetypes_subbandset) * nr_subband);
@@ -233,13 +233,13 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
233 struct chan_freq_power *cfp; 233 struct chan_freq_power *cfp;
234 234
235 if (region_chan == NULL) { 235 if (region_chan == NULL) {
236 lbs_pr_debug(1, "11D: region_chan is NULL\n"); 236 lbs_deb_11d("11D: region_chan is NULL\n");
237 return; 237 return;
238 } 238 }
239 239
240 cfp = region_chan->CFP; 240 cfp = region_chan->CFP;
241 if (cfp == NULL) { 241 if (cfp == NULL) {
242 lbs_pr_debug(1, "11D: cfp equal NULL \n"); 242 lbs_deb_11d("11D: cfp equal NULL \n");
243 return; 243 return;
244 } 244 }
245 245
@@ -248,19 +248,19 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
248 memcpy(parsed_region_chan->countrycode, 248 memcpy(parsed_region_chan->countrycode,
249 wlan_code_2_region(region_chan->region), COUNTRY_CODE_LEN); 249 wlan_code_2_region(region_chan->region), COUNTRY_CODE_LEN);
250 250
251 lbs_pr_debug(1, "11D: region[0x%x] band[%d]\n", parsed_region_chan->region, 251 lbs_deb_11d("11D: region[0x%x] band[%d]\n", parsed_region_chan->region,
252 parsed_region_chan->band); 252 parsed_region_chan->band);
253 253
254 for (i = 0; i < region_chan->nrcfp; i++, cfp++) { 254 for (i = 0; i < region_chan->nrcfp; i++, cfp++) {
255 parsed_region_chan->chanpwr[i].chan = cfp->channel; 255 parsed_region_chan->chanpwr[i].chan = cfp->channel;
256 parsed_region_chan->chanpwr[i].pwr = cfp->maxtxpower; 256 parsed_region_chan->chanpwr[i].pwr = cfp->maxtxpower;
257 lbs_pr_debug(1, "11D: Chan[%d] Pwr[%d]\n", 257 lbs_deb_11d("11D: Chan[%d] Pwr[%d]\n",
258 parsed_region_chan->chanpwr[i].chan, 258 parsed_region_chan->chanpwr[i].chan,
259 parsed_region_chan->chanpwr[i].pwr); 259 parsed_region_chan->chanpwr[i].pwr);
260 } 260 }
261 parsed_region_chan->nr_chan = region_chan->nrcfp; 261 parsed_region_chan->nr_chan = region_chan->nrcfp;
262 262
263 lbs_pr_debug(1, "11D: nrchan[%d]\n", parsed_region_chan->nr_chan); 263 lbs_deb_11d("11D: nrchan[%d]\n", parsed_region_chan->nr_chan);
264 264
265 return; 265 return;
266} 266}
@@ -277,8 +277,9 @@ static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan)
277 struct chan_freq_power *cfp; 277 struct chan_freq_power *cfp;
278 int cfp_no; 278 int cfp_no;
279 u8 idx; 279 u8 idx;
280 int ret = 0;
280 281
281 ENTER(); 282 lbs_deb_enter(LBS_DEB_11D);
282 283
283 cfp = libertas_get_region_cfp_table(region, band, &cfp_no); 284 cfp = libertas_get_region_cfp_table(region, band, &cfp_no);
284 if (cfp == NULL) 285 if (cfp == NULL)
@@ -288,16 +289,19 @@ static u8 wlan_region_chan_supported_11d(u8 region, u8 band, u8 chan)
288 if (chan == (cfp + idx)->channel) { 289 if (chan == (cfp + idx)->channel) {
289 /* If Mrvl Chip Supported? */ 290 /* If Mrvl Chip Supported? */
290 if ((cfp + idx)->unsupported) { 291 if ((cfp + idx)->unsupported) {
291 return 0; 292 ret = 0;
292 } else { 293 } else {
293 return 1; 294 ret = 1;
294 } 295 }
296 goto done;
295 } 297 }
296 } 298 }
297 299
298 /*chan is not in the region table */ 300 /*chan is not in the region table */
299 LEAVE(); 301
300 return 0; 302done:
303 lbs_deb_leave_args(LBS_DEB_11D, "ret %d", ret);
304 return ret;
301} 305}
302 306
303/** 307/**
@@ -321,7 +325,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
321 325
322 u8 j, i; 326 u8 j, i;
323 327
324 ENTER(); 328 lbs_deb_enter(LBS_DEB_11D);
325 329
326 /*validation Rules: 330 /*validation Rules:
327 1. valid region Code 331 1. valid region Code
@@ -337,15 +341,14 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
337 if ((*(countryinfo->countrycode)) == 0 341 if ((*(countryinfo->countrycode)) == 0
338 || (countryinfo->len <= COUNTRY_CODE_LEN)) { 342 || (countryinfo->len <= COUNTRY_CODE_LEN)) {
339 /* No region Info or Wrong region info: treat as No 11D info */ 343 /* No region Info or Wrong region info: treat as No 11D info */
340 LEAVE(); 344 goto done;
341 return 0;
342 } 345 }
343 346
344 /*Step1: check region_code */ 347 /*Step1: check region_code */
345 parsed_region_chan->region = region = 348 parsed_region_chan->region = region =
346 wlan_region_2_code(countryinfo->countrycode); 349 wlan_region_2_code(countryinfo->countrycode);
347 350
348 lbs_pr_debug(1, "regioncode=%x\n", (u8) parsed_region_chan->region); 351 lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region);
349 lbs_dbg_hex("CountryCode:", (char *)countryinfo->countrycode, 352 lbs_dbg_hex("CountryCode:", (char *)countryinfo->countrycode,
350 COUNTRY_CODE_LEN); 353 COUNTRY_CODE_LEN);
351 354
@@ -361,7 +364,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
361 364
362 if (countryinfo->subband[j].firstchan <= lastchan) { 365 if (countryinfo->subband[j].firstchan <= lastchan) {
363 /*Step2&3. Check First Chan Num increment and no overlap */ 366 /*Step2&3. Check First Chan Num increment and no overlap */
364 lbs_pr_debug(1, "11D: Chan[%d>%d] Overlap\n", 367 lbs_deb_11d("11D: Chan[%d>%d] Overlap\n",
365 countryinfo->subband[j].firstchan, lastchan); 368 countryinfo->subband[j].firstchan, lastchan);
366 continue; 369 continue;
367 } 370 }
@@ -374,7 +377,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
374 377
375 if (!wlan_get_chan_11d(band, firstchan, i, &curchan)) { 378 if (!wlan_get_chan_11d(band, firstchan, i, &curchan)) {
376 /* Chan is not found in UN table */ 379 /* Chan is not found in UN table */
377 lbs_pr_debug(1, "chan is not supported: %d \n", i); 380 lbs_deb_11d("chan is not supported: %d \n", i);
378 break; 381 break;
379 } 382 }
380 383
@@ -389,7 +392,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
389 idx++; 392 idx++;
390 } else { 393 } else {
391 /*not supported and ignore the chan */ 394 /*not supported and ignore the chan */
392 lbs_pr_debug(1, 395 lbs_deb_11d(
393 "11D:i[%d] chan[%d] unsupported in region[%x] band[%d]\n", 396 "11D:i[%d] chan[%d] unsupported in region[%x] band[%d]\n",
394 i, curchan, region, band); 397 i, curchan, region, band);
395 } 398 }
@@ -401,11 +404,12 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
401 404
402 parsed_region_chan->nr_chan = idx; 405 parsed_region_chan->nr_chan = idx;
403 406
404 lbs_pr_debug(1, "nrchan=%x\n", parsed_region_chan->nr_chan); 407 lbs_deb_11d("nrchan=%x\n", parsed_region_chan->nr_chan);
405 lbs_dbg_hex("11D:parsed_region_chan:", (u8 *) parsed_region_chan, 408 lbs_dbg_hex("11D:parsed_region_chan:", (u8 *) parsed_region_chan,
406 2 + COUNTRY_CODE_LEN + sizeof(struct parsed_region_chan_11d) * idx); 409 2 + COUNTRY_CODE_LEN + sizeof(struct parsed_region_chan_11d) * idx);
407 410
408 LEAVE(); 411done:
412 lbs_deb_enter(LBS_DEB_11D);
409 return 0; 413 return 0;
410} 414}
411 415
@@ -420,16 +424,16 @@ u8 libertas_get_scan_type_11d(u8 chan,
420{ 424{
421 u8 scan_type = cmd_scan_type_passive; 425 u8 scan_type = cmd_scan_type_passive;
422 426
423 ENTER(); 427 lbs_deb_enter(LBS_DEB_11D);
424 428
425 if (wlan_channel_known_11d(chan, parsed_region_chan)) { 429 if (wlan_channel_known_11d(chan, parsed_region_chan)) {
426 lbs_pr_debug(1, "11D: Found and do Active Scan\n"); 430 lbs_deb_11d("11D: Found and do Active Scan\n");
427 scan_type = cmd_scan_type_active; 431 scan_type = cmd_scan_type_active;
428 } else { 432 } else {
429 lbs_pr_debug(1, "11D: Not Find and do Passive Scan\n"); 433 lbs_deb_11d("11D: Not Find and do Passive Scan\n");
430 } 434 }
431 435
432 LEAVE(); 436 lbs_deb_leave_args(LBS_DEB_11D, "ret scan_type %d", scan_type);
433 return scan_type; 437 return scan_type;
434 438
435} 439}
@@ -456,7 +460,7 @@ static int wlan_enable_11d(wlan_private * priv, u8 flag)
456 OID_802_11D_ENABLE, 460 OID_802_11D_ENABLE,
457 &priv->adapter->enable11d); 461 &priv->adapter->enable11d);
458 if (ret) 462 if (ret)
459 lbs_pr_debug(1, "11D: Fail to enable 11D \n"); 463 lbs_deb_11d("11D: Fail to enable 11D \n");
460 464
461 return 0; 465 return 0;
462} 466}
@@ -471,7 +475,7 @@ static int set_domain_info_11d(wlan_private * priv)
471 int ret; 475 int ret;
472 476
473 if (!priv->adapter->enable11d) { 477 if (!priv->adapter->enable11d) {
474 lbs_pr_debug(1, "11D: dnld domain Info with 11d disabled\n"); 478 lbs_deb_11d("11D: dnld domain Info with 11d disabled\n");
475 return 0; 479 return 0;
476 } 480 }
477 481
@@ -479,7 +483,7 @@ static int set_domain_info_11d(wlan_private * priv)
479 cmd_act_set, 483 cmd_act_set,
480 cmd_option_waitforrsp, 0, NULL); 484 cmd_option_waitforrsp, 0, NULL);
481 if (ret) 485 if (ret)
482 lbs_pr_debug(1, "11D: Fail to dnld domain Info\n"); 486 lbs_deb_11d("11D: Fail to dnld domain Info\n");
483 487
484 return ret; 488 return ret;
485} 489}
@@ -501,7 +505,7 @@ int libertas_set_universaltable(wlan_private * priv, u8 band)
501 505
502 adapter->universal_channel[i].nrcfp = 506 adapter->universal_channel[i].nrcfp =
503 sizeof(channel_freq_power_UN_BG) / size; 507 sizeof(channel_freq_power_UN_BG) / size;
504 lbs_pr_debug(1, "11D: BG-band nrcfp=%d\n", 508 lbs_deb_11d("11D: BG-band nrcfp=%d\n",
505 adapter->universal_channel[i].nrcfp); 509 adapter->universal_channel[i].nrcfp);
506 510
507 adapter->universal_channel[i].CFP = channel_freq_power_UN_BG; 511 adapter->universal_channel[i].CFP = channel_freq_power_UN_BG;
@@ -531,9 +535,9 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv,
531 wlan_adapter *adapter = priv->adapter; 535 wlan_adapter *adapter = priv->adapter;
532 u8 nr_subband = adapter->domainreg.nr_subband; 536 u8 nr_subband = adapter->domainreg.nr_subband;
533 537
534 ENTER(); 538 lbs_deb_enter(LBS_DEB_11D);
535 539
536 lbs_pr_debug(1, "nr_subband=%x\n", nr_subband); 540 lbs_deb_11d("nr_subband=%x\n", nr_subband);
537 541
538 cmd->command = cpu_to_le16(cmdno); 542 cmd->command = cpu_to_le16(cmdno);
539 pdomaininfo->action = cpu_to_le16(cmdoption); 543 pdomaininfo->action = cpu_to_le16(cmdoption);
@@ -542,8 +546,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv,
542 cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN); 546 cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN);
543 lbs_dbg_hex("11D: 802_11D_DOMAIN_INFO:", (u8 *) cmd, 547 lbs_dbg_hex("11D: 802_11D_DOMAIN_INFO:", (u8 *) cmd,
544 (int)(cmd->size)); 548 (int)(cmd->size));
545 LEAVE(); 549 goto done;
546 return 0;
547 } 550 }
548 551
549 domain->header.type = cpu_to_le16(TLV_TYPE_DOMAIN); 552 domain->header.type = cpu_to_le16(TLV_TYPE_DOMAIN);
@@ -569,8 +572,8 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv,
569 572
570 lbs_dbg_hex("11D:802_11D_DOMAIN_INFO:", (u8 *) cmd, (int)(cmd->size)); 573 lbs_dbg_hex("11D:802_11D_DOMAIN_INFO:", (u8 *) cmd, (int)(cmd->size));
571 574
572 LEAVE(); 575done:
573 576 lbs_deb_enter(LBS_DEB_11D);
574 return 0; 577 return 0;
575} 578}
576 579
@@ -585,17 +588,17 @@ int libertas_cmd_enable_11d(wlan_private * priv, struct iwreq *wrq)
585 int data = 0; 588 int data = 0;
586 int *val; 589 int *val;
587 590
588 ENTER(); 591 lbs_deb_enter(LBS_DEB_11D);
589 data = SUBCMD_DATA(wrq); 592 data = SUBCMD_DATA(wrq);
590 593
591 lbs_pr_debug(1, "enable 11D: %s\n", 594 lbs_deb_11d("enable 11D: %s\n",
592 (data == 1) ? "enable" : "Disable"); 595 (data == 1) ? "enable" : "Disable");
593 596
594 wlan_enable_11d(priv, data); 597 wlan_enable_11d(priv, data);
595 val = (int *)wrq->u.name; 598 val = (int *)wrq->u.name;
596 *val = priv->adapter->enable11d; 599 *val = priv->adapter->enable11d;
597 600
598 LEAVE(); 601 lbs_deb_enter(LBS_DEB_11D);
599 return 0; 602 return 0;
600} 603}
601 604
@@ -615,7 +618,7 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv,
615 s16 ret = 0; 618 s16 ret = 0;
616 u8 nr_subband = 0; 619 u8 nr_subband = 0;
617 620
618 ENTER(); 621 lbs_deb_enter(LBS_DEB_11D);
619 622
620 lbs_dbg_hex("11D DOMAIN Info Rsp Data:", (u8 *) resp, 623 lbs_dbg_hex("11D DOMAIN Info Rsp Data:", (u8 *) resp,
621 (int)le16_to_cpu(resp->size)); 624 (int)le16_to_cpu(resp->size));
@@ -623,10 +626,10 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv,
623 nr_subband = (domain->header.len - 3) / sizeof(struct ieeetypes_subbandset); 626 nr_subband = (domain->header.len - 3) / sizeof(struct ieeetypes_subbandset);
624 /* countrycode 3 bytes */ 627 /* countrycode 3 bytes */
625 628
626 lbs_pr_debug(1, "11D Domain Info Resp: nr_subband=%d\n", nr_subband); 629 lbs_deb_11d("11D Domain Info Resp: nr_subband=%d\n", nr_subband);
627 630
628 if (nr_subband > MRVDRV_MAX_SUBBAND_802_11D) { 631 if (nr_subband > MRVDRV_MAX_SUBBAND_802_11D) {
629 lbs_pr_debug(1, "Invalid Numrer of Subband returned!!\n"); 632 lbs_deb_11d("Invalid Numrer of Subband returned!!\n");
630 return -1; 633 return -1;
631 } 634 }
632 635
@@ -637,12 +640,12 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv,
637 case cmd_act_get: 640 case cmd_act_get:
638 break; 641 break;
639 default: 642 default:
640 lbs_pr_debug(1, "Invalid action:%d\n", domaininfo->action); 643 lbs_deb_11d("Invalid action:%d\n", domaininfo->action);
641 ret = -1; 644 ret = -1;
642 break; 645 break;
643 } 646 }
644 647
645 LEAVE(); 648 lbs_deb_leave_args(LBS_DEB_11D, "ret %d", ret);
646 return ret; 649 return ret;
647} 650}
648 651
@@ -656,7 +659,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv)
656 int ret; 659 int ret;
657 wlan_adapter *adapter = priv->adapter; 660 wlan_adapter *adapter = priv->adapter;
658 661
659 ENTER(); 662 lbs_deb_enter(LBS_DEB_11D);
660 if (priv->adapter->enable11d) { 663 if (priv->adapter->enable11d) {
661 memset(&adapter->parsed_region_chan, 0, 664 memset(&adapter->parsed_region_chan, 0,
662 sizeof(struct parsed_region_chan_11d)); 665 sizeof(struct parsed_region_chan_11d));
@@ -665,9 +668,8 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv)
665 &adapter->parsed_region_chan); 668 &adapter->parsed_region_chan);
666 669
667 if (ret == -1) { 670 if (ret == -1) {
668 lbs_pr_debug(1, "11D: Err Parse domain_info from AP..\n"); 671 lbs_deb_11d("11D: Err Parse domain_info from AP..\n");
669 LEAVE(); 672 goto done;
670 return ret;
671 } 673 }
672 674
673 memset(&adapter->domainreg, 0, 675 memset(&adapter->domainreg, 0,
@@ -678,13 +680,15 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv)
678 ret = set_domain_info_11d(priv); 680 ret = set_domain_info_11d(priv);
679 681
680 if (ret) { 682 if (ret) {
681 lbs_pr_debug(1, "11D: Err set domainInfo to FW\n"); 683 lbs_deb_11d("11D: Err set domainInfo to FW\n");
682 LEAVE(); 684 goto done;
683 return ret;
684 } 685 }
685 } 686 }
686 LEAVE(); 687 ret = 0;
687 return 0; 688
689done:
690 lbs_deb_leave_args(LBS_DEB_11D, "ret %d", ret);
691 return ret;
688} 692}
689 693
690/** 694/**
@@ -699,8 +703,8 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
699 struct region_channel *region_chan; 703 struct region_channel *region_chan;
700 u8 j; 704 u8 j;
701 705
702 ENTER(); 706 lbs_deb_enter(LBS_DEB_11D);
703 lbs_pr_debug(1, "11D:curbssparams.band[%d]\n", adapter->curbssparams.band); 707 lbs_deb_11d("11D:curbssparams.band[%d]\n", adapter->curbssparams.band);
704 708
705 if (priv->adapter->enable11d) { 709 if (priv->adapter->enable11d) {
706 /* update parsed_region_chan_11; dnld domaininf to FW */ 710 /* update parsed_region_chan_11; dnld domaininf to FW */
@@ -709,7 +713,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
709 sizeof(adapter->region_channel[0]); j++) { 713 sizeof(adapter->region_channel[0]); j++) {
710 region_chan = &adapter->region_channel[j]; 714 region_chan = &adapter->region_channel[j];
711 715
712 lbs_pr_debug(1, "11D:[%d] region_chan->band[%d]\n", j, 716 lbs_deb_11d("11D:[%d] region_chan->band[%d]\n", j,
713 region_chan->band); 717 region_chan->band);
714 718
715 if (!region_chan || !region_chan->valid 719 if (!region_chan || !region_chan->valid
@@ -722,10 +726,10 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
722 726
723 if (j >= sizeof(adapter->region_channel) / 727 if (j >= sizeof(adapter->region_channel) /
724 sizeof(adapter->region_channel[0])) { 728 sizeof(adapter->region_channel[0])) {
725 lbs_pr_debug(1, "11D:region_chan not found. band[%d]\n", 729 lbs_deb_11d("11D:region_chan not found. band[%d]\n",
726 adapter->curbssparams.band); 730 adapter->curbssparams.band);
727 LEAVE(); 731 ret = -1;
728 return -1; 732 goto done;
729 } 733 }
730 734
731 memset(&adapter->parsed_region_chan, 0, 735 memset(&adapter->parsed_region_chan, 0,
@@ -742,13 +746,14 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
742 ret = set_domain_info_11d(priv); 746 ret = set_domain_info_11d(priv);
743 747
744 if (ret) { 748 if (ret) {
745 lbs_pr_debug(1, "11D: Err set domainInfo to FW\n"); 749 lbs_deb_11d("11D: Err set domainInfo to FW\n");
746 LEAVE(); 750 goto done;
747 return ret;
748 } 751 }
749 752
750 } 753 }
754 ret = 0;
751 755
752 LEAVE(); 756done:
753 return 0; 757 lbs_deb_leave_args(LBS_DEB_11D, "ret %d", ret);
758 return ret;
754} 759}