aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorChilam Ng <chilamng@qca.qualcomm.com>2012-02-09 05:17:01 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2012-02-27 12:14:51 -0500
commit0ea10f2b469ee51ed9948dd24cdd9582a98b885e (patch)
tree93b7e19903f146a43205c4bd8ed31d79bfab5f14 /drivers/net/wireless/ath
parentd0ff7383a3164adff7072719717d574436ec1677 (diff)
ath6kl: assign Tx packet drop threshold per endpoint based on AC priority
Tx packets will begin to drop when there are multiple traffic priorities and the current traffic is not the highest priority and the remaining cookies drop below a certain number, which is fixed for all AC. It is possilbe that lower priority AC have more traffic which will consume more cookies and lock out higher priority AC from having any. 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. Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath6kl/htc.c9
-rw-r--r--drivers/net/wireless/ath/ath6kl/htc.h1
-rw-r--r--drivers/net/wireless/ath/ath6kl/txrx.c3
3 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index c703ef9c5313..920e7c07fd4f 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -2483,6 +2483,15 @@ int ath6kl_htc_conn_service(struct htc_target *target,
2483 endpoint->cred_dist.endpoint = assigned_ep; 2483 endpoint->cred_dist.endpoint = assigned_ep;
2484 endpoint->cred_dist.cred_sz = target->tgt_cred_sz; 2484 endpoint->cred_dist.cred_sz = target->tgt_cred_sz;
2485 2485
2486 switch (endpoint->svc_id) {
2487 case WMI_DATA_BK_SVC:
2488 endpoint->tx_drop_packet_threshold = MAX_DEF_COOKIE_NUM / 3;
2489 break;
2490 default:
2491 endpoint->tx_drop_packet_threshold = MAX_HI_COOKIE_NUM;
2492 break;
2493 }
2494
2486 if (conn_req->max_rxmsg_sz) { 2495 if (conn_req->max_rxmsg_sz) {
2487 /* 2496 /*
2488 * Override cred_per_msg calculation, this optimizes 2497 * Override cred_per_msg calculation, this optimizes
diff --git a/drivers/net/wireless/ath/ath6kl/htc.h b/drivers/net/wireless/ath/ath6kl/htc.h
index 519766571334..2de4d6fc1e32 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.h
+++ b/drivers/net/wireless/ath/ath6kl/htc.h
@@ -501,6 +501,7 @@ struct htc_endpoint {
501 u8 seqno; 501 u8 seqno;
502 u32 conn_flags; 502 u32 conn_flags;
503 struct htc_endpoint_stats ep_st; 503 struct htc_endpoint_stats ep_st;
504 u16 tx_drop_packet_threshold;
504}; 505};
505 506
506struct htc_control_buffer { 507struct htc_control_buffer {
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 633637ace661..802291346d30 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -594,7 +594,8 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target,
594 */ 594 */
595 if (ar->ac_stream_pri_map[ar->ep2ac_map[endpoint]] < 595 if (ar->ac_stream_pri_map[ar->ep2ac_map[endpoint]] <
596 ar->hiac_stream_active_pri && 596 ar->hiac_stream_active_pri &&
597 ar->cookie_count <= MAX_HI_COOKIE_NUM) 597 ar->cookie_count <=
598 target->endpoint[endpoint].tx_drop_packet_threshold)
598 /* 599 /*
599 * Give preference to the highest priority stream by 600 * Give preference to the highest priority stream by
600 * dropping the packets which overflowed. 601 * dropping the packets which overflowed.