提交 ece56191 编写于 作者: H Holger Schurig 提交者: David S. Miller

[PATCH] libertas: make the hex dumper nicer

Currently, when you define LBS_DEB_HEX, you get every hex dump in the
whole driver, e.g. for LBS_DEB_CMD, LBS_DEB_RX, LBS_DEB_TX etc. This
patch makes sure that you only get the hexdump that you're interested in.

Renamed lbs_dbg_hex() into lbs_deb_hex(), like the other lbs_deb_XXX()
macros.

Made lbs_deb_hex() issue a line feed (and a new prompt) after 16 bytes.

As lbs_deb_hex() now prints the ":" after the prompt by itself, removed
the misc colons in the various *.c files.

lbs_deb_XXX() now print the debug category as well.

As lbs_deb_XXX() --- and especially lbs_deb_11d() --- now print the
category, I removed various "11D:" prefixes in 11d.c as well.
Signed-off-by: NHolger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 a9f38d02
...@@ -124,17 +124,17 @@ static u8 wlan_channel_known_11d(u8 chan, ...@@ -124,17 +124,17 @@ static u8 wlan_channel_known_11d(u8 chan,
u8 nr_chan = parsed_region_chan->nr_chan; u8 nr_chan = parsed_region_chan->nr_chan;
u8 i = 0; u8 i = 0;
lbs_dbg_hex("11D:parsed_region_chan:", (char *)chanpwr, lbs_deb_hex(LBS_DEB_11D, "parsed_region_chan", (char *)chanpwr,
sizeof(struct chan_power_11d) * nr_chan); sizeof(struct chan_power_11d) * nr_chan);
for (i = 0; i < nr_chan; i++) { for (i = 0; i < nr_chan; i++) {
if (chan == chanpwr[i].chan) { if (chan == chanpwr[i].chan) {
lbs_deb_11d("11D: Found Chan:%d\n", chan); lbs_deb_11d("found chan %d\n", chan);
return 1; return 1;
} }
} }
lbs_deb_11d("11D: Not Find Chan:%d\n", chan); lbs_deb_11d("chan %d not found\n", chan);
return 0; return 0;
} }
...@@ -174,8 +174,8 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d ...@@ -174,8 +174,8 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
memcpy(domaininfo->countrycode, parsed_region_chan->countrycode, memcpy(domaininfo->countrycode, parsed_region_chan->countrycode,
COUNTRY_CODE_LEN); COUNTRY_CODE_LEN);
lbs_deb_11d("11D:nrchan=%d\n", nr_chan); lbs_deb_11d("nrchan %d\n", nr_chan);
lbs_dbg_hex("11D:parsed_region_chan:", (char *)parsed_region_chan, lbs_deb_hex(LBS_DEB_11D, "parsed_region_chan", (char *)parsed_region_chan,
sizeof(struct parsed_region_chan_11d)); sizeof(struct parsed_region_chan_11d));
for (i = 0; i < nr_chan; i++) { for (i = 0; i < nr_chan; i++) {
...@@ -213,7 +213,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d ...@@ -213,7 +213,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
domaininfo->nr_subband = nr_subband; domaininfo->nr_subband = nr_subband;
lbs_deb_11d("nr_subband=%x\n", domaininfo->nr_subband); lbs_deb_11d("nr_subband=%x\n", domaininfo->nr_subband);
lbs_dbg_hex("11D:domaininfo:", (char *)domaininfo, lbs_deb_hex(LBS_DEB_11D, "domaininfo", (char *)domaininfo,
COUNTRY_CODE_LEN + 1 + COUNTRY_CODE_LEN + 1 +
sizeof(struct ieeetypes_subbandset) * nr_subband); sizeof(struct ieeetypes_subbandset) * nr_subband);
return 0; return 0;
...@@ -233,13 +233,13 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_ ...@@ -233,13 +233,13 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
struct chan_freq_power *cfp; struct chan_freq_power *cfp;
if (region_chan == NULL) { if (region_chan == NULL) {
lbs_deb_11d("11D: region_chan is NULL\n"); lbs_deb_11d("region_chan is NULL\n");
return; return;
} }
cfp = region_chan->CFP; cfp = region_chan->CFP;
if (cfp == NULL) { if (cfp == NULL) {
lbs_deb_11d("11D: cfp equal NULL \n"); lbs_deb_11d("cfp is NULL \n");
return; return;
} }
...@@ -248,19 +248,19 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_ ...@@ -248,19 +248,19 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
memcpy(parsed_region_chan->countrycode, memcpy(parsed_region_chan->countrycode,
wlan_code_2_region(region_chan->region), COUNTRY_CODE_LEN); wlan_code_2_region(region_chan->region), COUNTRY_CODE_LEN);
lbs_deb_11d("11D: region[0x%x] band[%d]\n", parsed_region_chan->region, lbs_deb_11d("region 0x%x, band %d\n", parsed_region_chan->region,
parsed_region_chan->band); parsed_region_chan->band);
for (i = 0; i < region_chan->nrcfp; i++, cfp++) { for (i = 0; i < region_chan->nrcfp; i++, cfp++) {
parsed_region_chan->chanpwr[i].chan = cfp->channel; parsed_region_chan->chanpwr[i].chan = cfp->channel;
parsed_region_chan->chanpwr[i].pwr = cfp->maxtxpower; parsed_region_chan->chanpwr[i].pwr = cfp->maxtxpower;
lbs_deb_11d("11D: Chan[%d] Pwr[%d]\n", lbs_deb_11d("chan %d, pwr %d\n",
parsed_region_chan->chanpwr[i].chan, parsed_region_chan->chanpwr[i].chan,
parsed_region_chan->chanpwr[i].pwr); parsed_region_chan->chanpwr[i].pwr);
} }
parsed_region_chan->nr_chan = region_chan->nrcfp; parsed_region_chan->nr_chan = region_chan->nrcfp;
lbs_deb_11d("11D: nrchan[%d]\n", parsed_region_chan->nr_chan); lbs_deb_11d("nrchan %d\n", parsed_region_chan->nr_chan);
return; return;
} }
...@@ -336,7 +336,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* ...@@ -336,7 +336,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
6. Others 6. Others
*/ */
lbs_dbg_hex("CountryInfo:", (u8 *) countryinfo, 30); lbs_deb_hex(LBS_DEB_11D, "countryinfo", (u8 *) countryinfo, 30);
if ((*(countryinfo->countrycode)) == 0 if ((*(countryinfo->countrycode)) == 0
|| (countryinfo->len <= COUNTRY_CODE_LEN)) { || (countryinfo->len <= COUNTRY_CODE_LEN)) {
...@@ -349,7 +349,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* ...@@ -349,7 +349,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
wlan_region_2_code(countryinfo->countrycode); wlan_region_2_code(countryinfo->countrycode);
lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region); lbs_deb_11d("regioncode=%x\n", (u8) parsed_region_chan->region);
lbs_dbg_hex("CountryCode:", (char *)countryinfo->countrycode, lbs_deb_hex(LBS_DEB_11D, "countrycode", (char *)countryinfo->countrycode,
COUNTRY_CODE_LEN); COUNTRY_CODE_LEN);
parsed_region_chan->band = band; parsed_region_chan->band = band;
...@@ -364,7 +364,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* ...@@ -364,7 +364,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
if (countryinfo->subband[j].firstchan <= lastchan) { if (countryinfo->subband[j].firstchan <= lastchan) {
/*Step2&3. Check First Chan Num increment and no overlap */ /*Step2&3. Check First Chan Num increment and no overlap */
lbs_deb_11d("11D: Chan[%d>%d] Overlap\n", lbs_deb_11d("chan %d>%d, overlap\n",
countryinfo->subband[j].firstchan, lastchan); countryinfo->subband[j].firstchan, lastchan);
continue; continue;
} }
...@@ -393,7 +393,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* ...@@ -393,7 +393,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
} else { } else {
/*not supported and ignore the chan */ /*not supported and ignore the chan */
lbs_deb_11d( lbs_deb_11d(
"11D:i[%d] chan[%d] unsupported in region[%x] band[%d]\n", "i %d, chan %d unsupported in region %x, band %d\n",
i, curchan, region, band); i, curchan, region, band);
} }
} }
...@@ -405,7 +405,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* ...@@ -405,7 +405,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
parsed_region_chan->nr_chan = idx; parsed_region_chan->nr_chan = idx;
lbs_deb_11d("nrchan=%x\n", parsed_region_chan->nr_chan); lbs_deb_11d("nrchan=%x\n", parsed_region_chan->nr_chan);
lbs_dbg_hex("11D:parsed_region_chan:", (u8 *) parsed_region_chan, lbs_deb_hex(LBS_DEB_11D, "parsed_region_chan", (u8 *) parsed_region_chan,
2 + COUNTRY_CODE_LEN + sizeof(struct parsed_region_chan_11d) * idx); 2 + COUNTRY_CODE_LEN + sizeof(struct parsed_region_chan_11d) * idx);
done: done:
...@@ -427,10 +427,10 @@ u8 libertas_get_scan_type_11d(u8 chan, ...@@ -427,10 +427,10 @@ u8 libertas_get_scan_type_11d(u8 chan,
lbs_deb_enter(LBS_DEB_11D); lbs_deb_enter(LBS_DEB_11D);
if (wlan_channel_known_11d(chan, parsed_region_chan)) { if (wlan_channel_known_11d(chan, parsed_region_chan)) {
lbs_deb_11d("11D: Found and do Active Scan\n"); lbs_deb_11d("found, do active scan\n");
scan_type = CMD_SCAN_TYPE_ACTIVE; scan_type = CMD_SCAN_TYPE_ACTIVE;
} else { } else {
lbs_deb_11d("11D: Not Find and do Passive Scan\n"); lbs_deb_11d("not found, do passive scan\n");
} }
lbs_deb_leave_args(LBS_DEB_11D, "ret scan_type %d", scan_type); 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,7 +456,7 @@ static int set_domain_info_11d(wlan_private * priv)
int ret; int ret;
if (!priv->adapter->enable11d) { if (!priv->adapter->enable11d) {
lbs_deb_11d("11D: dnld domain Info with 11d disabled\n"); lbs_deb_11d("dnld domain Info with 11d disabled\n");
return 0; return 0;
} }
...@@ -464,7 +464,7 @@ static int set_domain_info_11d(wlan_private * priv) ...@@ -464,7 +464,7 @@ static int set_domain_info_11d(wlan_private * priv)
CMD_ACT_SET, CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, 0, NULL); CMD_OPTION_WAITFORRSP, 0, NULL);
if (ret) if (ret)
lbs_deb_11d("11D: Fail to dnld domain Info\n"); lbs_deb_11d("fail to dnld domain info\n");
return ret; return ret;
} }
...@@ -486,7 +486,7 @@ int libertas_set_universaltable(wlan_private * priv, u8 band) ...@@ -486,7 +486,7 @@ int libertas_set_universaltable(wlan_private * priv, u8 band)
adapter->universal_channel[i].nrcfp = adapter->universal_channel[i].nrcfp =
sizeof(channel_freq_power_UN_BG) / size; sizeof(channel_freq_power_UN_BG) / size;
lbs_deb_11d("11D: BG-band nrcfp=%d\n", lbs_deb_11d("BG-band nrcfp %d\n",
adapter->universal_channel[i].nrcfp); adapter->universal_channel[i].nrcfp);
adapter->universal_channel[i].CFP = channel_freq_power_UN_BG; 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,7 +525,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv,
if (cmdoption == CMD_ACT_GET) { if (cmdoption == CMD_ACT_GET) {
cmd->size = cmd->size =
cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN); cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN);
lbs_dbg_hex("11D: 802_11D_DOMAIN_INFO:", (u8 *) cmd, lbs_deb_hex(LBS_DEB_11D, "802_11D_DOMAIN_INFO", (u8 *) cmd,
(int)(cmd->size)); (int)(cmd->size));
goto done; goto done;
} }
...@@ -551,7 +551,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv, ...@@ -551,7 +551,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv,
cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN); cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN);
} }
lbs_dbg_hex("11D:802_11D_DOMAIN_INFO:", (u8 *) cmd, le16_to_cpu(cmd->size)); lbs_deb_hex(LBS_DEB_11D, "802_11D_DOMAIN_INFO", (u8 *) cmd, le16_to_cpu(cmd->size));
done: done:
lbs_deb_enter(LBS_DEB_11D); lbs_deb_enter(LBS_DEB_11D);
...@@ -575,13 +575,13 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv, ...@@ -575,13 +575,13 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv,
lbs_deb_enter(LBS_DEB_11D); lbs_deb_enter(LBS_DEB_11D);
lbs_dbg_hex("11D DOMAIN Info Rsp Data:", (u8 *) resp, lbs_deb_hex(LBS_DEB_11D, "domain info resp", (u8 *) resp,
(int)le16_to_cpu(resp->size)); (int)le16_to_cpu(resp->size));
nr_subband = (le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) / nr_subband = (le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) /
sizeof(struct ieeetypes_subbandset); sizeof(struct ieeetypes_subbandset);
lbs_deb_11d("11D Domain Info Resp: nr_subband=%d\n", nr_subband); lbs_deb_11d("domain info resp: nr_subband %d\n", nr_subband);
if (nr_subband > MRVDRV_MAX_SUBBAND_802_11D) { if (nr_subband > MRVDRV_MAX_SUBBAND_802_11D) {
lbs_deb_11d("Invalid Numrer of Subband returned!!\n"); lbs_deb_11d("Invalid Numrer of Subband returned!!\n");
...@@ -623,7 +623,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv, ...@@ -623,7 +623,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
&adapter->parsed_region_chan); &adapter->parsed_region_chan);
if (ret == -1) { if (ret == -1) {
lbs_deb_11d("11D: Err Parse domain_info from AP..\n"); lbs_deb_11d("error parsing domain_info from AP\n");
goto done; goto done;
} }
...@@ -635,7 +635,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv, ...@@ -635,7 +635,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
ret = set_domain_info_11d(priv); ret = set_domain_info_11d(priv);
if (ret) { if (ret) {
lbs_deb_11d("11D: Err set domainInfo to FW\n"); lbs_deb_11d("error setting domain info\n");
goto done; goto done;
} }
} }
...@@ -659,7 +659,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv) ...@@ -659,7 +659,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
u8 j; u8 j;
lbs_deb_enter(LBS_DEB_11D); lbs_deb_enter(LBS_DEB_11D);
lbs_deb_11d("11D:curbssparams.band[%d]\n", adapter->curbssparams.band); lbs_deb_11d("curbssparams.band %d\n", adapter->curbssparams.band);
if (priv->adapter->enable11d) { if (priv->adapter->enable11d) {
/* update parsed_region_chan_11; dnld domaininf to FW */ /* update parsed_region_chan_11; dnld domaininf to FW */
...@@ -668,7 +668,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv) ...@@ -668,7 +668,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
sizeof(adapter->region_channel[0]); j++) { sizeof(adapter->region_channel[0]); j++) {
region_chan = &adapter->region_channel[j]; region_chan = &adapter->region_channel[j];
lbs_deb_11d("11D:[%d] region_chan->band[%d]\n", j, lbs_deb_11d("%d region_chan->band %d\n", j,
region_chan->band); region_chan->band);
if (!region_chan || !region_chan->valid if (!region_chan || !region_chan->valid
...@@ -681,7 +681,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv) ...@@ -681,7 +681,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
if (j >= sizeof(adapter->region_channel) / if (j >= sizeof(adapter->region_channel) /
sizeof(adapter->region_channel[0])) { sizeof(adapter->region_channel[0])) {
lbs_deb_11d("11D:region_chan not found. band[%d]\n", lbs_deb_11d("region_chan not found, band %d\n",
adapter->curbssparams.band); adapter->curbssparams.band);
ret = -1; ret = -1;
goto done; goto done;
...@@ -701,7 +701,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv) ...@@ -701,7 +701,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
ret = set_domain_info_11d(priv); ret = set_domain_info_11d(priv);
if (ret) { if (ret) {
lbs_deb_11d("11D: Err set domainInfo to FW\n"); lbs_deb_11d("error setting domain info\n");
goto done; goto done;
} }
......
...@@ -773,7 +773,7 @@ static int wlan_cmd_802_11_mac_address(wlan_private * priv, ...@@ -773,7 +773,7 @@ static int wlan_cmd_802_11_mac_address(wlan_private * priv,
if (cmd_action == CMD_ACT_SET) { if (cmd_action == CMD_ACT_SET) {
memcpy(cmd->params.macadd.macadd, memcpy(cmd->params.macadd.macadd,
adapter->current_addr, ETH_ALEN); adapter->current_addr, ETH_ALEN);
lbs_dbg_hex("SET_CMD: MAC ADDRESS-", adapter->current_addr, 6); lbs_deb_hex(LBS_DEB_CMD, "SET_CMD: MAC addr", adapter->current_addr, 6);
} }
return 0; return 0;
...@@ -815,11 +815,11 @@ static int wlan_cmd_bt_access(wlan_private * priv, ...@@ -815,11 +815,11 @@ static int wlan_cmd_bt_access(wlan_private * priv,
switch (cmd_action) { switch (cmd_action) {
case CMD_ACT_BT_ACCESS_ADD: case CMD_ACT_BT_ACCESS_ADD:
memcpy(bt_access->addr1, pdata_buf, 2 * ETH_ALEN); memcpy(bt_access->addr1, pdata_buf, 2 * ETH_ALEN);
lbs_dbg_hex("BT_ADD: blinded mac address-", bt_access->addr1, 6); lbs_deb_hex(LBS_DEB_MESH, "BT_ADD: blinded MAC addr", bt_access->addr1, 6);
break; break;
case CMD_ACT_BT_ACCESS_DEL: case CMD_ACT_BT_ACCESS_DEL:
memcpy(bt_access->addr1, pdata_buf, 1 * ETH_ALEN); memcpy(bt_access->addr1, pdata_buf, 1 * ETH_ALEN);
lbs_dbg_hex("BT_DEL: blinded mac address-", bt_access->addr1, 6); lbs_deb_hex(LBS_DEB_MESH, "BT_DEL: blinded MAC addr", bt_access->addr1, 6);
break; break;
case CMD_ACT_BT_ACCESS_LIST: case CMD_ACT_BT_ACCESS_LIST:
bt_access->id = cpu_to_le32(*(u32 *) pdata_buf); bt_access->id = cpu_to_le32(*(u32 *) pdata_buf);
...@@ -993,8 +993,8 @@ static int DownloadcommandToStation(wlan_private * priv, ...@@ -993,8 +993,8 @@ static int DownloadcommandToStation(wlan_private * priv,
goto done; goto done;
} }
lbs_deb_cmd("DNLD_CMD: Sent command 0x%x @ %lu\n", command, jiffies); lbs_deb_cmd("DNLD_CMD: sent command 0x%x, jiffies %lu\n", command, jiffies);
lbs_dbg_hex("DNLD_CMD: command", cmdnode->bufvirtualaddr, cmdsize); lbs_deb_hex(LBS_DEB_CMD, "command", cmdnode->bufvirtualaddr, cmdsize);
/* Setup the timer after transmit command */ /* Setup the timer after transmit command */
if (command == CMD_802_11_SCAN || command == CMD_802_11_AUTHENTICATE 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,7 +1801,7 @@ static int sendconfirmsleep(wlan_private * priv, u8 * cmdptr, u16 size)
lbs_deb_cmd("SEND_SLEEPC_CMD: Before download, size of cmd = %d\n", lbs_deb_cmd("SEND_SLEEPC_CMD: Before download, size of cmd = %d\n",
size); size);
lbs_dbg_hex("SEND_SLEEPC_CMD: Sleep confirm command", cmdptr, size); lbs_deb_hex(LBS_DEB_CMD, "sleep confirm command", cmdptr, size);
ret = priv->hw_host_to_card(priv, MVMS_CMD, cmdptr, size); ret = priv->hw_host_to_card(priv, MVMS_CMD, cmdptr, size);
priv->dnld_sent = DNLD_RES_RECEIVED; priv->dnld_sent = DNLD_RES_RECEIVED;
......
...@@ -431,7 +431,7 @@ static int wlan_ret_802_11_data_rate(wlan_private * priv, ...@@ -431,7 +431,7 @@ static int wlan_ret_802_11_data_rate(wlan_private * priv,
lbs_deb_enter(LBS_DEB_CMD); lbs_deb_enter(LBS_DEB_CMD);
lbs_dbg_hex("DATA_RATE_RESP: data_rate- ", (u8 *) pdatarate, lbs_deb_hex(LBS_DEB_CMD, "DATA_RATE_RESP: data_rate- ", (u8 *) pdatarate,
sizeof(struct cmd_ds_802_11_data_rate)); sizeof(struct cmd_ds_802_11_data_rate));
/* FIXME: get actual rates FW can do if this command actually returns /* 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,7 +512,7 @@ static int wlan_ret_802_11_eeprom_access(wlan_private * priv,
memcpy(&pbuf->value, (u8 *) & resp->params.rdeeprom.value, memcpy(&pbuf->value, (u8 *) & resp->params.rdeeprom.value,
le16_to_cpu(resp->params.rdeeprom.bytecount)); le16_to_cpu(resp->params.rdeeprom.bytecount));
lbs_dbg_hex("adapter", (char *)&pbuf->value, lbs_deb_hex(LBS_DEB_CMD, "adapter", (char *)&pbuf->value,
le16_to_cpu(resp->params.rdeeprom.bytecount)); le16_to_cpu(resp->params.rdeeprom.bytecount));
} }
return 0; return 0;
...@@ -758,7 +758,7 @@ int libertas_process_rx_command(wlan_private * priv) ...@@ -758,7 +758,7 @@ int libertas_process_rx_command(wlan_private * priv)
} }
resp = (struct cmd_ds_command *)(adapter->cur_cmd->bufvirtualaddr); resp = (struct cmd_ds_command *)(adapter->cur_cmd->bufvirtualaddr);
lbs_dbg_hex("CMD_RESP:", adapter->cur_cmd->bufvirtualaddr, lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", adapter->cur_cmd->bufvirtualaddr,
priv->upld_len); priv->upld_len);
respcmd = le16_to_cpu(resp->command); respcmd = le16_to_cpu(resp->command);
......
...@@ -43,43 +43,43 @@ ...@@ -43,43 +43,43 @@
extern unsigned int libertas_debug; extern unsigned int libertas_debug;
#ifdef DEBUG #ifdef DEBUG
#define LBS_DEB_LL(grp, fmt, args...) \ #define LBS_DEB_LL(grp, grpnam, fmt, args...) \
do { if ((libertas_debug & (grp)) == (grp)) \ do { if ((libertas_debug & (grp)) == (grp)) \
printk(KERN_DEBUG DRV_NAME "%s: " fmt, \ printk(KERN_DEBUG DRV_NAME grpnam "%s: " fmt, \
in_interrupt() ? " (INT)" : "", ## args); } while (0) in_interrupt() ? " (INT)" : "", ## args); } while (0)
#else #else
#define LBS_DEB_LL(grp, fmt, args...) do {} while (0) #define LBS_DEB_LL(grp, grpnam, fmt, args...) do {} while (0)
#endif #endif
#define lbs_deb_enter(grp) \ #define lbs_deb_enter(grp) \
LBS_DEB_LL(grp | LBS_DEB_ENTER, "%s():%d enter\n", __FUNCTION__, __LINE__); LBS_DEB_LL(grp | LBS_DEB_ENTER, " enter", "%s():%d\n", __FUNCTION__, __LINE__);
#define lbs_deb_enter_args(grp, fmt, args...) \ #define lbs_deb_enter_args(grp, fmt, args...) \
LBS_DEB_LL(grp | LBS_DEB_ENTER, "%s(" fmt "):%d\n", __FUNCTION__, ## args, __LINE__); LBS_DEB_LL(grp | LBS_DEB_ENTER, " enter", "%s(" fmt "):%d\n", __FUNCTION__, ## args, __LINE__);
#define lbs_deb_leave(grp) \ #define lbs_deb_leave(grp) \
LBS_DEB_LL(grp | LBS_DEB_LEAVE, "%s():%d leave\n", __FUNCTION__, __LINE__); LBS_DEB_LL(grp | LBS_DEB_LEAVE, " leave", "%s():%d\n", __FUNCTION__, __LINE__);
#define lbs_deb_leave_args(grp, fmt, args...) \ #define lbs_deb_leave_args(grp, fmt, args...) \
LBS_DEB_LL(grp | LBS_DEB_LEAVE, "%s():%d leave, " fmt "\n", \ LBS_DEB_LL(grp | LBS_DEB_LEAVE, " leave", "%s():%d, " fmt "\n", \
__FUNCTION__, __LINE__, ##args); __FUNCTION__, __LINE__, ##args);
#define lbs_deb_main(fmt, args...) LBS_DEB_LL(LBS_DEB_MAIN, fmt, ##args) #define lbs_deb_main(fmt, args...) LBS_DEB_LL(LBS_DEB_MAIN, " main", fmt, ##args)
#define lbs_deb_net(fmt, args...) LBS_DEB_LL(LBS_DEB_NET, fmt, ##args) #define lbs_deb_net(fmt, args...) LBS_DEB_LL(LBS_DEB_NET, " net", fmt, ##args)
#define lbs_deb_mesh(fmt, args...) LBS_DEB_LL(LBS_DEB_MESH, fmt, ##args) #define lbs_deb_mesh(fmt, args...) LBS_DEB_LL(LBS_DEB_MESH, " mesh", fmt, ##args)
#define lbs_deb_wext(fmt, args...) LBS_DEB_LL(LBS_DEB_WEXT, fmt, ##args) #define lbs_deb_wext(fmt, args...) LBS_DEB_LL(LBS_DEB_WEXT, " wext", fmt, ##args)
#define lbs_deb_ioctl(fmt, args...) LBS_DEB_LL(LBS_DEB_IOCTL, fmt, ##args) #define lbs_deb_ioctl(fmt, args...) LBS_DEB_LL(LBS_DEB_IOCTL, " ioctl", fmt, ##args)
#define lbs_deb_scan(fmt, args...) LBS_DEB_LL(LBS_DEB_SCAN, fmt, ##args) #define lbs_deb_scan(fmt, args...) LBS_DEB_LL(LBS_DEB_SCAN, " scan", fmt, ##args)
#define lbs_deb_assoc(fmt, args...) LBS_DEB_LL(LBS_DEB_ASSOC, fmt, ##args) #define lbs_deb_assoc(fmt, args...) LBS_DEB_LL(LBS_DEB_ASSOC, " assoc", fmt, ##args)
#define lbs_deb_join(fmt, args...) LBS_DEB_LL(LBS_DEB_JOIN, fmt, ##args) #define lbs_deb_join(fmt, args...) LBS_DEB_LL(LBS_DEB_JOIN, " join", fmt, ##args)
#define lbs_deb_11d(fmt, args...) LBS_DEB_LL(LBS_DEB_11D, fmt, ##args) #define lbs_deb_11d(fmt, args...) LBS_DEB_LL(LBS_DEB_11D, " 11d", fmt, ##args)
#define lbs_deb_debugfs(fmt, args...) LBS_DEB_LL(LBS_DEB_DEBUGFS, fmt, ##args) #define lbs_deb_debugfs(fmt, args...) LBS_DEB_LL(LBS_DEB_DEBUGFS, " debugfs", fmt, ##args)
#define lbs_deb_ethtool(fmt, args...) LBS_DEB_LL(LBS_DEB_ETHTOOL, fmt, ##args) #define lbs_deb_ethtool(fmt, args...) LBS_DEB_LL(LBS_DEB_ETHTOOL, " ethtool", fmt, ##args)
#define lbs_deb_host(fmt, args...) LBS_DEB_LL(LBS_DEB_HOST, fmt, ##args) #define lbs_deb_host(fmt, args...) LBS_DEB_LL(LBS_DEB_HOST, " host", fmt, ##args)
#define lbs_deb_cmd(fmt, args...) LBS_DEB_LL(LBS_DEB_CMD, fmt, ##args) #define lbs_deb_cmd(fmt, args...) LBS_DEB_LL(LBS_DEB_CMD, " cmd", fmt, ##args)
#define lbs_deb_rx(fmt, args...) LBS_DEB_LL(LBS_DEB_RX, fmt, ##args) #define lbs_deb_rx(fmt, args...) LBS_DEB_LL(LBS_DEB_RX, " rx", fmt, ##args)
#define lbs_deb_tx(fmt, args...) LBS_DEB_LL(LBS_DEB_TX, fmt, ##args) #define lbs_deb_tx(fmt, args...) LBS_DEB_LL(LBS_DEB_TX, " tx", fmt, ##args)
#define lbs_deb_fw(fmt, args...) LBS_DEB_LL(LBS_DEB_FW, fmt, ##args) #define lbs_deb_fw(fmt, args...) LBS_DEB_LL(LBS_DEB_FW, " fw", fmt, ##args)
#define lbs_deb_usb(fmt, args...) LBS_DEB_LL(LBS_DEB_USB, fmt, ##args) #define lbs_deb_usb(fmt, args...) LBS_DEB_LL(LBS_DEB_USB, " usb", fmt, ##args)
#define lbs_deb_usbd(dev, fmt, args...) LBS_DEB_LL(LBS_DEB_USB, "%s:" fmt, (dev)->bus_id, ##args) #define lbs_deb_usbd(dev, fmt, args...) LBS_DEB_LL(LBS_DEB_USB, " usbd", "%s:" fmt, (dev)->bus_id, ##args)
#define lbs_deb_cs(fmt, args...) LBS_DEB_LL(LBS_DEB_CS, fmt, ##args) #define lbs_deb_cs(fmt, args...) LBS_DEB_LL(LBS_DEB_CS, " cs", fmt, ##args)
#define lbs_deb_thread(fmt, args...) LBS_DEB_LL(LBS_DEB_THREAD, fmt, ##args) #define lbs_deb_thread(fmt, args...) LBS_DEB_LL(LBS_DEB_THREAD, " thread", fmt, ##args)
#define lbs_pr_info(format, args...) \ #define lbs_pr_info(format, args...) \
printk(KERN_INFO DRV_NAME": " format, ## args) printk(KERN_INFO DRV_NAME": " format, ## args)
...@@ -89,22 +89,28 @@ do { if ((libertas_debug & (grp)) == (grp)) \ ...@@ -89,22 +89,28 @@ do { if ((libertas_debug & (grp)) == (grp)) \
printk(KERN_ALERT DRV_NAME": " format, ## args) printk(KERN_ALERT DRV_NAME": " format, ## args)
#ifdef DEBUG #ifdef DEBUG
static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len) static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, int len)
{ {
int i = 0; int i = 0;
if (!(libertas_debug & LBS_DEB_HEX)) if (len &&
return; (libertas_debug & LBS_DEB_HEX) &&
(libertas_debug & grp))
printk(KERN_DEBUG "%s: ", prompt); {
for (i = 1; i <= len; i++) { for (i = 1; i <= len; i++) {
printk("%02x ", (u8) * buf); if ((i & 0xf) == 1) {
buf++; if (i != 1)
printk("\n");
printk(DRV_NAME " %s: ", prompt);
}
printk("%02x ", (u8) * buf);
buf++;
}
printk("\n");
} }
printk("\n");
} }
#else #else
#define lbs_dbg_hex(x,y,z) do {} while (0) #define lbs_deb_hex(grp,prompt,buf,len) do {} while (0)
#endif #endif
......
...@@ -51,9 +51,9 @@ static int get_common_rates(wlan_adapter * adapter, u8 * rates, u16 *rates_size) ...@@ -51,9 +51,9 @@ static int get_common_rates(wlan_adapter * adapter, u8 * rates, u16 *rates_size)
} }
} }
lbs_dbg_hex("rate1 (AP) rates:", rates, *rates_size); lbs_deb_hex(LBS_DEB_JOIN, "AP rates ", rates, *rates_size);
lbs_dbg_hex("rate2 (Card) rates:", card_rates, num_card_rates); lbs_deb_hex(LBS_DEB_JOIN, "card rates ", card_rates, num_card_rates);
lbs_dbg_hex("Common rates:", tmp, tmp_size); lbs_deb_hex(LBS_DEB_JOIN, "common rates", tmp, tmp_size);
lbs_deb_join("Tx datarate is currently 0x%X\n", adapter->cur_rate); lbs_deb_join("Tx datarate is currently 0x%X\n", adapter->cur_rate);
if (!adapter->auto_rate) { if (!adapter->auto_rate) {
...@@ -426,7 +426,7 @@ int libertas_cmd_80211_associate(wlan_private * priv, ...@@ -426,7 +426,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
tmplen = (u16) assoc_req->wpa_ie[1]; tmplen = (u16) assoc_req->wpa_ie[1];
rsn->header.len = cpu_to_le16(tmplen); rsn->header.len = cpu_to_le16(tmplen);
memcpy(rsn->rsnie, &assoc_req->wpa_ie[2], tmplen); memcpy(rsn->rsnie, &assoc_req->wpa_ie[2], tmplen);
lbs_dbg_hex("ASSOC_CMD: RSN IE", (u8 *) rsn, lbs_deb_hex(LBS_DEB_JOIN, "ASSOC_CMD: RSN IE", (u8 *) rsn,
sizeof(rsn->header) + tmplen); sizeof(rsn->header) + tmplen);
pos += sizeof(rsn->header) + tmplen; pos += sizeof(rsn->header) + tmplen;
} }
...@@ -711,7 +711,7 @@ int libertas_ret_80211_associate(wlan_private * priv, ...@@ -711,7 +711,7 @@ int libertas_ret_80211_associate(wlan_private * priv,
goto done; goto done;
} }
lbs_dbg_hex("ASSOC_RESP:", (void *)&resp->params, lbs_deb_hex(LBS_DEB_JOIN, "ASSOC_RESP", (void *)&resp->params,
le16_to_cpu(resp->size) - S_DS_GEN); le16_to_cpu(resp->size) - S_DS_GEN);
/* Send a Media Connected event, according to the Spec */ /* Send a Media Connected event, according to the Spec */
......
...@@ -556,9 +556,9 @@ static int libertas_set_mac_address(struct net_device *dev, void *addr) ...@@ -556,9 +556,9 @@ static int libertas_set_mac_address(struct net_device *dev, void *addr)
memset(adapter->current_addr, 0, ETH_ALEN); memset(adapter->current_addr, 0, ETH_ALEN);
/* dev->dev_addr is 8 bytes */ /* dev->dev_addr is 8 bytes */
lbs_dbg_hex("dev->dev_addr:", dev->dev_addr, ETH_ALEN); lbs_deb_hex(LBS_DEB_NET, "dev->dev_addr", dev->dev_addr, ETH_ALEN);
lbs_dbg_hex("addr:", phwaddr->sa_data, ETH_ALEN); lbs_deb_hex(LBS_DEB_NET, "addr", phwaddr->sa_data, ETH_ALEN);
memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN); memcpy(adapter->current_addr, phwaddr->sa_data, ETH_ALEN);
ret = libertas_prepare_and_send_command(priv, CMD_802_11_MAC_ADDRESS, 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,7 +571,7 @@ static int libertas_set_mac_address(struct net_device *dev, void *addr)
goto done; goto done;
} }
lbs_dbg_hex("adapter->macaddr:", adapter->current_addr, ETH_ALEN); lbs_deb_hex(LBS_DEB_NET, "adapter->macaddr", adapter->current_addr, ETH_ALEN);
memcpy(dev->dev_addr, adapter->current_addr, ETH_ALEN); memcpy(dev->dev_addr, adapter->current_addr, ETH_ALEN);
if (priv->mesh_dev) if (priv->mesh_dev)
memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, ETH_ALEN); memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, ETH_ALEN);
......
...@@ -182,7 +182,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb) ...@@ -182,7 +182,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)
else else
UNSET_MESH_FRAME(skb); UNSET_MESH_FRAME(skb);
lbs_dbg_hex("RX Data: Before chop rxpd", skb->data, lbs_deb_hex(LBS_DEB_RX, "RX Data: Before chop rxpd", skb->data,
min_t(unsigned int, skb->len, 100)); min_t(unsigned int, skb->len, 100));
if (skb->len < (ETH_HLEN + 8 + sizeof(struct rxpd))) { 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,9 +206,9 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)
lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n", lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n",
skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
lbs_dbg_hex("RX Data: Dest", p_rx_pkt->eth803_hdr.dest_addr, lbs_deb_hex(LBS_DEB_RX, "RX Data: Dest", p_rx_pkt->eth803_hdr.dest_addr,
sizeof(p_rx_pkt->eth803_hdr.dest_addr)); sizeof(p_rx_pkt->eth803_hdr.dest_addr));
lbs_dbg_hex("RX Data: Src", p_rx_pkt->eth803_hdr.src_addr, lbs_deb_hex(LBS_DEB_RX, "RX Data: Src", p_rx_pkt->eth803_hdr.src_addr,
sizeof(p_rx_pkt->eth803_hdr.src_addr)); sizeof(p_rx_pkt->eth803_hdr.src_addr));
if (memcmp(&p_rx_pkt->rfc1042_hdr, if (memcmp(&p_rx_pkt->rfc1042_hdr,
...@@ -240,7 +240,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb) ...@@ -240,7 +240,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)
*/ */
hdrchop = (u8 *) p_ethhdr - (u8 *) p_rx_pkt; hdrchop = (u8 *) p_ethhdr - (u8 *) p_rx_pkt;
} else { } else {
lbs_dbg_hex("RX Data: LLC/SNAP", lbs_deb_hex(LBS_DEB_RX, "RX Data: LLC/SNAP",
(u8 *) & p_rx_pkt->rfc1042_hdr, (u8 *) & p_rx_pkt->rfc1042_hdr,
sizeof(p_rx_pkt->rfc1042_hdr)); sizeof(p_rx_pkt->rfc1042_hdr));
...@@ -336,7 +336,7 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) ...@@ -336,7 +336,7 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
p_rx_pkt = (struct rx80211packethdr *) skb->data; p_rx_pkt = (struct rx80211packethdr *) skb->data;
prxpd = &p_rx_pkt->rx_pd; prxpd = &p_rx_pkt->rx_pd;
// lbs_dbg_hex("RX Data: Before chop rxpd", skb->data, min(skb->len, 100)); // lbs_deb_hex(LBS_DEB_RX, "RX Data: Before chop rxpd", skb->data, min(skb->len, 100));
if (skb->len < (ETH_HLEN + 8 + sizeof(struct rxpd))) { if (skb->len < (ETH_HLEN + 8 + sizeof(struct rxpd))) {
lbs_deb_rx("rx err: frame received wit bad length\n"); 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,8 +385,6 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
radiotap_hdr.rx_flags |= IEEE80211_RADIOTAP_F_RX_BADFCS; radiotap_hdr.rx_flags |= IEEE80211_RADIOTAP_F_RX_BADFCS;
//memset(radiotap_hdr.pad, 0x11, IEEE80211_RADIOTAP_HDRLEN - 18); //memset(radiotap_hdr.pad, 0x11, IEEE80211_RADIOTAP_HDRLEN - 18);
// lbs_dbg_hex1("RX radiomode packet BEF: ", skb->data, min(skb->len, 100));
/* chop the rxpd */ /* chop the rxpd */
skb_pull(skb, sizeof(struct rxpd)); skb_pull(skb, sizeof(struct rxpd));
...@@ -404,7 +402,6 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) ...@@ -404,7 +402,6 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
rx_radiotap_hdr)); rx_radiotap_hdr));
memcpy(pradiotap_hdr, &radiotap_hdr, memcpy(pradiotap_hdr, &radiotap_hdr,
sizeof(struct rx_radiotap_hdr)); sizeof(struct rx_radiotap_hdr));
//lbs_dbg_hex1("RX radiomode packet AFT: ", skb->data, min(skb->len, 100));
break; break;
default: default:
......
...@@ -867,7 +867,7 @@ void wlan_ret_802_11_scan_get_tlv_ptrs(struct mrvlietypes_data * ptlv, ...@@ -867,7 +867,7 @@ void wlan_ret_802_11_scan_get_tlv_ptrs(struct mrvlietypes_data * ptlv,
*ptsftlv = NULL; *ptsftlv = NULL;
lbs_deb_scan("SCAN_RESP: tlvbufsize = %d\n", tlvbufsize); lbs_deb_scan("SCAN_RESP: tlvbufsize = %d\n", tlvbufsize);
lbs_dbg_hex("SCAN_RESP: TLV Buf", (u8 *) ptlv, tlvbufsize); lbs_deb_hex(LBS_DEB_SCAN, "SCAN_RESP: TLV Buf", (u8 *) ptlv, tlvbufsize);
while (tlvbufleft >= sizeof(struct mrvlietypesheader)) { while (tlvbufleft >= sizeof(struct mrvlietypesheader)) {
tlvtype = le16_to_cpu(pcurrenttlv->header.type); tlvtype = le16_to_cpu(pcurrenttlv->header.type);
...@@ -979,7 +979,7 @@ static int libertas_process_bss(struct bss_descriptor * bss, ...@@ -979,7 +979,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
/* rest of the current buffer are IE's */ /* rest of the current buffer are IE's */
lbs_deb_scan("process_bss: IE length for this AP = %zd\n", end - pos); lbs_deb_scan("process_bss: IE length for this AP = %zd\n", end - pos);
lbs_dbg_hex("process_bss: IE info", pos, end - pos); lbs_deb_hex(LBS_DEB_SCAN, "process_bss: IE info", pos, end - pos);
/* process variable IE */ /* process variable IE */
while (pos <= end - 2) { while (pos <= end - 2) {
...@@ -1055,7 +1055,7 @@ static int libertas_process_bss(struct bss_descriptor * bss, ...@@ -1055,7 +1055,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
memcpy(&bss->countryinfo, memcpy(&bss->countryinfo,
pcountryinfo, pcountryinfo->len + 2); pcountryinfo, pcountryinfo->len + 2);
lbs_dbg_hex("process_bss: 11D- CountryInfo:", lbs_deb_hex(LBS_DEB_SCAN, "process_bss: 11d countryinfo",
(u8 *) pcountryinfo, (u8 *) pcountryinfo,
(u32) (pcountryinfo->len + 2)); (u32) (pcountryinfo->len + 2));
break; break;
...@@ -1085,7 +1085,7 @@ static int libertas_process_bss(struct bss_descriptor * bss, ...@@ -1085,7 +1085,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
bss->wpa_ie_len = min(elem->len + 2, bss->wpa_ie_len = min(elem->len + 2,
MAX_WPA_IE_LEN); MAX_WPA_IE_LEN);
memcpy(bss->wpa_ie, elem, bss->wpa_ie_len); memcpy(bss->wpa_ie, elem, bss->wpa_ie_len);
lbs_dbg_hex("process_bss: WPA IE", bss->wpa_ie, lbs_deb_hex(LBS_DEB_SCAN, "process_bss: WPA IE", bss->wpa_ie,
elem->len); elem->len);
} else if (elem->len >= MARVELL_MESH_IE_LENGTH && } else if (elem->len >= MARVELL_MESH_IE_LENGTH &&
elem->data[0] == 0x00 && elem->data[0] == 0x00 &&
...@@ -1099,7 +1099,7 @@ static int libertas_process_bss(struct bss_descriptor * bss, ...@@ -1099,7 +1099,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
case MFIE_TYPE_RSN: case MFIE_TYPE_RSN:
bss->rsn_ie_len = min(elem->len + 2, MAX_WPA_IE_LEN); bss->rsn_ie_len = min(elem->len + 2, MAX_WPA_IE_LEN);
memcpy(bss->rsn_ie, elem, bss->rsn_ie_len); memcpy(bss->rsn_ie, elem, bss->rsn_ie_len);
lbs_dbg_hex("process_bss: RSN_IE", bss->rsn_ie, elem->len); lbs_deb_hex(LBS_DEB_SCAN, "process_bss: RSN_IE", bss->rsn_ie, elem->len);
break; break;
default: default:
...@@ -1154,7 +1154,7 @@ struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter, ...@@ -1154,7 +1154,7 @@ struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter,
if (!bssid) if (!bssid)
return NULL; return NULL;
lbs_dbg_hex("libertas_find_BSSID_in_list: looking for ", lbs_deb_hex(LBS_DEB_SCAN, "looking for",
bssid, ETH_ALEN); bssid, ETH_ALEN);
/* Look through the scan table for a compatible match. The loop will /* Look through the scan table for a compatible match. The loop will
......
...@@ -116,7 +116,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb) ...@@ -116,7 +116,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb)
else else
memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr, ETH_ALEN); memcpy(plocaltxpd->tx_dest_addr_high, p802x_hdr, ETH_ALEN);
lbs_dbg_hex("txpd", (u8 *) plocaltxpd, sizeof(struct txpd)); lbs_deb_hex(LBS_DEB_TX, "txpd", (u8 *) plocaltxpd, sizeof(struct txpd));
if (IS_MESH_FRAME(skb)) { if (IS_MESH_FRAME(skb)) {
plocaltxpd->tx_control |= cpu_to_le32(TxPD_MESH_FRAME); plocaltxpd->tx_control |= cpu_to_le32(TxPD_MESH_FRAME);
...@@ -126,7 +126,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb) ...@@ -126,7 +126,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb)
ptr += sizeof(struct txpd); ptr += sizeof(struct txpd);
lbs_dbg_hex("Tx Data", (u8 *) p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length)); lbs_deb_hex(LBS_DEB_TX, "Tx Data", (u8 *) p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length));
memcpy(ptr, p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length)); memcpy(ptr, p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length));
ret = priv->hw_host_to_card(priv, MVMS_DAT, ret = priv->hw_host_to_card(priv, MVMS_DAT,
priv->adapter->tmptxbuf, priv->adapter->tmptxbuf,
...@@ -218,7 +218,7 @@ int libertas_process_tx(wlan_private * priv, struct sk_buff *skb) ...@@ -218,7 +218,7 @@ int libertas_process_tx(wlan_private * priv, struct sk_buff *skb)
int ret = -1; int ret = -1;
lbs_deb_enter(LBS_DEB_TX); lbs_deb_enter(LBS_DEB_TX);
lbs_dbg_hex("TX Data", skb->data, min_t(unsigned int, skb->len, 100)); lbs_deb_hex(LBS_DEB_TX, "TX Data", skb->data, min_t(unsigned int, skb->len, 100));
if (priv->dnld_sent) { if (priv->dnld_sent) {
lbs_pr_alert( "TX error: dnld_sent = %d, not sending\n", lbs_pr_alert( "TX error: dnld_sent = %d, not sending\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册