From patchwork Sat Apr 16 08:47:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 712021 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3G8le4t024230 for ; Sat, 16 Apr 2011 08:47:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751999Ab1DPIrj (ORCPT ); Sat, 16 Apr 2011 04:47:39 -0400 Received: from mail.atheros.com ([12.19.149.2]:43745 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751973Ab1DPIri (ORCPT ); Sat, 16 Apr 2011 04:47:38 -0400 Received: from mail.atheros.com ([10.234.20.105]) by sidewinder.atheros.com for ; Sat, 16 Apr 2011 01:47:12 -0700 Received: from mail.atheros.com (10.12.4.12) by SC1EXHC-01.global.atheros.com (10.234.20.111) with Microsoft SMTP Server (TLS) id 8.2.213.0; Sat, 16 Apr 2011 01:47:36 -0700 Received: by mail.atheros.com (sSMTP sendmail emulation); Sat, 16 Apr 2011 14:17:39 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH] ath9k_htc: Fix free slot value for cab queue Date: Sat, 16 Apr 2011 14:17:39 +0530 Message-ID: <1302943659-20116-1-git-send-email-rmanoharan@atheros.com> X-Mailer: git-send-email 1.7.4.4 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 16 Apr 2011 08:47:41 +0000 (UTC) ath9k_htc_tx_get_slot can return zero as valid index. Signed-off-by: Rajkumar Manoharan Acked-by: Sujith Manoharan --- drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c index bf7ef1b..a157107 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c @@ -322,7 +322,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv, } tx_slot = ath9k_htc_tx_get_slot(priv); - if (tx_slot != 0) { + if (tx_slot < 0) { ath_dbg(common, ATH_DBG_XMIT, "No free CAB slot\n"); dev_kfree_skb_any(skb); goto next;