From: Chilam Ng Date: Thu, 9 Feb 2012 10:17:01 +0000 (-0800) Subject: ath6kl: assign Tx packet drop threshold per endpoint based on AC priority X-Git-Tag: v3.4-rc1~177^2~48^2~55^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ea10f2b469ee51ed9948dd24cdd9582a98b885e;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c index c703ef9..920e7c0 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, endpoint->cred_dist.endpoint = assigned_ep; endpoint->cred_dist.cred_sz = target->tgt_cred_sz; + switch (endpoint->svc_id) { + case WMI_DATA_BK_SVC: + endpoint->tx_drop_packet_threshold = MAX_DEF_COOKIE_NUM / 3; + break; + default: + endpoint->tx_drop_packet_threshold = MAX_HI_COOKIE_NUM; + break; + } + if (conn_req->max_rxmsg_sz) { /* * 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 5197665..2de4d6f 100644 --- a/drivers/net/wireless/ath/ath6kl/htc.h +++ b/drivers/net/wireless/ath/ath6kl/htc.h @@ -501,6 +501,7 @@ struct htc_endpoint { u8 seqno; u32 conn_flags; struct htc_endpoint_stats ep_st; + u16 tx_drop_packet_threshold; }; struct htc_control_buffer { diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 633637a..8022913 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, */ if (ar->ac_stream_pri_map[ar->ep2ac_map[endpoint]] < ar->hiac_stream_active_pri && - ar->cookie_count <= MAX_HI_COOKIE_NUM) + ar->cookie_count <= + target->endpoint[endpoint].tx_drop_packet_threshold) /* * Give preference to the highest priority stream by * dropping the packets which overflowed.