mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
dfc_qmi: Honor tcp ancillary bit even when there is no change in grant
The tcp ancillary bit has been updated to be sent in almost all cases unlike earlier where this was sent in case of TCP DL traffic. This bit will now not be set only in case of adverse scenarios, so this change ensures that the ACK queue state is updated in case the ancillary bit is unset. CRs-Fixed: 2957344 Change-Id: I4e1f26c9d3fabc64401284e36b48d82a4f3a5161 Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
This commit is contained in:
parent
357a4b32f4
commit
82d77d9ec4
1 changed files with 17 additions and 7 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
|
@ -923,12 +923,18 @@ int dfc_bearer_flow_ctl(struct net_device *dev,
|
|||
|
||||
enable = bearer->grant_size ? true : false;
|
||||
|
||||
qmi_rmnet_flow_control(dev, bearer->mq_idx, enable);
|
||||
/* Do not flow disable tcp ack q in tcp bidir
|
||||
* ACK queue opened first to drain ACKs faster
|
||||
* Although since tcp ancillary is true most of the time,
|
||||
* this shouldn't really make a difference
|
||||
* If there is non zero grant but tcp ancillary is false,
|
||||
* send out ACKs anyway
|
||||
*/
|
||||
if (bearer->ack_mq_idx != INVALID_MQ)
|
||||
qmi_rmnet_flow_control(dev, bearer->ack_mq_idx,
|
||||
enable || bearer->tcp_bidir);
|
||||
|
||||
/* Do not flow disable tcp ack q in tcp bidir */
|
||||
if (bearer->ack_mq_idx != INVALID_MQ &&
|
||||
(enable || !bearer->tcp_bidir))
|
||||
qmi_rmnet_flow_control(dev, bearer->ack_mq_idx, enable);
|
||||
qmi_rmnet_flow_control(dev, bearer->mq_idx, enable);
|
||||
|
||||
if (!enable && bearer->ack_req)
|
||||
dfc_send_ack(dev, bearer->bearer_id,
|
||||
|
|
@ -1022,8 +1028,12 @@ static int dfc_update_fc_map(struct net_device *dev, struct qos_info *qos,
|
|||
itm->bytes_in_flight = 0;
|
||||
}
|
||||
|
||||
/* update queue state only if there is a change in grant
|
||||
* or change in ancillary tcp state
|
||||
*/
|
||||
if ((itm->grant_size == 0 && adjusted_grant > 0) ||
|
||||
(itm->grant_size > 0 && adjusted_grant == 0))
|
||||
(itm->grant_size > 0 && adjusted_grant == 0) ||
|
||||
(itm->tcp_bidir ^ DFC_IS_TCP_BIDIR(ancillary)))
|
||||
action = true;
|
||||
|
||||
/* This is needed by qmap */
|
||||
|
|
|
|||
Loading…
Reference in a new issue