summaryrefslogtreecommitdiffstats
path: root/net/caif/chnl_net.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-04-13 11:30:55 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-13 11:36:48 -0400
commite65ac4d54546b7d7514a9e8be1484c758f2b7ba3 (patch)
tree7b4bffabbe75739310e200360789e25732540da0 /net/caif/chnl_net.c
parent816a7854d56f19aeba3c83e1ed8c2c0ef275365a (diff)
parentd62f8dbb5b7771910f7c4657345df8ac93acb832 (diff)
downloadop-kernel-dev-e65ac4d54546b7d7514a9e8be1484c758f2b7ba3.zip
op-kernel-dev-e65ac4d54546b7d7514a9e8be1484c758f2b7ba3.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull in the 'net' tree to get CAIF bug fixes upon which the following set of CAIF feature patches depend. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/chnl_net.c')
-rw-r--r--net/caif/chnl_net.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
index 93e9c6d..69771c0 100644
--- a/net/caif/chnl_net.c
+++ b/net/caif/chnl_net.c
@@ -103,6 +103,7 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
skb->protocol = htons(ETH_P_IPV6);
break;
default:
+ kfree_skb(skb);
priv->netdev->stats.rx_errors++;
return -EINVAL;
}
@@ -220,14 +221,16 @@ static int chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (skb->len > priv->netdev->mtu) {
pr_warn("Size of skb exceeded MTU\n");
+ kfree_skb(skb);
dev->stats.tx_errors++;
- return -ENOSPC;
+ return NETDEV_TX_OK;
}
if (!priv->flowenabled) {
pr_debug("dropping packets flow off\n");
+ kfree_skb(skb);
dev->stats.tx_dropped++;
- return NETDEV_TX_BUSY;
+ return NETDEV_TX_OK;
}
if (priv->conn_req.protocol == CAIFPROTO_DATAGRAM_LOOP)
@@ -242,7 +245,7 @@ static int chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
result = priv->chnl.dn->transmit(priv->chnl.dn, pkt);
if (result) {
dev->stats.tx_dropped++;
- return result;
+ return NETDEV_TX_OK;
}
/* Update statistics. */
OpenPOWER on IntegriCloud