[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: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Holger Schurig
2007-08-02 11:53:06 -04:00
committed by David S. Miller
parent a9f38d023b
commit ece5619193
9 changed files with 105 additions and 102 deletions

View File

@@ -556,9 +556,9 @@ static int libertas_set_mac_address(struct net_device *dev, void *addr)
memset(adapter->current_addr, 0, ETH_ALEN);
/* 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);
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)
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);
if (priv->mesh_dev)
memcpy(priv->mesh_dev->dev_addr, adapter->current_addr, ETH_ALEN);