diff options
Diffstat (limited to 'net/bluetooth/6lowpan.c')
-rw-r--r-- | net/bluetooth/6lowpan.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 6c5c2eff45bd..45d9a9fef634 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c | |||
@@ -252,7 +252,7 @@ static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev) | |||
252 | 252 | ||
253 | skb_cp = skb_copy(skb, GFP_ATOMIC); | 253 | skb_cp = skb_copy(skb, GFP_ATOMIC); |
254 | if (!skb_cp) | 254 | if (!skb_cp) |
255 | return -ENOMEM; | 255 | return NET_RX_DROP; |
256 | 256 | ||
257 | return netif_rx(skb_cp); | 257 | return netif_rx(skb_cp); |
258 | } | 258 | } |
@@ -290,7 +290,7 @@ static int process_data(struct sk_buff *skb, struct net_device *netdev, | |||
290 | return lowpan_process_data(skb, netdev, | 290 | return lowpan_process_data(skb, netdev, |
291 | saddr, IEEE802154_ADDR_LONG, EUI64_ADDR_LEN, | 291 | saddr, IEEE802154_ADDR_LONG, EUI64_ADDR_LEN, |
292 | daddr, IEEE802154_ADDR_LONG, EUI64_ADDR_LEN, | 292 | daddr, IEEE802154_ADDR_LONG, EUI64_ADDR_LEN, |
293 | iphc0, iphc1, give_skb_to_upper); | 293 | iphc0, iphc1); |
294 | 294 | ||
295 | drop: | 295 | drop: |
296 | kfree_skb(skb); | 296 | kfree_skb(skb); |
@@ -350,6 +350,16 @@ static int recv_pkt(struct sk_buff *skb, struct net_device *dev, | |||
350 | if (ret != NET_RX_SUCCESS) | 350 | if (ret != NET_RX_SUCCESS) |
351 | goto drop; | 351 | goto drop; |
352 | 352 | ||
353 | local_skb->protocol = htons(ETH_P_IPV6); | ||
354 | local_skb->pkt_type = PACKET_HOST; | ||
355 | local_skb->dev = dev; | ||
356 | |||
357 | if (give_skb_to_upper(local_skb, dev) | ||
358 | != NET_RX_SUCCESS) { | ||
359 | kfree_skb(local_skb); | ||
360 | goto drop; | ||
361 | } | ||
362 | |||
353 | dev->stats.rx_bytes += skb->len; | 363 | dev->stats.rx_bytes += skb->len; |
354 | dev->stats.rx_packets++; | 364 | dev->stats.rx_packets++; |
355 | 365 | ||