From ef15e0b8220a12ca3ca110949c45754851be0bb8 Mon Sep 17 00:00:00 2001 From: morrownr Date: Tue, 13 Dec 2022 18:28:08 -0600 Subject: [PATCH] continued tweaks --- clean | 5 ----- include/autoconf.h | 2 +- install-driver.sh | 21 +++++++-------------- remove-driver.sh | 6 ------ rtw88_8821cu.conf | 1 - 5 files changed, 8 insertions(+), 27 deletions(-) delete mode 100755 clean delete mode 100644 rtw88_8821cu.conf diff --git a/clean b/clean deleted file mode 100755 index 8766421..0000000 --- a/clean +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -rmmod 8192cu -rmmod 8192ce -rmmod 8192du -rmmod 8192de diff --git a/include/autoconf.h b/include/autoconf.h index edbcd72..3a77696 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -176,7 +176,7 @@ #define CONFIG_GLOBAL_UI_PID -/*#define CONFIG_RTW_80211K*/ +#define CONFIG_RTW_80211K /*#define CONFIG_ADAPTOR_INFO_CACHING_FILE */ /* now just applied on 8192cu only, should make it general... */ /*#define CONFIG_RESUME_IN_WORKQUEUE */ diff --git a/install-driver.sh b/install-driver.sh index 8cec67d..809b4a9 100755 --- a/install-driver.sh +++ b/install-driver.sh @@ -19,10 +19,6 @@ SCRIPT_NAME="install-driver.sh" SCRIPT_VERSION="20221208" MODULE_NAME="8821cu" DRV_VERSION="5.12.0.4" -# Some distros have a not yet mainlined, patched-in kernel driver that -# must be deactivated so as not to conflict with this driver. The -# filename may need to change when the new in-kernel driver is mainlined. -#BLACKLIST_FILE="rtw88_8821cu.conf" KVER="$(uname -r)" KARCH="$(uname -m)" @@ -139,12 +135,12 @@ echo "gcc --version="${gcc_ver} # display ISO 3166-1 alpha-2 Country Code a2_country_code=$(iw reg get | grep -i country) echo "Country Code="${a2_country_code} -#if [[ $a2_country_code == *"00"* ]]; -#then -# echo "The Country Code is not properly set." -# echo "File alpha-2_Country_Codes is located in the driver directory." -# echo "Please read and follow the directions in the file." -#fi +if [[ $a2_country_code == *"00"* ]]; +then + echo "The Country Code may not be properly set." + echo "File alpha-2_Country_Codes is located in the driver directory." + echo "Please read and follow the directions in the file." +fi # display secure mode status # run if mokutil is installed @@ -153,10 +149,6 @@ then mokutil --sb-state fi -# blacklist the in-kernel module (driver) so that there is no conflict -#echo "Installing ${BLACKLIST_FILE} to: /etc/modprobe.d" -#cp -f ${BLACKLIST_FILE} /etc/modprobe.d - # sets module parameters (driver options) and blacklisted modules echo "Installing ${OPTIONS_FILE} to: /etc/modprobe.d" cp -f ${OPTIONS_FILE} /etc/modprobe.d @@ -216,6 +208,7 @@ else then if [[ "$RESULT" = "3" ]] then + echo "This driver may already be installed." echo "Run the following and then reattempt installation." echo "$ sudo ./remove-driver.sh" exit $RESULT diff --git a/remove-driver.sh b/remove-driver.sh index 55cc108..9dd42fe 100755 --- a/remove-driver.sh +++ b/remove-driver.sh @@ -19,10 +19,6 @@ SCRIPT_NAME="remove-driver.sh" SCRIPT_VERSION="20221207" MODULE_NAME="8821cu" DRV_VERSION="5.12.0.4" -# Some distros have a not yet mainlined, patched-in kernel driver that -# must be deactivated so as not to conflict with this driver. The -# filename may need to change when the new in-kernel driver is mainlined. -#BLACKLIST_FILE="rtw88_8821cu.conf" KVER="$(uname -r)" KARCH="$(uname -m)" @@ -104,8 +100,6 @@ then fi fi -#echo "Removing ${BLACKLIST_FILE} from /etc/modprobe.d" -#rm -f /etc/modprobe.d/${BLACKLIST_FILE} echo "Removing ${OPTIONS_FILE} from /etc/modprobe.d" rm -f /etc/modprobe.d/${OPTIONS_FILE} echo "Removing source files from /usr/src/${DRV_NAME}-${DRV_VERSION}" diff --git a/rtw88_8821cu.conf b/rtw88_8821cu.conf deleted file mode 100644 index 26864d8..0000000 --- a/rtw88_8821cu.conf +++ /dev/null @@ -1 +0,0 @@ -blacklist rtw88_8821cu