[Bugfix][T106BUG-534][AUTOSUSPEND]add wifi config to AP because the GPIO of WiFi affects power

Only Configure :No
Affected branch: master
Affected module: AUTOSUSPEND
Is it affected on both ZXIC and MTK:only ZXIC
Self-test: Yes
Doc Update: NO

Change-Id: I8cf30251f6d6e9beae5dd55f6466af51a706fa91
diff --git a/ap/choose_wifi.sh b/ap/choose_wifi.sh
new file mode 100755
index 0000000..0b546f0
--- /dev/null
+++ b/ap/choose_wifi.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+MMCO_CONFIG="KERNEL_EXT_CFLAGS   += -D_USE_VEHICLE_DC_REF_MMC0"
+WIFI_CONFIG_1="CONFIG_AIC8800=y"
+WIFI_CONFIG_2="CONFIG_AIC8800_SDIO_TX_AGGR=y"
+WIFI_CONFIG_3="CONFIG_AIC8800_SDIO_RX_AGGR=y"
+
+NO_MMCO_CONFIG="#KERNEL_EXT_CFLAGS   += -D_USE_VEHICLE_DC_REF_MMC0"
+NO_WIFI_CONFIG_1="#CONFIG_AIC8800=y"
+NO_WIFI_CONFIG_2="#CONFIG_AIC8800_SDIO_TX_AGGR=y"
+NO_WIFI_CONFIG_3="#CONFIG_AIC8800_SDIO_RX_AGGR=y"
+
+if [ $1 -eq 1 ];then
+    eval sed -i 's/^.*D_USE_VEHICLE_DC_REF_MMC0.*$/"${MMCO_CONFIG}"/' $(pwd)/build/libps_libs.mk
+    eval sed -i 's/^.*CONFIG_AIC8800=.*$/"${WIFI_CONFIG_1}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
+    eval sed -i 's/^.*CONFIG_AIC8800_SDIO_TX_AGGR=.*$/"${WIFI_CONFIG_2}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
+    eval sed -i 's/^.*CONFIG_AIC8800_SDIO_RX_AGGR=.*$/"${WIFI_CONFIG_3}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
+    exit 0
+fi
+
+eval sed -i 's/^.*D_USE_VEHICLE_DC_REF_MMC0.*$/"${NO_MMCO_CONFIG}"/' $(pwd)/build/libps_libs.mk
+eval sed -i 's/^.*CONFIG_AIC8800=.*$/"${NO_WIFI_CONFIG_1}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
+eval sed -i 's/^.*CONFIG_AIC8800_SDIO_TX_AGGR=.*$/"${NO_WIFI_CONFIG_2}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
+eval sed -i 's/^.*CONFIG_AIC8800_SDIO_RX_AGGR=.*$/"${NO_WIFI_CONFIG_3}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
+
+
+
diff --git a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/zx297520v3-mdl-devices.c b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/zx297520v3-mdl-devices.c
index 0702a4e..761c850 100755
--- a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/zx297520v3-mdl-devices.c
+++ b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/zx297520v3-mdl-devices.c
@@ -1149,7 +1149,7 @@
 #endif
 
 #ifdef CONFIG_MMC_ZX29
-#ifdef _USE_VEHICLE_DC_REF
+#if (defined _USE_VEHICLE_DC_REF)&&(defined _USE_VEHICLE_DC_REF_MMC0) //jb.qi add for wifi config on 20240221
     &zx29_sdmmc0_device,
 #endif
     &zx29_sdmmc1_device,
diff --git a/mk_T106.sh b/mk_T106.sh
old mode 100644
new mode 100755
index 2a53128..6d3a5da
--- a/mk_T106.sh
+++ b/mk_T106.sh
@@ -1,5 +1,8 @@
 #!/bin/bash
 TOP=$(pwd)
+cd ap
+bash choose_wifi.sh $1
+cd ${TOP}
 source update_version.sh
 mkdir esdk_patch/Uboot
 cp -R boot/ build/ cp/ pub/ rpm/ tools/ esdk_patch/Uboot/