Return-path: Received: from smtp.nokia.com ([192.100.122.233]:23058 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759611AbZJHS60 (ORCPT ); Thu, 8 Oct 2009 14:58:26 -0400 From: Luciano Coelho To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, Juuso Oikarinen Subject: [PATCH 02/20] wl1271: Correction to TX block allocation calculation Date: Thu, 8 Oct 2009 21:56:18 +0300 Message-Id: <1255028196-6565-3-git-send-email-luciano.coelho@nokia.com> In-Reply-To: <1255028196-6565-1-git-send-email-luciano.coelho@nokia.com> References: <1255028196-6565-1-git-send-email-luciano.coelho@nokia.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Juuso Oikarinen 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 --- drivers/net/wireless/wl12xx/wl1271_tx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.5.6.5