From 51e4b595d7dce5b1dc0f9e70e0e5069b6b85c80d Mon Sep 17 00:00:00 2001 From: Namita Nair Date: Tue, 21 Mar 2023 17:18:45 -0700 Subject: [PATCH] qcacmn: Fix filter delete check in opt wifi dp If only a single filter is installed, then the ip version of the second filter param will not be set. Hence fix the check for ip version in htt layer as it is already verified when received from the IPA layer. Change-Id: I05dff71aa27a254023599df0cbab51bafd0c4f82 CRs-Fixed: 3441760 --- dp/wifi3.0/dp_htt.c | 8 +++----- ipa/core/src/wlan_ipa_core.c | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 9a6150b1a2..921ee20eff 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -523,7 +523,7 @@ QDF_STATUS htt_h2t_rx_cce_super_rule_setup(struct htt_soc *soc, void *param) HTT_RX_CCE_SUPER_RULE_SETUP_OPERATION_SET(*msg_word, op); /* Set cce_super_rule_params */ - for (i = 0; i < num_filters; i++) { + for (i = 0; i < RX_CCE_SUPER_RULE_SETUP_NUM; i++) { valid = flt_params->flt_addr_params[i].valid; ver = flt_params->flt_addr_params[i].l3_type; msg_word++; @@ -537,8 +537,7 @@ QDF_STATUS htt_h2t_rx_cce_super_rule_setup(struct htt_soc *soc, void *param) msg_word, flt_params->flt_addr_params[i].src_ipv6_addr); } else { - dp_htt_err("Wrong ip version. Cannot set src_addr."); - return QDF_STATUS_FILT_REQ_ERROR; + dp_htt_debug("Filter %d not in use.", i); } /* move uint32_t *msg_word by IPV6 addr size */ @@ -553,8 +552,7 @@ QDF_STATUS htt_h2t_rx_cce_super_rule_setup(struct htt_soc *soc, void *param) msg_word, flt_params->flt_addr_params[i].dst_ipv6_addr); } else { - dp_htt_err("Wrong ip version. Cannot set dst_addr."); - return QDF_STATUS_FILT_REQ_ERROR; + dp_htt_debug("Filter %d not in use.", i); } /* move uint32_t *msg_word by IPV6 addr size */ diff --git a/ipa/core/src/wlan_ipa_core.c b/ipa/core/src/wlan_ipa_core.c index 5b348b2875..3ae5bc87ba 100644 --- a/ipa/core/src/wlan_ipa_core.c +++ b/ipa/core/src/wlan_ipa_core.c @@ -5112,7 +5112,7 @@ int wlan_ipa_wdi_opt_dpath_flt_rem_cb( } dp_flt_params->op = HTT_RX_CCE_SUPER_RULE_INSTALL; dp_flt_params->pdev_id = ipa_obj->dp_pdev_id; - dp_flt_params->num_filters = IPA_WDI_MAX_FILTER; + dp_flt_params->num_filters = num_flts; qdf_event_reset(&ipa_obj->ipa_flt_evnt); ipa_info("opt_dp: op %d, pdev_id %d. num_flts %d,",