* [PATCH 1/4] ath6kl: merge htc debug levels
@ 2011-10-13 12:21 Kalle Valo
2011-10-13 12:21 ` [PATCH 2/4] ath6kl: cleanup htc debug messages Kalle Valo
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kalle Valo @ 2011-10-13 12:21 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless
It's not really necessary to have separate debug levels for htc tx and rx
so combine them.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/debug.c | 5 +-
drivers/net/wireless/ath/ath6kl/debug.h | 4 +
drivers/net/wireless/ath/ath6kl/hif.c | 6 +-
drivers/net/wireless/ath/ath6kl/htc.c | 84 ++++++++++++++++---------------
4 files changed, 50 insertions(+), 49 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index dd37785..e52f7e3 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -180,9 +180,10 @@ void dump_cred_dist_stats(struct htc_target *target)
list_for_each_entry(ep_list, &target->cred_dist_list, list)
dump_cred_dist(ep_list);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:%p dist:%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:%p dist:%p\n",
target->cred_dist_cntxt, NULL);
- ath6kl_dbg(ATH6KL_DBG_TRC, "credit distribution, total : %d, free : %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC,
+ "credit distribution, total : %d, free : %d\n",
target->cred_dist_cntxt->total_avail_credits,
target->cred_dist_cntxt->cur_free_credits);
}
diff --git a/drivers/net/wireless/ath/ath6kl/debug.h b/drivers/net/wireless/ath/ath6kl/debug.h
index 7d5323d..01f4015 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.h
+++ b/drivers/net/wireless/ath/ath6kl/debug.h
@@ -25,8 +25,8 @@ enum ATH6K_DEBUG_MASK {
ATH6KL_DBG_WLAN_TX = BIT(2), /* wlan tx */
ATH6KL_DBG_WLAN_RX = BIT(3), /* wlan rx */
ATH6KL_DBG_BMI = BIT(4), /* bmi tracing */
- ATH6KL_DBG_HTC_SEND = BIT(5), /* htc send */
- ATH6KL_DBG_HTC_RECV = BIT(6), /* htc recv */
+ ATH6KL_DBG_HTC = BIT(5),
+ /* hole */
ATH6KL_DBG_IRQ = BIT(7), /* interrupt processing */
ATH6KL_DBG_PM = BIT(8), /* power management */
ATH6KL_DBG_WLAN_NODE = BIT(9), /* general wlan node tracing */
diff --git a/drivers/net/wireless/ath/ath6kl/hif.c b/drivers/net/wireless/ath/ath6kl/hif.c
index 57c9aff..7cc6cec 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.c
+++ b/drivers/net/wireless/ath/ath6kl/hif.c
@@ -51,7 +51,7 @@ int ath6kl_hif_rw_comp_handler(void *context, int status)
{
struct htc_packet *packet = context;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"ath6kl_hif_rw_comp_handler (pkt:0x%p , status: %d\n",
packet, status);
@@ -119,7 +119,7 @@ int ath6kl_hif_poll_mboxmsg_rx(struct ath6kl_device *dev, u32 *lk_ahd,
/* delay a little */
mdelay(ATH6KL_TIME_QUANTUM);
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV, "retry mbox poll : %d\n", i);
+ ath6kl_dbg(ATH6KL_DBG_HTC, "retry mbox poll : %d\n", i);
}
if (i == 0) {
@@ -186,7 +186,7 @@ int ath6kl_hif_submit_scat_req(struct ath6kl_device *dev,
dev->ar->mbox_info.htc_addr;
}
- ath6kl_dbg((ATH6KL_DBG_HTC_RECV | ATH6KL_DBG_HTC_SEND),
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"ath6kl_hif_submit_scat_req, entries: %d, total len: %d mbox:0x%X (mode: %s : %s)\n",
scat_req->scat_entries, scat_req->len,
scat_req->addr, !read ? "async" : "sync",
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 9b8cb22..241a7ce 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -102,7 +102,7 @@ static void htc_tx_comp_update(struct htc_target *target,
packet->info.tx.cred_used;
endpoint->cred_dist.txq_depth = get_queue_depth(&endpoint->txq);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -118,7 +118,7 @@ static void htc_tx_complete(struct htc_endpoint *endpoint,
if (list_empty(txq))
return;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"send complete ep %d, (%d pkts)\n",
endpoint->eid, get_queue_depth(txq));
@@ -148,7 +148,7 @@ static void htc_async_tx_scat_complete(struct htc_target *target,
INIT_LIST_HEAD(&tx_compq);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_async_tx_scat_complete total len: %d entries: %d\n",
scat_req->len, scat_req->scat_entries);
@@ -190,12 +190,12 @@ static int ath6kl_htc_tx_issue(struct htc_target *target,
send_len = packet->act_len + HTC_HDR_LENGTH;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "%s: transmit len : %d (%s)\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "%s: transmit len : %d (%s)\n",
__func__, send_len, sync ? "sync" : "async");
padded_len = CALC_TXRX_PADDED_LEN(target, send_len);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"DevSendPacket, padded len: %d mbox:0x%X (mode:%s)\n",
padded_len,
target->dev->ar->mbox_info.htc_addr,
@@ -227,7 +227,7 @@ static int htc_check_credits(struct htc_target *target,
*req_cred = (len > target->tgt_cred_sz) ?
DIV_ROUND_UP(len, target->tgt_cred_sz) : 1;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "creds required:%d got:%d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "creds required:%d got:%d\n",
*req_cred, ep->cred_dist.credits);
if (ep->cred_dist.credits < *req_cred) {
@@ -237,7 +237,7 @@ static int htc_check_credits(struct htc_target *target,
/* Seek more credits */
ep->cred_dist.seek_cred = *req_cred - ep->cred_dist.credits;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &ep->cred_dist);
ath6k_seek_credits(target->cred_dist_cntxt, &ep->cred_dist);
@@ -245,7 +245,7 @@ static int htc_check_credits(struct htc_target *target,
ep->cred_dist.seek_cred = 0;
if (ep->cred_dist.credits < *req_cred) {
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"not enough credits for ep %d - leaving packet in queue\n",
eid);
return -EINVAL;
@@ -260,7 +260,7 @@ static int htc_check_credits(struct htc_target *target,
ep->cred_dist.seek_cred =
ep->cred_dist.cred_per_msg - ep->cred_dist.credits;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &ep->cred_dist);
ath6k_seek_credits(target->cred_dist_cntxt, &ep->cred_dist);
@@ -270,7 +270,7 @@ static int htc_check_credits(struct htc_target *target,
/* tell the target we need credits ASAP! */
*flags |= HTC_FLAGS_NEED_CREDIT_UPDATE;
ep->ep_st.cred_low_indicate += 1;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "host needs credits\n");
+ ath6kl_dbg(ATH6KL_DBG_HTC, "host needs credits\n");
}
}
@@ -295,7 +295,7 @@ static void ath6kl_htc_tx_pkts_get(struct htc_target *target,
packet = list_first_entry(&endpoint->txq, struct htc_packet,
list);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"got head pkt:0x%p , queue depth: %d\n",
packet, get_queue_depth(&endpoint->txq));
@@ -404,7 +404,7 @@ static int ath6kl_htc_tx_setup_scat_list(struct htc_target *target,
scat_req->len += len;
scat_req->scat_entries++;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"%d, adding pkt : 0x%p len:%d (remaining space:%d)\n",
i, packet, len, rem_scat);
}
@@ -455,12 +455,12 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
if (!scat_req) {
/* no scatter resources */
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"no more scatter resources\n");
break;
}
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "pkts to scatter: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "pkts to scatter: %d\n",
n_scat);
scat_req->len = 0;
@@ -479,7 +479,7 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
n_sent_bundle++;
tot_pkts_bundle += scat_req->scat_entries;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"send scatter total bytes: %d , entries: %d\n",
scat_req->len, scat_req->scat_entries);
ath6kl_hif_submit_scat_req(target->dev, scat_req, false);
@@ -490,7 +490,7 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
*sent_bundle = n_sent_bundle;
*n_bundle_pkts = tot_pkts_bundle;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "%s (sent:%d)\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "%s (sent:%d)\n",
__func__, n_sent_bundle);
return;
@@ -510,7 +510,7 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
if (endpoint->tx_proc_cnt > 1) {
endpoint->tx_proc_cnt--;
spin_unlock_bh(&target->tx_lock);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "htc_try_send (busy)\n");
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc_try_send (busy)\n");
return;
}
@@ -588,13 +588,13 @@ static bool ath6kl_htc_tx_try(struct htc_target *target,
overflow = true;
if (overflow)
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"ep %d, tx queue will overflow :%d , tx depth:%d, max:%d\n",
endpoint->eid, overflow, txq_depth,
endpoint->max_txq_depth);
if (overflow && ep_cb.tx_full) {
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"indicating overflowed tx packet: 0x%p\n", tx_pkt);
if (ep_cb.tx_full(endpoint->target, tx_pkt) ==
@@ -629,7 +629,7 @@ static void htc_chk_ep_txq(struct htc_target *target)
spin_lock_bh(&target->tx_lock);
if (!list_empty(&endpoint->txq)) {
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"ep %d has %d credits and %d packets in tx queue\n",
cred_dist->endpoint,
endpoint->cred_dist.credits,
@@ -736,7 +736,7 @@ int ath6kl_htc_tx(struct htc_target *target, struct htc_packet *packet)
struct htc_endpoint *endpoint;
struct list_head queue;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_tx: ep id: %d, buf: 0x%p, len: %d\n",
packet->endpoint, packet->buf, packet->act_len);
@@ -787,7 +787,7 @@ void ath6kl_htc_flush_txep(struct htc_target *target,
list_for_each_entry_safe(packet, tmp_pkt, &discard_q, list) {
packet->status = -ECANCELED;
list_del(&packet->list);
- ath6kl_dbg(ATH6KL_DBG_TRC,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"flushing tx pkt:0x%p, len:%d, ep:%d tag:0x%X\n",
packet, packet->act_len,
packet->endpoint, packet->info.tx.tag);
@@ -844,7 +844,7 @@ void ath6kl_htc_indicate_activity_change(struct htc_target *target,
endpoint->cred_dist.txq_depth =
get_queue_depth(&endpoint->txq);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -924,7 +924,7 @@ static int ath6kl_htc_rx_packet(struct htc_target *target,
return -ENOMEM;
}
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"dev_rx_pkt (0x%p : hdr:0x%X) padded len: %d mbox:0x%X (mode:%s)\n",
packet, packet->info.rx.exp_hdr,
padded_len, dev->ar->mbox_info.htc_addr, "sync");
@@ -1137,7 +1137,7 @@ static int ath6kl_htc_rx_alloc(struct htc_target *target,
}
endpoint->ep_st.rx_bundle_from_hdr += 1;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc hdr indicates :%d msg can be fetched as a bundle\n",
n_msg);
} else
@@ -1209,7 +1209,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
int tot_credits = 0, i;
bool dist = false;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_proc_cred_rpt, credit report entries:%d\n", n_entries);
spin_lock_bh(&target->tx_lock);
@@ -1223,7 +1223,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
endpoint = &target->endpoint[rpt->eid];
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, " ep %d got %d credits\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, " ep %d got %d credits\n",
rpt->eid, rpt->credits);
endpoint->ep_st.tx_cred_rpt += 1;
@@ -1264,7 +1264,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
tot_credits += rpt->credits;
}
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"report indicated %d credits to distribute\n",
tot_credits);
@@ -1273,7 +1273,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
* This was a credit return based on a completed send
* operations note, this is done with the lock held
*/
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -1320,7 +1320,7 @@ static int htc_parse_trailer(struct htc_target *target,
if ((lk_ahd->pre_valid == ((~lk_ahd->post_valid) & 0xFF))
&& next_lk_ahds) {
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"lk_ahd report found (pre valid:0x%X, post valid:0x%X)\n",
lk_ahd->pre_valid, lk_ahd->post_valid);
@@ -1378,7 +1378,7 @@ static int htc_proc_trailer(struct htc_target *target,
u8 *record_buf;
u8 *orig_buf;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV, "+htc_proc_trailer (len:%d)\n", len);
+ ath6kl_dbg(ATH6KL_DBG_HTC, "+htc_proc_trailer (len:%d)\n", len);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Recv Trailer", "",
buf, len);
@@ -1534,7 +1534,7 @@ fail_rx:
static void ath6kl_htc_rx_complete(struct htc_endpoint *endpoint,
struct htc_packet *packet)
{
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc calling ep %d recv callback on packet 0x%p\n",
endpoint->eid, packet);
endpoint->ep_cb.rx(endpoint->target, packet);
@@ -1571,7 +1571,7 @@ static int ath6kl_htc_rx_bundle(struct htc_target *target,
len = 0;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"%s(): (numpackets: %d , actual : %d)\n",
__func__, get_queue_depth(rxq), n_scat_pkt);
@@ -1897,7 +1897,7 @@ static struct htc_packet *htc_wait_for_ctrl_msg(struct htc_target *target)
HTC_TARGET_RESPONSE_TIMEOUT))
return NULL;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_wait_for_ctrl_msg: look_ahead : 0x%X\n", look_ahead);
htc_hdr = (struct htc_frame_hdr *)&look_ahead;
@@ -1962,7 +1962,7 @@ int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
depth = get_queue_depth(pkt_queue);
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_add_rxbuf_multiple: ep id: %d, cnt:%d, len: %d\n",
first_pkt->endpoint, depth, first_pkt->buf_len);
@@ -1988,7 +1988,7 @@ int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
/* check if we are blocked waiting for a new buffer */
if (target->rx_st_flags & HTC_RECV_WAIT_BUFFERS) {
if (target->ep_waiting == first_pkt->endpoint) {
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"receiver was blocked on ep:%d, unblocking.\n",
target->ep_waiting);
target->rx_st_flags &= ~HTC_RECV_WAIT_BUFFERS;
@@ -2023,7 +2023,7 @@ void ath6kl_htc_flush_rx_buf(struct htc_target *target)
&endpoint->rx_bufq, list) {
list_del(&packet->list);
spin_unlock_bh(&target->rx_lock);
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"flushing rx pkt:0x%p, len:%d, ep:%d\n",
packet, packet->buf_len,
packet->endpoint);
@@ -2047,7 +2047,7 @@ int ath6kl_htc_conn_service(struct htc_target *target,
unsigned int max_msg_sz = 0;
int status = 0;
- ath6kl_dbg(ATH6KL_DBG_TRC,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_conn_service, target:0x%p service id:0x%X\n",
target, conn_req->svc_id);
@@ -2220,7 +2220,7 @@ static void htc_setup_msg_bndl(struct htc_target *target)
target->msg_per_bndl_max = min(target->max_scat_entries,
target->msg_per_bndl_max);
- ath6kl_dbg(ATH6KL_DBG_TRC,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc bundling allowed. max msg per htc bundle: %d\n",
target->msg_per_bndl_max);
@@ -2230,7 +2230,7 @@ static void htc_setup_msg_bndl(struct htc_target *target)
target->max_tx_bndl_sz = min(HIF_MBOX0_EXT_WIDTH,
target->max_xfer_szper_scatreq);
- ath6kl_dbg(ATH6KL_DBG_ANY, "max recv: %d max send: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "max recv: %d max send: %d\n",
target->max_rx_bndl_sz, target->max_tx_bndl_sz);
if (target->max_tx_bndl_sz)
@@ -2284,7 +2284,7 @@ int ath6kl_htc_wait_target(struct htc_target *target)
target->tgt_creds = le16_to_cpu(rdy_msg->ver2_0_info.cred_cnt);
target->tgt_cred_sz = le16_to_cpu(rdy_msg->ver2_0_info.cred_sz);
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"target ready: credits: %d credit size: %d\n",
target->tgt_creds, target->tgt_cred_sz);
@@ -2299,7 +2299,7 @@ int ath6kl_htc_wait_target(struct htc_target *target)
target->msg_per_bndl_max = 0;
}
- ath6kl_dbg(ATH6KL_DBG_TRC, "using htc protocol version : %s (%d)\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "using htc protocol version : %s (%d)\n",
(target->htc_tgt_ver == HTC_VERSION_2P0) ? "2.0" : ">= 2.1",
target->htc_tgt_ver);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] ath6kl: cleanup htc debug messages
2011-10-13 12:21 [PATCH 1/4] ath6kl: merge htc debug levels Kalle Valo
@ 2011-10-13 12:21 ` Kalle Valo
2011-10-13 12:21 ` [PATCH 3/4] ath6kl: don't dump full htc packets Kalle Valo
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2011-10-13 12:21 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless
Unify debug message format and other minor changes.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/htc.c | 138 ++++++++++++++++-----------------
1 files changed, 67 insertions(+), 71 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 241a7ce..840f1b3 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -102,7 +102,7 @@ static void htc_tx_comp_update(struct htc_target *target,
packet->info.tx.cred_used;
endpoint->cred_dist.txq_depth = get_queue_depth(&endpoint->txq);
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc tx ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -119,7 +119,7 @@ static void htc_tx_complete(struct htc_endpoint *endpoint,
return;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "send complete ep %d, (%d pkts)\n",
+ "htc tx complete ep %d pkts %d\n",
endpoint->eid, get_queue_depth(txq));
ath6kl_tx_complete(endpoint->target->dev->ar, txq);
@@ -149,7 +149,7 @@ static void htc_async_tx_scat_complete(struct htc_target *target,
INIT_LIST_HEAD(&tx_compq);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_async_tx_scat_complete total len: %d entries: %d\n",
+ "htc tx scat complete len %d entries %d\n",
scat_req->len, scat_req->scat_entries);
if (scat_req->status)
@@ -190,16 +190,13 @@ static int ath6kl_htc_tx_issue(struct htc_target *target,
send_len = packet->act_len + HTC_HDR_LENGTH;
- ath6kl_dbg(ATH6KL_DBG_HTC, "%s: transmit len : %d (%s)\n",
- __func__, send_len, sync ? "sync" : "async");
-
padded_len = CALC_TXRX_PADDED_LEN(target, send_len);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "DevSendPacket, padded len: %d mbox:0x%X (mode:%s)\n",
- padded_len,
- target->dev->ar->mbox_info.htc_addr,
- sync ? "sync" : "async");
+ "htc tx issue len %d padded_len %d mbox 0x%X %s\n",
+ send_len, padded_len,
+ target->dev->ar->mbox_info.htc_addr,
+ sync ? "sync" : "async");
if (sync) {
status = hif_read_write_sync(target->dev->ar,
@@ -227,7 +224,7 @@ static int htc_check_credits(struct htc_target *target,
*req_cred = (len > target->tgt_cred_sz) ?
DIV_ROUND_UP(len, target->tgt_cred_sz) : 1;
- ath6kl_dbg(ATH6KL_DBG_HTC, "creds required:%d got:%d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds required %d got %d\n",
*req_cred, ep->cred_dist.credits);
if (ep->cred_dist.credits < *req_cred) {
@@ -237,7 +234,7 @@ static int htc_check_credits(struct htc_target *target,
/* Seek more credits */
ep->cred_dist.seek_cred = *req_cred - ep->cred_dist.credits;
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &ep->cred_dist);
ath6k_seek_credits(target->cred_dist_cntxt, &ep->cred_dist);
@@ -246,7 +243,7 @@ static int htc_check_credits(struct htc_target *target,
if (ep->cred_dist.credits < *req_cred) {
ath6kl_dbg(ATH6KL_DBG_HTC,
- "not enough credits for ep %d - leaving packet in queue\n",
+ "htc creds not enough credits for ep %d\n",
eid);
return -EINVAL;
}
@@ -260,7 +257,7 @@ static int htc_check_credits(struct htc_target *target,
ep->cred_dist.seek_cred =
ep->cred_dist.cred_per_msg - ep->cred_dist.credits;
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &ep->cred_dist);
ath6k_seek_credits(target->cred_dist_cntxt, &ep->cred_dist);
@@ -270,7 +267,7 @@ static int htc_check_credits(struct htc_target *target,
/* tell the target we need credits ASAP! */
*flags |= HTC_FLAGS_NEED_CREDIT_UPDATE;
ep->ep_st.cred_low_indicate += 1;
- ath6kl_dbg(ATH6KL_DBG_HTC, "host needs credits\n");
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds host needs credits\n");
}
}
@@ -296,7 +293,7 @@ static void ath6kl_htc_tx_pkts_get(struct htc_target *target,
list);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "got head pkt:0x%p , queue depth: %d\n",
+ "htc tx got packet 0x%p queue depth %d\n",
packet, get_queue_depth(&endpoint->txq));
len = CALC_TXRX_PADDED_LEN(target,
@@ -405,7 +402,7 @@ static int ath6kl_htc_tx_setup_scat_list(struct htc_target *target,
scat_req->len += len;
scat_req->scat_entries++;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "%d, adding pkt : 0x%p len:%d (remaining space:%d)\n",
+ "htc tx adding (%d) pkt 0x%p len %d remaining %d\n",
i, packet, len, rem_scat);
}
@@ -456,11 +453,11 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
if (!scat_req) {
/* no scatter resources */
ath6kl_dbg(ATH6KL_DBG_HTC,
- "no more scatter resources\n");
+ "htc tx no more scatter resources\n");
break;
}
- ath6kl_dbg(ATH6KL_DBG_HTC, "pkts to scatter: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc tx pkts to scatter: %d\n",
n_scat);
scat_req->len = 0;
@@ -480,7 +477,7 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
tot_pkts_bundle += scat_req->scat_entries;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "send scatter total bytes: %d , entries: %d\n",
+ "htc tx scatter bytes %d entries %d\n",
scat_req->len, scat_req->scat_entries);
ath6kl_hif_submit_scat_req(target->dev, scat_req, false);
@@ -490,8 +487,8 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
*sent_bundle = n_sent_bundle;
*n_bundle_pkts = tot_pkts_bundle;
- ath6kl_dbg(ATH6KL_DBG_HTC, "%s (sent:%d)\n",
- __func__, n_sent_bundle);
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc tx bundle sent %d pkts\n",
+ n_sent_bundle);
return;
}
@@ -510,7 +507,7 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
if (endpoint->tx_proc_cnt > 1) {
endpoint->tx_proc_cnt--;
spin_unlock_bh(&target->tx_lock);
- ath6kl_dbg(ATH6KL_DBG_HTC, "htc_try_send (busy)\n");
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc tx busy\n");
return;
}
@@ -589,14 +586,11 @@ static bool ath6kl_htc_tx_try(struct htc_target *target,
if (overflow)
ath6kl_dbg(ATH6KL_DBG_HTC,
- "ep %d, tx queue will overflow :%d , tx depth:%d, max:%d\n",
- endpoint->eid, overflow, txq_depth,
+ "htc tx overflow ep %d depth %d max %d\n",
+ endpoint->eid, txq_depth,
endpoint->max_txq_depth);
if (overflow && ep_cb.tx_full) {
- ath6kl_dbg(ATH6KL_DBG_HTC,
- "indicating overflowed tx packet: 0x%p\n", tx_pkt);
-
if (ep_cb.tx_full(endpoint->target, tx_pkt) ==
HTC_SEND_FULL_DROP) {
endpoint->ep_st.tx_dropped += 1;
@@ -630,7 +624,7 @@ static void htc_chk_ep_txq(struct htc_target *target)
spin_lock_bh(&target->tx_lock);
if (!list_empty(&endpoint->txq)) {
ath6kl_dbg(ATH6KL_DBG_HTC,
- "ep %d has %d credits and %d packets in tx queue\n",
+ "htc creds ep %d credits %d pkts %d\n",
cred_dist->endpoint,
endpoint->cred_dist.credits,
get_queue_depth(&endpoint->txq));
@@ -737,7 +731,7 @@ int ath6kl_htc_tx(struct htc_target *target, struct htc_packet *packet)
struct list_head queue;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_tx: ep id: %d, buf: 0x%p, len: %d\n",
+ "htc tx ep id %d buf 0x%p len %d\n",
packet->endpoint, packet->buf, packet->act_len);
if (packet->endpoint >= ENDPOINT_MAX) {
@@ -788,7 +782,7 @@ void ath6kl_htc_flush_txep(struct htc_target *target,
packet->status = -ECANCELED;
list_del(&packet->list);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "flushing tx pkt:0x%p, len:%d, ep:%d tag:0x%X\n",
+ "htc tx flushing pkt 0x%p len %d ep %d tag 0x%x\n",
packet, packet->act_len,
packet->endpoint, packet->info.tx.tag);
@@ -844,7 +838,8 @@ void ath6kl_htc_indicate_activity_change(struct htc_target *target,
endpoint->cred_dist.txq_depth =
get_queue_depth(&endpoint->txq);
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC,
+ "htc tx activity ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -919,15 +914,15 @@ static int ath6kl_htc_rx_packet(struct htc_target *target,
padded_len = CALC_TXRX_PADDED_LEN(target, rx_len);
if (padded_len > packet->buf_len) {
- ath6kl_err("not enough receive space for packet - padlen:%d recvlen:%d bufferlen:%d\n",
+ ath6kl_err("not enough receive space for packet - padlen %d recvlen %d bufferlen %d\n",
padded_len, rx_len, packet->buf_len);
return -ENOMEM;
}
ath6kl_dbg(ATH6KL_DBG_HTC,
- "dev_rx_pkt (0x%p : hdr:0x%X) padded len: %d mbox:0x%X (mode:%s)\n",
+ "htc rx 0x%p hdr x%x len %d mbox 0x%x\n",
packet, packet->info.rx.exp_hdr,
- padded_len, dev->ar->mbox_info.htc_addr, "sync");
+ padded_len, dev->ar->mbox_info.htc_addr);
status = hif_read_write_sync(dev->ar,
dev->ar->mbox_info.htc_addr,
@@ -1138,7 +1133,7 @@ static int ath6kl_htc_rx_alloc(struct htc_target *target,
endpoint->ep_st.rx_bundle_from_hdr += 1;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc hdr indicates :%d msg can be fetched as a bundle\n",
+ "htc rx bundle pkts %d\n",
n_msg);
} else
/* HTC header only indicates 1 message to fetch */
@@ -1191,8 +1186,8 @@ static void htc_ctrl_rx(struct htc_target *context, struct htc_packet *packets)
ath6kl_err("htc_ctrl_rx, got message with len:%zu\n",
packets->act_len + HTC_HDR_LENGTH);
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES,
- "Unexpected ENDPOINT 0 Message", "",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC,
+ "htc rx unexpected endpoint 0 message", "",
packets->buf - HTC_HDR_LENGTH,
packets->act_len + HTC_HDR_LENGTH);
}
@@ -1210,7 +1205,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
bool dist = false;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_proc_cred_rpt, credit report entries:%d\n", n_entries);
+ "htc creds report entries %d\n", n_entries);
spin_lock_bh(&target->tx_lock);
@@ -1223,8 +1218,9 @@ static void htc_proc_cred_rpt(struct htc_target *target,
endpoint = &target->endpoint[rpt->eid];
- ath6kl_dbg(ATH6KL_DBG_HTC, " ep %d got %d credits\n",
- rpt->eid, rpt->credits);
+ ath6kl_dbg(ATH6KL_DBG_HTC,
+ "htc creds report ep %d credits %d\n",
+ rpt->eid, rpt->credits);
endpoint->ep_st.tx_cred_rpt += 1;
endpoint->ep_st.cred_retnd += rpt->credits;
@@ -1265,7 +1261,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
}
ath6kl_dbg(ATH6KL_DBG_HTC,
- "report indicated %d credits to distribute\n",
+ "htc creds report tot_credits %d\n",
tot_credits);
if (dist) {
@@ -1273,7 +1269,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
* This was a credit return based on a completed send
* operations note, this is done with the lock held
*/
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -1321,13 +1317,14 @@ static int htc_parse_trailer(struct htc_target *target,
&& next_lk_ahds) {
ath6kl_dbg(ATH6KL_DBG_HTC,
- "lk_ahd report found (pre valid:0x%X, post valid:0x%X)\n",
+ "htc rx lk_ahd found pre_valid 0x%x post_valid 0x%x\n",
lk_ahd->pre_valid, lk_ahd->post_valid);
/* look ahead bytes are valid, copy them over */
memcpy((u8 *)&next_lk_ahds[0], lk_ahd->lk_ahd, 4);
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Next Look Ahead",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC,
+ "htc rx next look ahead",
"", next_lk_ahds, 4);
*n_lk_ahds = 1;
@@ -1346,7 +1343,7 @@ static int htc_parse_trailer(struct htc_target *target,
bundle_lkahd_rpt =
(struct htc_bundle_lkahd_rpt *) record_buf;
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Bundle lk_ahd",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bundle lk_ahd",
"", record_buf, record->len);
for (i = 0; i < len; i++) {
@@ -1378,10 +1375,8 @@ static int htc_proc_trailer(struct htc_target *target,
u8 *record_buf;
u8 *orig_buf;
- ath6kl_dbg(ATH6KL_DBG_HTC, "+htc_proc_trailer (len:%d)\n", len);
-
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Recv Trailer", "",
- buf, len);
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc rx trailer len %d\n", len);
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, NULL, "", buf, len);
orig_buf = buf;
orig_len = len;
@@ -1418,7 +1413,7 @@ static int htc_proc_trailer(struct htc_target *target,
}
if (status)
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "BAD Recv Trailer",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bad trailer",
"", orig_buf, orig_len);
return status;
@@ -1436,7 +1431,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", "htc ",
+ /* FIXME: is this needed? */
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx", "htc rx",
packet->buf, packet->act_len);
/*
@@ -1480,9 +1476,9 @@ static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
if (lk_ahd != packet->info.rx.exp_hdr) {
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",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx expected lk_ahd",
"", &packet->info.rx.exp_hdr, 4);
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Current Frame Header",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx current header",
"", (u8 *)&lk_ahd, sizeof(lk_ahd));
status = -ENOMEM;
goto fail_rx;
@@ -1518,13 +1514,13 @@ 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->act_len < 256 ? packet->act_len : 256);
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bad packet",
+ "", packet->buf, packet->act_len);
else {
+ /* FIXME: is this needed? */
if (packet->act_len > 0)
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES,
- "HTC - Application Msg", "",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC,
+ "htc rx application message", "",
packet->buf, packet->act_len);
}
@@ -1535,7 +1531,7 @@ static void ath6kl_htc_rx_complete(struct htc_endpoint *endpoint,
struct htc_packet *packet)
{
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc calling ep %d recv callback on packet 0x%p\n",
+ "htc rx complete ep %d packet 0x%p\n",
endpoint->eid, packet);
endpoint->ep_cb.rx(endpoint->target, packet);
}
@@ -1572,8 +1568,8 @@ static int ath6kl_htc_rx_bundle(struct htc_target *target,
len = 0;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "%s(): (numpackets: %d , actual : %d)\n",
- __func__, get_queue_depth(rxq), n_scat_pkt);
+ "htc rx bundle depth %d pkts %d\n",
+ get_queue_depth(rxq), n_scat_pkt);
scat_req = hif_scatter_req_get(target->dev->ar);
@@ -1898,7 +1894,7 @@ static struct htc_packet *htc_wait_for_ctrl_msg(struct htc_target *target)
return NULL;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_wait_for_ctrl_msg: look_ahead : 0x%X\n", look_ahead);
+ "htc rx wait ctrl look_ahead 0x%X\n", look_ahead);
htc_hdr = (struct htc_frame_hdr *)&look_ahead;
@@ -1963,7 +1959,7 @@ int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
depth = get_queue_depth(pkt_queue);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_add_rxbuf_multiple: ep id: %d, cnt:%d, len: %d\n",
+ "htc rx add multiple ep id %d cnt %d len %d\n",
first_pkt->endpoint, depth, first_pkt->buf_len);
endpoint = &target->endpoint[first_pkt->endpoint];
@@ -1989,7 +1985,7 @@ int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
if (target->rx_st_flags & HTC_RECV_WAIT_BUFFERS) {
if (target->ep_waiting == first_pkt->endpoint) {
ath6kl_dbg(ATH6KL_DBG_HTC,
- "receiver was blocked on ep:%d, unblocking.\n",
+ "htc rx blocked on ep %d, unblocking\n",
target->ep_waiting);
target->rx_st_flags &= ~HTC_RECV_WAIT_BUFFERS;
target->ep_waiting = ENDPOINT_MAX;
@@ -2024,7 +2020,7 @@ void ath6kl_htc_flush_rx_buf(struct htc_target *target)
list_del(&packet->list);
spin_unlock_bh(&target->rx_lock);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "flushing rx pkt:0x%p, len:%d, ep:%d\n",
+ "htc rx flush pkt 0x%p len %d ep %d\n",
packet, packet->buf_len,
packet->endpoint);
dev_kfree_skb(packet->pkt_cntxt);
@@ -2048,7 +2044,7 @@ int ath6kl_htc_conn_service(struct htc_target *target,
int status = 0;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_conn_service, target:0x%p service id:0x%X\n",
+ "htc connect service target 0x%p service id 0x%x\n",
target, conn_req->svc_id);
if (conn_req->svc_id == HTC_CTRL_RSVD_SVC) {
@@ -2221,7 +2217,7 @@ static void htc_setup_msg_bndl(struct htc_target *target)
target->msg_per_bndl_max);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc bundling allowed. max msg per htc bundle: %d\n",
+ "htc bundling allowed msg_per_bndl_max %d\n",
target->msg_per_bndl_max);
/* Max rx bundle size is limited by the max tx bundle size */
@@ -2230,7 +2226,7 @@ static void htc_setup_msg_bndl(struct htc_target *target)
target->max_tx_bndl_sz = min(HIF_MBOX0_EXT_WIDTH,
target->max_xfer_szper_scatreq);
- ath6kl_dbg(ATH6KL_DBG_HTC, "max recv: %d max send: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc max_rx_bndl_sz %d max_tx_bndl_sz %d\n",
target->max_rx_bndl_sz, target->max_tx_bndl_sz);
if (target->max_tx_bndl_sz)
@@ -2285,7 +2281,7 @@ int ath6kl_htc_wait_target(struct htc_target *target)
target->tgt_cred_sz = le16_to_cpu(rdy_msg->ver2_0_info.cred_sz);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "target ready: credits: %d credit size: %d\n",
+ "htc target ready credits %d size %d\n",
target->tgt_creds, target->tgt_cred_sz);
/* check if this is an extended ready message */
@@ -2299,7 +2295,7 @@ int ath6kl_htc_wait_target(struct htc_target *target)
target->msg_per_bndl_max = 0;
}
- ath6kl_dbg(ATH6KL_DBG_HTC, "using htc protocol version : %s (%d)\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc using protocol %s (%d)\n",
(target->htc_tgt_ver == HTC_VERSION_2P0) ? "2.0" : ">= 2.1",
target->htc_tgt_ver);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] ath6kl: don't dump full htc packets
2011-10-13 12:21 [PATCH 1/4] ath6kl: merge htc debug levels Kalle Valo
2011-10-13 12:21 ` [PATCH 2/4] ath6kl: cleanup htc debug messages Kalle Valo
@ 2011-10-13 12:21 ` Kalle Valo
2011-10-13 12:21 ` [PATCH 4/4] ath6kl: add debug level for hif Kalle Valo
2011-10-17 16:46 ` [PATCH 1/4] ath6kl: merge htc debug levels Kalle Valo
3 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2011-10-13 12:21 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless
It's currently possible to dump full sdio packets, so dumping htc packets
is not strictly needed. So remove it, we can always add it back if
there ever comes a need for that.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/htc.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 840f1b3..3cd3ef5 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -1431,10 +1431,6 @@ static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
if (n_lkahds != NULL)
*n_lkahds = 0;
- /* FIXME: is this needed? */
- ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx", "htc rx",
- packet->buf, packet->act_len);
-
/*
* NOTE: we cannot assume the alignment of buf, so we use the safe
* macros to retrieve 16 bit fields.
@@ -1516,13 +1512,6 @@ fail_rx:
if (status)
ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bad packet",
"", packet->buf, packet->act_len);
- else {
- /* FIXME: is this needed? */
- if (packet->act_len > 0)
- ath6kl_dbg_dump(ATH6KL_DBG_HTC,
- "htc rx application message", "",
- packet->buf, packet->act_len);
- }
return status;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] ath6kl: add debug level for hif
2011-10-13 12:21 [PATCH 1/4] ath6kl: merge htc debug levels Kalle Valo
2011-10-13 12:21 ` [PATCH 2/4] ath6kl: cleanup htc debug messages Kalle Valo
2011-10-13 12:21 ` [PATCH 3/4] ath6kl: don't dump full htc packets Kalle Valo
@ 2011-10-13 12:21 ` Kalle Valo
2011-10-17 16:46 ` [PATCH 1/4] ath6kl: merge htc debug levels Kalle Valo
3 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2011-10-13 12:21 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless
That way we htc level debug messages can be removed from hif files. Also
add few new messages and remove useless debug message about using
synchrous irq processing (we don't support anything else).
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/debug.h | 2 +-
drivers/net/wireless/ath/ath6kl/hif-ops.h | 18 ++++++++++++++++++
drivers/net/wireless/ath/ath6kl/hif.c | 17 ++++++++---------
3 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.h b/drivers/net/wireless/ath/ath6kl/debug.h
index 01f4015..cbabc25 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.h
+++ b/drivers/net/wireless/ath/ath6kl/debug.h
@@ -26,7 +26,7 @@ enum ATH6K_DEBUG_MASK {
ATH6KL_DBG_WLAN_RX = BIT(3), /* wlan rx */
ATH6KL_DBG_BMI = BIT(4), /* bmi tracing */
ATH6KL_DBG_HTC = BIT(5),
- /* hole */
+ ATH6KL_DBG_HIF = BIT(6),
ATH6KL_DBG_IRQ = BIT(7), /* interrupt processing */
ATH6KL_DBG_PM = BIT(8), /* power management */
ATH6KL_DBG_WLAN_NODE = BIT(9), /* general wlan node tracing */
diff --git a/drivers/net/wireless/ath/ath6kl/hif-ops.h b/drivers/net/wireless/ath/ath6kl/hif-ops.h
index 21b1575..95e7303 100644
--- a/drivers/net/wireless/ath/ath6kl/hif-ops.h
+++ b/drivers/net/wireless/ath/ath6kl/hif-ops.h
@@ -18,10 +18,16 @@
#define HIF_OPS_H
#include "hif.h"
+#include "debug.h"
static inline int hif_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf,
u32 len, u32 request)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF,
+ "hif %s sync addr 0x%x buf 0x%p len %d request 0x%x\n",
+ (request & HIF_WRITE) ? "write" : "read",
+ addr, buf, len, request);
+
return ar->hif_ops->read_write_sync(ar, addr, buf, len, request);
}
@@ -29,16 +35,24 @@ static inline int hif_write_async(struct ath6kl *ar, u32 address, u8 *buffer,
u32 length, u32 request,
struct htc_packet *packet)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF,
+ "hif write async addr 0x%x buf 0x%p len %d request 0x%x\n",
+ address, buffer, length, request);
+
return ar->hif_ops->write_async(ar, address, buffer, length,
request, packet);
}
static inline void ath6kl_hif_irq_enable(struct ath6kl *ar)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif irq enable\n");
+
return ar->hif_ops->irq_enable(ar);
}
static inline void ath6kl_hif_irq_disable(struct ath6kl *ar)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif irq disable\n");
+
return ar->hif_ops->irq_disable(ar);
}
@@ -71,11 +85,15 @@ static inline void ath6kl_hif_cleanup_scatter(struct ath6kl *ar)
static inline int ath6kl_hif_suspend(struct ath6kl *ar)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif suspend\n");
+
return ar->hif_ops->suspend(ar);
}
static inline int ath6kl_hif_resume(struct ath6kl *ar)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif resume\n");
+
return ar->hif_ops->resume(ar);
}
#endif
diff --git a/drivers/net/wireless/ath/ath6kl/hif.c b/drivers/net/wireless/ath/ath6kl/hif.c
index 7cc6cec..e2d8088 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.c
+++ b/drivers/net/wireless/ath/ath6kl/hif.c
@@ -51,8 +51,7 @@ int ath6kl_hif_rw_comp_handler(void *context, int status)
{
struct htc_packet *packet = context;
- ath6kl_dbg(ATH6KL_DBG_HTC,
- "ath6kl_hif_rw_comp_handler (pkt:0x%p , status: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif rw completion pkt 0x%p status %d\n",
packet, status);
packet->status = status;
@@ -119,7 +118,7 @@ int ath6kl_hif_poll_mboxmsg_rx(struct ath6kl_device *dev, u32 *lk_ahd,
/* delay a little */
mdelay(ATH6KL_TIME_QUANTUM);
- ath6kl_dbg(ATH6KL_DBG_HTC, "retry mbox poll : %d\n", i);
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif retry mbox poll try %d\n", i);
}
if (i == 0) {
@@ -147,6 +146,9 @@ int ath6kl_hif_rx_control(struct ath6kl_device *dev, bool enable_rx)
struct ath6kl_irq_enable_reg regs;
int status = 0;
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif rx %s\n",
+ enable_rx ? "enable" : "disable");
+
/* take the lock to protect interrupt enable shadows */
spin_lock_bh(&dev->lock);
@@ -186,8 +188,8 @@ int ath6kl_hif_submit_scat_req(struct ath6kl_device *dev,
dev->ar->mbox_info.htc_addr;
}
- ath6kl_dbg(ATH6KL_DBG_HTC,
- "ath6kl_hif_submit_scat_req, entries: %d, total len: %d mbox:0x%X (mode: %s : %s)\n",
+ ath6kl_dbg(ATH6KL_DBG_HIF,
+ "hif submit scatter request entries %d len %d mbox 0x%x %s %s\n",
scat_req->scat_entries, scat_req->len,
scat_req->addr, !read ? "async" : "sync",
(read) ? "rd" : "wr");
@@ -629,12 +631,9 @@ int ath6kl_hif_setup(struct ath6kl_device *dev)
/* assemble mask, used for padding to a block */
dev->htc_cnxt->block_mask = dev->htc_cnxt->block_sz - 1;
- ath6kl_dbg(ATH6KL_DBG_TRC, "block size: %d, mbox addr:0x%X\n",
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif block size %d mbox addr 0x%x\n",
dev->htc_cnxt->block_sz, dev->ar->mbox_info.htc_addr);
- ath6kl_dbg(ATH6KL_DBG_TRC,
- "hif interrupt processing is sync only\n");
-
status = ath6kl_hif_disable_intrs(dev);
fail_setup:
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] ath6kl: merge htc debug levels
2011-10-13 12:21 [PATCH 1/4] ath6kl: merge htc debug levels Kalle Valo
` (2 preceding siblings ...)
2011-10-13 12:21 ` [PATCH 4/4] ath6kl: add debug level for hif Kalle Valo
@ 2011-10-17 16:46 ` Kalle Valo
3 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2011-10-17 16:46 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
On 10/13/2011 03:21 PM, Kalle Valo wrote:
> It's not really necessary to have separate debug levels for htc tx and rx
> so combine them.
Applied all four.
Kalle
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-17 16:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 12:21 [PATCH 1/4] ath6kl: merge htc debug levels Kalle Valo
2011-10-13 12:21 ` [PATCH 2/4] ath6kl: cleanup htc debug messages Kalle Valo
2011-10-13 12:21 ` [PATCH 3/4] ath6kl: don't dump full htc packets Kalle Valo
2011-10-13 12:21 ` [PATCH 4/4] ath6kl: add debug level for hif Kalle Valo
2011-10-17 16:46 ` [PATCH 1/4] ath6kl: merge htc debug levels Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).