[Bugfix][R305][bug-view-1932][led] When a device is connected to WiFi, press the button to turn it off, and the WiFi light will turn off and then turn on again.

Change-Id: I8ea9892a434283f9ed29945e0108486989227c41
diff --git a/lynq/CPE_COMMON/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/CPE_COMMON/ap/app/zte_comm/zte_mmi/mmi.c
index 7ca91e8..4577ed6 100755
--- a/lynq/CPE_COMMON/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/CPE_COMMON/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/CPE_TELKOMSEL/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/CPE_TELKOMSEL/ap/app/zte_comm/zte_mmi/mmi.c
index 7ca91e8..4577ed6 100755
--- a/lynq/CPE_TELKOMSEL/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/CPE_TELKOMSEL/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi.c
index 3b9f1ea..e080529 100755
--- a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi.c
@@ -328,8 +328,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/MD310EU/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/MD310EU/ap/app/zte_comm/zte_mmi/mmi.c
index ad9e8c6..4ed0b6d 100755
--- a/lynq/MD310EU/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/MD310EU/ap/app/zte_comm/zte_mmi/mmi.c
@@ -328,8 +328,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/R305/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/R305/ap/app/zte_comm/zte_mmi/mmi.c
old mode 100644
new mode 100755
index 7ca91e8..4577ed6
--- a/lynq/R305/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/R305/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/R306/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/R306/ap/app/zte_comm/zte_mmi/mmi.c
index c711e69..d90c284 100755
--- a/lynq/R306/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/R306/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/R306BR/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/R306BR/ap/app/zte_comm/zte_mmi/mmi.c
index c711e69..d90c284 100755
--- a/lynq/R306BR/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/R306BR/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/R306_MTN/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/R306_MTN/ap/app/zte_comm/zte_mmi/mmi.c
index c711e69..d90c284 100755
--- a/lynq/R306_MTN/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/R306_MTN/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/R307/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/R307/ap/app/zte_comm/zte_mmi/mmi.c
index 7ca91e8..4577ed6 100755
--- a/lynq/R307/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/R307/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/R307L/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/R307L/ap/app/zte_comm/zte_mmi/mmi.c
index 7ca91e8..4577ed6 100755
--- a/lynq/R307L/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/R307L/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/S300/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/S300/ap/app/zte_comm/zte_mmi/mmi.c
index 7ca91e8..4577ed6 100755
--- a/lynq/S300/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/S300/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/S300AI/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/S300AI/ap/app/zte_comm/zte_mmi/mmi.c
index c711e69..d90c284 100755
--- a/lynq/S300AI/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/S300AI/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/S300_AIC/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/S300_AIC/ap/app/zte_comm/zte_mmi/mmi.c
index 7ca91e8..4577ed6 100755
--- a/lynq/S300_AIC/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/S300_AIC/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;
diff --git a/lynq/S300_COMMON/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/S300_COMMON/ap/app/zte_comm/zte_mmi/mmi.c
index 7ca91e8..4577ed6 100755
--- a/lynq/S300_COMMON/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/S300_COMMON/ap/app/zte_comm/zte_mmi/mmi.c
@@ -323,8 +323,17 @@
 		break;
 	case MSG_CMD_MMIGET_WIFI_STANUM:
 	case MSG_CMD_STA_COUNT_CHANGE:
-		zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+	{
+		char poweroff[8] = {0};
+		cfg_get_item("doingPowerOff", poweroff, sizeof(poweroff));
+		/* Shutdown or restart, the connected device will disconnect, and the wifi side will send an MSG:MSG_CMD_STA_COUNT_CHANGE message, 
+		which will make the wifi light turn on again */
+		if (1 != atoi(poweroff))
+		{
+			zMMI_Handle_Msg_Get_Wifi_StaNum((VOID *)pstMsg->aucDataBuf);
+		}
 		break;
+	}
 	case MSG_CMD_MMISTART_BACKLIGHTOFF_TIMER:
 		zMMI_Handle_Msg_BacklightOff((VOID *)pstMsg->aucDataBuf);
 		break;