[][MAC80211][mt76][Refactor mt76 internal patches]

[Description]
Refactor internal patches to fix patch failed.

[Release-log]
N/A

Change-Id: I85b6e531f13944c576a939596d3431c6d27e963a
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7087554
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-rework-mt7915_thermal_init.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-rework-mt7915_thermal_init.patch
new file mode 100644
index 0000000..0494b40
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-rework-mt7915_thermal_init.patch
@@ -0,0 +1,41 @@
+From e4a095d551a5d2252887b88d064dee43fcb4149d Mon Sep 17 00:00:00 2001
+From: Howard Hsu <howard-yh.hsu@mediatek.com>
+Date: Thu, 19 Jan 2023 11:03:44 +0800
+Subject: [PATCH] wifi: mt76: mt7915: rework mt7915_thermal_init()
+
+If the kernel configuration "CONFIG_HWMON" is not set to Y, the
+critial/maximum high temperature will not be initialised to the correct
+setting. Rework mt7915_thermal_init to fix this.
+---
+ mt7915/init.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/mt7915/init.c b/mt7915/init.c
+index ec297e04..8485a154 100644
+--- a/mt7915/init.c
++++ b/mt7915/init.c
+@@ -202,6 +202,10 @@ static int mt7915_thermal_init(struct mt7915_phy *phy)
+ 			phy->cdev = cdev;
+ 	}
+ 
++	/* initialize critical/maximum high temperature */
++	phy->throttle_temp[MT7915_CRIT_TEMP_IDX] = MT7915_CRIT_TEMP;
++	phy->throttle_temp[MT7915_MAX_TEMP_IDX] = MT7915_MAX_TEMP;
++
+ 	if (!IS_REACHABLE(CONFIG_HWMON))
+ 		return 0;
+ 
+@@ -210,10 +214,6 @@ static int mt7915_thermal_init(struct mt7915_phy *phy)
+ 	if (IS_ERR(hwmon))
+ 		return PTR_ERR(hwmon);
+ 
+-	/* initialize critical/maximum high temperature */
+-	phy->throttle_temp[MT7915_CRIT_TEMP_IDX] = MT7915_CRIT_TEMP;
+-	phy->throttle_temp[MT7915_MAX_TEMP_IDX] = MT7915_MAX_TEMP;
+-
+ 	return 0;
+ }
+ 
+-- 
+2.18.0
+