Revert "extrawifi: Clean code (#4636)" (#4667)

This reverts commit 764214156e.

- This needs fixing. many failures
This commit is contained in:
Ricardo Pardini 2023-01-08 11:10:21 +01:00 committed by GitHub
parent ba48245f29
commit 0936a4200b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 267 additions and 70 deletions

View File

@ -1,34 +1,5 @@
#!/bin/bash
extrawifi_patch_default()
{
local name="$1"
local repo="$2"
local ref="$3"
fetch_from_repo "${repo}" "${name}" "${ref}" "yes"
cd "$kerneldir" || exit
mkdir -p "${kerneldir}/drivers/net/wireless/${name}"
cp -R "${SRC}/cache/sources/${name}/${ref##*:}/." \
"$kerneldir/drivers/net/wireless/${name}/"
# https://github.com/torvalds/linux/commit/8f268881d7d278047b00eed54bbb9288dbd6ab23
sed -i 's/---help---/help/g' \
"${kerneldir}/drivers/net/wireless/${name}/Kconfig"
# Append to section Makefile
local config="$(grep --max-count=1 '^config ' "${kerneldir}/drivers/net/wireless/${name}/Kconfig" | cut -d' ' -f2)"
echo "obj-\$(${config}) += ${name}/" >>"${kerneldir}/drivers/net/wireless/Makefile"
# Append to section Kconfig
sed -i "
1h;1!H;\$!d;x;
s@.*\nsource [^\n]*@&\nsource \"drivers/net/wireless/${name}/Kconfig\"@
" "${kerneldir}/drivers/net/wireless/Kconfig"
}
driver_rtl8152_rtl8153()
{
# Updated USB network drivers for RTL8152/RTL8153 based dongles that also support 2.5Gbs variants
@ -51,11 +22,31 @@ driver_rtl8189ES()
if linux-version compare "${version}" ge 3.14 && [ "$EXTRAWIFI" == yes ]; then
# attach to specifics tag or branch
local rtl8189esver="branch:master"
display_alert "Adding" "Wireless drivers for Realtek 8189ES chipsets ${rtl8189esver}" "info"
extrawifi_patch_default "rtl8189es" \
"$GITHUB_SOURCE/jwrdegoede/rtl8189ES_linux" \
"branch:master"
fetch_from_repo "$GITHUB_SOURCE/jwrdegoede/rtl8189ES_linux" "rtl8189es" "${rtl8189esver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl8189es"
mkdir -p "$kerneldir/drivers/net/wireless/rtl8189es/"
cp -R "${SRC}/cache/sources/rtl8189es/${rtl8189esver#*:}"/{core,hal,include,os_dep,platform} \
"$kerneldir/drivers/net/wireless/rtl8189es"
# Makefile
cp "${SRC}/cache/sources/rtl8189es/${rtl8189esver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl8189es/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/rtl8189es/${rtl8189esver#*:}/Kconfig"
cp "${SRC}/cache/sources/rtl8189es/${rtl8189esver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl8189es/Kconfig"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8189ES) += rtl8189es/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8189es\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
fi
}
@ -68,11 +59,31 @@ driver_rtl8189FS()
if linux-version compare "${version}" ge 3.14 && [ "$EXTRAWIFI" == yes ]; then
# attach to specifics tag or branch
local rtl8189fsver="branch:rtl8189fs"
display_alert "Adding" "Wireless drivers for Realtek 8189FS chipsets ${rtl8189fsver}" "info"
extrawifi_patch_default "rtl8189fs" \
"$GITHUB_SOURCE/jwrdegoede/rtl8189ES_linux" \
"branch:rtl8189fs"
fetch_from_repo "$GITHUB_SOURCE/jwrdegoede/rtl8189ES_linux" "rtl8189fs" "${rtl8189fsver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl8189fs"
mkdir -p "$kerneldir/drivers/net/wireless/rtl8189fs/"
cp -R "${SRC}/cache/sources/rtl8189fs/${rtl8189fsver#*:}"/{core,hal,include,os_dep,platform} \
"$kerneldir/drivers/net/wireless/rtl8189fs"
# Makefile
cp "${SRC}/cache/sources/rtl8189fs/${rtl8189fsver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl8189fs/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/rtl8189fs/${rtl8189fsver#*:}/Kconfig"
cp "${SRC}/cache/sources/rtl8189fs/${rtl8189fsver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl8189fs/Kconfig"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8189FS) += rtl8189fs/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8189fs\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
process_patch_file "${SRC}/patch/misc/wireless-rtl8189fs-fix-p2p-go-advertising.patch" "applying"
process_patch_file "${SRC}/patch/misc/wireless-rtl8189fs-fix-and-enable-secondary-iface.patch" "applying"
@ -88,11 +99,31 @@ driver_rtl8192EU()
if linux-version compare "${version}" ge 3.14 && [ "$EXTRAWIFI" == yes ]; then
# attach to specifics tag or branch
local rtl8192euver="branch:realtek-4.4.x"
display_alert "Adding" "Wireless drivers for Realtek 8192EU chipsets ${rtl8192euver}" "info"
extrawifi_patch_default "rtl8192eu" \
"$GITHUB_SOURCE/Mange/rtl8192eu-linux-driver" \
"branch:realtek-4.4.x"
fetch_from_repo "$GITHUB_SOURCE/Mange/rtl8192eu-linux-driver" "rtl8192eu" "${rtl8192euver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl8192eu"
mkdir -p "$kerneldir/drivers/net/wireless/rtl8192eu/"
cp -R "${SRC}/cache/sources/rtl8192eu/${rtl8192euver#*:}"/{core,hal,include,os_dep,platform} \
"$kerneldir/drivers/net/wireless/rtl8192eu"
# Makefile
cp "${SRC}/cache/sources/rtl8192eu/${rtl8192euver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl8192eu/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/rtl8192eu/${rtl8192euver#*:}/Kconfig"
cp "${SRC}/cache/sources/rtl8192eu/${rtl8192euver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl8192eu/Kconfig"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8192EU) += rtl8192eu/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8192eu\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
fi
}
@ -104,11 +135,30 @@ driver_rtl8811_rtl8812_rtl8814_rtl8821()
if linux-version compare "${version}" ge 3.14 && [ "$EXTRAWIFI" == yes ]; then
# attach to specifics tag or branch
local rtl8812auver="commit:450db78f7bd23f0c611553eb475fa5b5731d6497"
display_alert "Adding" "Wireless drivers for Realtek 8811, 8812, 8814 and 8821 chipsets ${rtl8812auver}" "info"
extrawifi_patch_default "rtl8812au" \
"$GITHUB_SOURCE/aircrack-ng/rtl8812au" \
"commit:450db78f7bd23f0c611553eb475fa5b5731d6497"
fetch_from_repo "$GITHUB_SOURCE/aircrack-ng/rtl8812au" "rtl8812au" "${rtl8812auver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl8812au"
mkdir -p "$kerneldir/drivers/net/wireless/rtl8812au/"
cp -R "${SRC}/cache/sources/rtl8812au/${rtl8812auver#*:}"/{core,hal,include,os_dep,platform} \
"$kerneldir/drivers/net/wireless/rtl8812au"
# Makefile
cp "${SRC}/cache/sources/rtl8812au/${rtl8812auver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl8812au/Makefile"
# Kconfig
cp "${SRC}/cache/sources/rtl8812au/${rtl8812auver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl8812au/Kconfig"
# Add to section Makefile
echo "obj-\$(CONFIG_88XXAU) += rtl8812au/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8812au\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
fi
@ -123,9 +173,27 @@ driver_xradio_xr819()
display_alert "Adding" "Wireless drivers for Xradio XR819 chipsets" "info"
extrawifi_patch_default "xradio" \
"$GITHUB_SOURCE/dbeinder/xradio" \
"branch:karabek_rebase"
fetch_from_repo "$GITHUB_SOURCE/dbeinder/xradio" "xradio" "branch:karabek_rebase" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/xradio"
mkdir -p "$kerneldir/drivers/net/wireless/xradio/"
cp "${SRC}"/cache/sources/xradio/karabek_rebase/*.{h,c} \
"$kerneldir/drivers/net/wireless/xradio/"
# Makefile
cp "${SRC}/cache/sources/xradio/karabek_rebase/Makefile" \
"$kerneldir/drivers/net/wireless/xradio/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/xradio/karabek_rebase/Kconfig"
cp "${SRC}/cache/sources/xradio/karabek_rebase/Kconfig" \
"$kerneldir/drivers/net/wireless/xradio/Kconfig"
# Add to section Makefile
echo "obj-\$(CONFIG_WLAN_VENDOR_XRADIO) += xradio/" \
>> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/xradio\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
# add support for K5.13+
process_patch_file "${SRC}/patch/misc/wireless-xradio-5.13.patch" "applying"
@ -145,11 +213,26 @@ driver_rtl8811CU_rtl8821C()
if linux-version compare "${version}" ge 3.14 && [ "$EXTRAWIFI" == yes ]; then
# attach to specifics tag or branch
local rtl8811cuver="commit:7b8c45a270454f05e2dbf3beeb4afcf817db65da"
display_alert "Adding" "Wireless drivers for Realtek RTL8811CU and RTL8821C chipsets ${rtl8811cuver}" "info"
extrawifi_patch_default "rtl8811cu" \
"$GITHUB_SOURCE/morrownr/8821cu-20210118" \
"commit:7b8c45a270454f05e2dbf3beeb4afcf817db65da"
fetch_from_repo "$GITHUB_SOURCE/morrownr/8821cu-20210118" "rtl8811cu" "${rtl8811cuver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl8811cu"
mkdir -p "$kerneldir/drivers/net/wireless/rtl8811cu/"
cp -R "${SRC}/cache/sources/rtl8811cu/${rtl8811cuver#*:}"/{core,hal,include,os_dep,platform,*.mk} \
"$kerneldir/drivers/net/wireless/rtl8811cu"
# Makefile
cp "${SRC}/cache/sources/rtl8811cu/${rtl8811cuver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl8811cu/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/rtl8811cu/${rtl8811cuver#*:}/Kconfig"
cp "${SRC}/cache/sources/rtl8811cu/${rtl8811cuver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl8811cu/Kconfig"
# Disable debug
sed -i "s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/" \
@ -159,6 +242,11 @@ driver_rtl8811CU_rtl8821C()
sed -i "s/^CONFIG_MP_VHT_HW_TX_MODE.*/CONFIG_MP_VHT_HW_TX_MODE = n/" \
"$kerneldir/drivers/net/wireless/rtl8811cu/Makefile"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8821CU) += rtl8811cu/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8811cu\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
fi
}
@ -172,16 +260,36 @@ driver_rtl8188EU_rtl8188ETV()
linux-version compare "${version}" lt 5.15 &&
[ "$EXTRAWIFI" == yes ]; then
# attach to specifics tag or branch
local rtl8188euver="branch:v5.7.6.1"
display_alert "Adding" "Wireless drivers for Realtek 8188EU 8188EUS and 8188ETV chipsets ${rtl8188euver}" "info"
extrawifi_patch_default "rtl8188eus" \
"$GITHUB_SOURCE/aircrack-ng/rtl8188eus" \
"branch:v5.7.6.1"
fetch_from_repo "$GITHUB_SOURCE/aircrack-ng/rtl8188eus" "rtl8188eu" "${rtl8188euver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl8188eu"
mkdir -p "$kerneldir/drivers/net/wireless/rtl8188eu/"
cp -R "${SRC}/cache/sources/rtl8188eu/${rtl8188euver#*:}"/{core,hal,include,os_dep,platform} \
"$kerneldir/drivers/net/wireless/rtl8188eu"
# Makefile
cp "${SRC}/cache/sources/rtl8188eu/${rtl8188euver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl8188eu/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/rtl8188eu/${rtl8188euver#*:}/Kconfig"
cp "${SRC}/cache/sources/rtl8188eu/${rtl8188euver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl8188eu/Kconfig"
# Disable debug
sed -i "s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/" \
"$kerneldir/drivers/net/wireless/rtl8188eu/Makefile"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8188EU) += rtl8188eu/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8188eu\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
process_patch_file "${SRC}/patch/misc/wireless-rtl8188eu.patch" "applying"
# add support for K5.12+
@ -197,16 +305,36 @@ driver_rtl88x2bu()
if linux-version compare "${version}" ge 5.0 && [ "$EXTRAWIFI" == yes ]; then
# attach to specifics tag or branch
local rtl88x2buver="commit:2590672d717e2516dd2e96ed66f1037a6815bced"
display_alert "Adding" "Wireless drivers for Realtek 88x2bu chipsets ${rtl88x2buver}" "info"
extrawifi_patch_default "rtl88x2bu" \
"$GITHUB_SOURCE/morrownr/88x2bu-20210702" \
"commit:2590672d717e2516dd2e96ed66f1037a6815bced"
fetch_from_repo "$GITHUB_SOURCE/morrownr/88x2bu-20210702" "rtl88x2bu" "${rtl88x2buver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl88x2bu"
mkdir -p "$kerneldir/drivers/net/wireless/rtl88x2bu/"
cp -R "${SRC}/cache/sources/rtl88x2bu/${rtl88x2buver#*:}"/{core,hal,include,os_dep,platform,halmac.mk,rtl8822b.mk} \
"$kerneldir/drivers/net/wireless/rtl88x2bu"
# Makefile
cp "${SRC}/cache/sources/rtl88x2bu/${rtl88x2buver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl88x2bu/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/rtl88x2bu/${rtl88x2buver#*:}/Kconfig"
cp "${SRC}/cache/sources/rtl88x2bu/${rtl88x2buver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl88x2bu/Kconfig"
# Adjust path
sed -i "s/include \$(src)\/rtl8822b.mk /include \$(TopDIR)\/drivers\/net\/wireless\/rtl88x2bu\/rtl8822b.mk/" \
"$kerneldir/drivers/net/wireless/rtl88x2bu/Makefile"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8822BU) += rtl88x2bu/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i "/source \"drivers\/net\/wireless\/ti\/Kconfig\"/a source \"drivers\/net\/wireless\/rtl88x2bu\/Kconfig\"" \
"$kerneldir/drivers/net/wireless/Kconfig"
fi
}
@ -218,11 +346,26 @@ driver_rtl88x2cs()
if linux-version compare "${version}" ge 5.9 && [ "$EXTRAWIFI" == yes ] ; then
# attach to specifics tag or branch
local rtl88x2csver="branch:tune_for_jethub"
display_alert "Adding" "Wireless drivers for Realtek 88x2cs chipsets ${rtl88x2csver}" "info"
extrawifi_patch_default "rtl88x2cs" \
"$GITHUB_SOURCE/jethome-ru/rtl88x2cs" \
"branch:tune_for_jethub"
fetch_from_repo "$GITHUB_SOURCE/jethome-ru/rtl88x2cs" "rtl88x2cs" "${rtl88x2csver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl88x2cs"
mkdir -p "$kerneldir/drivers/net/wireless/rtl88x2cs/"
cp -R "${SRC}/cache/sources/rtl88x2cs/${rtl88x2csver#*:}"/{core,hal,include,os_dep,platform,halmac.mk,ifcfg-wlan0,rtl8822c.mk,runwpa,wlan0dhcp} \
"$kerneldir/drivers/net/wireless/rtl88x2cs"
# Makefile
cp "${SRC}/cache/sources/rtl88x2cs/${rtl88x2csver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl88x2cs/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/rtl88x2cs/${rtl88x2csver#*:}/Kconfig"
cp "${SRC}/cache/sources/rtl88x2cs/${rtl88x2csver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl88x2cs/Kconfig"
# Adjust path
sed -i "s/include \$(src)\/rtl8822c.mk/include \$(TopDIR)\/drivers\/net\/wireless\/rtl88x2cs\/rtl8822c.mk/" \
@ -232,10 +375,12 @@ driver_rtl88x2cs()
sed -i "s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/" \
"$kerneldir/drivers/net/wireless/rtl88x2cs/Makefile"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8822CS) += rtl88x2cs/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl88x2cs\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
fi
}
#_bt for blueteeth
driver_rtl8822cs_bt()
{
@ -257,16 +402,36 @@ driver_rtl8723DS()
if linux-version compare "${version}" ge 5.0 && [[ "$EXTRAWIFI" == yes ]]; then
# attach to specifics tag or branch
local rtl8723dsver="branch:master"
display_alert "Adding" "Wireless drivers for Realtek 8723DS chipsets ${rtl8723dsver}" "info"
extrawifi_patch_default "rtl8723ds" \
"$GITHUB_SOURCE/lwfinger/rtl8723ds" \
"branch:master"
fetch_from_repo "$GITHUB_SOURCE/lwfinger/rtl8723ds" "rtl8723ds" "${rtl8723dsver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl8723ds"
mkdir -p "$kerneldir/drivers/net/wireless/rtl8723ds/"
cp -R "${SRC}/cache/sources/rtl8723ds/${rtl8723dsver#*:}"/{core,hal,include,os_dep,platform} \
"$kerneldir/drivers/net/wireless/rtl8723ds"
# Makefile
cp "${SRC}/cache/sources/rtl8723ds/${rtl8723dsver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl8723ds/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/rtl8723ds/${rtl8723dsver#*:}/Kconfig"
cp "${SRC}/cache/sources/rtl8723ds/${rtl8723dsver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl8723ds/Kconfig"
# Disable debug
sed -i "s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/" \
"$kerneldir/drivers/net/wireless/rtl8723ds/Makefile"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8723DS) += rtl8723ds/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8723ds\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
fi
}
@ -277,18 +442,31 @@ driver_rtl8723DU()
if linux-version compare "${version}" ge 5.0 && [ "$EXTRAWIFI" == yes ]; then
local rtl8723duver="branch:master"
display_alert "Adding" "Wireless drivers for Realtek 8723DU chipsets ${rtl8723duver}" "info"
extrawifi_patch_default "rtl8723du" \
"$GITHUB_SOURCE/lwfinger/rtl8723du" \
"branch:master"
fetch_from_repo "$GITHUB_SOURCE/lwfinger/rtl8723du" "rtl8723du" "${rtl8723duver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl8723du"
mkdir -p "$kerneldir/drivers/net/wireless/rtl8723du/"
cp -R "${SRC}/cache/sources/rtl8723du/${rtl8723duver#*:}"/{core,hal,include,os_dep,platform} \
"$kerneldir/drivers/net/wireless/rtl8723du"
# Makefile
cp "${SRC}/cache/sources/rtl8723du/${rtl8723duver#*:}"/Makefile \
"$kerneldir/drivers/net/wireless/rtl8723du/Makefile"
# Disable debug
sed -i "s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/" \
"$kerneldir/drivers/net/wireless/rtl8723du/Makefile"
process_patch_file "${SRC}/patch/misc/wireless-rtl8723du-5.19.2.patch" "applying"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8723DU) += rtl8723du/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8723du\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
process_patch_file "${SRC}/patch/misc/wireless-rtl8723du-5.19.2.patch" "applying"
fi
}
@ -298,11 +476,30 @@ driver_rtl8822BS()
if linux-version compare "${version}" ge 4.4 && linux-version compare "${version}" le 5.16 && [ "$EXTRAWIFI" == yes ]; then
# attach to specifics tag or branch
display_alert "Adding" "Wireless drivers for Realtek 8822BS chipsets ${rtl8822bsver}" "info"
extrawifi_patch_default "rtl8822bs" \
"$GITHUB_SOURCE/150balbes/wifi" \
"branch:local_rtl8822bs"
local rtl8822bsver="branch:local_rtl8822bs"
fetch_from_repo "$GITHUB_SOURCE/150balbes/wifi" "rtl8822bs" "${rtl8822bsver}" "yes"
cd "$kerneldir" || exit
rm -rf "$kerneldir/drivers/net/wireless/rtl8822bs"
mkdir -p "$kerneldir/drivers/net/wireless/rtl8822bs/"
cp -R "${SRC}/cache/sources/rtl8822bs/${rtl8822bsver#*:}"/{core,hal,include,os_dep,platform,bluetooth,getAP,rtl8822b.mk} \
"$kerneldir/drivers/net/wireless/rtl8822bs"
# Makefile
cp "${SRC}/cache/sources/rtl8822bs/${rtl8822bsver#*:}/Makefile" \
"$kerneldir/drivers/net/wireless/rtl8822bs/Makefile"
# Kconfig
sed -i 's/---help---/help/g' "${SRC}/cache/sources/rtl8822bs/${rtl8822bsver#*:}/Kconfig"
cp "${SRC}/cache/sources/rtl8822bs/${rtl8822bsver#*:}/Kconfig" \
"$kerneldir/drivers/net/wireless/rtl8822bs/Kconfig"
# Add to section Makefile
echo "obj-\$(CONFIG_RTL8822BS) += rtl8822bs/" >> "$kerneldir/drivers/net/wireless/Makefile"
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8822bs\/Kconfig"' \
"$kerneldir/drivers/net/wireless/Kconfig"
fi