diff mbox

[2/3] Bluetooth: 6lowpan: Print errors during recv_pkt

Message ID 20170403144857.4661-2-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Luiz Augusto von Dentz April 3, 2017, 2:48 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes should make it more clear why a packet is being dropped.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/6lowpan.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jukka Rissanen April 5, 2017, 12:23 p.m. UTC | #1
Hi Luiz,

On Mon, 2017-04-03 at 17:48 +0300, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This makes should make it more clear why a packet is being dropped.
> 
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> ---
>  net/bluetooth/6lowpan.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
> index 2063e96..5b91e85 100644
> --- a/net/bluetooth/6lowpan.c
> +++ b/net/bluetooth/6lowpan.c
> @@ -337,6 +337,7 @@ static int recv_pkt(struct sk_buff *skb, struct
> net_device *dev,
>  
>  		ret = iphc_decompress(local_skb, dev, peer);
>  		if (ret < 0) {
> +			BT_DBG("iphc_decompress failed: %d", ret);
>  			kfree_skb(local_skb);
>  			goto drop;
>  		}
> @@ -356,6 +357,7 @@ static int recv_pkt(struct sk_buff *skb, struct
> net_device *dev,
>  		consume_skb(local_skb);
>  		consume_skb(skb);
>  	} else {
> +		BT_DBG("unknown packet type");
>  		goto drop;
>  	}
>  

Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>


Cheers,
Jukka

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 2063e96..5b91e85 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -337,6 +337,7 @@  static int recv_pkt(struct sk_buff *skb, struct net_device *dev,
 
 		ret = iphc_decompress(local_skb, dev, peer);
 		if (ret < 0) {
+			BT_DBG("iphc_decompress failed: %d", ret);
 			kfree_skb(local_skb);
 			goto drop;
 		}
@@ -356,6 +357,7 @@  static int recv_pkt(struct sk_buff *skb, struct net_device *dev,
 		consume_skb(local_skb);
 		consume_skb(skb);
 	} else {
+		BT_DBG("unknown packet type");
 		goto drop;
 	}