aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>2013-04-18 07:33:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-04-22 15:20:24 -0400
commitb5d98e9d02091713f8fe5bed92773fcea862a8c2 (patch)
tree0e045dd65b16e082558f9a5a46fc0b5e727324ef
parent33e611690e6478ebb095e4eb755010343374a2a3 (diff)
wil6210: Tx init optimization
vring size is known from the beginning, fill it immediately in the struct initializer This is minor optimization that reduces code size. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/wil6210/txrx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
index d8619440d175..3d9afc560246 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -527,6 +527,7 @@ int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size,
527 .vring_cfg = { 527 .vring_cfg = {
528 .tx_sw_ring = { 528 .tx_sw_ring = {
529 .max_mpdu_size = cpu_to_le16(TX_BUF_LEN), 529 .max_mpdu_size = cpu_to_le16(TX_BUF_LEN),
530 .ring_size = cpu_to_le16(size),
530 }, 531 },
531 .ringid = id, 532 .ringid = id,
532 .cidxtid = (cid & 0xf) | ((tid & 0xf) << 4), 533 .cidxtid = (cid & 0xf) | ((tid & 0xf) << 4),
@@ -558,7 +559,6 @@ int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size,
558 goto out; 559 goto out;
559 560
560 cmd.vring_cfg.tx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa); 561 cmd.vring_cfg.tx_sw_ring.ring_mem_base = cpu_to_le64(vring->pa);
561 cmd.vring_cfg.tx_sw_ring.ring_size = cpu_to_le16(vring->size);
562 562
563 rc = wmi_call(wil, WMI_VRING_CFG_CMDID, &cmd, sizeof(cmd), 563 rc = wmi_call(wil, WMI_VRING_CFG_CMDID, &cmd, sizeof(cmd),
564 WMI_VRING_CFG_DONE_EVENTID, &reply, sizeof(reply), 100); 564 WMI_VRING_CFG_DONE_EVENTID, &reply, sizeof(reply), 100);