diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-13 17:30:55 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-13 17:36:48 +0200 |
commit | e65ac4d54546b7d7514a9e8be1484c758f2b7ba3 (patch) | |
tree | 7b4bffabbe75739310e200360789e25732540da0 /net/caif/chnl_net.c | |
parent | Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/lin... (diff) | |
parent | caif_hsi: use dev_dbg not dev_err for reporting (diff) | |
download | linux-e65ac4d54546b7d7514a9e8be1484c758f2b7ba3.tar.xz linux-e65ac4d54546b7d7514a9e8be1484c758f2b7ba3.zip |
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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 93e9c6dc9ddf..69771c04ba8f 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. */ |