[qca-ssdk]: del flowcookie need check nathelper status

Del flowcookie need check nathelper status and unregister
inetaddr notifier when nathelpr exit.

Change-Id: I7e1f6f8139afb302207d28a84e6640d8b900933d
Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
diff --git a/app/nathelper/linux/host_helper.c b/app/nathelper/linux/host_helper.c
index 426b77d..d9402cf 100755
--- a/app/nathelper/linux/host_helper.c
+++ b/app/nathelper/linux/host_helper.c
@@ -2030,5 +2030,9 @@
     nf_unregister_hook(&ipv6_inhook);
 #endif
 #endif
+
+	#ifdef AUTO_UPDATE_PPPOE_INFO
+	unregister_inetaddr_notifier(&qcaswitch_ip_notifier);
+	#endif
 }
 
diff --git a/app/nathelper/linux/lib/nat_helper_hsl.c b/app/nathelper/linux/lib/nat_helper_hsl.c
index b271fd9..1c2ec17 100755
--- a/app/nathelper/linux/lib/nat_helper_hsl.c
+++ b/app/nathelper/linux/lib/nat_helper_hsl.c
@@ -620,15 +620,6 @@
 void
 napt_hw_mode_cleanup(void)
 {
-    sw_error_t rv;
-    a_uint32_t entry = 0;
-
-    HSL_REG_ENTRY_GET(rv, 0, MOD_ENABLE, 0,
-                      (a_uint8_t *) (&entry), sizeof (a_uint32_t));
-    SW_SET_REG_BY_FIELD(MOD_ENABLE, L3_EN, 0, entry);
-    HSL_REG_ENTRY_SET(rv, 0, MOD_ENABLE, 0,
-                      (a_uint8_t *) (&entry), sizeof (a_uint32_t));
-
     ACL_STATUS_SET(0, A_FALSE);
 }
 
diff --git a/src/hsl/dess/dess_nat.c b/src/hsl/dess/dess_nat.c
index 687af6d..456649d 100755
--- a/src/hsl/dess/dess_nat.c
+++ b/src/hsl/dess/dess_nat.c
@@ -2286,7 +2286,8 @@
 			#if 0
 			napt_cookie[entry.entry_id*2+1] = 0;
 			#endif
-			nat_helper_cookie_del(entry.entry_id);
+			if (dess_nat_global_status)
+				nat_helper_cookie_del(entry.entry_id);
 			#endif
 			return ret;
 		}
@@ -2336,7 +2337,8 @@
 			#if 0
 			napt_cookie[entry.entry_id*2] = 0;
 			#endif
-			nat_helper_cookie_del(entry.entry_id);
+			if (dess_nat_global_status)
+				nat_helper_cookie_del(entry.entry_id);
 			#endif
 			return ret;
 		}