[][openwrt][mt7988][pce][fix uninitialized variable]

[Description]
Fix uninitialized variable.
When we delete dipfilter entry, we use an uninitialized index rather than
the found dip entry to delete the entry.
Fix the issue by using the found dipfilter entry to free the entry.

[Release-log]
N/A

Change-Id: I9e58dd3f0d8b13876d942c6ec44dad2d432f51ce
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7998990
diff --git a/package-21.02/kernel/pce/src/dipfilter.c b/package-21.02/kernel/pce/src/dipfilter.c
index b064db1..6037159 100644
--- a/package-21.02/kernel/pce/src/dipfilter.c
+++ b/package-21.02/kernel/pce/src/dipfilter.c
@@ -177,7 +177,6 @@
 	struct dipfilter_entry *dip_entry;
 	unsigned long flag;
 	int ret;
-	u32 idx;
 
 	if (!ddesc)
 		return 0;
@@ -188,12 +187,12 @@
 	if (!dip_entry)
 		goto unlock;
 
-	dip_entry = &dip_hw.dip_entries[idx];
 	if (!refcount_dec_and_test(&dip_entry->refcnt))
 		/* dipfilter descriptor is still in use */
 		return 0;
 
-	mtk_pce_fe_mem_msg_config(&fmsg, FE_MEM_CMD_WRITE, FE_MEM_TYPE_DIPFILTER, idx);
+	mtk_pce_fe_mem_msg_config(&fmsg, FE_MEM_CMD_WRITE, FE_MEM_TYPE_DIPFILTER,
+				  dip_entry->index);
 	memset(&fmsg.raw, 0, sizeof(fmsg.raw));
 
 	ret = mtk_pce_fe_mem_msg_send(&fmsg);
@@ -203,7 +202,7 @@
 	}
 
 	memset(&dip_entry->ddesc, 0, sizeof(struct dip_desc));
-	clear_bit(idx, dip_hw.dip_tbl);
+	clear_bit(dip_entry->index, dip_hw.dip_tbl);
 
 unlock:
 	spin_unlock_irqrestore(&dip_hw.lock, flag);