Cleanup plus remove duplicate device ID

This commit is contained in:
morrownr 2022-09-26 00:34:54 -05:00
parent 305d682ae8
commit ccb2b0aa4c
3 changed files with 34 additions and 17 deletions

View File

@ -5,8 +5,16 @@
# This version of the installation script does not use dkms. # This version of the installation script does not use dkms.
SCRIPT_NAME="install-driver-no-dkms.sh" SCRIPT_NAME="install-driver-no-dkms.sh"
SCRIPT_VERSION="20220821" SCRIPT_VERSION="20220913"
OPTIONS_FILE="88x2bu.conf" OPTIONS_FILE="88x2bu.conf"
MODULE_NAME="88x2bu"
KVER="$(uname -r)"
KSRC="/lib/modules/${KVER}/build"
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
# Some distros have a non-mainlined, patched-in kernel driver
# that has to be deactivated.
BLACKLIST_FILE="rtw88_8822bu.conf" BLACKLIST_FILE="rtw88_8822bu.conf"
# support for NoPrompt allows non-interactive use of this script # support for NoPrompt allows non-interactive use of this script
@ -36,18 +44,18 @@ then
exit 1 exit 1
fi fi
# information that helps with bug reports
# displays script name and version # displays script name and version
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}" echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
# information that helps with bug reports
# kernel # kernel
uname -r uname -r
# architecture - for ARM: aarch64 = 64 bit, armv7l = 32 bit # architecture - for ARM: aarch64 = 64 bit, armv7l = 32 bit
uname -m uname -m
#getconf LONG_BIT (need to work on this)
echo "Starting installation..." echo "Installing the following driver..."
echo "${MODDESTDIR}${MODULE_NAME}.ko"
# sets module parameters (driver options) # sets module parameters (driver options)
echo "Copying ${OPTIONS_FILE} to: /etc/modprobe.d" echo "Copying ${OPTIONS_FILE} to: /etc/modprobe.d"
@ -72,11 +80,20 @@ then
exit $RESULT exit $RESULT
fi fi
# As shown in Makefile
# install:
# install -p -m 644 $(MODULE_NAME).ko $(MODDESTDIR)
# /sbin/depmod -a ${KVER}
make install make install
RESULT=$? RESULT=$?
if [[ "$RESULT" != "0" ]] if [[ ("$RESULT" = "0")]]
then then
echo "The driver was installed successfully."
# unblock wifi
rfkill unblock wlan
else
echo "An error occurred. Error = ${RESULT}" echo "An error occurred. Error = ${RESULT}"
echo "Please report this error." echo "Please report this error."
echo "Please copy all screen output and paste it into the report." echo "Please copy all screen output and paste it into the report."
@ -85,11 +102,6 @@ then
exit $RESULT exit $RESULT
fi fi
echo "The driver was installed successfully."
# unblock wifi
rfkill unblock wlan
# if NoPrompt is not used, ask user some questions to complete installation # if NoPrompt is not used, ask user some questions to complete installation
if [ $NO_PROMPT -ne 1 ] if [ $NO_PROMPT -ne 1 ]
then then

View File

@ -248,7 +248,6 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
{USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xD822, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Edimax */ {USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xD822, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Edimax */
{USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xE822, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Edimax */ {USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xE822, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Edimax */
{USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xF822, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Edimax */ {USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xF822, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Edimax */
{USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0043, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Alpha - Alpha */
{USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x012D, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* TP-Link Archer T3U v1 */ {USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x012D, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* TP-Link Archer T3U v1 */
{USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0138, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* TP-Link Archer T3U Plus v1 */ {USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0138, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* TP-Link Archer T3U Plus v1 */
{USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0115, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* TP-Link Archer T4U V3 */ {USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0115, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* TP-Link Archer T4U V3 */
@ -268,7 +267,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
{USB_DEVICE_AND_INTERFACE_INFO(0x13B1, 0x0045, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Linksys WUSB3600 v2 */ {USB_DEVICE_AND_INTERFACE_INFO(0x13B1, 0x0045, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Linksys WUSB3600 v2 */
{USB_DEVICE_AND_INTERFACE_INFO(0x04CA, 0x8602, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* LiteOn */ {USB_DEVICE_AND_INTERFACE_INFO(0x04CA, 0x8602, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* LiteOn */
{USB_DEVICE_AND_INTERFACE_INFO(0x0E66, 0x0025, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Hawking HW12ACU */ {USB_DEVICE_AND_INTERFACE_INFO(0x0E66, 0x0025, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Hawking HW12ACU */
{USB_DEVICE_AND_INTERFACE_INFO(0x13B1, 0x0043, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Linksys */ {USB_DEVICE_AND_INTERFACE_INFO(0x13B1, 0x0043, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Alpha - Linksys */
{USB_DEVICE_AND_INTERFACE_INFO(0x0BDA, 0x2102, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* CCNC */ {USB_DEVICE_AND_INTERFACE_INFO(0x0BDA, 0x2102, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* CCNC */
#endif /* CONFIG_RTL8822B */ #endif /* CONFIG_RTL8822B */

View File

@ -5,11 +5,15 @@
# This version of the removal script does not use dkms. # This version of the removal script does not use dkms.
SCRIPT_NAME="remove-driver-no-dkms.sh" SCRIPT_NAME="remove-driver-no-dkms.sh"
SCRIPT_VERSION="20220821" SCRIPT_VERSION="20220913"
OPTIONS_FILE="88x2bu.conf" OPTIONS_FILE="88x2bu.conf"
BLACKLIST_FILE="rtw88_8822bu.conf"
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}" MODULE_NAME="88x2bu"
KVER="$(uname -r)"
KSRC="/lib/modules/${KVER}/build"
MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/"
BLACKLIST_FILE="rtw88_8822bu.conf"
# support for NoPrompt allows non-interactive use of this script # support for NoPrompt allows non-interactive use of this script
NO_PROMPT=0 NO_PROMPT=0
@ -38,7 +42,8 @@ then
exit 1 exit 1
fi fi
echo "Starting removal..." # displays script name and version
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
make uninstall make uninstall
RESULT=$? RESULT=$?
@ -57,6 +62,7 @@ else
exit $RESULT exit $RESULT
fi fi
# if NoPrompt is not used, ask user some questions to complete removal
if [ $NO_PROMPT -ne 1 ] if [ $NO_PROMPT -ne 1 ]
then then
read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r