Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 867a7b35 authored by Ashwanth Goli's avatar Ashwanth Goli
Browse files

msm_rmnet_bam: Return NETDEV_TX_BUSY when queue is stopped



rmnet_data driver directy uses rmnet_xmit for control packets
and since there is a possibility that the queue is stopped,
skb's would not be freed by rmnet_data as it assumes
that the xmit was successful. Changing the return value in
case the channel is full so that rmnet_data handles the skb
appropriately.

Change-Id: I8608f367d8c1018640e87d5b10416b0dc8a1bcd5
Signed-off-by: default avatarAshwanth Goli <ashwanth@codeaurora.org>
parent 315f8d16
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -451,7 +451,7 @@ static int rmnet_xmit(struct sk_buff *skb, struct net_device *dev)
	if (netif_queue_stopped(dev)) {
		pr_err("[%s]fatal: rmnet_xmit called when "
			"netif_queue is stopped", dev->name);
		return 0;
		return NETDEV_TX_BUSY;
	}

	spin_lock_irqsave(&p->lock, flags);