aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/rx.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-08-02 11:53:06 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:53 -0400
commitece561919326236c7fb791a5e883f0eb76af029e (patch)
tree69d81daf8f8de4182ca89ab3b722defc585ffa80 /drivers/net/wireless/libertas/rx.c
parenta9f38d023b65c9fe2602303c1101c868be4fcbcc (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/rx.c')
-rw-r--r--drivers/net/wireless/libertas/rx.c13
1 files changed, 5 insertions, 8 deletions
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: