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

Commit 93ae6d49 authored by Vladimir Kondratiev's avatar Vladimir Kondratiev Committed by John W. Linville
Browse files

wil6210: Fill vring2cid_tid table early



Need to fill translation table before calling WMI with WMI_VRING_CFG_CMDID
since firmware may generate events during this call; and events need translation
table filled to be properly dispatched

Signed-off-by: default avatarVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 91886b0b
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -610,6 +610,9 @@ int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size,
	if (rc)
	if (rc)
		goto out;
		goto out;


	wil->vring2cid_tid[id][0] = cid;
	wil->vring2cid_tid[id][1] = tid;

	cmd.vring_cfg.tx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa);
	cmd.vring_cfg.tx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa);


	rc = wmi_call(wil, WMI_VRING_CFG_CMDID, &cmd, sizeof(cmd),
	rc = wmi_call(wil, WMI_VRING_CFG_CMDID, &cmd, sizeof(cmd),
@@ -625,9 +628,6 @@ int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size,
	}
	}
	vring->hwtail = le32_to_cpu(reply.cmd.tx_vring_tail_ptr);
	vring->hwtail = le32_to_cpu(reply.cmd.tx_vring_tail_ptr);


	wil->vring2cid_tid[id][0] = cid;
	wil->vring2cid_tid[id][1] = tid;

	return 0;
	return 0;
 out_free:
 out_free:
	wil_vring_free(wil, vring, 1);
	wil_vring_free(wil, vring, 1);