diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-07-16 09:12:13 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-07-17 13:48:32 -0400 |
commit | 255a68e0124082396d5e6a073ae80f2c41d9c886 (patch) | |
tree | 40c5b0455c536e02101de13cdddce54d1a1feb80 /drivers/bluetooth | |
parent | cd1b44255c498d122220f5280c6cdbf7749c764b (diff) |
Bluetooth: Improve rx debug logs for Three-wire UART
Remove unnecessary debug logs and add some to more centralized places.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_h5.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index 3c0e17b4602d..eb40b9a38289 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c | |||
@@ -246,8 +246,6 @@ static void h5_complete_rx_pkt(struct hci_uart *hu) | |||
246 | struct h5 *h5 = hu->priv; | 246 | struct h5 *h5 = hu->priv; |
247 | const unsigned char *hdr = h5->rx_skb->data; | 247 | const unsigned char *hdr = h5->rx_skb->data; |
248 | 248 | ||
249 | BT_DBG("%s", hu->hdev->name); | ||
250 | |||
251 | if (H5_HDR_RELIABLE(hdr)) { | 249 | if (H5_HDR_RELIABLE(hdr)) { |
252 | h5->tx_ack = (h5->tx_ack + 1) % 8; | 250 | h5->tx_ack = (h5->tx_ack + 1) % 8; |
253 | h5->tx_ack_req = true; | 251 | h5->tx_ack_req = true; |
@@ -284,8 +282,6 @@ static int h5_rx_crc(struct hci_uart *hu, unsigned char c) | |||
284 | { | 282 | { |
285 | struct h5 *h5 = hu->priv; | 283 | struct h5 *h5 = hu->priv; |
286 | 284 | ||
287 | BT_DBG("%s 0x%02hhx", hu->hdev->name, c); | ||
288 | |||
289 | h5_complete_rx_pkt(hu); | 285 | h5_complete_rx_pkt(hu); |
290 | h5_reset_rx(h5); | 286 | h5_reset_rx(h5); |
291 | 287 | ||
@@ -297,8 +293,6 @@ static int h5_rx_payload(struct hci_uart *hu, unsigned char c) | |||
297 | struct h5 *h5 = hu->priv; | 293 | struct h5 *h5 = hu->priv; |
298 | const unsigned char *hdr = h5->rx_skb->data; | 294 | const unsigned char *hdr = h5->rx_skb->data; |
299 | 295 | ||
300 | BT_DBG("%s 0x%02hhx", hu->hdev->name, c); | ||
301 | |||
302 | if (H5_HDR_CRC(hdr)) { | 296 | if (H5_HDR_CRC(hdr)) { |
303 | h5->rx_func = h5_rx_crc; | 297 | h5->rx_func = h5_rx_crc; |
304 | h5->rx_pending = 2; | 298 | h5->rx_pending = 2; |
@@ -315,8 +309,6 @@ static int h5_rx_3wire_hdr(struct hci_uart *hu, unsigned char c) | |||
315 | struct h5 *h5 = hu->priv; | 309 | struct h5 *h5 = hu->priv; |
316 | const unsigned char *hdr = h5->rx_skb->data; | 310 | const unsigned char *hdr = h5->rx_skb->data; |
317 | 311 | ||
318 | BT_DBG("%s 0x%02hhx", hu->hdev->name, c); | ||
319 | |||
320 | BT_DBG("%s rx: seq %u ack %u crc %u rel %u type %u len %u", | 312 | BT_DBG("%s rx: seq %u ack %u crc %u rel %u type %u len %u", |
321 | hu->hdev->name, H5_HDR_SEQ(hdr), H5_HDR_ACK(hdr), | 313 | hu->hdev->name, H5_HDR_SEQ(hdr), H5_HDR_ACK(hdr), |
322 | H5_HDR_CRC(hdr), H5_HDR_RELIABLE(hdr), H5_HDR_PKT_TYPE(hdr), | 314 | H5_HDR_CRC(hdr), H5_HDR_RELIABLE(hdr), H5_HDR_PKT_TYPE(hdr), |
@@ -345,8 +337,6 @@ static int h5_rx_pkt_start(struct hci_uart *hu, unsigned char c) | |||
345 | { | 337 | { |
346 | struct h5 *h5 = hu->priv; | 338 | struct h5 *h5 = hu->priv; |
347 | 339 | ||
348 | BT_DBG("%s 0x%02hhx", hu->hdev->name, c); | ||
349 | |||
350 | if (c == SLIP_DELIMITER) | 340 | if (c == SLIP_DELIMITER) |
351 | return 1; | 341 | return 1; |
352 | 342 | ||
@@ -369,8 +359,6 @@ static int h5_rx_delimiter(struct hci_uart *hu, unsigned char c) | |||
369 | { | 359 | { |
370 | struct h5 *h5 = hu->priv; | 360 | struct h5 *h5 = hu->priv; |
371 | 361 | ||
372 | BT_DBG("%s 0x%02hhx", hu->hdev->name, c); | ||
373 | |||
374 | if (c == SLIP_DELIMITER) | 362 | if (c == SLIP_DELIMITER) |
375 | h5->rx_func = h5_rx_pkt_start; | 363 | h5->rx_func = h5_rx_pkt_start; |
376 | 364 | ||
@@ -407,7 +395,7 @@ static void h5_unslip_one_byte(struct h5 *h5, unsigned char c) | |||
407 | memcpy(skb_put(h5->rx_skb, 1), byte, 1); | 395 | memcpy(skb_put(h5->rx_skb, 1), byte, 1); |
408 | h5->rx_pending--; | 396 | h5->rx_pending--; |
409 | 397 | ||
410 | BT_DBG("unsliped 0x%02hhx", *byte); | 398 | BT_DBG("unsliped 0x%02hhx, rx_pending %zu", *byte, h5->rx_pending); |
411 | } | 399 | } |
412 | 400 | ||
413 | static void h5_reset_rx(struct h5 *h5) | 401 | static void h5_reset_rx(struct h5 *h5) |
@@ -427,7 +415,8 @@ static int h5_recv(struct hci_uart *hu, void *data, int count) | |||
427 | struct h5 *h5 = hu->priv; | 415 | struct h5 *h5 = hu->priv; |
428 | unsigned char *ptr = data; | 416 | unsigned char *ptr = data; |
429 | 417 | ||
430 | BT_DBG("%s count %d", hu->hdev->name, count); | 418 | BT_DBG("%s pending %zu count %d", hu->hdev->name, h5->rx_pending, |
419 | count); | ||
431 | 420 | ||
432 | while (count > 0) { | 421 | while (count > 0) { |
433 | int processed; | 422 | int processed; |