diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-12-12 13:44:27 +0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-04-12 09:43:59 +0400 |
commit | 4a3b97eea216135cd37e6d3a4a6c551c201a6615 (patch) | |
tree | c5124b5939cecad0b7061fcf91601c6ece301a46 /drivers/net/wireless/ti/wl12xx/main.c | |
parent | b3b4b4b812018a06221b6d7b88a5540fccae2940 (diff) | |
download | linux-4a3b97eea216135cd37e6d3a4a6c551c201a6615.tar.xz |
wlcore/wl12xx: add hw op for setting blocks in hw_tx_desc
Each chip family has a slightly different Tx descriptor. Set the
descriptor values according to family.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl12xx/main.c')
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/main.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index e1bdeae89506..c8f314814e5d 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c @@ -597,6 +597,18 @@ static u32 wl12xx_calc_tx_blocks(struct wl1271 *wl, u32 len, u32 spare_blks) return (align_len + blk_size - 1) / blk_size + spare_blks; } +static void +wl12xx_set_tx_desc_blocks(struct wl1271 *wl, struct wl1271_tx_hw_descr *desc, + u32 blks, u32 spare_blks) +{ + if (wl->chip.id == CHIP_ID_1283_PG20) { + desc->wl128x_mem.total_mem_blocks = blks; + } else { + desc->wl127x_mem.extra_blocks = spare_blks; + desc->wl127x_mem.total_mem_blocks = blks; + } +} + static bool wl12xx_mac_in_fuse(struct wl1271 *wl) { bool supported = false; @@ -661,13 +673,14 @@ static void wl12xx_get_mac(struct wl1271 *wl) } static struct wlcore_ops wl12xx_ops = { - .identify_chip = wl12xx_identify_chip, - .boot = wl12xx_boot, - .trigger_cmd = wl12xx_trigger_cmd, - .ack_event = wl12xx_ack_event, - .calc_tx_blocks = wl12xx_calc_tx_blocks, - .get_pg_ver = wl12xx_get_pg_ver, - .get_mac = wl12xx_get_mac, + .identify_chip = wl12xx_identify_chip, + .boot = wl12xx_boot, + .trigger_cmd = wl12xx_trigger_cmd, + .ack_event = wl12xx_ack_event, + .calc_tx_blocks = wl12xx_calc_tx_blocks, + .set_tx_desc_blocks = wl12xx_set_tx_desc_blocks, + .get_pg_ver = wl12xx_get_pg_ver, + .get_mac = wl12xx_get_mac, }; struct wl12xx_priv { |