[rdkb][common][bsp][Refactor mt76-add-internal-wed_tiny-header-file.patch]
[Description]
Refactor mt76-add-internal-wed_tiny-header-file.patch
1. when disable flow_offload feature, only kernel and mac80211 will not patch related patches of wed.
2. mt76 will patch all the patches include related patches of wed and this patch "5000-mt76-add-internal-wed_tiny-header-file.patch"
in flow_offload feature enable and disable situation.
[Release-log]
diff --git a/recipes-wifi/linux-mt76/linux-mt76_2.x.bb b/recipes-wifi/linux-mt76/linux-mt76_2.x.bb
index 970937d..bbbc47d 100644
--- a/recipes-wifi/linux-mt76/linux-mt76_2.x.bb
+++ b/recipes-wifi/linux-mt76/linux-mt76_2.x.bb
@@ -9,7 +9,6 @@
SRC_URI = " \
git://git@github.com/openwrt/mt76.git;protocol=https \
file://COPYING;subdir=git \
- file://0001-mt76-add-internal-wed_tiny-header-file.patch;apply=no \
"
SRC_URI += " \
file://src \
@@ -23,39 +22,11 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches:"
FILESEXTRAPATHS_prepend := "${THISDIR}/src:"
-#require files/patches/patches.inc
-SRC_URI += "file://*.patch;apply=no"
+require files/patches/patches.inc
+SRC_URI_append += "file://5000-mt76-add-internal-wed_tiny-header-file.patch"
S = "${WORKDIR}/git"
-do_mtk_patches() {
- cd ${S}
-
- DISTRO_FlowBlock_ENABLED="${@bb.utils.contains('DISTRO_FEATURES','flow_offload','true','false',d)}"
-
- if [ ! -e mtk_wifi_patch_applied ]; then
- for i in ${WORKDIR}/*.patch
- do
- if [ $DISTRO_FlowBlock_ENABLED = 'true' ]; then
- patch -p1 < $i;
- else
- prefix=$(echo -n "${WORKDIR}"|wc -c)
- patch_number_start=$(expr $prefix + 2)
- patch_number_end=$(expr $patch_number_start + 3 )
- patch_number=$(echo "$i" | cut -c"$patch_number_start"-"$patch_number_end")
-
- if [ "$patch_number" -ge "3000" ]; then
- continue;
- else
- patch -p1 < $i;
- fi
- fi
- done
- fi
- touch mtk_wifi_patch_applied
-}
-addtask mtk_patches after do_patch before do_configure
-
NOSTDINC_FLAGS = " \
-I${B} \
-I${STAGING_KERNEL_BUILDDIR}/usr/include/mac80211-backport/uapi \