[][kernel][common][eth][Add phy state sanity check to heartbeat thread for Aquantia firwmare download]

[Description]
Add phy state sanity check to heartbeat thread for Aquantia firwmare download.

If without this patch, kernel might not be able to reboot system
when connected with WiFi.

[Release-log]
N/A


Change-Id: Ib8eea0e8b1fbe42a88d6b09a73a72519c0e56257
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7075872
diff --git a/target/linux/mediatek/patches-5.4/751-net-phy-aquantia-add-firmware-download.patch b/target/linux/mediatek/patches-5.4/751-net-phy-aquantia-add-firmware-download.patch
index f568322..6eb5bf4 100644
--- a/target/linux/mediatek/patches-5.4/751-net-phy-aquantia-add-firmware-download.patch
+++ b/target/linux/mediatek/patches-5.4/751-net-phy-aquantia-add-firmware-download.patch
@@ -148,7 +148,7 @@
 index 0000000..7aeec86
 --- /dev/null
 +++ b/drivers/net/phy/aquantia_firmware.c
-@@ -0,0 +1,1095 @@
+@@ -0,0 +1,1096 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/* FW download driver for Aquantia PHY
 + */
@@ -1062,7 +1062,8 @@
 +		if (kthread_should_stop())
 +			break;
 +
-+		if (aqr_firmware_check_heartbeat(phydev) == 1) {
++		if (phydev->state != PHY_HALTED &&
++		    aqr_firmware_check_heartbeat(phydev) == 1) {
 +			priv->fw_initialized = false;
 +			aqr_firmware_download_single(phydev);
 +		}