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

Commit 45a8e8f2 authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan
Browse files

dfc: Re-send DFC_CONFIG command



Re-send QMAP DFC_CONFIG command if no ack is received upon
first QMAP indication.

Change-Id: I33ec5cbbf3550d1df03ca1dd990bf8ad58ad9582
Acked-by: default avatarWeiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent c583c040
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -127,9 +127,11 @@ static struct dfc_tx_link_status_ind_msg_v01 qmap_tx_ind;
static struct dfc_qmi_data __rcu *qmap_dfc_data;
static atomic_t qmap_txid;
static void *rmnet_ctl_handle;
static bool dfc_config_acked;

static struct rmnet_ctl_client_if *rmnet_ctl;

static void dfc_qmap_send_config(struct dfc_qmi_data *data);
static void dfc_qmap_send_end_marker_cnf(struct qos_info *qos,
					 u8 bearer_id, u16 seq, u32 tx_id);

@@ -319,6 +321,9 @@ static void dfc_qmap_cmd_handler(struct sk_buff *skb)
		if (cmd->cmd_type != QMAP_CMD_ACK)
			goto free_skb;
	} else if (cmd->cmd_type != QMAP_CMD_REQUEST) {
		if (cmd->cmd_type == QMAP_CMD_ACK &&
		    cmd->cmd_name == QMAP_DFC_CONFIG)
			dfc_config_acked = true;
		goto free_skb;
	}

@@ -330,6 +335,12 @@ static void dfc_qmap_cmd_handler(struct sk_buff *skb)
		goto free_skb;
	}

	/* Re-send DFC config once if needed */
	if (unlikely(!dfc_config_acked)) {
		dfc_qmap_send_config(dfc);
		dfc_config_acked = true;
	}

	switch (cmd->cmd_name) {
	case QMAP_DFC_IND:
		rc = dfc_qmap_handle_ind(dfc, skb);
@@ -520,6 +531,7 @@ int dfc_qmap_client_init(void *port, int index, struct svc_info *psvc,

	pr_info("DFC QMAP init\n");

	dfc_config_acked = false;
	dfc_qmap_send_config(data);

out: