linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ath6kl: handle background(BK) stream properly on htc mbox layer
@ 2012-04-27  1:18 Kevin Fang
  2012-04-27  1:18 ` [PATCH 2/2] ath6kl: assign Tx packet drop threshold per endpoint on htc pipe layer Kevin Fang
  2012-04-27  7:00 ` [PATCH 1/2] ath6kl: handle background(BK) stream properly on htc mbox layer Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Fang @ 2012-04-27  1:18 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, ath6kl-devel

Bug description:
STA sends huge BK QoS data frame first, then sends BE/VI/VO QoS data frame.
The corresponding throughput becomes much lower than
that without sends BK QoS data frame before.

The root cause is that when station send BK stream,
the tx credits of BK stream don't return back to
higher priority QoS stream such as BE, VI, and VO stream.
This patch will handle BK stream properly,
when there is higher priority QoS stream,
it will seek tx credits from BK stream properly.

Signed-off-by: Kevin Fang <kevin.fang@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/htc_mbox.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
index 065e615..3e65d36 100644
--- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c
+++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
@@ -83,10 +83,7 @@ static void ath6kl_credit_init(struct ath6kl_htc_credit_info *cred_info,
 			 * never goes inactive EVER.
 			 */
 			cur_ep_dist->dist_flags |= HTC_EP_ACTIVE;
-		} else if (cur_ep_dist->svc_id == WMI_DATA_BK_SVC)
-			/* this is the lowest priority data endpoint */
-			/* FIXME: this looks fishy, check */
-			cred_info->lowestpri_ep_dist = cur_ep_dist->list;
+		}
 
 		/*
 		 * Streams have to be created (explicit | implicit) for all
@@ -100,6 +97,13 @@ static void ath6kl_credit_init(struct ath6kl_htc_credit_info *cred_info,
 		 */
 	}
 
+	/*
+	 * For ath6kl_credit_seek function,
+	 * it use list_for_each_entry_reverse to walk around the whole ep list.
+	 * Therefore assign this lowestpri_ep_dist after walk around the ep_list
+	 */
+	cred_info->lowestpri_ep_dist = cur_ep_dist->list;
+
 	WARN_ON(cred_info->cur_free_credits <= 0);
 
 	list_for_each_entry(cur_ep_dist, ep_list, list) {
-- 
1.7.0.4


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

* [PATCH 2/2] ath6kl: assign Tx packet drop threshold per endpoint on htc pipe layer
  2012-04-27  1:18 [PATCH 1/2] ath6kl: handle background(BK) stream properly on htc mbox layer Kevin Fang
@ 2012-04-27  1:18 ` Kevin Fang
  2012-04-27  7:00 ` [PATCH 1/2] ath6kl: handle background(BK) stream properly on htc mbox layer Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Fang @ 2012-04-27  1:18 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, ath6kl-devel

on the htc mbox layer, it will assign each endpoint (AC)
with a different Tx-packet-drop threshold,
so lower priority AC is more likely to drop packets
and the cookies become more available to higher priority AC.

on the htc pipe layer, assign the tx packet drop threshold as well,
it will let AC to drop packets when cookies below the tx packet drop thresho

Signed-off-by: Kevin Fang <kevin.fang@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/htc_pipe.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/ath/ath6kl/htc_pipe.c
index b21a69f..f9626c7 100644
--- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c
+++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c
@@ -1378,6 +1378,9 @@ static int ath6kl_htc_pipe_conn_service(struct htc_target *target,
 	/* copy all the callbacks */
 	ep->ep_cb = conn_req->ep_cb;
 
+	/* initialize tx_drop_packet_threshold */
+	ep->tx_drop_packet_threshold = MAX_HI_COOKIE_NUM;
+
 	status = ath6kl_hif_pipe_map_service(ar, ep->svc_id,
 					     &ep->pipe.pipeid_ul,
 					     &ep->pipe.pipeid_dl);
-- 
1.7.0.4


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

* Re: [PATCH 1/2] ath6kl: handle background(BK) stream properly on htc mbox layer
  2012-04-27  1:18 [PATCH 1/2] ath6kl: handle background(BK) stream properly on htc mbox layer Kevin Fang
  2012-04-27  1:18 ` [PATCH 2/2] ath6kl: assign Tx packet drop threshold per endpoint on htc pipe layer Kevin Fang
@ 2012-04-27  7:00 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2012-04-27  7:00 UTC (permalink / raw)
  To: Kevin Fang; +Cc: linux-wireless, ath6kl-devel

On 04/27/2012 04:18 AM, Kevin Fang wrote:
> Bug description:
> STA sends huge BK QoS data frame first, then sends BE/VI/VO QoS data frame.
> The corresponding throughput becomes much lower than
> that without sends BK QoS data frame before.
> 
> The root cause is that when station send BK stream,
> the tx credits of BK stream don't return back to
> higher priority QoS stream such as BE, VI, and VO stream.
> This patch will handle BK stream properly,
> when there is higher priority QoS stream,
> it will seek tx credits from BK stream properly.
> 
> Signed-off-by: Kevin Fang <kevin.fang@qca.qualcomm.com>

Thanks, both patches applied. I just did minor cosmetic changes to the
commit log (word wrapping etc).

Kalle

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

end of thread, other threads:[~2012-04-27  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27  1:18 [PATCH 1/2] ath6kl: handle background(BK) stream properly on htc mbox layer Kevin Fang
2012-04-27  1:18 ` [PATCH 2/2] ath6kl: assign Tx packet drop threshold per endpoint on htc pipe layer Kevin Fang
2012-04-27  7:00 ` [PATCH 1/2] ath6kl: handle background(BK) stream properly on htc mbox layer Kalle Valo

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).