arcnet: move dev_free_skb to its only user
The call for dev_free_skb is done only once. This patch moves its call to its only user and removes the obsolete condition variable. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
This commit is contained in:
parent
d1611c3aba
commit
b82de0e28c
|
@ -515,7 +515,7 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb,
|
||||||
struct ArcProto *proto;
|
struct ArcProto *proto;
|
||||||
int txbuf;
|
int txbuf;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int freeskb, retval;
|
int retval;
|
||||||
|
|
||||||
arc_printk(D_DURING, dev,
|
arc_printk(D_DURING, dev,
|
||||||
"transmit requested (status=%Xh, txbufs=%d/%d, len=%d, protocol %x)\n",
|
"transmit requested (status=%Xh, txbufs=%d/%d, len=%d, protocol %x)\n",
|
||||||
|
@ -554,15 +554,13 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb,
|
||||||
* the package later - forget about it now
|
* the package later - forget about it now
|
||||||
*/
|
*/
|
||||||
dev->stats.tx_bytes += skb->len;
|
dev->stats.tx_bytes += skb->len;
|
||||||
freeskb = 1;
|
dev_kfree_skb(skb);
|
||||||
} else {
|
} else {
|
||||||
/* do it the 'split' way */
|
/* do it the 'split' way */
|
||||||
lp->outgoing.proto = proto;
|
lp->outgoing.proto = proto;
|
||||||
lp->outgoing.skb = skb;
|
lp->outgoing.skb = skb;
|
||||||
lp->outgoing.pkt = pkt;
|
lp->outgoing.pkt = pkt;
|
||||||
|
|
||||||
freeskb = 0;
|
|
||||||
|
|
||||||
if (proto->continue_tx &&
|
if (proto->continue_tx &&
|
||||||
proto->continue_tx(dev, txbuf)) {
|
proto->continue_tx(dev, txbuf)) {
|
||||||
arc_printk(D_NORMAL, dev,
|
arc_printk(D_NORMAL, dev,
|
||||||
|
@ -574,7 +572,6 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb,
|
||||||
lp->next_tx = txbuf;
|
lp->next_tx = txbuf;
|
||||||
} else {
|
} else {
|
||||||
retval = NETDEV_TX_BUSY;
|
retval = NETDEV_TX_BUSY;
|
||||||
freeskb = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
arc_printk(D_DEBUG, dev, "%s: %d: %s, status: %x\n",
|
arc_printk(D_DEBUG, dev, "%s: %d: %s, status: %x\n",
|
||||||
|
@ -589,9 +586,6 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb,
|
||||||
__FILE__, __LINE__, __func__, lp->hw.status(dev));
|
__FILE__, __LINE__, __func__, lp->hw.status(dev));
|
||||||
|
|
||||||
spin_unlock_irqrestore(&lp->lock, flags);
|
spin_unlock_irqrestore(&lp->lock, flags);
|
||||||
if (freeskb)
|
|
||||||
dev_kfree_skb(skb);
|
|
||||||
|
|
||||||
return retval; /* no need to try again */
|
return retval; /* no need to try again */
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(arcnet_send_packet);
|
EXPORT_SYMBOL(arcnet_send_packet);
|
||||||
|
|
Loading…
Reference in New Issue