diff options
author | Luciano Coelho <coelho@ti.com> | 2011-11-29 13:38:37 +0200 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-04-12 08:43:56 +0300 |
commit | 00782136b4d6e2316e0a2a55f3b1fba160e9576e (patch) | |
tree | 67a75d38098a2c66c78ce0b70de6f8cf99d8c673 /drivers/net/wireless/ti/wlcore/rx.c | |
parent | 25a43d78eb63281294793fdaab6108bef81d7648 (diff) |
wlcore/wl12xx: implement chip-specific register tables
Add register tables support in wlcore, add some new IO functions to
read and write to chip-specific register and data addresses. Move
some common register values from wl12xx to wlcore and add the
registers table to wl12xx.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/rx.c')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/rx.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c index 4fc37f9f38a6..d7fab4626a1d 100644 --- a/drivers/net/wireless/ti/wlcore/rx.c +++ b/drivers/net/wireless/ti/wlcore/rx.c @@ -27,11 +27,16 @@ #include "wlcore.h" #include "debug.h" #include "acx.h" -#include "reg.h" #include "rx.h" #include "tx.h" #include "io.h" +/* + * TODO: this is here just for now, it must be removed when the data + * operations are in place. + */ +#include "../wl12xx/reg.h" + static u8 wl12xx_rx_get_mem_block(struct wl12xx_fw_status *status, u32 drv_rx_counter) { @@ -231,14 +236,14 @@ void wl12xx_rx(struct wl1271 *wl, struct wl12xx_fw_status *status) wl->rx_mem_pool_addr.addr_extra = wl->rx_mem_pool_addr.addr + 4; - wl1271_write(wl, WL1271_SLV_REG_DATA, - &wl->rx_mem_pool_addr, - sizeof(wl->rx_mem_pool_addr), false); + wlcore_write_data(wl, REG_SLV_REG_DATA, + &wl->rx_mem_pool_addr, + sizeof(wl->rx_mem_pool_addr), false); } /* Read all available packets at once */ - wl1271_read(wl, WL1271_SLV_MEM_DATA, wl->aggr_buf, - buf_size, true); + wlcore_read_data(wl, REG_SLV_MEM_DATA, wl->aggr_buf, + buf_size, true); /* Split data into separate packets */ pkt_offset = 0; @@ -278,7 +283,8 @@ void wl12xx_rx(struct wl1271 *wl, struct wl12xx_fw_status *status) * for older hardware revisions */ if (wl->quirks & WL12XX_QUIRK_END_OF_TRANSACTION) - wl1271_write32(wl, RX_DRIVER_COUNTER_ADDRESS, wl->rx_counter); + wl1271_write32(wl, WL12XX_REG_RX_DRIVER_COUNTER, + wl->rx_counter); wl12xx_rearm_rx_streaming(wl, active_hlids); } |