dfc: not caching grant for removed bearers
If a grant indication for a bearer has "removed" flag set, caching the bearer could lead to data stall for the next data call because modem will not send grant for this bearer during powersave. Do not cache grant for the removed or disabled bearers. Also make sure a bearer is flow enabled when it is associated with a tx queue. Change-Id: I7eca597e3cc7d5a0bfe523201c454fb45e66a3a0 Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
This commit is contained in:
parent
a6f6879bc6
commit
37ee4eb551
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
|
||||
@ -1003,7 +1004,9 @@ static int dfc_update_fc_map(struct net_device *dev, struct qos_info *qos,
|
||||
u32 adjusted_grant;
|
||||
|
||||
itm = qmi_rmnet_get_bearer_map(qos, fc_info->bearer_id);
|
||||
if (!itm)
|
||||
|
||||
/* cache the bearer assuming it is a new bearer */
|
||||
if (unlikely(!itm && !is_query && fc_info->num_bytes))
|
||||
itm = qmi_rmnet_get_bearer_noref(qos, fc_info->bearer_id);
|
||||
|
||||
if (itm) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
|
||||
@ -401,12 +402,15 @@ static void __qmi_rmnet_update_mq(struct net_device *dev,
|
||||
bearer->mq_idx = itm->mq_idx;
|
||||
}
|
||||
|
||||
qmi_rmnet_flow_control(dev, itm->mq_idx,
|
||||
bearer->grant_size > 0 ? 1 : 0);
|
||||
|
||||
/* Always enable flow for the newly associated bearer */
|
||||
if (!bearer->grant_size) {
|
||||
bearer->grant_size = DEFAULT_GRANT;
|
||||
bearer->grant_thresh =
|
||||
qmi_rmnet_grant_per(DEFAULT_GRANT);
|
||||
}
|
||||
qmi_rmnet_flow_control(dev, itm->mq_idx, 1);
|
||||
if (dfc_mode == DFC_MODE_SA)
|
||||
qmi_rmnet_flow_control(dev, bearer->ack_mq_idx,
|
||||
bearer->grant_size > 0 ? 1 : 0);
|
||||
qmi_rmnet_flow_control(dev, bearer->ack_mq_idx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user