diff options
author | Eliad Ben Yishay <quic_ebenyish@quicinc.com> | 2022-04-21 11:02:17 +0300 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2022-04-29 07:23:22 -0700 |
commit | 837ab5874a60c98a535159ef91df4ef5328c4e04 (patch) | |
tree | 1340829742d8ec10c29acb5f3c17dd74296f09fc /drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c | |
parent | 452f681fa5b5d25e623edd29f094d8594bf3f1d8 (diff) | |
download | dataipa-837ab5874a60c98a535159ef91df4ef5328c4e04.tar.gz |
dataipa: ipahal: Filtering & routing rules generation extra word pointer fix
* In case extension header exists the rule is 2 bytes into the extra words
area
* Subtract extension header size to point to the next whole 8 byte word
right after the header
Change-Id: Ic6e4fc05ca8e03408530cc9815f4ce7455bd7c57
Signed-off-by: Eliad Ben Yishay <quic_ebenyish@quicinc.com>
Diffstat (limited to 'drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c')
-rw-r--r-- | drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c index 4e171f2..b16e5d1 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c @@ -2853,19 +2853,19 @@ static int ipa_fltrt_generate_hw_rule_bdy_from_eq_5_5( } else if (extra_bytes > IPA3_0_HW_TBL_HDR_WIDTH) { /* two extra words */ extra = *buf; - rest = *buf + IPA3_0_HW_TBL_HDR_WIDTH * 2; + rest = *buf + IPA3_0_HW_TBL_HDR_WIDTH * 2 - ext_hdr * 2; } else if (extra_bytes > 0) { /* single exra word */ extra = *buf; /* With ext_hdr, 2 bytes are already occupied. */ if (ext_hdr && extra_bytes > (IPA3_0_HW_TBL_HDR_WIDTH - 2)) - rest = *buf + IPA3_0_HW_TBL_HDR_WIDTH * 2; + rest = *buf + IPA3_0_HW_TBL_HDR_WIDTH * 2 - ext_hdr * 2; else - rest = *buf + IPA3_0_HW_TBL_HDR_WIDTH; + rest = *buf + IPA3_0_HW_TBL_HDR_WIDTH - ext_hdr * 2; } else { /* no extra words */ - extra = NULL; - rest = *buf; + extra = ext_hdr ? *buf : NULL; + rest = *buf - ext_hdr * 2 + ext_hdr * IPA3_0_HW_TBL_HDR_WIDTH; } /* |