[][OpenWrt Dev][Add empty page bitflips detection and fix for mtk-snand driver]

[Description]
Add support for mtk-snand driver to detect and fix bitflips of empty pages

Also, change to ecc strength of mtd layer to ecc strength of a sector,
and report max bitflips of sectors within a page.

[Release-log]
N/A

Change-Id: I0cb71808076ab809bdbbe98b59859394c79c59f9
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/4520684
diff --git a/target/linux/mediatek/files-5.4/drivers/mtd/mtk-snand/mtk-snand-mtd.c b/target/linux/mediatek/files-5.4/drivers/mtd/mtk-snand/mtk-snand-mtd.c
index 27cfb18..949a3de 100644
--- a/target/linux/mediatek/files-5.4/drivers/mtd/mtk-snand/mtk-snand-mtd.c
+++ b/target/linux/mediatek/files-5.4/drivers/mtd/mtk-snand/mtk-snand-mtd.c
@@ -592,7 +592,7 @@
 
 	mtd->ooblayout = &mtk_snand_ooblayout;
 
-	mtd->ecc_strength = msm->cinfo.ecc_strength * msm->cinfo.num_sectors;
+	mtd->ecc_strength = msm->cinfo.ecc_strength;
 	mtd->bitflip_threshold = (mtd->ecc_strength * 3) / 4;
 	mtd->ecc_step_size = msm->cinfo.sector_size;