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

Commit beea1ce6 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "icnss2 Ignore server exit if already in progress"

parents 2b28d3c6 637d6960
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -404,6 +404,9 @@ static int icnss_stats_show_state(struct seq_file *s, struct icnss_priv *priv)
			continue;
		case ICNSS_PDR:
			seq_puts(s, "PDR TRIGGERED");
			continue;
		case ICNSS_DEL_SERVER:
			seq_puts(s, "DEL SERVER");
		}

		seq_printf(s, "UNKNOWN-%d", i);
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ enum icnss_driver_state {
	ICNSS_MODE_ON,
	ICNSS_BLOCK_SHUTDOWN,
	ICNSS_PDR,
	ICNSS_DEL_SERVER,
};

struct ce_irq_list {
+15 −0
Original line number Diff line number Diff line
@@ -1945,6 +1945,8 @@ int icnss_clear_server(struct icnss_priv *priv)

	icnss_unregister_fw_service(priv);

	clear_bit(ICNSS_DEL_SERVER, &priv->state);

	ret =  icnss_register_fw_service(priv);
	if (ret < 0) {
		icnss_pr_err("WLFW server registration failed\n");
@@ -1961,6 +1963,12 @@ static int wlfw_new_server(struct qmi_handle *qmi,
		container_of(qmi, struct icnss_priv, qmi);
	struct icnss_event_server_arrive_data *event_data;

	if (priv && test_bit(ICNSS_DEL_SERVER, &priv->state)) {
		icnss_pr_info("WLFW server delete in progress, Ignore server arrive: 0x%lx\n",
			      priv->state);
		return 0;
	}

	icnss_pr_dbg("WLFW server arrive: node %u port %u\n",
		     service->node, service->port);

@@ -1982,9 +1990,16 @@ static void wlfw_del_server(struct qmi_handle *qmi,
{
	struct icnss_priv *priv = container_of(qmi, struct icnss_priv, qmi);

	if (priv && test_bit(ICNSS_DEL_SERVER, &priv->state)) {
		icnss_pr_info("WLFW server delete in progress, Ignore server delete:  0x%lx\n",
			      priv->state);
		return;
	}

	icnss_pr_dbg("WLFW server delete\n");

	if (priv) {
		set_bit(ICNSS_DEL_SERVER, &priv->state);
		set_bit(ICNSS_FW_DOWN, &priv->state);
		icnss_ignore_fw_timeout(true);
	}