From: Juuso Oikarinen Date: Thu, 8 Oct 2009 18:56:18 +0000 (+0300) Subject: wl1271: Correction to TX block allocation calculation X-Git-Tag: upstream/snapshot3+hdmi~16449^2~599^2~170 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b4be9e08abd8c390d13001f5dd55f64afa5ab93;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git wl1271: Correction to TX block allocation calculation Correct the TX path implementation to allocate sufficient blocks in the firmware for TX packets. Signed-off-by: Juuso Oikarinen Reviewed-by: Kalle Valo Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/wl12xx/wl1271_tx.c b/drivers/net/wireless/wl12xx/wl1271_tx.c index ff22125..0c19688 100644 --- a/drivers/net/wireless/wl12xx/wl1271_tx.c +++ b/drivers/net/wireless/wl12xx/wl1271_tx.c @@ -58,7 +58,7 @@ 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 = (skb->len) >> TX_HW_BLOCK_SHIFT_DIV; + total_blocks = (total_len) >> TX_HW_BLOCK_SHIFT_DIV; excluded = (total_blocks << 2) + (skb->len & 0xff) + 34; total_blocks += (excluded > 252) ? 2 : 1; total_blocks += TX_HW_BLOCK_SPARE;