From patchwork Wed Aug 29 03:50:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Manoharan X-Patchwork-Id: 1383491 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7F736DFFCF for ; Wed, 29 Aug 2012 03:55:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752578Ab2H2Dyk (ORCPT ); Tue, 28 Aug 2012 23:54:40 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:2025 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752575Ab2H2Dyj (ORCPT ); Tue, 28 Aug 2012 23:54:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1346212480; x=1377748480; h=from:mime-version:content-transfer-encoding:message-id: date:to:cc:subject; bh=X3n36uOx56QjM8ZP29FCg4Af2x8+86OvjmtiP1mz1yo=; b=eQTi5Nx9EBhS1sFfiIDGIf0Uym7bblzFJQHPgSScbiSuLgMqwzwqmfZr A94msAlBH4Yyw6H7w/MPmmcw+irdR/zlK56iBVctKdgFFdLyDfFbJercC aE+VEd3rbRCv3984ufVm39PXO2RzTJlp0eOFN6SHzNCfKOnweYkgyH9yw g=; X-IronPort-AV: E=McAfee;i="5400,1158,6818"; a="228257684" Received: from ironmsg04-l.qualcomm.com ([172.30.48.19]) by wolverine02.qualcomm.com with ESMTP; 28 Aug 2012 20:54:25 -0700 X-IronPort-AV: E=Sophos;i="4.80,330,1344236400"; d="scan'208";a="291191027" Received: from nasanexhc11.na.qualcomm.com ([172.30.39.6]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 28 Aug 2012 20:54:24 -0700 Received: from APHYDEXHC05.ap.qualcomm.com (10.222.117.51) by nasanexhc11.na.qualcomm.com (172.30.39.6) with Microsoft SMTP Server (TLS) id 14.2.318.1; Tue, 28 Aug 2012 20:54:23 -0700 Received: from nako (10.100.2.14) by qcmail1.qualcomm.com (10.222.117.51) with Microsoft SMTP Server (TLS) id 14.2.318.1; Tue, 28 Aug 2012 20:54:20 -0700 From: Sujith Manoharan MIME-Version: 1.0 Message-ID: <20541.37266.533608.571099@gargle.gargle.HOWL> Date: Wed, 29 Aug 2012 09:20:42 +0530 To: X-Mailer: VM 8.2.0b under 24.1.1 (x86_64-unknown-linux-gnu) CC: Subject: [PATCH] ath9k: Fix TX filter usage X-Originating-IP: [10.100.2.14] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The TX filter bit for a station would be set by the HW when a frame is not acked. A frame would be completed with ATH9K_TXERR_FILT status only when the corresponding filter bit for the destination station is already set. Currently, un-acknowledged packets are added to the pending queue and retried, but the "clear_dest_mask" bit in the descriptor is set only when the TX status has been ATH9K_TXERR_FILT. This results in packet loss and the log shows: wlan0: dropped TX filtered frame, queue_len=0 PS=0 @4309746071 wlan0: dropped TX filtered frame, queue_len=0 PS=0 @4309746076 wlan0: dropped TX filtered frame, queue_len=0 PS=0 @4309746377 ... ... This issue can be resolved by making sure that the destination mask is cleared when the packet is being retried and the earlier TX status is ATH9K_TXERR_XRETRY. Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath9k/xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index ef91f6c..b074c3a 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -568,7 +568,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq, if (!an->sleeping) { ath_tx_queue_tid(txq, tid); - if (ts->ts_status & ATH9K_TXERR_FILT) + if (ts->ts_status & (ATH9K_TXERR_FILT | ATH9K_TXERR_XRETRY)) tid->ac->clear_ps_filter = true; } }