From patchwork Thu Aug 27 20:59:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 44327 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7RL0PhM011097 for ; Thu, 27 Aug 2009 21:00:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752838AbZH0VAW (ORCPT ); Thu, 27 Aug 2009 17:00:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752789AbZH0VAW (ORCPT ); Thu, 27 Aug 2009 17:00:22 -0400 Received: from smtp.nokia.com ([192.100.122.233]:50839 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752787AbZH0VAV (ORCPT ); Thu, 27 Aug 2009 17:00:21 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7RL01S1014486; Fri, 28 Aug 2009 00:00:05 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 28 Aug 2009 00:00:15 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 28 Aug 2009 00:00:14 +0300 Received: from localhost.localdomain (pimenta.research.nokia.com [172.21.50.90]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7RL025L020286; Fri, 28 Aug 2009 00:00:06 +0300 From: Luciano Coelho To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, juuso.oikarinen@nokia.com, kalle.valo@nokia.com Subject: [PATCH 02/13] wl1271: Correction to TX block allocation calculation Date: Thu, 27 Aug 2009 23:59:56 +0300 Message-Id: <1251406807-31495-3-git-send-email-luciano.coelho@nokia.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1251406807-31495-1-git-send-email-luciano.coelho@nokia.com> References: <1251406807-31495-1-git-send-email-luciano.coelho@nokia.com> X-OriginalArrivalTime: 27 Aug 2009 21:00:15.0182 (UTC) FILETIME=[6020DEE0:01CA2759] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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;