Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66461
b: refs/heads/master
c: ece5619
h: refs/heads/master
i:
  66459: aa55982
v: v3
  • Loading branch information
Holger Schurig authored and David S. Miller committed Oct 10, 2007
1 parent 60714e1 commit fb8fc7c
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 103 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9f38d023b65c9fe2602303c1101c868be4fcbcc
refs/heads/master: ece561919326236c7fb791a5e883f0eb76af029e
62 changes: 31 additions & 31 deletions trunk/drivers/net/wireless/libertas/11d.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,17 @@ static u8 wlan_channel_known_11d(u8 chan,
u8 nr_chan = parsed_region_chan->nr_chan;
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);

for (i = 0; i < nr_chan; i++) {
if (chan == chanpwr[i].chan) {
lbs_deb_11d("11D: Found Chan:%d\n", chan);
lbs_deb_11d("found chan %d\n", chan);
return 1;
}
}

lbs_deb_11d("11D: Not Find Chan:%d\n", chan);
lbs_deb_11d("chan %d not found\n", chan);
return 0;
}

Expand Down Expand Up @@ -174,8 +174,8 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
memcpy(domaininfo->countrycode, parsed_region_chan->countrycode,
COUNTRY_CODE_LEN);

lbs_deb_11d("11D:nrchan=%d\n", nr_chan);
lbs_dbg_hex("11D:parsed_region_chan:", (char *)parsed_region_chan,
lbs_deb_11d("nrchan %d\n", nr_chan);
lbs_deb_hex(LBS_DEB_11D, "parsed_region_chan", (char *)parsed_region_chan,
sizeof(struct parsed_region_chan_11d));

for (i = 0; i < nr_chan; i++) {
Expand Down Expand Up @@ -213,7 +213,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d
domaininfo->nr_subband = 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 +
sizeof(struct ieeetypes_subbandset) * nr_subband);
return 0;
Expand All @@ -233,13 +233,13 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
struct chan_freq_power *cfp;

if (region_chan == NULL) {
lbs_deb_11d("11D: region_chan is NULL\n");
lbs_deb_11d("region_chan is NULL\n");
return;
}

cfp = region_chan->CFP;
if (cfp == NULL) {
lbs_deb_11d("11D: cfp equal NULL \n");
lbs_deb_11d("cfp is NULL \n");
return;
}

Expand All @@ -248,19 +248,19 @@ static void wlan_generate_parsed_region_chan_11d(struct region_channel * region_
memcpy(parsed_region_chan->countrycode,
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);

for (i = 0; i < region_chan->nrcfp; i++, cfp++) {
parsed_region_chan->chanpwr[i].chan = cfp->channel;
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].pwr);
}
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;
}
Expand Down Expand Up @@ -336,7 +336,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
6. Others
*/

lbs_dbg_hex("CountryInfo:", (u8 *) countryinfo, 30);
lbs_deb_hex(LBS_DEB_11D, "countryinfo", (u8 *) countryinfo, 30);

if ((*(countryinfo->countrycode)) == 0
|| (countryinfo->len <= COUNTRY_CODE_LEN)) {
Expand All @@ -349,7 +349,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
wlan_region_2_code(countryinfo->countrycode);

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);

parsed_region_chan->band = band;
Expand All @@ -364,7 +364,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*

if (countryinfo->subband[j].firstchan <= lastchan) {
/*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);
continue;
}
Expand Down Expand Up @@ -393,7 +393,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
} else {
/*not supported and ignore the chan */
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);
}
}
Expand All @@ -405,7 +405,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset*
parsed_region_chan->nr_chan = idx;

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);

done:
Expand All @@ -427,10 +427,10 @@ u8 libertas_get_scan_type_11d(u8 chan,
lbs_deb_enter(LBS_DEB_11D);

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;
} 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);
Expand All @@ -456,15 +456,15 @@ static int set_domain_info_11d(wlan_private * priv)
int ret;

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;
}

ret = libertas_prepare_and_send_command(priv, CMD_802_11D_DOMAIN_INFO,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, 0, NULL);
if (ret)
lbs_deb_11d("11D: Fail to dnld domain Info\n");
lbs_deb_11d("fail to dnld domain info\n");

return ret;
}
Expand All @@ -486,7 +486,7 @@ int libertas_set_universaltable(wlan_private * priv, u8 band)

adapter->universal_channel[i].nrcfp =
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].CFP = channel_freq_power_UN_BG;
Expand Down Expand Up @@ -525,7 +525,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv,
if (cmdoption == CMD_ACT_GET) {
cmd->size =
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));
goto done;
}
Expand All @@ -551,7 +551,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv,
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:
lbs_deb_enter(LBS_DEB_11D);
Expand All @@ -575,13 +575,13 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv,

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));

nr_subband = (le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) /
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) {
lbs_deb_11d("Invalid Numrer of Subband returned!!\n");
Expand Down Expand Up @@ -623,7 +623,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
&adapter->parsed_region_chan);

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;
}

Expand All @@ -635,7 +635,7 @@ int libertas_parse_dnld_countryinfo_11d(wlan_private * priv,
ret = set_domain_info_11d(priv);

if (ret) {
lbs_deb_11d("11D: Err set domainInfo to FW\n");
lbs_deb_11d("error setting domain info\n");
goto done;
}
}
Expand All @@ -659,7 +659,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
u8 j;

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) {
/* update parsed_region_chan_11; dnld domaininf to FW */
Expand All @@ -668,7 +668,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
sizeof(adapter->region_channel[0]); 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);

if (!region_chan || !region_chan->valid
Expand All @@ -681,7 +681,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)

if (j >= sizeof(adapter->region_channel) /
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);
ret = -1;
goto done;
Expand All @@ -701,7 +701,7 @@ int libertas_create_dnld_countryinfo_11d(wlan_private * priv)
ret = set_domain_info_11d(priv);

if (ret) {
lbs_deb_11d("11D: Err set domainInfo to FW\n");
lbs_deb_11d("error setting domain info\n");
goto done;
}

Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/libertas/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ static int wlan_cmd_802_11_mac_address(wlan_private * priv,
if (cmd_action == CMD_ACT_SET) {
memcpy(cmd->params.macadd.macadd,
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;
Expand Down Expand Up @@ -815,11 +815,11 @@ static int wlan_cmd_bt_access(wlan_private * priv,
switch (cmd_action) {
case CMD_ACT_BT_ACCESS_ADD:
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;
case CMD_ACT_BT_ACCESS_DEL:
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;
case CMD_ACT_BT_ACCESS_LIST:
bt_access->id = cpu_to_le32(*(u32 *) pdata_buf);
Expand Down Expand Up @@ -993,8 +993,8 @@ static int DownloadcommandToStation(wlan_private * priv,
goto done;
}

lbs_deb_cmd("DNLD_CMD: Sent command 0x%x @ %lu\n", command, jiffies);
lbs_dbg_hex("DNLD_CMD: command", cmdnode->bufvirtualaddr, cmdsize);
lbs_deb_cmd("DNLD_CMD: sent command 0x%x, jiffies %lu\n", command, jiffies);
lbs_deb_hex(LBS_DEB_CMD, "command", cmdnode->bufvirtualaddr, cmdsize);

/* Setup the timer after transmit command */
if (command == CMD_802_11_SCAN || command == CMD_802_11_AUTHENTICATE
Expand Down Expand Up @@ -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",
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);
priv->dnld_sent = DNLD_RES_RECEIVED;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/libertas/cmdresp.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ static int wlan_ret_802_11_data_rate(wlan_private * priv,

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));

/* FIXME: get actual rates FW can do if this command actually returns
Expand Down Expand Up @@ -512,7 +512,7 @@ static int wlan_ret_802_11_eeprom_access(wlan_private * priv,

memcpy(&pbuf->value, (u8 *) & resp->params.rdeeprom.value,
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));
}
return 0;
Expand Down Expand Up @@ -758,7 +758,7 @@ int libertas_process_rx_command(wlan_private * priv)
}
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);

respcmd = le16_to_cpu(resp->command);
Expand Down
Loading

0 comments on commit fb8fc7c

Please sign in to comment.