replace hardcoded paths to /etc/firmware /vendor/firmware and point them to /lib/firmware/postmarketos

diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c
index a9f57b8002b..12815028a9f 100644
--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c
@@ -159,35 +159,35 @@ WLAN_STATUS kalFirmwareOpen(IN P_GLUE_INFO_T prGlueInfo)
 	case WMTHWVER_MT6620_E3:
 	case WMTHWVER_MT6620_E4:
 	case WMTHWVER_MT6620_E5:
-		filp = filp_open("/vendor/firmware/" CFG_FW_FILENAME, O_RDONLY, 0);
+		filp = filp_open("/lib/firmware/postmarketos/" CFG_FW_FILENAME, O_RDONLY, 0);
 		break;
 
 	case WMTHWVER_MT6620_E6:
 	default:
-		filp = filp_open("/vendor/firmware/" CFG_FW_FILENAME "_E6", O_RDONLY, 0);
+		filp = filp_open("/lib/firmware/postmarketos/" CFG_FW_FILENAME "_E6", O_RDONLY, 0);
 		break;
 	}
 #elif defined(MT6628)
-/* filp = filp_open("/vendor/firmware/"CFG_FW_FILENAME"_MT6628", O_RDONLY, 0); */
-/* filp = filp_open("/vendor/firmware/"CFG_FW_FILENAME"_MT6582", O_RDONLY, 0); */
+/* filp = filp_open("/lib/firmware/postmarketos/"CFG_FW_FILENAME"_MT6628", O_RDONLY, 0); */
+/* filp = filp_open("/lib/firmware/postmarketos/"CFG_FW_FILENAME"_MT6582", O_RDONLY, 0); */
 #if 0				/* new wifi ram code mechanism, waiting firmware ready, then we can enable these code */
 	kalMemZero(aucFilePath, sizeof(aucFilePath));
-	kalMemCopy(aucFilePath, "/vendor/firmware/" CFG_FW_FILENAME "_AD",
-		sizeof("/vendor/firmware/" CFG_FW_FILENAME "_AD"));
+	kalMemCopy(aucFilePath, "/lib/firmware/postmarketos/" CFG_FW_FILENAME "_AD",
+		sizeof("/lib/firmware/postmarketos/" CFG_FW_FILENAME "_AD"));
 	filp = filp_open(aucFilePath, O_RDONLY, 0);
 	if (!IS_ERR(filp))
 		goto open_success;
 #endif
 	kalMemZero(aucFilePath, sizeof(aucFilePath));
-	kalMemCopy(aucFilePath, "/vendor/firmware/" CFG_FW_FILENAME "_",
-		strlen("/vendor/firmware/" CFG_FW_FILENAME "_"));
-	glGetChipInfo(prGlueInfo, &aucFilePath[strlen("/vendor/firmware/" CFG_FW_FILENAME "_")]);
+	kalMemCopy(aucFilePath, "/lib/firmware/postmarketos/" CFG_FW_FILENAME "_",
+		strlen("/lib/firmware/postmarketos/" CFG_FW_FILENAME "_"));
+	glGetChipInfo(prGlueInfo, &aucFilePath[strlen("/lib/firmware/postmarketos/" CFG_FW_FILENAME "_")]);
 
 	DBGLOG(INIT, INFO, "open file: %s\n", aucFilePath);
 
 	filp = filp_open(aucFilePath, O_RDONLY, 0);
 #else
-	filp = filp_open("/vendor/firmware/" CFG_FW_FILENAME, O_RDONLY, 0);
+	filp = filp_open("/lib/firmware/postmarketos/" CFG_FW_FILENAME, O_RDONLY, 0);
 #endif
 	if (IS_ERR(filp)) {
 		DBGLOG(INIT, ERROR, "Open FW image: %s failed\n", CFG_FW_FILENAME);
diff --git a/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_kal.c b/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_kal.c
index fa6f22ba5a6..464b2819c87 100644
--- a/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_kal.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_kal.c
@@ -106,7 +106,7 @@ static PUINT_8 apucFwPath[] = {
 	(PUINT_8) "/storage/sdcard0/",
 	(PUINT_8) "/vendor/firmware/",
 #if !CONFIG_ANDROID
-	(PUINT_8) "/lib/firmware/",
+	(PUINT_8) "/lib/firmware/postmarketos/",
 #endif
 	NULL
 };
diff --git a/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c b/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c
index b0a8c88d45e..9073dabb373 100644
--- a/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c
+++ b/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c
@@ -35,7 +35,7 @@ static unsigned int md_sbp_code_default;
 #endif
 
 #ifndef CONFIG_MODEM_FIRMWARE_PATH
-#define CONFIG_MODEM_FIRMWARE_PATH "/vendor/firmware/"
+#define CONFIG_MODEM_FIRMWARE_PATH "/lib/firmware/postmarketos/"
 #endif
 
 static char *type_str[] = {[modem_invalid] = "invalid",
diff --git a/drivers/misc/mediatek/include/mt-plat/mt_ccci_common.h b/drivers/misc/mediatek/include/mt-plat/mt_ccci_common.h
index ee5e9714621..c62f010baaa 100644
--- a/drivers/misc/mediatek/include/mt-plat/mt_ccci_common.h
+++ b/drivers/misc/mediatek/include/mt-plat/mt_ccci_common.h
@@ -61,7 +61,7 @@ typedef enum {
 /* image name/path */
 #define MOEDM_IMAGE_NAME			"modem.img"
 #define DSP_IMAGE_NAME					"DSP_ROM"
-#define CONFIG_MODEM_FIRMWARE_PATH		"/vendor/firmware/"
+#define CONFIG_MODEM_FIRMWARE_PATH		"/lib/firmware/postmarketos/"
 #define CONFIG_MODEM_FIRMWARE_CIP_PATH	"/custom/etc/firmware/"
 #define IMG_ERR_STR_LEN				 64
 
diff --git a/drivers/misc/mediatek/wmt_ccci/wmt_cfg_parser.h b/drivers/misc/mediatek/wmt_ccci/wmt_cfg_parser.h
index 23d25e94619..4830339bb93 100644
--- a/drivers/misc/mediatek/wmt_ccci/wmt_cfg_parser.h
+++ b/drivers/misc/mediatek/wmt_ccci/wmt_cfg_parser.h
@@ -78,7 +78,7 @@ do { \
 #endif
 
 #define WMT_CFG_FILE "WMT_SOC.cfg"
-#define WMT_CFG_FILE_PREFIX "/vendor/firmware/"
+#define WMT_CFG_FILE_PREFIX "/lib/firmware/postmarketos"
 
 /*******************************************************************************
 *                             D A T A   T Y P E S
