diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-08-02 11:53:06 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:53 -0400 |
commit | ece561919326236c7fb791a5e883f0eb76af029e (patch) | |
tree | 69d81daf8f8de4182ca89ab3b722defc585ffa80 /drivers/net/wireless/libertas/scan.c | |
parent | a9f38d023b65c9fe2602303c1101c868be4fcbcc (diff) |
[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>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 12 |
1 files changed, 6 insertions, 6 deletions
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 |