wil6210: Fill vring2cid_tid table early
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Thu, 27 Feb 2014 14:20:51 +0000 (16:20 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Feb 2014 19:33:35 +0000 (14:33 -0500)
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: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/txrx.c

index baced1bca04cebe469dcdcfd160e3d4f5ea89fee..9b4388b842a298430e3a385083cdb276e65cd187 100644 (file)
@@ -610,6 +610,9 @@ int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size,
        if (rc)
                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);
 
        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);
 
-       wil->vring2cid_tid[id][0] = cid;
-       wil->vring2cid_tid[id][1] = tid;
-
        return 0;
  out_free:
        wil_vring_free(wil, vring, 1);