aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-10-14 23:40:11 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-14 23:40:11 -0400
commit766e9037cc139ee25ed93ee5ad11e1450c4b99f6 (patch)
tree062702b8edf203a6e91d1e6853ab24989617d758 /net/ieee802154
parent48bccd25df71f4f8177cb800f4b288222eb57761 (diff)
net: sk_drops consolidation
sock_queue_rcv_skb() can update sk_drops itself, removing need for callers to take care of it. This is more consistent since sock_queue_rcv_skb() also reads sk_drops when queueing a skb. This adds sk_drops managment to many protocols that not cared yet. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/dgram.c1
-rw-r--r--net/ieee802154/raw.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c
index 25ad956a39d8..9aac5aee1575 100644
--- a/net/ieee802154/dgram.c
+++ b/net/ieee802154/dgram.c
@@ -318,7 +318,6 @@ out:
318static int dgram_rcv_skb(struct sock *sk, struct sk_buff *skb) 318static int dgram_rcv_skb(struct sock *sk, struct sk_buff *skb)
319{ 319{
320 if (sock_queue_rcv_skb(sk, skb) < 0) { 320 if (sock_queue_rcv_skb(sk, skb) < 0) {
321 atomic_inc(&sk->sk_drops);
322 kfree_skb(skb); 321 kfree_skb(skb);
323 return NET_RX_DROP; 322 return NET_RX_DROP;
324 } 323 }
diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c
index 769c8d138fc3..9c9b85c00033 100644
--- a/net/ieee802154/raw.c
+++ b/net/ieee802154/raw.c
@@ -206,7 +206,6 @@ out:
206static int raw_rcv_skb(struct sock *sk, struct sk_buff *skb) 206static int raw_rcv_skb(struct sock *sk, struct sk_buff *skb)
207{ 207{
208 if (sock_queue_rcv_skb(sk, skb) < 0) { 208 if (sock_queue_rcv_skb(sk, skb) < 0) {
209 atomic_inc(&sk->sk_drops);
210 kfree_skb(skb); 209 kfree_skb(skb);
211 return NET_RX_DROP; 210 return NET_RX_DROP;
212 } 211 }