Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266625
b: refs/heads/master
c: ef09410
h: refs/heads/master
i:
  266623: ec94e2f
v: v3
  • Loading branch information
Kalle Valo committed Sep 28, 2011
1 parent 52c5e8a commit 8c8a3a3
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 23 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: 9a7308341b71f3c5e88e6a30f9d6a1cfb3bc2b4f
refs/heads/master: ef094103233344271990d15045d6a776386c3784
14 changes: 8 additions & 6 deletions trunk/drivers/net/wireless/ath/ath6kl/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ enum ath6kl_war {
})

static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
const char *msg, const void *buf,
size_t len)
const char *msg, const char *prefix,
const void *buf, size_t len)
{
if (debug_mask & mask) {
ath6kl_dbg(mask, "%s\n", msg);
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len);
if (msg)
ath6kl_dbg(mask, "%s\n", msg);

print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len);
}
}

Expand All @@ -95,8 +97,8 @@ static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask,
}

static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
const char *msg, const void *buf,
size_t len)
const char *msg, const char *prefix,
const void *buf, size_t len)
{
}

Expand Down
27 changes: 14 additions & 13 deletions trunk/drivers/net/wireless/ath/ath6kl/htc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,9 +1192,9 @@ static void htc_ctrl_rx(struct htc_target *context, struct htc_packet *packets)
packets->act_len + HTC_HDR_LENGTH);

ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES,
"Unexpected ENDPOINT 0 Message",
packets->buf - HTC_HDR_LENGTH,
packets->act_len + HTC_HDR_LENGTH);
"Unexpected ENDPOINT 0 Message", "",
packets->buf - HTC_HDR_LENGTH,
packets->act_len + HTC_HDR_LENGTH);
}

htc_reclaim_rxbuf(context, packets, &context->endpoint[0]);
Expand Down Expand Up @@ -1328,7 +1328,7 @@ static int htc_parse_trailer(struct htc_target *target,
memcpy((u8 *)&next_lk_ahds[0], lk_ahd->lk_ahd, 4);

ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Next Look Ahead",
next_lk_ahds, 4);
"", next_lk_ahds, 4);

*n_lk_ahds = 1;
}
Expand All @@ -1347,7 +1347,7 @@ static int htc_parse_trailer(struct htc_target *target,
(struct htc_bundle_lkahd_rpt *) record_buf;

ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Bundle lk_ahd",
record_buf, record->len);
"", record_buf, record->len);

for (i = 0; i < len; i++) {
memcpy((u8 *)&next_lk_ahds[i],
Expand Down Expand Up @@ -1380,7 +1380,8 @@ static int htc_proc_trailer(struct htc_target *target,

ath6kl_dbg(ATH6KL_DBG_HTC_RECV, "+htc_proc_trailer (len:%d)\n", len);

ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Recv Trailer", buf, len);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Recv Trailer", "",
buf, len);

orig_buf = buf;
orig_len = len;
Expand Down Expand Up @@ -1418,7 +1419,7 @@ static int htc_proc_trailer(struct htc_target *target,

if (status)
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "BAD Recv Trailer",
orig_buf, orig_len);
"", orig_buf, orig_len);

return status;
}
Expand All @@ -1435,8 +1436,8 @@ static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
if (n_lkahds != NULL)
*n_lkahds = 0;

ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "HTC Recv PKT", packet->buf,
packet->act_len);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "HTC Recv PKT", "htc ",
packet->buf, packet->act_len);

/*
* NOTE: we cannot assume the alignment of buf, so we use the safe
Expand Down Expand Up @@ -1480,9 +1481,9 @@ static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
ath6kl_err("%s(): lk_ahd mismatch! (pPkt:0x%p flags:0x%X)\n",
__func__, packet, packet->info.rx.rx_flags);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Expected Message lk_ahd",
&packet->info.rx.exp_hdr, 4);
"", &packet->info.rx.exp_hdr, 4);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Current Frame Header",
(u8 *)&lk_ahd, sizeof(lk_ahd));
"", (u8 *)&lk_ahd, sizeof(lk_ahd));
status = -ENOMEM;
goto fail_rx;
}
Expand Down Expand Up @@ -1518,12 +1519,12 @@ static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
fail_rx:
if (status)
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "BAD HTC Recv PKT",
packet->buf,
"", packet->buf,
packet->act_len < 256 ? packet->act_len : 256);
else {
if (packet->act_len > 0)
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES,
"HTC - Application Msg",
"HTC - Application Msg", "",
packet->buf, packet->act_len);
}

Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/net/wireless/ath/ath6kl/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
set_htc_pkt_info(&cookie->htc_pkt, cookie, skb->data, skb->len,
eid, htc_tag);

ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, skb->data, skb->len);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "tx ",
skb->data, skb->len);

/*
* HTC interface is asynchronous, if this fails, cleanup will
Expand Down Expand Up @@ -1068,7 +1069,8 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
skb_put(skb, packet->act_len + HTC_HDR_LENGTH);
skb_pull(skb, HTC_HDR_LENGTH);

ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, skb->data, skb->len);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ",
skb->data, skb->len);

skb->dev = ar->net_dev;

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/ath/ath6kl/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2850,7 +2850,8 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)
len = skb->len;

ath6kl_dbg(ATH6KL_DBG_WMI, "%s: wmi id: %d\n", __func__, id);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "msg payload ", datap, len);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "msg payload ", "wmi rx ",
datap, len);

switch (id) {
case WMI_GET_BITRATE_CMDID:
Expand Down

0 comments on commit 8c8a3a3

Please sign in to comment.