IPANAT: fix IPANAT deletion issue

Used different variable to back up index table next
entry while deleting the head in index table to avoid
overwrite. Print index table entry while dumping nat entry

Change-Id: I6c389652ce0d514e0a03ff0532d90727c100bd4a
diff --git a/ipanat/src/ipa_nat_drvi.c b/ipanat/src/ipa_nat_drvi.c
index 4d77a1f..d85a96d 100644
--- a/ipanat/src/ipa_nat_drvi.c
+++ b/ipanat/src/ipa_nat_drvi.c
@@ -1615,6 +1615,7 @@
 
 	uint16_t prev_entry = IPA_NAT_INVALID_NAT_ENTRY;
 	uint16_t next_entry = IPA_NAT_INVALID_NAT_ENTRY;
+	uint16_t indx_next_entry = IPA_NAT_INVALID_NAT_ENTRY;
 	uint16_t table_entry;
 
 	size = sizeof(struct ipa_ioc_nat_dma_cmd)+
@@ -1787,6 +1788,7 @@
 																																	cmd->dma[no_of_cmds].base_addr,
 																																	indx_tbl_entry);
 		cmd->dma[no_of_cmds].offset += IPA_NAT_INDEX_RULE_NEXT_FIELD_OFFSET;
+		indx_next_entry = next_entry;
 	}
 
 	/*
@@ -1880,7 +1882,11 @@
 	if (IPA_NAT_DEL_TYPE_HEAD == indx_rule_pos) {
 		/* Reset the next entry to IPA_NAT_DEL_TYPE_HEAD as we copied
 						 the next entry to IPA_NAT_DEL_TYPE_HEAD */
-		indx_tbl_ptr[next_entry].tbl_entry_nxt_indx = 0;
+
+		IPADBG("Resetting, index table entry(Proper): %d\n",
+						(cache_ptr->table_entries + indx_next_entry));
+
+		indx_tbl_ptr[indx_next_entry].tbl_entry_nxt_indx = 0;
 
 		/*
 				 In case of IPA_NAT_DEL_TYPE_HEAD, update the sw specific parameters