summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Javid <mjavid@codeaurora.org>2017-11-24 16:28:39 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-11-24 11:27:22 -0800
commitc337e15a4013dde878e0688521f108f24e1e2ee1 (patch)
treed68ee599011cf0dd5f2fc95c7dc2f827a613962f
parent283316ef397ae687beb7407c72d80f90fec2d9c6 (diff)
downloadipacfg-mgr-c337e15a4013dde878e0688521f108f24e1e2ee1.tar.gz
ipacm: Add flag to get previous mux id
Add flag to get previous mux id and delete rule for correct PDN. Change-Id: Id55ba3d2c0c79121ccf4e8f74e017e10bf82acc7 Acked-by: Pooja Kumari <kumarip@qti.qualcomm.com> Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
-rw-r--r--ipacm/inc/IPACM_Lan.h2
-rw-r--r--ipacm/src/IPACM_Lan.cpp18
2 files changed, 15 insertions, 5 deletions
diff --git a/ipacm/inc/IPACM_Lan.h b/ipacm/inc/IPACM_Lan.h
index 0f50ae7..21a72c1 100644
--- a/ipacm/inc/IPACM_Lan.h
+++ b/ipacm/inc/IPACM_Lan.h
@@ -263,7 +263,9 @@ protected:
bool is_active;
bool modem_ul_v4_set;
+ uint8_t v4_mux_id;
bool modem_ul_v6_set;
+ uint8_t v6_mux_id;
bool sta_ul_v4_set;
bool sta_ul_v6_set;
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp
index e47767c..2cbb69a 100644
--- a/ipacm/src/IPACM_Lan.cpp
+++ b/ipacm/src/IPACM_Lan.cpp
@@ -81,7 +81,9 @@ IPACM_Lan::IPACM_Lan(int iface_index) : IPACM_Iface(iface_index)
num_wan_ul_fl_rule_v6 = 0;
is_active = true;
modem_ul_v4_set = false;
+ v4_mux_id = 0;
modem_ul_v6_set = false;
+ v6_mux_id = 0;
sta_ul_v4_set = false;
sta_ul_v6_set = false;
@@ -1169,8 +1171,8 @@ int IPACM_Lan::handle_wan_down(bool is_sta_mode)
flt_index.retain_header_valid = 1;
flt_index.retain_header = 0;
flt_index.embedded_call_mux_id_valid = 1;
- flt_index.embedded_call_mux_id = IPACM_Iface::ipacmcfg->GetQmapId();
-
+ flt_index.embedded_call_mux_id = v4_mux_id;
+ v4_mux_id = 0;
if(false == m_filtering.SendFilteringRuleIndex(&flt_index))
{
IPACMERR("Error sending filtering rule index, aborting...\n");
@@ -3102,6 +3104,7 @@ int IPACM_Lan::handle_uplink_filter_rule(ipacm_ext_prop *prop, ipa_ip_type iptyp
int fd;
int i, index, eq_index;
uint32_t value = 0;
+ uint8_t qmap_id;
IPACMDBG_H("Set modem UL flt rules\n");
@@ -3157,8 +3160,9 @@ int IPACM_Lan::handle_uplink_filter_rule(ipacm_ext_prop *prop, ipa_ip_type iptyp
flt_index.retain_header_valid = 1;
flt_index.retain_header = 0;
- flt_index.embedded_call_mux_id_valid = 1;
- flt_index.embedded_call_mux_id = IPACM_Iface::ipacmcfg->GetQmapId();
+ flt_index.embedded_call_mux_id_valid = 1;
+ qmap_id = IPACM_Iface::ipacmcfg->GetQmapId();
+ flt_index.embedded_call_mux_id = qmap_id;
#ifndef FEATURE_IPA_V3
IPACMDBG_H("flt_index: src pipe: %d, num of rules: %d, ebd pipe: %d, mux id: %d\n",
flt_index.source_pipe_index, flt_index.filter_index_list_len, flt_index.embedded_pipe_index, flt_index.embedded_call_mux_id);
@@ -3376,6 +3380,7 @@ int IPACM_Lan::handle_uplink_filter_rule(ipacm_ext_prop *prop, ipa_ip_type iptyp
num_wan_ul_fl_rule_v4++;
}
IPACM_Iface::ipacmcfg->increaseFltRuleCount(rx_prop->rx[0].src_pipe, iptype, pFilteringTable->num_rules);
+ v4_mux_id = qmap_id;
}
else if(iptype == IPA_IP_v6)
{
@@ -3385,7 +3390,9 @@ int IPACM_Lan::handle_uplink_filter_rule(ipacm_ext_prop *prop, ipa_ip_type iptyp
num_wan_ul_fl_rule_v6++;
}
IPACM_Iface::ipacmcfg->increaseFltRuleCount(rx_prop->rx[0].src_pipe, iptype, pFilteringTable->num_rules);
+ v6_mux_id = qmap_id;
}
+
else
{
IPACMERR("IP type is not expected.\n");
@@ -3469,7 +3476,8 @@ int IPACM_Lan::handle_wan_down_v6(bool is_sta_mode)
flt_index.retain_header_valid = 1;
flt_index.retain_header = 0;
flt_index.embedded_call_mux_id_valid = 1;
- flt_index.embedded_call_mux_id = IPACM_Iface::ipacmcfg->GetQmapId();
+ flt_index.embedded_call_mux_id = v6_mux_id;
+ v6_mux_id = 0;
if(false == m_filtering.SendFilteringRuleIndex(&flt_index))
{
IPACMERR("Error sending filtering rule index, aborting...\n");