From patchwork Thu Oct 8 18:56:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 52567 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 n98J9uR5019204 for ; Thu, 8 Oct 2009 19:09:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759627AbZJHS61 (ORCPT ); Thu, 8 Oct 2009 14:58:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759615AbZJHS61 (ORCPT ); Thu, 8 Oct 2009 14:58:27 -0400 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 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n98IunOn025113; Thu, 8 Oct 2009 21:56:51 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Oct 2009 21:56:44 +0300 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Oct 2009 21:56:43 +0300 Received: from localhost.localdomain (pimenta.research.nokia.com [172.21.50.90]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n98IubOc001553; Thu, 8 Oct 2009 21:56:41 +0300 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> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1255028196-6565-1-git-send-email-luciano.coelho@nokia.com> References: <1255028196-6565-1-git-send-email-luciano.coelho@nokia.com> X-OriginalArrivalTime: 08 Oct 2009 18:56:43.0989 (UTC) FILETIME=[14101050:01CA4849] X-Nokia-AV: Clean Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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;