linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Patches for compat-drivers/linux-3.6.y
@ 2012-11-26 12:29 Bala Shanmugam
  2012-11-26 12:29 ` [PATCH 1/3] compat-drivers: Remove few cherry-pick patches Bala Shanmugam
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bala Shanmugam @ 2012-11-26 12:29 UTC (permalink / raw)
  To: rodrigue; +Cc: linux-wireless, backports

These patches are for linux-3.6.y branch and has some
fixes for AR9565.

Bala Shanmugam (3):
  compat-drivers: Remove few cherry-pick patches
  compat-drivers: Add next-pending patches.
  compat-drivers: Add a crap patch for AR9565

 ...005-ath9k-Improve-PAN-profile-performance.patch |  141 ++++++++++++++++++++
 .../0088-cfg80211-fix-antenna-gain-handling.patch  |   39 ------
 ...tale-pointers-potentially-causing-access-.patch |   43 ------
 ...for-TID-only-in-BlockAcks-while-checking-.patch |   65 ---------
 ...x-signal-strength-noise-measurements-on-a.patch |    2 +-
 .../0002-ath9k-Fix-MCI-reset-in-BT-cal_req.patch   |   95 +++++++++++++
 ...mp-audio-profiles-on-weak-signal-strength.patch |  105 +++++++++++++++
 7 files changed, 342 insertions(+), 148 deletions(-)
 create mode 100644 crap/0005-ath9k-Improve-PAN-profile-performance.patch
 delete mode 100644 linux-next-cherry-picks/0088-cfg80211-fix-antenna-gain-handling.patch
 delete mode 100644 linux-next-cherry-picks/0093-ath9k-fix-stale-pointers-potentially-causing-access-.patch
 delete mode 100644 linux-next-cherry-picks/0119-ath9k-Test-for-TID-only-in-BlockAcks-while-checking-.patch
 create mode 100644 linux-next-pending/0002-ath9k-Fix-MCI-reset-in-BT-cal_req.patch
 create mode 100644 linux-next-pending/0003-ath9k-stomp-audio-profiles-on-weak-signal-strength.patch

-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] compat-drivers: Remove few cherry-pick patches
  2012-11-26 12:29 [PATCH 0/3] Patches for compat-drivers/linux-3.6.y Bala Shanmugam
@ 2012-11-26 12:29 ` Bala Shanmugam
  2012-11-26 12:29 ` [PATCH 2/3] compat-drivers: Add next-pending patches Bala Shanmugam
  2012-11-26 12:29 ` [PATCH 3/3] compat-drivers: Add a crap patch for AR9565 Bala Shanmugam
  2 siblings, 0 replies; 5+ messages in thread
From: Bala Shanmugam @ 2012-11-26 12:29 UTC (permalink / raw)
  To: rodrigue; +Cc: linux-wireless, backports

These patches are moved to stable git, remove it and
refresh next pending patches.

Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
---
 .../0088-cfg80211-fix-antenna-gain-handling.patch  |   39 ------------
 ...tale-pointers-potentially-causing-access-.patch |   43 -------------
 ...for-TID-only-in-BlockAcks-while-checking-.patch |   65 --------------------
 ...x-signal-strength-noise-measurements-on-a.patch |    2 +-
 4 files changed, 1 insertions(+), 148 deletions(-)
 delete mode 100644 linux-next-cherry-picks/0088-cfg80211-fix-antenna-gain-handling.patch
 delete mode 100644 linux-next-cherry-picks/0093-ath9k-fix-stale-pointers-potentially-causing-access-.patch
 delete mode 100644 linux-next-cherry-picks/0119-ath9k-Test-for-TID-only-in-BlockAcks-while-checking-.patch

diff --git a/linux-next-cherry-picks/0088-cfg80211-fix-antenna-gain-handling.patch b/linux-next-cherry-picks/0088-cfg80211-fix-antenna-gain-handling.patch
deleted file mode 100644
index b5ee43d..0000000
--- a/linux-next-cherry-picks/0088-cfg80211-fix-antenna-gain-handling.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From c4a9fafc77a5318f5ed26c509bbcddf03e18c201 Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd@openwrt.org>
-Date: Wed, 17 Oct 2012 13:56:19 +0200
-Subject: [PATCH] cfg80211: fix antenna gain handling
-
-No driver initializes chan->max_antenna_gain to something sensible, and
-the only place where it is being used right now is inside ath9k. This
-leads to ath9k potentially using less tx power than it can use, which can
-decrease performance/range in some rare cases.
-
-Rather than going through every single driver, this patch initializes
-chan->orig_mag in wiphy_register(), ignoring whatever value the driver
-left in there. If a driver for some reason wishes to limit it independent
-from regulatory rulesets, it can do so internally.
-
-Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-Cc: stable@vger.kernel.org
-Signed-off-by: Johannes Berg <johannes.berg@intel.com>
----
- net/wireless/core.c |    3 +--
- 1 files changed, 1 insertions(+), 2 deletions(-)
-
-diff --git a/net/wireless/core.c b/net/wireless/core.c
-index 443d4d7..3f72530 100644
---- a/net/wireless/core.c
-+++ b/net/wireless/core.c
-@@ -526,8 +526,7 @@ int wiphy_register(struct wiphy *wiphy)
- 		for (i = 0; i < sband->n_channels; i++) {
- 			sband->channels[i].orig_flags =
- 				sband->channels[i].flags;
--			sband->channels[i].orig_mag =
--				sband->channels[i].max_antenna_gain;
-+			sband->channels[i].orig_mag = INT_MAX;
- 			sband->channels[i].orig_mpwr =
- 				sband->channels[i].max_power;
- 			sband->channels[i].band = band;
--- 
-1.7.4.1
-
diff --git a/linux-next-cherry-picks/0093-ath9k-fix-stale-pointers-potentially-causing-access-.patch b/linux-next-cherry-picks/0093-ath9k-fix-stale-pointers-potentially-causing-access-.patch
deleted file mode 100644
index e3a77ab..0000000
--- a/linux-next-cherry-picks/0093-ath9k-fix-stale-pointers-potentially-causing-access-.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 8c6e30936a7893a85f6222084f0f26aceb81137a Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd@openwrt.org>
-Date: Fri, 26 Oct 2012 00:31:11 +0200
-Subject: [PATCH] ath9k: fix stale pointers potentially causing access to free'd skbs
-
-bf->bf_next is only while buffers are chained as part of an A-MPDU
-in the tx queue. When a tid queue is flushed (e.g. on tearing down
-an aggregation session), frames can be enqueued again as normal
-transmission, without bf_next being cleared. This can lead to the
-old pointer being dereferenced again later.
-
-This patch might fix crashes and "Failed to stop TX DMA!" messages.
-
-Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-Cc: stable@vger.kernel.org
-Signed-off-by: John W. Linville <linville@tuxdriver.com>
----
- drivers/net/wireless/ath/ath9k/xmit.c |    2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
-index 378bd70..1ffca75 100644
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -312,6 +312,7 @@ static struct ath_buf *ath_tx_get_buffer(struct ath_softc *sc)
- 	}
- 
- 	bf = list_first_entry(&sc->tx.txbuf, struct ath_buf, list);
-+	bf->bf_next = NULL;
- 	list_del(&bf->list);
- 
- 	spin_unlock_bh(&sc->tx.txbuflock);
-@@ -1774,6 +1775,7 @@ static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
- 	list_add_tail(&bf->list, &bf_head);
- 	bf->bf_state.bf_type = 0;
- 
-+	bf->bf_next = NULL;
- 	bf->bf_lastbf = bf;
- 	ath_tx_fill_desc(sc, bf, txq, fi->framelen);
- 	ath_tx_txqaddbuf(sc, txq, &bf_head, false);
--- 
-1.7.4.1
-
diff --git a/linux-next-cherry-picks/0119-ath9k-Test-for-TID-only-in-BlockAcks-while-checking-.patch b/linux-next-cherry-picks/0119-ath9k-Test-for-TID-only-in-BlockAcks-while-checking-.patch
deleted file mode 100644
index 7c2f24e..0000000
--- a/linux-next-cherry-picks/0119-ath9k-Test-for-TID-only-in-BlockAcks-while-checking-.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 6fe7cc71bbf3a0bc28c9cec3c00bc11e81344412 Mon Sep 17 00:00:00 2001
-From: Sven Eckelmann <sven@narfation.org>
-Date: Mon, 29 Oct 2012 13:25:20 +0100
-Subject: [PATCH] ath9k: Test for TID only in BlockAcks while checking tx status
-
-The ath9k xmit functions for AMPDUs can send frames as non-aggregate in case
-only one frame is currently available. The client will then answer using a
-normal Ack instead of a BlockAck. This acknowledgement has no TID stored and
-therefore the hardware is not able to provide us the corresponding TID.
-
-The TID set by the hardware in the tx status descriptor has to be seen as
-undefined and not as a valid TID value for normal acknowledgements. Doing
-otherwise results in a massive amount of retransmissions and stalls of
-connections.
-
-Users may experience low bandwidth and complete connection stalls in
-environments with transfers using multiple TIDs.
-
-This regression was introduced in b11b160defc48e4daa283f785192ea3a23a51f8e
-("ath9k: validate the TID in the tx status information").
-
-Signed-off-by: Sven Eckelmann <sven@narfation.org>
-Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
-Cc: stable@vger.kernel.org
-Acked-by: Felix Fietkau <nbd@openwrt.org>
-Signed-off-by: John W. Linville <linville@tuxdriver.com>
----
- drivers/net/wireless/ath/ath9k/xmit.c |    8 ++++++--
- 1 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
-index 1ffca75..741918a 100644
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -394,7 +394,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
- 	u16 seq_st = 0, acked_cnt = 0, txfail_cnt = 0, seq_first;
- 	u32 ba[WME_BA_BMP_SIZE >> 5];
- 	int isaggr, txfail, txpending, sendbar = 0, needreset = 0, nbad = 0;
--	bool rc_update = true;
-+	bool rc_update = true, isba;
- 	struct ieee80211_tx_rate rates[4];
- 	struct ath_frame_info *fi;
- 	int nframes;
-@@ -438,13 +438,17 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
- 	tidno = ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK;
- 	tid = ATH_AN_2_TID(an, tidno);
- 	seq_first = tid->seq_start;
-+	isba = ts->ts_flags & ATH9K_TX_BA;
- 
- 	/*
- 	 * The hardware occasionally sends a tx status for the wrong TID.
- 	 * In this case, the BA status cannot be considered valid and all
- 	 * subframes need to be retransmitted
-+	 *
-+	 * Only BlockAcks have a TID and therefore normal Acks cannot be
-+	 * checked
- 	 */
--	if (tidno != ts->tid)
-+	if (isba && tidno != ts->tid)
- 		txok = false;
- 
- 	isaggr = bf_isaggr(bf);
--- 
-1.7.4.1
-
diff --git a/linux-next-pending/0001-ath9k_hw-fix-signal-strength-noise-measurements-on-a.patch b/linux-next-pending/0001-ath9k_hw-fix-signal-strength-noise-measurements-on-a.patch
index 727c904..604dc0d 100644
--- a/linux-next-pending/0001-ath9k_hw-fix-signal-strength-noise-measurements-on-a.patch
+++ b/linux-next-pending/0001-ath9k_hw-fix-signal-strength-noise-measurements-on-a.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 
 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
-@@ -332,9 +332,9 @@
+@@ -344,9 +344,9 @@
  #define AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ     -95
  #define AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ     -100
  
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] compat-drivers: Add next-pending patches.
  2012-11-26 12:29 [PATCH 0/3] Patches for compat-drivers/linux-3.6.y Bala Shanmugam
  2012-11-26 12:29 ` [PATCH 1/3] compat-drivers: Remove few cherry-pick patches Bala Shanmugam
@ 2012-11-26 12:29 ` Bala Shanmugam
  2012-11-26 12:29 ` [PATCH 3/3] compat-drivers: Add a crap patch for AR9565 Bala Shanmugam
  2 siblings, 0 replies; 5+ messages in thread
From: Bala Shanmugam @ 2012-11-26 12:29 UTC (permalink / raw)
  To: rodrigue; +Cc: linux-wireless, backports

Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
---
 .../0002-ath9k-Fix-MCI-reset-in-BT-cal_req.patch   |   95 ++++++++++++++++++
 ...mp-audio-profiles-on-weak-signal-strength.patch |  105 ++++++++++++++++++++
 2 files changed, 200 insertions(+), 0 deletions(-)
 create mode 100644 linux-next-pending/0002-ath9k-Fix-MCI-reset-in-BT-cal_req.patch
 create mode 100644 linux-next-pending/0003-ath9k-stomp-audio-profiles-on-weak-signal-strength.patch

diff --git a/linux-next-pending/0002-ath9k-Fix-MCI-reset-in-BT-cal_req.patch b/linux-next-pending/0002-ath9k-Fix-MCI-reset-in-BT-cal_req.patch
new file mode 100644
index 0000000..130fce8
--- /dev/null
+++ b/linux-next-pending/0002-ath9k-Fix-MCI-reset-in-BT-cal_req.patch
@@ -0,0 +1,95 @@
+From 21aac28c0e8a762395364bf99b939cba120f58e8 Mon Sep 17 00:00:00 2001
+From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+Date: Fri, 16 Nov 2012 19:18:01 +0530
+Subject: [PATCH 1/2] ath9k: Fix MCI reset in BT cal_req
+
+This patch reverts the commit "ath9k_hw: Wait BT calibration to complete"
+and bail out from MCI interrupt routine for chip reset. The above commit
+stalls the WLAN TCP traffic while bringing up and down the BT interface
+iteratively. Fixing this properly by queueing up chip reset and bailing
+out properly from tasklet routine.
+
+Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+---
+ drivers/net/wireless/ath/ath9k/ar9003_mci.c |  1 -
+ drivers/net/wireless/ath/ath9k/debug.c      |  3 +++
+ drivers/net/wireless/ath/ath9k/debug.h      |  1 +
+ drivers/net/wireless/ath/ath9k/mci.c        | 21 +++------------------
+ 4 files changed, 7 insertions(+), 19 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+@@ -714,7 +714,6 @@ bool ar9003_mci_start_reset(struct ath_h
+ 
+ 	return true;
+ }
+-EXPORT_SYMBOL(ar9003_mci_start_reset);
+ 
+ int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan,
+ 			 struct ath9k_hw_cal_data *caldata)
+--- a/drivers/net/wireless/ath/ath9k/debug.c
++++ b/drivers/net/wireless/ath/ath9k/debug.c
+@@ -837,6 +837,9 @@ static ssize_t read_file_reset(struct fi
+ 	len += snprintf(buf + len, sizeof(buf) - len,
+ 			"%17s: %2d\n", "PLL RX Hang",
+ 			sc->debug.stats.reset[RESET_TYPE_PLL_HANG]);
++	len += snprintf(buf + len, sizeof(buf) - len,
++			"%17s: %2d\n", "MCI Reset",
++			sc->debug.stats.reset[RESET_TYPE_MCI]);
+ 
+ 	if (len > sizeof(buf))
+ 		len = sizeof(buf);
+--- a/drivers/net/wireless/ath/ath9k/debug.h
++++ b/drivers/net/wireless/ath/ath9k/debug.h
+@@ -41,6 +41,7 @@ enum ath_reset_type {
+ 	RESET_TYPE_PLL_HANG,
+ 	RESET_TYPE_MAC_HANG,
+ 	RESET_TYPE_BEACON_STUCK,
++	RESET_TYPE_MCI,
+ 	__RESET_TYPE_MAX
+ };
+ 
+--- a/drivers/net/wireless/ath/ath9k/mci.c
++++ b/drivers/net/wireless/ath/ath9k/mci.c
+@@ -207,23 +207,6 @@ skip_tuning:
+ 	ath9k_btcoex_timer_resume(sc);
+ }
+ 
+-static void ath_mci_wait_btcal_done(struct ath_softc *sc)
+-{
+-	struct ath_hw *ah = sc->sc_ah;
+-
+-	/* Stop tx & rx */
+-	ieee80211_stop_queues(sc->hw);
+-	ath_stoprecv(sc);
+-	ath_drain_all_txq(sc, false);
+-
+-	/* Wait for cal done */
+-	ar9003_mci_start_reset(ah, ah->curchan);
+-
+-	/* Resume tx & rx */
+-	ath_startrecv(sc);
+-	ieee80211_wake_queues(sc->hw);
+-}
+-
+ static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
+ {
+ 	struct ath_hw *ah = sc->sc_ah;
+@@ -235,7 +218,7 @@ static void ath_mci_cal_msg(struct ath_s
+ 	case MCI_GPM_BT_CAL_REQ:
+ 		if (mci_hw->bt_state == MCI_BT_AWAKE) {
+ 			mci_hw->bt_state = MCI_BT_CAL_START;
+-			ath_mci_wait_btcal_done(sc);
++			ath9k_queue_reset(sc, RESET_TYPE_MCI);
+ 		}
+ 		ath_dbg(common, MCI, "MCI State : %d\n", mci_hw->bt_state);
+ 		break;
+@@ -578,6 +561,8 @@ void ath_mci_intr(struct ath_softc *sc)
+ 		mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_GPM;
+ 
+ 		while (more_data == MCI_GPM_MORE) {
++			if (test_bit(SC_OP_HW_RESET, &sc->sc_flags))
++				return;
+ 
+ 			pgpm = mci->gpm_buf.bf_addr;
+ 			offset = ar9003_mci_get_next_gpm_offset(ah, false,
diff --git a/linux-next-pending/0003-ath9k-stomp-audio-profiles-on-weak-signal-strength.patch b/linux-next-pending/0003-ath9k-stomp-audio-profiles-on-weak-signal-strength.patch
new file mode 100644
index 0000000..9efbcee
--- /dev/null
+++ b/linux-next-pending/0003-ath9k-stomp-audio-profiles-on-weak-signal-strength.patch
@@ -0,0 +1,105 @@
+From 2b2a2ffa141e1b2d9d4f2699dffcf7e35081089a Mon Sep 17 00:00:00 2001
+From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+Date: Mon, 19 Nov 2012 17:46:25 +0530
+Subject: [PATCH 2/2] ath9k: stomp audio profiles on weak signal strength
+
+On lower WLAN signal strength, WLAN downlink traffic might suffer
+from retransmissions. At the mean time, playing SCO/A2DP profiles
+is affecting WLAN stability. In such scenario, by stomping SCO/A2DP
+BT traffic completely for a BTCOEX period, gives WLAN traffic an
+oppertunity to recover PHY rate. It also improves WLAN stability at
+lower RSSI without sacificing BT traffic.
+
+Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+---
+ drivers/net/wireless/ath/ath9k/ath9k.h  |  1 +
+ drivers/net/wireless/ath/ath9k/btcoex.c |  1 +
+ drivers/net/wireless/ath/ath9k/btcoex.h |  1 +
+ drivers/net/wireless/ath/ath9k/gpio.c   |  5 ++++-
+ drivers/net/wireless/ath/ath9k/mci.c    | 18 ++++++++++++++++++
+ 5 files changed, 25 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/ath/ath9k/ath9k.h
++++ b/drivers/net/wireless/ath/ath9k/ath9k.h
+@@ -482,6 +482,7 @@ struct ath_btcoex {
+ 	int rssi_count;
+ 	struct ath_gen_timer *no_stomp_timer; /* Timer for no BT stomping */
+ 	struct ath_mci_profile mci;
++	u8 stomp_audio;
+ };
+ 
+ #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+--- a/drivers/net/wireless/ath/ath9k/btcoex.c
++++ b/drivers/net/wireless/ath/ath9k/btcoex.c
+@@ -49,6 +49,7 @@ static const u32 mci_wlan_weights[ATH_BT
+ 	{ 0x01017d01, 0x3b3b3b01, 0x3b3b3b01, 0x3b3b3b3b }, /* STOMP_LOW */
+ 	{ 0x01017d01, 0x01010101, 0x01010101, 0x01010101 }, /* STOMP_NONE */
+ 	{ 0x01017d01, 0x013b0101, 0x3b3b0101, 0x3b3b013b }, /* STOMP_LOW_FTP */
++	{ 0xffffff01, 0xffffffff, 0xffffff01, 0xffffffff }, /* STOMP_AUDIO */
+ };
+ 
+ void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum)
+--- a/drivers/net/wireless/ath/ath9k/btcoex.h
++++ b/drivers/net/wireless/ath/ath9k/btcoex.h
+@@ -50,6 +50,7 @@ enum ath_stomp_type {
+ 	ATH_BTCOEX_STOMP_LOW,
+ 	ATH_BTCOEX_STOMP_NONE,
+ 	ATH_BTCOEX_STOMP_LOW_FTP,
++	ATH_BTCOEX_STOMP_AUDIO,
+ 	ATH_BTCOEX_STOMP_MAX
+ };
+ 
+--- a/drivers/net/wireless/ath/ath9k/gpio.c
++++ b/drivers/net/wireless/ath/ath9k/gpio.c
+@@ -247,6 +247,9 @@ static void ath_btcoex_period_timer(unsi
+ 			stomp_type = ATH_BTCOEX_STOMP_ALL;
+ 			timer_period = btcoex->btscan_no_stomp;
+ 		}
++	} else if (btcoex->stomp_audio >= 5) {
++		stomp_type = ATH_BTCOEX_STOMP_AUDIO;
++		btcoex->stomp_audio = 0;
+ 	}
+ 
+ 	ath9k_hw_btcoex_bt_stomp(ah, stomp_type);
+@@ -295,7 +298,7 @@ static void ath_btcoex_no_stomp_timer(vo
+ 	    (!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI) &&
+ 	     test_bit(BT_OP_SCAN, &btcoex->op_flags)))
+ 		ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE);
+-	 else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL)
++	else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL)
+ 		ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_LOW);
+ 
+ 	ath9k_hw_btcoex_enable(ah);
+--- a/drivers/net/wireless/ath/ath9k/mci.c
++++ b/drivers/net/wireless/ath/ath9k/mci.c
+@@ -729,12 +729,30 @@ void ath9k_mci_set_txpower(struct ath_so
+ 		ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit, false);
+ }
+ 
++static void ath9k_mci_stomp_audio(struct ath_softc *sc)
++{
++	struct ath_hw *ah = sc->sc_ah;
++	struct ath_btcoex *btcoex = &sc->btcoex;
++	struct ath_mci_profile *mci = &btcoex->mci;
++
++	if (!mci->num_sco && !mci->num_a2dp)
++		return;
++
++	if (ah->stats.avgbrssi > 25) {
++		btcoex->stomp_audio = 0;
++		return;
++	}
++
++	btcoex->stomp_audio++;
++}
+ void ath9k_mci_update_rssi(struct ath_softc *sc)
+ {
+ 	struct ath_hw *ah = sc->sc_ah;
+ 	struct ath_btcoex *btcoex = &sc->btcoex;
+ 	struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci;
+ 
++	ath9k_mci_stomp_audio(sc);
++
+ 	if (!(mci_hw->config & ATH_MCI_CONFIG_CONCUR_TX))
+ 		return;
+ 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] compat-drivers: Add a crap patch for AR9565
  2012-11-26 12:29 [PATCH 0/3] Patches for compat-drivers/linux-3.6.y Bala Shanmugam
  2012-11-26 12:29 ` [PATCH 1/3] compat-drivers: Remove few cherry-pick patches Bala Shanmugam
  2012-11-26 12:29 ` [PATCH 2/3] compat-drivers: Add next-pending patches Bala Shanmugam
@ 2012-11-26 12:29 ` Bala Shanmugam
  2012-11-27 13:34   ` Rajkumar Manoharan
  2 siblings, 1 reply; 5+ messages in thread
From: Bala Shanmugam @ 2012-11-26 12:29 UTC (permalink / raw)
  To: rodrigue; +Cc: linux-wireless, backports

This patch is required to improve BT throughput to
meet customer requirement.  This patch is a workaround
to put WLAN to sleep during BT cycle and cannot be
upstreamed.

Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
---
 ...9k-Improve-BT-PAN-FTP-profile-performance.patch |  140 ++++++++++++++++++++
 1 files changed, 140 insertions(+), 0 deletions(-)
 create mode 100644 crap/0005-ath9k-Improve-BT-PAN-FTP-profile-performance.patch

diff --git a/crap/0005-ath9k-Improve-BT-PAN-FTP-profile-performance.patch b/crap/0005-ath9k-Improve-BT-PAN-FTP-profile-performance.patch
new file mode 100644
index 0000000..a566351
--- /dev/null
+++ b/crap/0005-ath9k-Improve-BT-PAN-FTP-profile-performance.patch
@@ -0,0 +1,140 @@
+From 6c4e8baa270c00e16a606bf0ad4a686bd5c0300c Mon Sep 17 00:00:00 2001
+From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+Date: Fri, 23 Nov 2012 14:17:59 +0530
+Subject: [PATCH] ath9k: Improve BT PAN/FTP profile performance
+
+As AR9565 shares LNA and antenna for both BT & WLAN, there
+are some degrade in BT performance. In order to improve BT PAN/FTP
+profile performance, this change puts WLAN into sleep state
+whenever BT gets its slot during BTCOEX period. It improves
+BT performance at the cost of WLAN throughout. Hence this change
+is applied only for AR9565 and BT FTP/PAN profiles.
+
+Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+---
+ drivers/net/wireless/ath/ath9k/btcoex.c | 13 +++++++++++++
+ drivers/net/wireless/ath/ath9k/btcoex.h |  1 +
+ drivers/net/wireless/ath/ath9k/gpio.c   |  5 ++++-
+ drivers/net/wireless/ath/ath9k/mci.c    | 13 +++++++++++++
+ drivers/net/wireless/ath/ath9k/mci.h    |  1 +
+ drivers/net/wireless/ath/ath9k/reg.h    |  5 ++++-
+ 6 files changed, 36 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c
+index 9963b0b..40a9761 100644
+--- a/drivers/net/wireless/ath/ath9k/btcoex.c
++++ b/drivers/net/wireless/ath/ath9k/btcoex.c
+@@ -414,3 +414,16 @@ void ath9k_hw_btcoex_set_concur_txprio(struct ath_hw *ah, u8 *stomp_txprio)
+ 		btcoex->tx_prio[i] = stomp_txprio[i];
+ }
+ EXPORT_SYMBOL(ath9k_hw_btcoex_set_concur_txprio);
++
++void ath9k_hw_btcoex_set_sleep(struct ath_hw *ah, u8 state)
++{
++	REG_RMW_FIELD(ah, AR_PCU_MISC_MODE2,
++		      AR_PCU_MISC_MODE2_PM_FIELD_FOR_DAT, state);
++	REG_RMW_FIELD(ah, AR_PCU_MISC_MODE3,
++		      AR_PCU_MISC_MODE3_PM_FIELD_FOR_MGT, state);
++	if (state)
++		REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV);
++	else
++		REG_CLR_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV);
++}
++EXPORT_SYMBOL(ath9k_hw_btcoex_set_sleep);
+diff --git a/drivers/net/wireless/ath/ath9k/btcoex.h b/drivers/net/wireless/ath/ath9k/btcoex.h
+index 6de26ea..5e82cca 100644
+--- a/drivers/net/wireless/ath/ath9k/btcoex.h
++++ b/drivers/net/wireless/ath/ath9k/btcoex.h
+@@ -120,5 +120,6 @@ void ath9k_hw_btcoex_disable(struct ath_hw *ah);
+ void ath9k_hw_btcoex_bt_stomp(struct ath_hw *ah,
+ 			      enum ath_stomp_type stomp_type);
+ void ath9k_hw_btcoex_set_concur_txprio(struct ath_hw *ah, u8 *stomp_txprio);
++void ath9k_hw_btcoex_set_sleep(struct ath_hw *ah, u8 state);
+ 
+ #endif
+diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
+index 4b412aa..6599f76 100644
+--- a/drivers/net/wireless/ath/ath9k/gpio.c
++++ b/drivers/net/wireless/ath/ath9k/gpio.c
+@@ -234,8 +234,10 @@ static void ath_btcoex_period_timer(unsigned long data)
+ 	if (!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI))
+ 		ath_detect_bt_priority(sc);
+ 
+-	if (ah->caps.hw_caps & ATH9K_HW_CAP_MCI)
++	if (ah->caps.hw_caps & ATH9K_HW_CAP_MCI) {
++		ath9k_mci_set_sleep(sc, 0);
+ 		ath_mci_ftp_adjust(sc);
++	}
+ 
+ 	spin_lock_bh(&btcoex->btcoex_lock);
+ 
+@@ -303,6 +305,7 @@ static void ath_btcoex_no_stomp_timer(void *arg)
+ 
+ 	ath9k_hw_btcoex_enable(ah);
+ 	spin_unlock_bh(&btcoex->btcoex_lock);
++	ath9k_mci_set_sleep(sc, 1);
+ 	ath9k_ps_restore(sc);
+ }
+ 
+diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
+index 706378e..419c11f 100644
+--- a/drivers/net/wireless/ath/ath9k/mci.c
++++ b/drivers/net/wireless/ath/ath9k/mci.c
+@@ -745,6 +745,7 @@ static void ath9k_mci_stomp_audio(struct ath_softc *sc)
+ 
+ 	btcoex->stomp_audio++;
+ }
++
+ void ath9k_mci_update_rssi(struct ath_softc *sc)
+ {
+ 	struct ath_hw *ah = sc->sc_ah;
+@@ -772,3 +773,15 @@ void ath9k_mci_update_rssi(struct ath_softc *sc)
+ 		}
+ 	}
+ }
++
++void ath9k_mci_set_sleep(struct ath_softc *sc, u8 state)
++{
++	struct ath_mci_profile *mci = &sc->btcoex.mci;
++
++	if (!AR_SREV_9565(sc->sc_ah))
++		return;
++
++	state = (state && (mci->num_pan || mci->num_other_acl)) ? 1 : 0;
++
++	ath9k_hw_btcoex_set_sleep(sc->sc_ah, state);
++}
+diff --git a/drivers/net/wireless/ath/ath9k/mci.h b/drivers/net/wireless/ath/ath9k/mci.h
+index 0695883..4f39730 100644
+--- a/drivers/net/wireless/ath/ath9k/mci.h
++++ b/drivers/net/wireless/ath/ath9k/mci.h
+@@ -155,6 +155,7 @@ int ath_mci_setup(struct ath_softc *sc);
+ void ath_mci_cleanup(struct ath_softc *sc);
+ void ath_mci_intr(struct ath_softc *sc);
+ void ath9k_mci_update_rssi(struct ath_softc *sc);
++void ath9k_mci_set_sleep(struct ath_softc *sc, u8 state);
+ 
+ #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+ void ath_mci_enable(struct ath_softc *sc);
+diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
+index ad3c82c..69277f2 100644
+--- a/drivers/net/wireless/ath/ath9k/reg.h
++++ b/drivers/net/wireless/ath/ath9k/reg.h
+@@ -1897,10 +1897,13 @@ enum {
+ #define AR_PCU_MISC_MODE2_ENABLE_AGGWEP                0x00020000
+ #define AR_PCU_MISC_MODE2_HWWAR1                       0x00100000
+ #define AR_PCU_MISC_MODE2_HWWAR2                       0x02000000
++#define AR_PCU_MISC_MODE2_PM_FIELD_FOR_DAT             0x04000000
++#define AR_PCU_MISC_MODE2_PM_FIELD_FOR_DAT_S           26
+ #define AR_PCU_MISC_MODE2_RESERVED2                    0xFFFE0000
+ 
+ #define AR_PCU_MISC_MODE3			       0x83d0
+-
++#define AR_PCU_MISC_MODE3_PM_FIELD_FOR_MGT	       0x00400000
++#define AR_PCU_MISC_MODE3_PM_FIELD_FOR_MGT_S	       22
+ #define AR_MAC_PCU_ASYNC_FIFO_REG3			0x8358
+ #define AR_MAC_PCU_ASYNC_FIFO_REG3_DATAPATH_SEL		0x00000400
+ #define AR_MAC_PCU_ASYNC_FIFO_REG3_SOFT_RESET		0x80000000
+-- 
+1.8.0
+
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] compat-drivers: Add a crap patch for AR9565
  2012-11-26 12:29 ` [PATCH 3/3] compat-drivers: Add a crap patch for AR9565 Bala Shanmugam
@ 2012-11-27 13:34   ` Rajkumar Manoharan
  0 siblings, 0 replies; 5+ messages in thread
From: Rajkumar Manoharan @ 2012-11-27 13:34 UTC (permalink / raw)
  To: Bala Shanmugam; +Cc: rodrigue, linux-wireless, backports

On Mon, Nov 26, 2012 at 05:59:57PM +0530, Bala Shanmugam wrote:
> This patch is required to improve BT throughput to
> meet customer requirement.  This patch is a workaround
> to put WLAN to sleep during BT cycle and cannot be
> upstreamed.
> 
> Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
> ---
>  ...9k-Improve-BT-PAN-FTP-profile-performance.patch |  140 ++++++++++++++++++++
>  1 files changed, 140 insertions(+), 0 deletions(-)
>  create mode 100644 crap/0005-ath9k-Improve-BT-PAN-FTP-profile-performance.patch
>
Luis,

Can you please hold this patch? It needs some more testing.

-Rajkumar

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-27 13:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26 12:29 [PATCH 0/3] Patches for compat-drivers/linux-3.6.y Bala Shanmugam
2012-11-26 12:29 ` [PATCH 1/3] compat-drivers: Remove few cherry-pick patches Bala Shanmugam
2012-11-26 12:29 ` [PATCH 2/3] compat-drivers: Add next-pending patches Bala Shanmugam
2012-11-26 12:29 ` [PATCH 3/3] compat-drivers: Add a crap patch for AR9565 Bala Shanmugam
2012-11-27 13:34   ` Rajkumar Manoharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).