diff options
author | Skylar Chang <chiaweic@codeaurora.org> | 2015-01-06 11:18:32 -0800 |
---|---|---|
committer | Skylar Chang <chiaweic@codeaurora.org> | 2015-01-06 11:18:32 -0800 |
commit | 9fb80f638737a2810be75673216f813927cd8b85 (patch) | |
tree | 999e36f291652b5770544bbfb8154f1c9186c0f7 /ipanat | |
parent | a96aedac386367e2ecd41ba5266545b61f277bf8 (diff) | |
download | ipacfg-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.c | 5 |
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; |