From patchwork Thu Sep 27 15:12:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Shajakhan, Mohammed" X-Patchwork-Id: 1514771 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 868933FC71 for ; Thu, 27 Sep 2012 15:13:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755400Ab2I0PNP (ORCPT ); Thu, 27 Sep 2012 11:13:15 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:58489 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754924Ab2I0PNN (ORCPT ); Thu, 27 Sep 2012 11:13:13 -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=1348758793; x=1380294793; h=from:to:cc:subject:date:message-id:mime-version; bh=q8B895ZOJyQu+/qtIUniMvXlaSb6MBMBQVxWgrUqA0M=; b=PaAbnHQlznqYaHgRyiHAZG594qx+tQ/Jjvq1mSD1CsbaDDiIcV6fIOmO YRndV0XaeQ7bSM5570tGQNmLgGFymAKAbEa5LZRzkLmxARiW+QVo1Hyv6 DNKHFFjameEky5wgNYRbP4PYah6YeZdzHSGMEPeoerriiPElTigP2VoNM c=; X-IronPort-AV: E=McAfee;i="5400,1158,6847"; a="239693634" Received: from ironmsg04-r.qualcomm.com ([172.30.46.18]) by wolverine02.qualcomm.com with ESMTP; 27 Sep 2012 08:12:57 -0700 X-IronPort-AV: E=Sophos;i="4.80,496,1344236400"; d="scan'208";a="395320444" Received: from nasanexhc04.na.qualcomm.com ([172.30.48.17]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 27 Sep 2012 08:12:57 -0700 Received: from qcmail1.qualcomm.com (172.30.48.1) by qcmail1.qualcomm.com (172.30.48.17) with Microsoft SMTP Server (TLS) id 14.2.318.1; Thu, 27 Sep 2012 08:12:55 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Thu, 27 Sep 2012 20:42:50 +0530 From: Mohammed Shafi Shajakhan To: "John W. Linville" CC: , Rodriguez Luis , , Mohammed Shafi Shajakhan Subject: [PATCH] ath9k: Ensure we set FTP_STOMP_LOW weight when WLAN is idle Date: Thu, 27 Sep 2012 20:42:48 +0530 Message-ID: <1348758768-5228-1-git-send-email-mohammed@qca.qualcomm.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-Originating-IP: [172.30.48.1] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Mohammed Shafi Shajakhan We WLAN is idle we can some better bandwidth to FTP by setting STOMP_LOW_FTP where stomping the FTP BT is pretty much reduced when compared to setting STOMP_LOW weight. we calculate WLAN is idle by taking into account of the rx data packets, so ensure that we take into account of data packets(ignore beacons). Also update bt_wait_time even if the chip is NETWORK SLEEP mode. This should help BT throughput when WLAN is idle, when everything else is fine :) Signed-off-by: Mohammed Shafi Shajakhan --- drivers/net/wireless/ath/ath9k/gpio.c | 2 +- drivers/net/wireless/ath/ath9k/recv.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index bf7d29e..97d1ed4 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c @@ -204,6 +204,7 @@ static void ath_btcoex_period_timer(unsigned long data) spin_lock_irqsave(&sc->sc_pm_lock, flags); if (sc->sc_ah->power_mode == ATH9K_PM_NETWORK_SLEEP) { + btcoex->bt_wait_time += btcoex->btcoex_period; spin_unlock_irqrestore(&sc->sc_pm_lock, flags); goto skip_hw_wakeup; } @@ -214,7 +215,6 @@ static void ath_btcoex_period_timer(unsigned long data) ath_detect_bt_priority(sc); is_btscan = test_bit(BT_OP_SCAN, &btcoex->op_flags); - btcoex->bt_wait_time += btcoex->btcoex_period; if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) { if (ar9003_mci_state(ah, MCI_STATE_NEED_FTP_STOMP) && (mci->num_pan || mci->num_other_acl)) diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 4480c0c..9b2a8cc 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -1105,7 +1105,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) else rs.is_mybeacon = false; - sc->rx.num_pkts++; + if (ieee80211_is_data_present(hdr->frame_control) && + !ieee80211_is_qos_nullfunc(hdr->frame_control)) + sc->rx.num_pkts++; + ath_debug_stat_rx(sc, &rs); /*