Commit 4456c50d authored by Li RongQing's avatar Li RongQing Committed by Marcel Holtmann

Bluetooth: 6lowpan: remove unnecessary codes in give_skb_to_upper

netif_rx() only returns NET_RX_DROP and NET_RX_SUCCESS, not returns
negative value
Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
Acked-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 15346a9c
...@@ -249,19 +249,12 @@ static struct lowpan_dev *lookup_dev(struct l2cap_conn *conn) ...@@ -249,19 +249,12 @@ static struct lowpan_dev *lookup_dev(struct l2cap_conn *conn)
static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev) static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev)
{ {
struct sk_buff *skb_cp; struct sk_buff *skb_cp;
int ret;
skb_cp = skb_copy(skb, GFP_ATOMIC); skb_cp = skb_copy(skb, GFP_ATOMIC);
if (!skb_cp) if (!skb_cp)
return -ENOMEM; return -ENOMEM;
ret = netif_rx(skb_cp); return netif_rx(skb_cp);
if (ret < 0) {
BT_DBG("receive skb %d", ret);
return NET_RX_DROP;
}
return ret;
} }
static int process_data(struct sk_buff *skb, struct net_device *netdev, static int process_data(struct sk_buff *skb, struct net_device *netdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment