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

Commit 2c053eba authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: rmnet_ipa: do not release resource on pending data" into msm-4.8

parents 8d29767a f3a7dac1
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2017, 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
@@ -1132,6 +1132,7 @@ static int ipa3_wwan_xmit(struct sk_buff *skb, struct net_device *dev)
	dev->stats.tx_bytes += skb->len;
	ret = NETDEV_TX_OK;
out:
	if (atomic_read(&wwan_ptr->outstanding_pkts) == 0)
		ipa_rm_inactivity_timer_release_resource(
			IPA_RM_RESOURCE_WWAN_0_PROD);
	return ret;
@@ -1184,10 +1185,12 @@ static void apps_ipa_tx_complete_notify(void *priv,
				wwan_ptr->outstanding_low);
		netif_wake_queue(wwan_ptr->net);
	}
	__netif_tx_unlock_bh(netdev_get_tx_queue(dev, 0));
	dev_kfree_skb_any(skb);

	if (atomic_read(&wwan_ptr->outstanding_pkts) == 0)
		ipa_rm_inactivity_timer_release_resource(
			IPA_RM_RESOURCE_WWAN_0_PROD);
	__netif_tx_unlock_bh(netdev_get_tx_queue(dev, 0));
	dev_kfree_skb_any(skb);
}

/**