msm: ipa3: Fix the agg_byte_limit update for ioctl_v2

Includes agg_byt_limit update for ioctl_v2

Change-Id: I21121b10857f0742297694cc2230cdb782b14360
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
This commit is contained in:
Michael Adisumarta
2021-02-18 18:00:42 -08:00
parent 1bcd04848d
commit 6be04c2b1f

View File

@@ -3912,16 +3912,20 @@ static void ipa3_set_aggr_limit(struct ipa_sys_connect_params *in,
u32 *aggr_byte_limit = &in->ipa_ep_cfg.aggr.aggr_byte_limit; u32 *aggr_byte_limit = &in->ipa_ep_cfg.aggr.aggr_byte_limit;
u32 adjusted_sz; u32 adjusted_sz;
if (sys->ext_ioctl_v2) { if (ipa3_ctx->ipa_wan_skb_page) {
IPAERR("set rx_buff_sz config from netmngr %lu\n", (unsigned long) IPAERR("set rx_buff_sz config from netmngr %lu\n", (unsigned long)
sys->buff_size); sys->buff_size);
sys->rx_buff_sz = IPA_GENERIC_RX_BUFF_SZ(sys->buff_size); sys->rx_buff_sz = IPA_GENERIC_RX_BUFF_SZ(sys->buff_size);
*aggr_byte_limit = IPA_ADJUST_AGGR_BYTE_LIMIT(*aggr_byte_limit);
} else { } else {
adjusted_sz = ipa_adjust_ra_buff_base_sz(*aggr_byte_limit); adjusted_sz = ipa_adjust_ra_buff_base_sz(*aggr_byte_limit);
IPAERR("get close-by %u\n", adjusted_sz); IPAERR("get close-by %u\n", adjusted_sz);
IPAERR("set default rx_buff_sz %lu\n", (unsigned long) IPAERR("set default rx_buff_sz %lu\n", (unsigned long)
IPA_GENERIC_RX_BUFF_SZ(adjusted_sz)); IPA_GENERIC_RX_BUFF_SZ(adjusted_sz));
sys->rx_buff_sz = IPA_GENERIC_RX_BUFF_SZ(adjusted_sz); sys->rx_buff_sz = IPA_GENERIC_RX_BUFF_SZ(adjusted_sz);
*aggr_byte_limit = sys->rx_buff_sz < *aggr_byte_limit ?
IPA_ADJUST_AGGR_BYTE_LIMIT(sys->rx_buff_sz) :
IPA_ADJUST_AGGR_BYTE_LIMIT(*aggr_byte_limit);
} }
/* disable ipa_status */ /* disable ipa_status */
@@ -3930,10 +3934,6 @@ static void ipa3_set_aggr_limit(struct ipa_sys_connect_params *in,
if (in->client == IPA_CLIENT_APPS_WAN_COAL_CONS) if (in->client == IPA_CLIENT_APPS_WAN_COAL_CONS)
in->ipa_ep_cfg.aggr.aggr_hard_byte_limit_en = 1; in->ipa_ep_cfg.aggr.aggr_hard_byte_limit_en = 1;
*aggr_byte_limit = sys->rx_buff_sz < *aggr_byte_limit ?
IPA_ADJUST_AGGR_BYTE_LIMIT(sys->rx_buff_sz) :
IPA_ADJUST_AGGR_BYTE_LIMIT(*aggr_byte_limit);
IPADBG("set aggr_limit %lu\n", (unsigned long) *aggr_byte_limit); IPADBG("set aggr_limit %lu\n", (unsigned long) *aggr_byte_limit);
} }