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

Commit f3a7dac1 authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: rmnet_ipa: do not release resource on pending data



In case there is pending data submitted to IPA, IPA RM resource should
not be released. The resource release happens only when all packets were
processed by IPA.

CRs-Fixed: 1116262
Change-Id: I19756cbe4f84a5d09853d6066362e4a2c9ae1f73
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 8bd02af9
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);
}

/**