diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-10-12 15:08:53 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:05 -0400 |
commit | 207347e498cbe25fa2a8369edd49df43e56000be (patch) | |
tree | f970b3384de1f2074d126d01930fe4df6b9ba5fb /drivers/net/wireless/wl12xx/wl1271_tx.c | |
parent | 3cfd6cf960b2b030ccae1144a5c0dcd91c7c56a8 (diff) | |
download | kernel_samsung_smdk4412-207347e498cbe25fa2a8369edd49df43e56000be.zip kernel_samsung_smdk4412-207347e498cbe25fa2a8369edd49df43e56000be.tar.gz kernel_samsung_smdk4412-207347e498cbe25fa2a8369edd49df43e56000be.tar.bz2 |
wl1271: Update TX path block calucation algo
Update the TX path block calculation algorithm based on TI reference.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_tx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_tx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_tx.c b/drivers/net/wireless/wl12xx/wl1271_tx.c index 5d3aa4b..56a7f36 100644 --- a/drivers/net/wireless/wl12xx/wl1271_tx.c +++ b/drivers/net/wireless/wl12xx/wl1271_tx.c @@ -57,8 +57,8 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct sk_buff *skb, u32 extra) /* approximate the number of blocks required for this packet in the firmware */ /* FIXME: try to figure out what is done here and make it cleaner */ - total_blocks = (total_len) >> TX_HW_BLOCK_SHIFT_DIV; - excluded = (total_blocks << 2) + (skb->len & 0xff) + 34; + total_blocks = (total_len + 20) >> TX_HW_BLOCK_SHIFT_DIV; + excluded = (total_blocks << 2) + ((total_len + 20) & 0xff) + 34; total_blocks += (excluded > 252) ? 2 : 1; total_blocks += TX_HW_BLOCK_SPARE; |