diff options
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r-- | drivers/net/wireless/libertas/11d.c | 62 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/defs.h | 80 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/join.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/rx.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/tx.c | 6 |
9 files changed, 105 insertions, 102 deletions
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c index ba4cbcb59113..8b366ef2fe95 100644 --- a/drivers/net/wireless/libertas/11d.c +++ b/drivers/net/wireless/libertas/11d.c | |||
@@ -124,17 +124,17 @@ static u8 wlan_channel_known_11d(u8 chan, | |||
124 | u8 nr_chan = parsed_region_chan->nr_chan; | 124 | u8 nr_chan = parsed_region_chan->nr_chan; |
125 | u8 i = 0; | 125 | u8 i = 0; |
126 | 126 | ||
127 | lbs_dbg_hex("11D:parsed_region_chan:", (char *)chanpwr, | 127 | lbs_deb_hex(LBS_DEB_11D, "parsed_region_chan", (char *)chanpwr, |
128 | sizeof(struct chan_power_11d) * nr_chan); | 128 | sizeof(struct chan_power_11d) * nr_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_deb_11d("11D: Found Chan:%d\n", chan); | 132 | lbs_deb_11d("found chan %d\n", chan); |
133 | return 1; | 133 | return 1; |
134 | } | 134 | } |
135 | } | 135 | } |
136 | 136 | ||
137 | lbs_deb_11d("11D: Not Find Chan:%d\n", chan); | 137 | lbs_deb_11d("chan %d not found\n", chan); |
138 | return 0; | 138 | return 0; |
139 | } | 139 | } |
140 | 140 | ||
@@ -174,8 +174,8 @@ 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_deb_11d("11D:nrchan=%d\n", nr_chan); | 177 | lbs_deb_11d("nrchan %d\n", nr_chan); |
178 | lbs_dbg_hex("11D:parsed_region_chan:", (char *)parsed_region_chan, | 178 | lbs_deb_hex(LBS_DEB_11D, "parsed_region_chan", (char *)parsed_region_chan, |
179 | sizeof(struct parsed_region_chan_11d)); | 179 | sizeof(struct parsed_region_chan_11d)); |
180 | 180 | ||
181 | for (i = 0; i < nr_chan; i++) { | 181 | for (i = 0; i < nr_chan; i++) { |
@@ -213,7 +213,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d | |||
213 | domaininfo->nr_subband = nr_subband; | 213 | domaininfo->nr_subband = nr_subband; |
214 | 214 | ||
215 | lbs_deb_11d("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_deb_hex(LBS_DEB_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); |
219 | return 0; | 219 | return 0; |
@@ -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_deb_11d("11D: region_chan is NULL\n"); | 236 | lbs_deb_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_deb_11d("11D: cfp equal NULL \n"); | 242 | lbs_deb_11d("cfp is 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_deb_11d("11D: region[0x%x] band[%d]\n", parsed_region_chan->region, | 251 | lbs_deb_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_deb_11d("11D: Chan[%d] Pwr[%d]\n", | 257 | lbs_deb_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_deb_11d("11D: nrchan[%d]\n", parsed_region_chan->nr_chan); | 263 | lbs_deb_11d("nrchan %d\n", parsed_region_chan->nr_chan); |
264 | 264 | ||
265 | return; | 265 | return; |
266 | } | 266 | } |
@@ -336,7 +336,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
336 | 6. Others | 336 | 6. Others |
337 | */ | 337 | */ |
338 | 338 | ||
339 | lbs_dbg_hex("CountryInfo:", (u8 *) countryinfo, 30); | 339 | lbs_deb_hex(LBS_DEB_11D, "countryinfo", (u8 *) countryinfo, 30); |
340 | 340 | ||
341 | if ((*(countryinfo->countrycode)) == 0 | 341 | if ((*(countryinfo->countrycode)) == 0 |
342 | || (countryinfo->len <= COUNTRY_CODE_LEN)) { | 342 | || (countryinfo->len <= COUNTRY_CODE_LEN)) { |
@@ -349,7 +349,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
349 | wlan_region_2_code(countryinfo->countrycode); | 349 | wlan_region_2_code(countryinfo->countrycode); |
350 | 350 | ||
351 | lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region); | 351 | lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region); |
352 | lbs_dbg_hex("CountryCode:", (char *)countryinfo->countrycode, | 352 | lbs_deb_hex(LBS_DEB_11D, "countrycode", (char *)countryinfo->countrycode, |
353 | COUNTRY_CODE_LEN); | 353 | COUNTRY_CODE_LEN); |
354 | 354 | ||
355 | parsed_region_chan->band = band; | 355 | parsed_region_chan->band = band; |
@@ -364,7 +364,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
364 | 364 | ||
365 | if (countryinfo->subband[j].firstchan <= lastchan) { | 365 | if (countryinfo->subband[j].firstchan <= lastchan) { |
366 | /*Step2&3. Check First Chan Num increment and no overlap */ | 366 | /*Step2&3. Check First Chan Num increment and no overlap */ |
367 | lbs_deb_11d("11D: Chan[%d>%d] Overlap\n", | 367 | lbs_deb_11d("chan %d>%d, overlap\n", |
368 | countryinfo->subband[j].firstchan, lastchan); | 368 | countryinfo->subband[j].firstchan, lastchan); |
369 | continue; | 369 | continue; |
370 | } | 370 | } |
@@ -393,7 +393,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
393 | } else { | 393 | } else { |
394 | /*not supported and ignore the chan */ | 394 | /*not supported and ignore the chan */ |
395 | lbs_deb_11d( | 395 | lbs_deb_11d( |
396 | "11D:i[%d] chan[%d] unsupported in region[%x] band[%d]\n", | 396 | "i %d, chan %d unsupported in region %x, band %d\n", |
397 | i, curchan, region, band); | 397 | i, curchan, region, band); |
398 | } | 398 | } |
399 | } | 399 | } |
@@ -405,7 +405,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
405 | parsed_region_chan->nr_chan = idx; | 405 | parsed_region_chan->nr_chan = idx; |
406 | 406 | ||
407 | lbs_deb_11d("nrchan=%x\n", parsed_region_chan->nr_chan); | 407 | lbs_deb_11d("nrchan=%x\n", parsed_region_chan->nr_chan); |
408 | lbs_dbg_hex("11D:parsed_region_chan:", (u8 *) parsed_region_chan, | 408 | lbs_deb_hex(LBS_DEB_11D, "parsed_region_chan", (u8 *) parsed_region_chan, |
409 | 2 + COUNTRY_CODE_LEN + sizeof(struct parsed_region_chan_11d) * idx); | 409 | 2 + COUNTRY_CODE_LEN + sizeof(struct parsed_region_chan_11d) * idx); |
410 | 410 | ||
411 | done: | 411 | done: |
@@ -427,10 +427,10 @@ u8 libertas_get_scan_type_11d(u8 chan, | |||
427 | lbs_deb_enter(LBS_DEB_11D); | 427 | lbs_deb_enter(LBS_DEB_11D); |
428 | 428 | ||
429 | if (wlan_channel_known_11d(chan, parsed_region_chan)) { | 429 | if (wlan_channel_known_11d(chan, parsed_region_chan)) { |
430 | lbs_deb_11d("11D: Found and do Active Scan\n"); | 430 | lbs_deb_11d("found, do active scan\n"); |
431 | scan_type = CMD_SCAN_TYPE_ACTIVE; | 431 | scan_type = CMD_SCAN_TYPE_ACTIVE; |
432 | } else { | 432 | } else { |
433 | lbs_deb_11d("11D: Not Find and do Passive Scan\n"); | 433 | lbs_deb_11d("not found, do passive scan\n"); |
434 | } | 434 | } |
435 | 435 | ||
436 | lbs_deb_leave_args(LBS_DEB_11D, "ret scan_type %d", scan_type); | 436 | lbs_deb_leave_args(LBS_DEB_11D, "ret scan_type %d", scan_type); |
@@ -456,7 +456,7 @@ static int set_domain_info_11d(wlan_private * priv) | |||
456 | int ret; | 456 | int ret; |
457 | 457 | ||
458 | if (!priv->adapter->enable11d) { | 458 | if (!priv->adapter->enable11d) { |
459 | lbs_deb_11d("11D: dnld domain Info with 11d disabled\n"); | 459 | lbs_deb_11d("dnld domain Info with 11d disabled\n"); |
460 | return 0; | 460 | return 0; |
461 | } | 461 | } |
462 | 462 | ||
@@ -464,7 +464,7 @@ static int set_domain_info_11d(wlan_private * priv) | |||
464 | CMD_ACT_SET, | 464 | CMD_ACT_SET, |
465 | CMD_OPTION_WAITFORRSP, 0, NULL); | 465 | CMD_OPTION_WAITFORRSP, 0, NULL); |
466 | if (ret) | 466 | if (ret) |
467 | lbs_deb_11d("11D: Fail to dnld domain Info\n"); | 467 | lbs_deb_11d("fail to dnld domain info\n"); |
468 | 468 | ||
469 | return ret; | 469 | return ret; |
470 | } | 470 | } |
@@ -486,7 +486,7 @@ int libertas_set_universaltable(wlan_private * priv, u8 band) | |||
486 | 486 | ||
487 | adapter->universal_channel[i].nrcfp = | 487 | adapter->universal_channel[i].nrcfp = |
488 | sizeof(channel_freq_power_UN_BG) / size; | 488 | sizeof(channel_freq_power_UN_BG) / size; |
489 | lbs_deb_11d("11D: BG-band nrcfp=%d\n", | 489 | lbs_deb_11d("BG-band nrcfp %d\n", |
490 | adapter->universal_channel[i].nrcfp); | 490 | adapter->universal_channel[i].nrcfp); |
491 | 491 | ||
492 | adapter->universal_channel[i].CFP = channel_freq_power_UN_BG; | 492 | adapter->universal_channel[i].CFP = channel_freq_power_UN_BG; |
@@ -525,7 +525,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv, | |||
525 | if (cmdoption == CMD_ACT_GET) { | 525 | if (cmdoption == CMD_ACT_GET) { |
526 | cmd->size = | 526 | cmd->size = |
527 | cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN); | 527 | cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN); |
528 | lbs_dbg_hex("11D: 802_11D_DOMAIN_INFO:", (u8 *) cmd, | 528 | lbs_deb_hex(LBS_DEB_11D, "802_11D_DOMAIN_INFO", (u8 *) cmd, |
529 | (int)(cmd->size)); | 529 | (int)(cmd->size)); |
530 | goto done; | 530 | goto done; |
531 | } | 531 | } |
@@ -551,7 +551,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv, | |||
551 | cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN); | 551 | cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN); |
552 | } | 552 | } |
553 | 553 | ||
554 | lbs_dbg_hex("11D:802_11D_DOMAIN_INFO:", (u8 *) cmd, le16_to_cpu(cmd->size)); | 554 | lbs_deb_hex(LBS_DEB_11D, "802_11D_DOMAIN_INFO", (u8 *) cmd, le16_to_cpu(cmd->size)); |
555 | 555 | ||
556 | done: | 556 | done: |
557 | lbs_deb_enter(LBS_DEB_11D); | 557 | lbs_deb_enter(LBS_DEB_11D); |
@@ -575,13 +575,13 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv, | |||
575 | 575 | ||
576 | lbs_deb_enter(LBS_DEB_11D); | 576 | lbs_deb_enter(LBS_DEB_11D); |
577 | 577 | ||
578 | lbs_dbg_hex("11D DOMAIN Info Rsp Data:", (u8 *) resp, | 578 | lbs_deb_hex(LBS_DEB_11D, "domain info resp", (u8 *) resp, |
579 | (int)le16_to_cpu(resp->size)); | 579 | (int)le16_to_cpu(resp->size)); |
580 | 580 | ||
581 | nr_subband = (le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) / | 581 | nr_subband = (le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) / |
582 | sizeof(struct ieeetypes_subbandset); | 582 | sizeof(struct ieeetypes_subbandset); |
583 | 583 | ||
584 | lbs_deb_11d("11D Domain Info Resp: nr_subband=%d\n", nr_subband); | 584 | lbs_deb_11d("domain info resp: nr_subband %d\n", nr_subband); |
585 | 585 | ||
586 | if (nr_subband > MRVDRV_MAX_SUBBAND_802_11D) { | 586 | if (nr_subband > MRVDRV_MAX_SUBBAND_802_11D) { |
587 | lbs_deb_11d("Invalid Numrer of Subband returned!!\n"); | 587 | lbs_deb_11d("Invalid Numrer of Subband returned!!\n"); |
@@ -623,7 +623,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv, | |||
623 | &adapter->parsed_region_chan); | 623 | &adapter->parsed_region_chan); |
624 | 624 | ||
625 | if (ret == -1) { | 625 | if (ret == -1) { |
626 | lbs_deb_11d("11D: Err Parse domain_info from AP..\n"); | 626 | lbs_deb_11d("error parsing domain_info from AP\n"); |
627 | goto done; | 627 | goto done; |
628 | } | 628 | } |
629 | 629 | ||
@@ -635,7 +635,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv, | |||
635 | ret = set_domain_info_11d(priv); | 635 | ret = set_domain_info_11d(priv); |
636 | 636 | ||
637 | if (ret) { | 637 | if (ret) { |
638 | lbs_deb_11d("11D: Err set domainInfo to FW\n"); | 638 | lbs_deb_11d("error setting domain info\n"); |
639 | goto done; | 639 | goto done; |
640 | } | 640 | } |
641 | } | 641 | } |
@@ -659,7 +659,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv) | |||
659 | u8 j; | 659 | u8 j; |
660 | 660 | ||
661 | lbs_deb_enter(LBS_DEB_11D); | 661 | lbs_deb_enter(LBS_DEB_11D); |
662 | lbs_deb_11d("11D:curbssparams.band[%d]\n", adapter->curbssparams.band); | 662 | lbs_deb_11d("curbssparams.band %d\n", adapter->curbssparams.band); |
663 | 663 | ||
664 | if (priv->adapter->enable11d) { | 664 | if (priv->adapter->enable11d) { |
665 | /* update parsed_region_chan_11; dnld domaininf to FW */ | 665 | /* update parsed_region_chan_11; dnld domaininf to FW */ |
@@ -668,7 +668,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv) | |||
668 | sizeof(adapter->region_channel[0]); j++) { | 668 | sizeof(adapter->region_channel[0]); j++) { |
669 | region_chan = &adapter->region_channel[j]; | 669 | region_chan = &adapter->region_channel[j]; |
670 | 670 | ||
671 | lbs_deb_11d("11D:[%d] region_chan->band[%d]\n", j, | 671 | lbs_deb_11d("%d region_chan->band %d\n", j, |
672 | region_chan->band); | 672 | region_chan->band); |
673 | 673 | ||
674 | if (!region_chan || !region_chan->valid | 674 | if (!region_chan || !region_chan->valid |
@@ -681,7 +681,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv) | |||
681 | 681 | ||
682 | if (j >= sizeof(adapter->region_channel) / | 682 | if (j >= sizeof(adapter->region_channel) / |
683 | sizeof(adapter->region_channel[0])) { | 683 | sizeof(adapter->region_channel[0])) { |
684 | lbs_deb_11d("11D:region_chan not found. band[%d]\n", | 684 | lbs_deb_11d("region_chan not found, band %d\n", |
685 | adapter->curbssparams.band); | 685 | adapter->curbssparams.band); |
686 | ret = -1; | 686 | ret = -1; |
687 | goto done; | 687 | goto done; |
@@ -701,7 +701,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv) | |||
701 | ret = set_domain_info_11d(priv); | 701 | ret = set_domain_info_11d(priv); |
702 | 702 | ||
703 | if (ret) { | 703 | if (ret) { |
704 | lbs_deb_11d("11D: Err set domainInfo to FW\n"); | 704 | lbs_deb_11d("error setting domain info\n"); |
705 | goto done; | 705 | goto done; |
706 | } | 706 | } |
707 | 707 | ||
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 85b573770704..8d2f9bad8680 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -773,7 +773,7 @@ static int wlan_cmd_802_11_mac_address(wlan_private * priv, | |||
773 | if (cmd_action == CMD_ACT_SET) { | 773 | if (cmd_action == CMD_ACT_SET) { |
774 | memcpy(cmd->params.macadd.macadd, | 774 | memcpy(cmd->params.macadd.macadd, |
775 | adapter->current_addr, ETH_ALEN); | 775 | adapter->current_addr, ETH_ALEN); |
776 | lbs_dbg_hex("SET_CMD: MAC ADDRESS-", adapter->current_addr, 6); | 776 | lbs_deb_hex(LBS_DEB_CMD, "SET_CMD: MAC addr", adapter->current_addr, 6); |
777 | } | 777 | } |
778 | 778 | ||
779 | return 0; | 779 | return 0; |
@@ -815,11 +815,11 @@ static int wlan_cmd_bt_access(wlan_private * priv, | |||
815 | switch (cmd_action) { | 815 | switch (cmd_action) { |
816 | case CMD_ACT_BT_ACCESS_ADD: | 816 | case CMD_ACT_BT_ACCESS_ADD: |
817 | memcpy(bt_access->addr1, pdata_buf, 2 * ETH_ALEN); | 817 | memcpy(bt_access->addr1, pdata_buf, 2 * ETH_ALEN); |
818 | lbs_dbg_hex("BT_ADD: blinded mac address-", bt_access->addr1, 6); | 818 | lbs_deb_hex(LBS_DEB_MESH, "BT_ADD: blinded MAC addr", bt_access->addr1, 6); |
819 | break; | 819 | break; |
820 | case CMD_ACT_BT_ACCESS_DEL: | 820 | case CMD_ACT_BT_ACCESS_DEL: |
821 | memcpy(bt_access->addr1, pdata_buf, 1 * ETH_ALEN); | 821 | memcpy(bt_access->addr1, pdata_buf, 1 * ETH_ALEN); |
822 | lbs_dbg_hex("BT_DEL: blinded mac address-", bt_access->addr1, 6); | 822 | lbs_deb_hex(LBS_DEB_MESH, "BT_DEL: blinded MAC addr", bt_access->addr1, 6); |
823 | break; | 823 | break; |
824 | case CMD_ACT_BT_ACCESS_LIST: | 824 | case CMD_ACT_BT_ACCESS_LIST: |
825 | bt_access->id = cpu_to_le32(*(u32 *) pdata_buf); | 825 | bt_access->id = cpu_to_le32(*(u32 *) pdata_buf); |
@@ -993,8 +993,8 @@ static int DownloadcommandToStation(wlan_private * priv, | |||
993 | goto done; | 993 | goto done; |
994 | } | 994 | } |
995 | 995 | ||
996 | lbs_deb_cmd("DNLD_CMD: Sent command 0x%x @ %lu\n", command, jiffies); | 996 | lbs_deb_cmd("DNLD_CMD: sent command 0x%x, jiffies %lu\n", command, jiffies); |
997 | lbs_dbg_hex("DNLD_CMD: command", cmdnode->bufvirtualaddr, cmdsize); | 997 | lbs_deb_hex(LBS_DEB_CMD, "command", cmdnode->bufvirtualaddr, cmdsize); |
998 | 998 | ||
999 | /* Setup the timer after transmit command */ | 999 | /* Setup the timer after transmit command */ |
1000 | if (command == CMD_802_11_SCAN || command == CMD_802_11_AUTHENTICATE | 1000 | if (command == CMD_802_11_SCAN || command == CMD_802_11_AUTHENTICATE |
@@ -1801,7 +1801,7 @@ static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size) | |||
1801 | lbs_deb_cmd("SEND_SLEEPC_CMD: Before download, size of cmd = %d\n", | 1801 | lbs_deb_cmd("SEND_SLEEPC_CMD: Before download, size of cmd = %d\n", |
1802 | size); | 1802 | size); |
1803 | 1803 | ||
1804 | lbs_dbg_hex("SEND_SLEEPC_CMD: Sleep confirm command", cmdptr, size); | 1804 | lbs_deb_hex(LBS_DEB_CMD, "sleep confirm command", cmdptr, size); |
1805 | 1805 | ||
1806 | ret = priv->hw_host_to_card(priv, MVMS_CMD, cmdptr, size); | 1806 | ret = priv->hw_host_to_card(priv, MVMS_CMD, cmdptr, size); |
1807 | priv->dnld_sent = DNLD_RES_RECEIVED; | 1807 | priv->dnld_sent = DNLD_RES_RECEIVED; |
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index bb1d72b2b524..6166bbc0528e 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -431,7 +431,7 @@ static int wlan_ret_802_11_data_rate(wlan_private * priv, | |||
431 | 431 | ||
432 | lbs_deb_enter(LBS_DEB_CMD); | 432 | lbs_deb_enter(LBS_DEB_CMD); |
433 | 433 | ||
434 | lbs_dbg_hex("DATA_RATE_RESP: data_rate- ", (u8 *) pdatarate, | 434 | lbs_deb_hex(LBS_DEB_CMD, "DATA_RATE_RESP: data_rate- ", (u8 *) pdatarate, |
435 | sizeof(struct cmd_ds_802_11_data_rate)); | 435 | sizeof(struct cmd_ds_802_11_data_rate)); |
436 | 436 | ||
437 | /* FIXME: get actual rates FW can do if this command actually returns | 437 | /* FIXME: get actual rates FW can do if this command actually returns |
@@ -512,7 +512,7 @@ static int wlan_ret_802_11_eeprom_access(wlan_private * priv, | |||
512 | 512 | ||
513 | memcpy(&pbuf->value, (u8 *) & resp->params.rdeeprom.value, | 513 | memcpy(&pbuf->value, (u8 *) & resp->params.rdeeprom.value, |
514 | le16_to_cpu(resp->params.rdeeprom.bytecount)); | 514 | le16_to_cpu(resp->params.rdeeprom.bytecount)); |
515 | lbs_dbg_hex("adapter", (char *)&pbuf->value, | 515 | lbs_deb_hex(LBS_DEB_CMD, "adapter", (char *)&pbuf->value, |
516 | le16_to_cpu(resp->params.rdeeprom.bytecount)); | 516 | le16_to_cpu(resp->params.rdeeprom.bytecount)); |
517 | } | 517 | } |
518 | return 0; | 518 | return 0; |
@@ -758,7 +758,7 @@ int libertas_process_rx_command(wlan_private * priv) | |||
758 | } | 758 | } |
759 | resp = (struct cmd_ds_command *)(adapter->cur_cmd->bufvirtualaddr); | 759 | resp = (struct cmd_ds_command *)(adapter->cur_cmd->bufvirtualaddr); |
760 | 760 | ||
761 | lbs_dbg_hex("CMD_RESP:", adapter->cur_cmd->bufvirtualaddr, | 761 | lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", adapter->cur_cmd->bufvirtualaddr, |
762 | priv->upld_len); | 762 | priv->upld_len); |
763 | 763 | ||
764 | respcmd = le16_to_cpu(resp->command); | 764 | respcmd = le16_to_cpu(resp->command); |
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h index e47fadf37220..7c5b7f7b45db 100644 --- a/drivers/net/wireless/libertas/defs.h +++ b/drivers/net/wireless/libertas/defs.h | |||
@@ -43,43 +43,43 @@ | |||
43 | extern unsigned int libertas_debug; | 43 | extern unsigned int libertas_debug; |
44 | 44 | ||
45 | #ifdef DEBUG | 45 | #ifdef DEBUG |
46 | #define LBS_DEB_LL(grp, fmt, args...) \ | 46 | #define LBS_DEB_LL(grp, grpnam, fmt, args...) \ |
47 | do { if ((libertas_debug & (grp)) == (grp)) \ | 47 | do { if ((libertas_debug & (grp)) == (grp)) \ |
48 | printk(KERN_DEBUG DRV_NAME "%s: " fmt, \ | 48 | printk(KERN_DEBUG DRV_NAME grpnam "%s: " fmt, \ |
49 | in_interrupt() ? " (INT)" : "", ## args); } while (0) | 49 | in_interrupt() ? " (INT)" : "", ## args); } while (0) |
50 | #else | 50 | #else |
51 | #define LBS_DEB_LL(grp, fmt, args...) do {} while (0) | 51 | #define LBS_DEB_LL(grp, grpnam, fmt, args...) do {} while (0) |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #define lbs_deb_enter(grp) \ | 54 | #define lbs_deb_enter(grp) \ |
55 | LBS_DEB_LL(grp | LBS_DEB_ENTER, "%s():%d enter\n", __FUNCTION__, __LINE__); | 55 | LBS_DEB_LL(grp | LBS_DEB_ENTER, " enter", "%s():%d\n", __FUNCTION__, __LINE__); |
56 | #define lbs_deb_enter_args(grp, fmt, args...) \ | 56 | #define lbs_deb_enter_args(grp, fmt, args...) \ |
57 | LBS_DEB_LL(grp | LBS_DEB_ENTER, "%s(" fmt "):%d\n", __FUNCTION__, ## args, __LINE__); | 57 | LBS_DEB_LL(grp | LBS_DEB_ENTER, " enter", "%s(" fmt "):%d\n", __FUNCTION__, ## args, __LINE__); |
58 | #define lbs_deb_leave(grp) \ | 58 | #define lbs_deb_leave(grp) \ |
59 | LBS_DEB_LL(grp | LBS_DEB_LEAVE, "%s():%d leave\n", __FUNCTION__, __LINE__); | 59 | LBS_DEB_LL(grp | LBS_DEB_LEAVE, " leave", "%s():%d\n", __FUNCTION__, __LINE__); |
60 | #define lbs_deb_leave_args(grp, fmt, args...) \ | 60 | #define lbs_deb_leave_args(grp, fmt, args...) \ |
61 | LBS_DEB_LL(grp | LBS_DEB_LEAVE, "%s():%d leave, " fmt "\n", \ | 61 | LBS_DEB_LL(grp | LBS_DEB_LEAVE, " leave", "%s():%d, " fmt "\n", \ |
62 | __FUNCTION__, __LINE__, ##args); | 62 | __FUNCTION__, __LINE__, ##args); |
63 | #define lbs_deb_main(fmt, args...) LBS_DEB_LL(LBS_DEB_MAIN, fmt, ##args) | 63 | #define lbs_deb_main(fmt, args...) LBS_DEB_LL(LBS_DEB_MAIN, " main", fmt, ##args) |
64 | #define lbs_deb_net(fmt, args...) LBS_DEB_LL(LBS_DEB_NET, fmt, ##args) | 64 | #define lbs_deb_net(fmt, args...) LBS_DEB_LL(LBS_DEB_NET, " net", fmt, ##args) |
65 | #define lbs_deb_mesh(fmt, args...) LBS_DEB_LL(LBS_DEB_MESH, fmt, ##args) | 65 | #define lbs_deb_mesh(fmt, args...) LBS_DEB_LL(LBS_DEB_MESH, " mesh", fmt, ##args) |
66 | #define lbs_deb_wext(fmt, args...) LBS_DEB_LL(LBS_DEB_WEXT, fmt, ##args) | 66 | #define lbs_deb_wext(fmt, args...) LBS_DEB_LL(LBS_DEB_WEXT, " wext", fmt, ##args) |
67 | #define lbs_deb_ioctl(fmt, args...) LBS_DEB_LL(LBS_DEB_IOCTL, fmt, ##args) | 67 | #define lbs_deb_ioctl(fmt, args...) LBS_DEB_LL(LBS_DEB_IOCTL, " ioctl", fmt, ##args) |
68 | #define lbs_deb_scan(fmt, args...) LBS_DEB_LL(LBS_DEB_SCAN, fmt, ##args) | 68 | #define lbs_deb_scan(fmt, args...) LBS_DEB_LL(LBS_DEB_SCAN, " scan", fmt, ##args) |
69 | #define lbs_deb_assoc(fmt, args...) LBS_DEB_LL(LBS_DEB_ASSOC, fmt, ##args) | 69 | #define lbs_deb_assoc(fmt, args...) LBS_DEB_LL(LBS_DEB_ASSOC, " assoc", fmt, ##args) |
70 | #define lbs_deb_join(fmt, args...) LBS_DEB_LL(LBS_DEB_JOIN, fmt, ##args) | 70 | #define lbs_deb_join(fmt, args...) LBS_DEB_LL(LBS_DEB_JOIN, " join", fmt, ##args) |
71 | #define lbs_deb_11d(fmt, args...) LBS_DEB_LL(LBS_DEB_11D, fmt, ##args) | 71 | #define lbs_deb_11d(fmt, args...) LBS_DEB_LL(LBS_DEB_11D, " 11d", fmt, ##args) |
72 | #define lbs_deb_debugfs(fmt, args...) LBS_DEB_LL(LBS_DEB_DEBUGFS, fmt, ##args) | 72 | #define lbs_deb_debugfs(fmt, args...) LBS_DEB_LL(LBS_DEB_DEBUGFS, " debugfs", fmt, ##args) |
73 | #define lbs_deb_ethtool(fmt, args...) LBS_DEB_LL(LBS_DEB_ETHTOOL, fmt, ##args) | 73 | #define lbs_deb_ethtool(fmt, args...) LBS_DEB_LL(LBS_DEB_ETHTOOL, " ethtool", fmt, ##args) |
74 | #define lbs_deb_host(fmt, args...) LBS_DEB_LL(LBS_DEB_HOST, fmt, ##args) | 74 | #define lbs_deb_host(fmt, args...) LBS_DEB_LL(LBS_DEB_HOST, " host", fmt, ##args) |
75 | #define lbs_deb_cmd(fmt, args...) LBS_DEB_LL(LBS_DEB_CMD, fmt, ##args) | 75 | #define lbs_deb_cmd(fmt, args...) LBS_DEB_LL(LBS_DEB_CMD, " cmd", fmt, ##args) |
76 | #define lbs_deb_rx(fmt, args...) LBS_DEB_LL(LBS_DEB_RX, fmt, ##args) | 76 | #define lbs_deb_rx(fmt, args...) LBS_DEB_LL(LBS_DEB_RX, " rx", fmt, ##args) |
77 | #define lbs_deb_tx(fmt, args...) LBS_DEB_LL(LBS_DEB_TX, fmt, ##args) | 77 | #define lbs_deb_tx(fmt, args...) LBS_DEB_LL(LBS_DEB_TX, " tx", fmt, ##args) |
78 | #define lbs_deb_fw(fmt, args...) LBS_DEB_LL(LBS_DEB_FW, fmt, ##args) | 78 | #define lbs_deb_fw(fmt, args...) LBS_DEB_LL(LBS_DEB_FW, " fw", fmt, ##args) |
79 | #define lbs_deb_usb(fmt, args...) LBS_DEB_LL(LBS_DEB_USB, fmt, ##args) | 79 | #define lbs_deb_usb(fmt, args...) LBS_DEB_LL(LBS_DEB_USB, " usb", fmt, ##args) |
80 | #define lbs_deb_usbd(dev, fmt, args...) LBS_DEB_LL(LBS_DEB_USB, "%s:" fmt, (dev)->bus_id, ##args) | 80 | #define lbs_deb_usbd(dev, fmt, args...) LBS_DEB_LL(LBS_DEB_USB, " usbd", "%s:" fmt, (dev)->bus_id, ##args) |
81 | #define lbs_deb_cs(fmt, args...) LBS_DEB_LL(LBS_DEB_CS, fmt, ##args) | 81 | #define lbs_deb_cs(fmt, args...) LBS_DEB_LL(LBS_DEB_CS, " cs", fmt, ##args) |
82 | #define lbs_deb_thread(fmt, args...) LBS_DEB_LL(LBS_DEB_THREAD, fmt, ##args) | 82 | #define lbs_deb_thread(fmt, args...) LBS_DEB_LL(LBS_DEB_THREAD, " thread", fmt, ##args) |
83 | 83 | ||
84 | #define lbs_pr_info(format, args...) \ | 84 | #define lbs_pr_info(format, args...) \ |
85 | printk(KERN_INFO DRV_NAME": " format, ## args) | 85 | printk(KERN_INFO DRV_NAME": " format, ## args) |
@@ -89,22 +89,28 @@ do { if ((libertas_debug & (grp)) == (grp)) \ | |||
89 | printk(KERN_ALERT DRV_NAME": " format, ## args) | 89 | printk(KERN_ALERT DRV_NAME": " format, ## args) |
90 | 90 | ||
91 | #ifdef DEBUG | 91 | #ifdef DEBUG |
92 | static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len) | 92 | static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, int len) |
93 | { | 93 | { |
94 | int i = 0; | 94 | int i = 0; |
95 | 95 | ||
96 | if (!(libertas_debug & LBS_DEB_HEX)) | 96 | if (len && |
97 | return; | 97 | (libertas_debug & LBS_DEB_HEX) && |
98 | 98 | (libertas_debug & grp)) | |
99 | printk(KERN_DEBUG "%s: ", prompt); | 99 | { |
100 | for (i = 1; i <= len; i++) { | 100 | for (i = 1; i <= len; i++) { |
101 | printk("%02x ", (u8) * buf); | 101 | if ((i & 0xf) == 1) { |
102 | buf++; | 102 | if (i != 1) |
103 | printk("\n"); | ||
104 | printk(DRV_NAME " %s: ", prompt); | ||
105 | } | ||
106 | printk("%02x ", (u8) * buf); | ||
107 | buf++; | ||
108 | } | ||
109 | printk("\n"); | ||
103 | } | 110 | } |
104 | printk("\n"); | ||
105 | } | 111 | } |
106 | #else | 112 | #else |
107 | #define lbs_dbg_hex(x,y,z) do {} while (0) | 113 | #define lbs_deb_hex(grp,prompt,buf,len) do {} while (0) |
108 | #endif | 114 | #endif |
109 | 115 | ||
110 | 116 | ||
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c index da47c225e101..2b538ab51d40 100644 --- a/drivers/net/wireless/libertas/join.c +++ b/drivers/net/wireless/libertas/join.c | |||
@@ -51,9 +51,9 @@ static int get_common_rates(wlan_adapter * adapter, u8 * rates, u16 *rates_size) | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | lbs_dbg_hex("rate1 (AP) rates:", rates, *rates_size); | 54 | lbs_deb_hex(LBS_DEB_JOIN, "AP rates ", rates, *rates_size); |
55 | lbs_dbg_hex("rate2 (Card) rates:", card_rates, num_card_rates); | 55 | lbs_deb_hex(LBS_DEB_JOIN, "card rates ", card_rates, num_card_rates); |
56 | lbs_dbg_hex("Common rates:", tmp, tmp_size); | 56 | lbs_deb_hex(LBS_DEB_JOIN, "common rates", tmp, tmp_size); |
57 | lbs_deb_join("Tx datarate is currently 0x%X\n", adapter->cur_rate); | 57 | lbs_deb_join("Tx datarate is currently 0x%X\n", adapter->cur_rate); |
58 | 58 | ||
59 | if (!adapter->auto_rate) { | 59 | if (!adapter->auto_rate) { |
@@ -426,7 +426,7 @@ int libertas_cmd_80211_associate(wlan_private * priv, | |||
426 | tmplen = (u16) assoc_req->wpa_ie[1]; | 426 | tmplen = (u16) assoc_req->wpa_ie[1]; |
427 | rsn->header.len = cpu_to_le16(tmplen); | 427 | rsn->header.len = cpu_to_le16(tmplen); |
428 | memcpy(rsn->rsnie, &assoc_req->wpa_ie[2], tmplen); | 428 | memcpy(rsn->rsnie, &assoc_req->wpa_ie[2], tmplen); |
429 | lbs_dbg_hex("ASSOC_CMD: RSN IE", (u8 *) rsn, | 429 | lbs_deb_hex(LBS_DEB_JOIN, "ASSOC_CMD: RSN IE", (u8 *) rsn, |
430 | sizeof(rsn->header) + tmplen); | 430 | sizeof(rsn->header) + tmplen); |
431 | pos += sizeof(rsn->header) + tmplen; | 431 | pos += sizeof(rsn->header) + tmplen; |
432 | } | 432 | } |
@@ -711,7 +711,7 @@ int libertas_ret_80211_associate(wlan_private * priv, | |||
711 | goto done; | 711 | goto done; |
712 | } | 712 | } |
713 | 713 | ||
714 | lbs_dbg_hex("ASSOC_RESP:", (void *)&resp->params, | 714 | lbs_deb_hex(LBS_DEB_JOIN, "ASSOC_RESP", (void *)&resp->params, |
715 | le16_to_cpu(resp->size) - S_DS_GEN); | 715 | le16_to_cpu(resp->size) - S_DS_GEN); |
716 | 716 | ||
717 | /* Send a Media Connected event, according to the Spec */ | 717 | /* Send a Media Connected event, according to the Spec */ |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 717b33616ea8..2713f57e9bc8 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -556,9 +556,9 @@ static int libertas_set_mac_address(struct net_device *dev, void *addr) | |||
556 | memset(adapter->current_addr, 0, ETH_ALEN); | 556 | memset(adapter->current_addr, 0, ETH_ALEN); |
557 | 557 | ||
558 | /* dev->dev_addr is 8 bytes */ | 558 | /* dev->dev_addr is 8 bytes */ |
559 | lbs_dbg_hex("dev->dev_addr:", dev->dev_addr, ETH_ALEN); | 559 | lbs_deb_hex(LBS_DEB_NET, "dev->dev_addr", dev->dev_addr, ETH_ALEN); |
560 | 560 | ||
561 | lbs_dbg_hex("addr:", phwaddr->sa_data, ETH_ALEN); | 561 | lbs_deb_hex(LBS_DEB_NET, "addr", phwaddr->sa_data, ETH_ALEN); |
562 | memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN); | 562 | memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN); |
563 | 563 | ||
564 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS, | 564 | ret = libertas_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS, |
@@ -571,7 +571,7 @@ static int libertas_set_mac_address(struct net_device *dev, void *addr) | |||
571 | goto done; | 571 | goto done; |
572 | } | 572 | } |
573 | 573 | ||
574 | lbs_dbg_hex("adapter->macaddr:", adapter->current_addr, ETH_ALEN); | 574 | lbs_deb_hex(LBS_DEB_NET, "adapter->macaddr", adapter->current_addr, ETH_ALEN); |
575 | memcpy(dev->dev_addr, adapter->current_addr, ETH_ALEN); | 575 | memcpy(dev->dev_addr, adapter->current_addr, ETH_ALEN); |
576 | if (priv->mesh_dev) | 576 | if (priv->mesh_dev) |
577 | memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, ETH_ALEN); | 577 | memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, ETH_ALEN); |
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index c9251abbb964..25d45c646d71 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -182,7 +182,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb) | |||
182 | else | 182 | else |
183 | UNSET_MESH_FRAME(skb); | 183 | UNSET_MESH_FRAME(skb); |
184 | 184 | ||
185 | lbs_dbg_hex("RX Data: Before chop rxpd", skb->data, | 185 | lbs_deb_hex(LBS_DEB_RX, "RX Data: Before chop rxpd", skb->data, |
186 | min_t(unsigned int, skb->len, 100)); | 186 | min_t(unsigned int, skb->len, 100)); |
187 | 187 | ||
188 | if (skb->len < (ETH_HLEN + 8 + sizeof(struct rxpd))) { | 188 | if (skb->len < (ETH_HLEN + 8 + sizeof(struct rxpd))) { |
@@ -206,9 +206,9 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb) | |||
206 | lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n", | 206 | lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n", |
207 | skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); | 207 | skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); |
208 | 208 | ||
209 | lbs_dbg_hex("RX Data: Dest", p_rx_pkt->eth803_hdr.dest_addr, | 209 | lbs_deb_hex(LBS_DEB_RX, "RX Data: Dest", p_rx_pkt->eth803_hdr.dest_addr, |
210 | sizeof(p_rx_pkt->eth803_hdr.dest_addr)); | 210 | sizeof(p_rx_pkt->eth803_hdr.dest_addr)); |
211 | lbs_dbg_hex("RX Data: Src", p_rx_pkt->eth803_hdr.src_addr, | 211 | lbs_deb_hex(LBS_DEB_RX, "RX Data: Src", p_rx_pkt->eth803_hdr.src_addr, |
212 | sizeof(p_rx_pkt->eth803_hdr.src_addr)); | 212 | sizeof(p_rx_pkt->eth803_hdr.src_addr)); |
213 | 213 | ||
214 | if (memcmp(&p_rx_pkt->rfc1042_hdr, | 214 | if (memcmp(&p_rx_pkt->rfc1042_hdr, |
@@ -240,7 +240,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb) | |||
240 | */ | 240 | */ |
241 | hdrchop = (u8 *) p_ethhdr - (u8 *) p_rx_pkt; | 241 | hdrchop = (u8 *) p_ethhdr - (u8 *) p_rx_pkt; |
242 | } else { | 242 | } else { |
243 | lbs_dbg_hex("RX Data: LLC/SNAP", | 243 | lbs_deb_hex(LBS_DEB_RX, "RX Data: LLC/SNAP", |
244 | (u8 *) & p_rx_pkt->rfc1042_hdr, | 244 | (u8 *) & p_rx_pkt->rfc1042_hdr, |
245 | sizeof(p_rx_pkt->rfc1042_hdr)); | 245 | sizeof(p_rx_pkt->rfc1042_hdr)); |
246 | 246 | ||
@@ -336,7 +336,7 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) | |||
336 | p_rx_pkt = (struct rx80211packethdr *) skb->data; | 336 | p_rx_pkt = (struct rx80211packethdr *) skb->data; |
337 | prxpd = &p_rx_pkt->rx_pd; | 337 | prxpd = &p_rx_pkt->rx_pd; |
338 | 338 | ||
339 | // lbs_dbg_hex("RX Data: Before chop rxpd", skb->data, min(skb->len, 100)); | 339 | // lbs_deb_hex(LBS_DEB_RX, "RX Data: Before chop rxpd", skb->data, min(skb->len, 100)); |
340 | 340 | ||
341 | if (skb->len < (ETH_HLEN + 8 + sizeof(struct rxpd))) { | 341 | if (skb->len < (ETH_HLEN + 8 + sizeof(struct rxpd))) { |
342 | lbs_deb_rx("rx err: frame received wit bad length\n"); | 342 | lbs_deb_rx("rx err: frame received wit bad length\n"); |
@@ -385,8 +385,6 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) | |||
385 | radiotap_hdr.rx_flags |= IEEE80211_RADIOTAP_F_RX_BADFCS; | 385 | radiotap_hdr.rx_flags |= IEEE80211_RADIOTAP_F_RX_BADFCS; |
386 | //memset(radiotap_hdr.pad, 0x11, IEEE80211_RADIOTAP_HDRLEN - 18); | 386 | //memset(radiotap_hdr.pad, 0x11, IEEE80211_RADIOTAP_HDRLEN - 18); |
387 | 387 | ||
388 | // lbs_dbg_hex1("RX radiomode packet BEF: ", skb->data, min(skb->len, 100)); | ||
389 | |||
390 | /* chop the rxpd */ | 388 | /* chop the rxpd */ |
391 | skb_pull(skb, sizeof(struct rxpd)); | 389 | skb_pull(skb, sizeof(struct rxpd)); |
392 | 390 | ||
@@ -404,7 +402,6 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) | |||
404 | rx_radiotap_hdr)); | 402 | rx_radiotap_hdr)); |
405 | memcpy(pradiotap_hdr, &radiotap_hdr, | 403 | memcpy(pradiotap_hdr, &radiotap_hdr, |
406 | sizeof(struct rx_radiotap_hdr)); | 404 | sizeof(struct rx_radiotap_hdr)); |
407 | //lbs_dbg_hex1("RX radiomode packet AFT: ", skb->data, min(skb->len, 100)); | ||
408 | break; | 405 | break; |
409 | 406 | ||
410 | default: | 407 | default: |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 7f045ec2441d..f471157c02df 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -867,7 +867,7 @@ void wlan_ret_802_11_scan_get_tlv_ptrs(struct mrvlietypes_data * ptlv, | |||
867 | *ptsftlv = NULL; | 867 | *ptsftlv = NULL; |
868 | 868 | ||
869 | lbs_deb_scan("SCAN_RESP: tlvbufsize = %d\n", tlvbufsize); | 869 | lbs_deb_scan("SCAN_RESP: tlvbufsize = %d\n", tlvbufsize); |
870 | lbs_dbg_hex("SCAN_RESP: TLV Buf", (u8 *) ptlv, tlvbufsize); | 870 | lbs_deb_hex(LBS_DEB_SCAN, "SCAN_RESP: TLV Buf", (u8 *) ptlv, tlvbufsize); |
871 | 871 | ||
872 | while (tlvbufleft >= sizeof(struct mrvlietypesheader)) { | 872 | while (tlvbufleft >= sizeof(struct mrvlietypesheader)) { |
873 | tlvtype = le16_to_cpu(pcurrenttlv->header.type); | 873 | tlvtype = le16_to_cpu(pcurrenttlv->header.type); |
@@ -979,7 +979,7 @@ static int libertas_process_bss(struct bss_descriptor * bss, | |||
979 | 979 | ||
980 | /* rest of the current buffer are IE's */ | 980 | /* rest of the current buffer are IE's */ |
981 | lbs_deb_scan("process_bss: IE length for this AP = %zd\n", end - pos); | 981 | lbs_deb_scan("process_bss: IE length for this AP = %zd\n", end - pos); |
982 | lbs_dbg_hex("process_bss: IE info", pos, end - pos); | 982 | lbs_deb_hex(LBS_DEB_SCAN, "process_bss: IE info", pos, end - pos); |
983 | 983 | ||
984 | /* process variable IE */ | 984 | /* process variable IE */ |
985 | while (pos <= end - 2) { | 985 | while (pos <= end - 2) { |
@@ -1055,7 +1055,7 @@ static int libertas_process_bss(struct bss_descriptor * bss, | |||
1055 | 1055 | ||
1056 | memcpy(&bss->countryinfo, | 1056 | memcpy(&bss->countryinfo, |
1057 | pcountryinfo, pcountryinfo->len + 2); | 1057 | pcountryinfo, pcountryinfo->len + 2); |
1058 | lbs_dbg_hex("process_bss: 11D- CountryInfo:", | 1058 | lbs_deb_hex(LBS_DEB_SCAN, "process_bss: 11d countryinfo", |
1059 | (u8 *) pcountryinfo, | 1059 | (u8 *) pcountryinfo, |
1060 | (u32) (pcountryinfo->len + 2)); | 1060 | (u32) (pcountryinfo->len + 2)); |
1061 | break; | 1061 | break; |
@@ -1085,7 +1085,7 @@ static int libertas_process_bss(struct bss_descriptor * bss, | |||
1085 | bss->wpa_ie_len = min(elem->len + 2, | 1085 | bss->wpa_ie_len = min(elem->len + 2, |
1086 | MAX_WPA_IE_LEN); | 1086 | MAX_WPA_IE_LEN); |
1087 | memcpy(bss->wpa_ie, elem, bss->wpa_ie_len); | 1087 | memcpy(bss->wpa_ie, elem, bss->wpa_ie_len); |
1088 | lbs_dbg_hex("process_bss: WPA IE", bss->wpa_ie, | 1088 | lbs_deb_hex(LBS_DEB_SCAN, "process_bss: WPA IE", bss->wpa_ie, |
1089 | elem->len); | 1089 | elem->len); |
1090 | } else if (elem->len >= MARVELL_MESH_IE_LENGTH && | 1090 | } else if (elem->len >= MARVELL_MESH_IE_LENGTH && |
1091 | elem->data[0] == 0x00 && | 1091 | elem->data[0] == 0x00 && |
@@ -1099,7 +1099,7 @@ static int libertas_process_bss(struct bss_descriptor * bss, | |||
1099 | case MFIE_TYPE_RSN: | 1099 | case MFIE_TYPE_RSN: |
1100 | bss->rsn_ie_len = min(elem->len + 2, MAX_WPA_IE_LEN); | 1100 | bss->rsn_ie_len = min(elem->len + 2, MAX_WPA_IE_LEN); |
1101 | memcpy(bss->rsn_ie, elem, bss->rsn_ie_len); | 1101 | memcpy(bss->rsn_ie, elem, bss->rsn_ie_len); |
1102 | lbs_dbg_hex("process_bss: RSN_IE", bss->rsn_ie, elem->len); | 1102 | lbs_deb_hex(LBS_DEB_SCAN, "process_bss: RSN_IE", bss->rsn_ie, elem->len); |
1103 | break; | 1103 | break; |
1104 | 1104 | ||
1105 | default: | 1105 | default: |
@@ -1154,7 +1154,7 @@ struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter, | |||
1154 | if (!bssid) | 1154 | if (!bssid) |
1155 | return NULL; | 1155 | return NULL; |
1156 | 1156 | ||
1157 | lbs_dbg_hex("libertas_find_BSSID_in_list: looking for ", | 1157 | lbs_deb_hex(LBS_DEB_SCAN, "looking for", |
1158 | bssid, ETH_ALEN); | 1158 | bssid, ETH_ALEN); |
1159 | 1159 | ||
1160 | /* Look through the scan table for a compatible match. The loop will | 1160 | /* Look through the scan table for a compatible match. The loop will |
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index 7743d3f30f61..56d84027ec2b 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -116,7 +116,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb) | |||
116 | else | 116 | else |
117 | memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr, ETH_ALEN); | 117 | memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr, ETH_ALEN); |
118 | 118 | ||
119 | lbs_dbg_hex("txpd", (u8 *) plocaltxpd, sizeof(struct txpd)); | 119 | lbs_deb_hex(LBS_DEB_TX, "txpd", (u8 *) plocaltxpd, sizeof(struct txpd)); |
120 | 120 | ||
121 | if (IS_MESH_FRAME(skb)) { | 121 | if (IS_MESH_FRAME(skb)) { |
122 | plocaltxpd->tx_control |= cpu_to_le32(TxPD_MESH_FRAME); | 122 | plocaltxpd->tx_control |= cpu_to_le32(TxPD_MESH_FRAME); |
@@ -126,7 +126,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb) | |||
126 | 126 | ||
127 | ptr += sizeof(struct txpd); | 127 | ptr += sizeof(struct txpd); |
128 | 128 | ||
129 | lbs_dbg_hex("Tx Data", (u8 *) p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length)); | 129 | lbs_deb_hex(LBS_DEB_TX, "Tx Data", (u8 *) p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length)); |
130 | memcpy(ptr, p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length)); | 130 | memcpy(ptr, p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length)); |
131 | ret = priv->hw_host_to_card(priv, MVMS_DAT, | 131 | ret = priv->hw_host_to_card(priv, MVMS_DAT, |
132 | priv->adapter->tmptxbuf, | 132 | priv->adapter->tmptxbuf, |
@@ -218,7 +218,7 @@ int libertas_process_tx(wlan_private * priv, struct sk_buff *skb) | |||
218 | int ret = -1; | 218 | int ret = -1; |
219 | 219 | ||
220 | lbs_deb_enter(LBS_DEB_TX); | 220 | lbs_deb_enter(LBS_DEB_TX); |
221 | lbs_dbg_hex("TX Data", skb->data, min_t(unsigned int, skb->len, 100)); | 221 | lbs_deb_hex(LBS_DEB_TX, "TX Data", skb->data, min_t(unsigned int, skb->len, 100)); |
222 | 222 | ||
223 | if (priv->dnld_sent) { | 223 | if (priv->dnld_sent) { |
224 | lbs_pr_alert( "TX error: dnld_sent = %d, not sending\n", | 224 | lbs_pr_alert( "TX error: dnld_sent = %d, not sending\n", |