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

Commit cd338aae authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: support pipe stats across multi-PDNS"

parents cc05bca4 6c2edbec
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -2221,12 +2221,12 @@ static void rmnet_ipa_free_msg(void *buff, u32 len, u32 type)
}

/**
 * rmnet_ipa_get_stats_and_update() - Gets pipe stats from Modem
 * rmnet_ipa_get_stats_and_update(bool reset) - Gets pipe stats from Modem
 *
 * This function queries the IPA Modem driver for the pipe stats
 * via QMI, and updates the user space IPA entity.
 */
static void rmnet_ipa_get_stats_and_update(void)
static void rmnet_ipa_get_stats_and_update(bool reset)
{
	struct ipa_get_data_stats_req_msg_v01 req;
	struct ipa_get_data_stats_resp_msg_v01 *resp;
@@ -2244,6 +2244,11 @@ static void rmnet_ipa_get_stats_and_update(void)
	memset(resp, 0, sizeof(struct ipa_get_data_stats_resp_msg_v01));

	req.ipa_stats_type = QMI_IPA_STATS_TYPE_PIPE_V01;
	if (reset == true) {
		req.reset_stats_valid = true;
		req.reset_stats = true;
		IPAWANERR("Get the latest pipe-stats and reset it\n");
	}

	rc = ipa_qmi_get_data_stats(&req, resp);

@@ -2270,7 +2275,7 @@ static void rmnet_ipa_get_stats_and_update(void)
 */
static void tethering_stats_poll_queue(struct work_struct *work)
{
	rmnet_ipa_get_stats_and_update();
	rmnet_ipa_get_stats_and_update(false);

	schedule_delayed_work(&ipa_tether_stats_poll_wakequeue_work,
			msecs_to_jiffies(ipa_rmnet_ctx.polling_interval*1000));
@@ -2340,7 +2345,7 @@ int rmnet_ipa_poll_tethering_stats(struct wan_ioctl_poll_tethering_stats *data)
	if (0 == ipa_rmnet_ctx.polling_interval) {
		ipa_qmi_stop_data_qouta();
		rmnet_ipa_get_network_stats_and_update();
		rmnet_ipa_get_stats_and_update();
		rmnet_ipa_get_stats_and_update(true);
		return 0;
	}