Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352321
b: refs/heads/master
c: 56f004b
h: refs/heads/master
i:
  352319: b9669e1
v: v3
  • Loading branch information
Vladimir Kondratiev authored and John W. Linville committed Jan 30, 2013
1 parent df3b492 commit 20484f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b98917d742bcf519b15894e78c17f2eb287b3584
refs/heads/master: 56f004b4672972b6c936573eca835ed90787097a
21 changes: 11 additions & 10 deletions trunk/drivers/net/wireless/ath/wil6210/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ static void wil_connect_timer_fn(ulong x)
schedule_work(&wil->disconnect_worker);
}

static void wil_cache_mbox_regs(struct wil6210_priv *wil)
{
/* make shadow copy of registers that should not change on run time */
wil_memcpy_fromio_32(&wil->mbox_ctl, wil->csr + HOST_MBOX,
sizeof(struct wil6210_mbox_ctl));
wil_mbox_ring_le2cpus(&wil->mbox_ctl.rx);
wil_mbox_ring_le2cpus(&wil->mbox_ctl.tx);
}

int wil_priv_init(struct wil6210_priv *wil)
{
wil_dbg_MISC(wil, "%s()\n", __func__);
Expand Down Expand Up @@ -138,11 +147,7 @@ int wil_priv_init(struct wil6210_priv *wil)
return -EAGAIN;
}

/* make shadow copy of registers that should not change on run time */
wil_memcpy_fromio_32(&wil->mbox_ctl, wil->csr + HOST_MBOX,
sizeof(struct wil6210_mbox_ctl));
wil_mbox_ring_le2cpus(&wil->mbox_ctl.rx);
wil_mbox_ring_le2cpus(&wil->mbox_ctl.tx);
wil_cache_mbox_regs(wil);

return 0;
}
Expand Down Expand Up @@ -260,11 +265,7 @@ int wil_reset(struct wil6210_priv *wil)
wil->pending_connect_cid = -1;
INIT_COMPLETION(wil->wmi_ready);

/* make shadow copy of registers that should not change on run time */
wil_memcpy_fromio_32(&wil->mbox_ctl, wil->csr + HOST_MBOX,
sizeof(struct wil6210_mbox_ctl));
wil_mbox_ring_le2cpus(&wil->mbox_ctl.rx);
wil_mbox_ring_le2cpus(&wil->mbox_ctl.tx);
wil_cache_mbox_regs(wil);

/* TODO: release MAC reset */
wil6210_enable_irq(wil);
Expand Down

0 comments on commit 20484f0

Please sign in to comment.