[][macro for 32K and fix null ptr]

[Description]
Add macro for 32K entry and fix null pointer error

[Release-log]
N/A

Change-Id: I728000204a2199a7d15f826592149a15fe4e9b4c
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/4563564
diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat.h b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat.h
index 734b6bd..744dd5a 100644
--- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat.h
+++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat.h
@@ -581,9 +581,11 @@
  * DEF_ETRY_NUM_CFG need to be modified.
  */
 #define DEF_ETRY_NUM		8192
-/* feasible values : 16384, 8192, 4096, 2048, 1024 */
+/* feasible values : 32768, 16384, 8192, 4096, 2048, 1024 */
 #define DEF_ETRY_NUM_CFG	TABLE_8K
-/* corresponding values : TABLE_16K, TABLE_8K, TABLE_4K, TABLE_2K, TABLE_1K */
+/* corresponding values : TABLE_32K, TABLE_16K, TABLE_8K, TABLE_4K, TABLE_2K,
+ * TABLE_1K
+ */
 #define MAX_EXT_DEVS		(0x3fU)
 #define MAX_IF_NUM		64
 
@@ -705,6 +707,7 @@
 #define TABLE_4K 2
 #define TABLE_8K 3
 #define TABLE_16K 4
+#define TABLE_32K 5
 #define SMA_DROP 0 /* Drop the packet */
 #define SMA_DROP2 1 /* Drop the packet */
 #define SMA_ONLY_FWD_CPU 2 /* Only Forward to CPU */
diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
index 293f3c0..51370a9 100644
--- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
+++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
@@ -148,7 +148,7 @@
 			dev_put(dev);
 			pr_info("%s(%s)\n", __func__, dev->name);
 
-			return ext_entry->dev->ifindex;
+			return 0;
 		}
 	}