summaryrefslogtreecommitdiff
path: root/ipanat
diff options
context:
space:
mode:
authorSkylar Chang <chiaweic@codeaurora.org>2015-01-06 11:18:32 -0800
committerSkylar Chang <chiaweic@codeaurora.org>2015-01-06 11:18:32 -0800
commit9fb80f638737a2810be75673216f813927cd8b85 (patch)
tree999e36f291652b5770544bbfb8154f1c9186c0f7 /ipanat
parenta96aedac386367e2ecd41ba5266545b61f277bf8 (diff)
downloadipacfg-mgr-9fb80f638737a2810be75673216f813927cd8b85.tar.gz
IPACM: Reset nat memory before posting init command
Reset the memory allocated for nat table before posting init command to IPH. 0th location not suppose to access by software after posting init imm command. Change-Id: I5aad855ac956ba1488cc95d0ae04c24fa8a9b361
Diffstat (limited to 'ipanat')
-rw-r--r--ipanat/src/ipa_nat_drvi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ipanat/src/ipa_nat_drvi.c b/ipanat/src/ipa_nat_drvi.c
index 74161a7..32114b5 100644
--- a/ipanat/src/ipa_nat_drvi.c
+++ b/ipanat/src/ipa_nat_drvi.c
@@ -665,6 +665,9 @@ int ipa_nati_add_ipv4_tbl(uint32_t public_ip_addr,
return -EINVAL;
}
+ /* Reset the nat table before posting init cmd */
+ ipa_nati_reset_tbl(tbl_indx);
+
/* Initialize the ipa hw with nat table dimensions */
ret = ipa_nati_post_ipv4_init_cmd(tbl_indx);
if (0 != ret) {
@@ -672,8 +675,6 @@ int ipa_nati_add_ipv4_tbl(uint32_t public_ip_addr,
return -EINVAL;
}
- ipa_nati_reset_tbl(tbl_indx);
-
/* Return table handle */
ipv4_nat_cache.table_cnt++;
*tbl_hdl = ipv4_nat_cache.table_cnt;