[][MAC80211][MT76/Hostapd/MAC80211 internal patches refactor]

[Description]
Refactor MT76/Hostapd/MAC80211 patches for common use

[Release-log]
N/A

Change-Id: I971fa053b9a523a3e871ab2d2c3b89a3c96c04df
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/5799282
diff --git a/autobuild_mac80211_release/mt7622_mt7915_mac80211/lede-branch-build-sanity.sh b/autobuild_mac80211_release/mt7622_mt7915_mac80211/lede-branch-build-sanity.sh
index a5ae07f..1fff771 100755
--- a/autobuild_mac80211_release/mt7622_mt7915_mac80211/lede-branch-build-sanity.sh
+++ b/autobuild_mac80211_release/mt7622_mt7915_mac80211/lede-branch-build-sanity.sh
@@ -21,9 +21,6 @@
 
 cp -fpR ${BUILD_DIR}/./../mac80211_package/package/kernel/mt76 ${BUILD_DIR}/package/kernel
 
-#use hostapd master package revision, remove hostapd master patches
-find ../mtk-openwrt-feeds/openwrt_patches-21.02 -name "*-2102-hostapd-*.patch" -delete
-
 #step1 clean
 #clean
 
@@ -39,17 +36,9 @@
 echo "CONFIG_WPS_UPNP=y"  >> ./package/network/services/hostapd/files/hostapd-full.config
 echo "CONFIG_RELAY=y" >> ./target/linux/mediatek/mt7622/config-5.4
 
-prepare_final ${branch_name}
-
-#copy mt7915/mt7916/mt7986 default eeprom
-FW_SOURCE_DIR=${BUILD_DIR}/package/kernel/mt76/src/firmware
-mkdir -p ${FW_SOURCE_DIR}
-cp -rf ../mtk-openwrt-feeds/autobuild_mac80211_release/default_bins/* ${FW_SOURCE_DIR}
+prepare_mac80211
 
-#hack hostapd/mac80211/mt76 package in master branch
-patch -f -p1 -i ${BUILD_DIR}/autobuild/0001-master-mac80211-generate-hostapd-setting-from-ap-cap.patch
-patch -f -p1 -i ${BUILD_DIR}/autobuild/0002-master-hostapd-makefile-for-utils.patch
-patch -f -p1 -i ${BUILD_DIR}/autobuild/0003-master-mt76-makefile-for-new-chip.patch
+prepare_final ${branch_name}
 
 #step2 build
 build ${branch_name} -j1 || [ "$LOCAL" != "1" ]