summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/tx.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-12-07 21:38:47 (GMT)
committerLuciano Coelho <coelho@ti.com>2012-04-12 05:43:58 (GMT)
commit3edab305dfd48415074a36f1cdd605dcae8463de (patch)
tree090df6dff3214f856b54ceaf7b287737e0aacf60 /drivers/net/wireless/ti/wlcore/tx.c
parent72b0624fa5b766133fd0be9099724324b1f0d70e (diff)
downloadlinux-fsl-qoriq-3edab305dfd48415074a36f1cdd605dcae8463de.tar.xz
wlcore/wl12xx: change GEM Tx-spare blocks per-vif
The number of spare Tx blocks must be changed when the GEM cipher is engaged. Track set_key() operations to see if this is the case and change the Tx HW spare block count accordingly. Set the number of spare blocks for each operating mode from the low level driver. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/tx.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/tx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 815d0ac..3306990 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -190,7 +190,7 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u32 len;
u32 total_blocks;
int id, ret = -EBUSY, ac;
- u32 spare_blocks = wl->tx_spare_blocks;
+ u32 spare_blocks = wl->normal_tx_spare;
bool is_dummy = false;
if (buf_offset + total_len > WL1271_AGGR_BUFFER_SIZE)
@@ -205,11 +205,10 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif,
in the firmware */
len = wl12xx_calc_packet_alignment(wl, total_len);
- /* in case of a dummy packet, use default amount of spare mem blocks */
- if (unlikely(wl12xx_is_dummy_packet(wl, skb))) {
+ if (unlikely(wl12xx_is_dummy_packet(wl, skb)))
is_dummy = true;
- spare_blocks = TX_HW_BLOCK_SPARE_DEFAULT;
- }
+ else if (wlvif->is_gem)
+ spare_blocks = wl->gem_tx_spare;
total_blocks = (len + TX_HW_BLOCK_SIZE - 1) / TX_HW_BLOCK_SIZE +
spare_blocks;