numerous updates- MU-MIMO works

This commit is contained in:
morrownr 2023-01-27 10:16:08 -06:00
parent d0f2241ec5
commit 9597e68f44
12 changed files with 332 additions and 241 deletions

View File

@ -10,13 +10,13 @@
blacklist rtw88_8822bu blacklist rtw88_8822bu
# #
# Edit the following line to change, add or delete options: # Edit the following line to change, add or delete options:
options 88x2bu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgnt=1 rtw_switch_usb_mode=0 options 88x2bu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_switch_usb_mode=0
# #
# Note: To activate USB3 mode, change rtw_switch_usb_mode above to rtw_switch_usb_mode=1 # Note: To activate USB3 mode, change rtw_switch_usb_mode above to rtw_switch_usb_mode=1
# #
# Note: The above `options` line is a good default for managed mode. Below is # Note: The above `options` line is a good default for managed mode. Below is
# an example for AP mode. Modify as required after reading the documentation: # an example for AP mode. Modify as required after reading the documentation:
#options 88x2bu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=2 rtw_power_mgnt=1 rtw_beamform_cap=1 rtw_dfs_region_domain=1 #options 88x2bu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=2 rtw_power_mgnt=1 rtw_beamform_cap=1 rtw_switch_usb_mode=1 rtw_dfs_region_domain=1
# #
# After editing is complete, save this file (if using nano: Ctrl + x, y, Enter) # After editing is complete, save this file (if using nano: Ctrl + x, y, Enter)
# and reboot to activate the changes. # and reboot to activate the changes.
@ -40,7 +40,7 @@ options 88x2bu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgn
# #
# sudo ./save-log.sh # sudo ./save-log.sh
# #
# Note: The name of the log file will be ```rtw.log```. # Note: The name of the log file will be `rtw.log`.
# #
# ----- # -----
# #

View File

@ -1,6 +1,7 @@
config RTL8822BU config RTL8822BU
tristate "Realtek 8822B USB WiFi" tristate "Realtek 8822B USB WiFi"
depends on USB depends on USB
select WIRELESS_EXT
help help
Help message of RTL8822BU Help message of RTL8822BU

View File

@ -1,6 +1,6 @@
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2007 - 2022 Realtek Corporation. * Copyright(c) 2007 - 2023 Realtek Corporation.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as * under the terms of version 2 of the GNU General Public License as

View File

@ -2513,7 +2513,7 @@ install:
/sbin/depmod -a ${KVER} /sbin/depmod -a ${KVER}
uninstall: uninstall:
rm -f $(MODDESTDIR)/$(MODULE_NAME).ko rm -f $(MODDESTDIR)$(MODULE_NAME).ko
/sbin/depmod -a ${KVER} /sbin/depmod -a ${KVER}
backup_rtlwifi: backup_rtlwifi:

115
README.md

File diff suppressed because it is too large Load Diff

1
default-editor.txt Normal file
View File

@ -0,0 +1 @@
nano

17
dkms-make.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# SMEM needs to be set here if dkms build is not initiated by install-driver.sh
SMEM=$(LANG=C free | awk '/Mem:/ { print $2 }')
# sproc needs to be set here if dkms build is not initiated by install-driver.sh
sproc=$(nproc)
# avoid Out of Memory condition in low-RAM systems by limiting core usage
if [ "$sproc" -gt 1 ]; then
if [ "$SMEM" -lt 1400000 ]; then
sproc=2
fi
fi
kernelver=${kernelver:-$(uname -r)}
make "-j$sproc" "KVER=$kernelver" "KSRC=/lib/modules/$kernelver/build"

View File

@ -1,7 +1,7 @@
PACKAGE_NAME="rtl88x2bu" PACKAGE_NAME="rtl88x2bu"
PACKAGE_VERSION="5.13.1" PACKAGE_VERSION="5.13.1"
MAKE[0]="'make' -j$(nproc) KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]="88x2bu" BUILT_MODULE_NAME[0]="88x2bu"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless" MAKE="./dkms-make.sh"
AUTOINSTALL="yes" CLEAN="'make' clean"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"

View File

@ -1,10 +1,9 @@
#!/bin/bash #!/bin/sh
#
OPTIONS_FILE="88x2bu.conf"
SCRIPT_NAME="edit-options.sh"
#
# Purpose: Make it easier to edit the driver options file. # Purpose: Make it easier to edit the driver options file.
# #
# Flexible editor support.
#
# To make this file executable: # To make this file executable:
# #
# $ chmod +x edit-options.sh # $ chmod +x edit-options.sh
@ -13,20 +12,45 @@ SCRIPT_NAME="edit-options.sh"
# #
# $ sudo ./edit-options.sh # $ sudo ./edit-options.sh
# #
if [[ $EUID -ne 0 ]] # Copyright(c) 2023 Nick Morrow
then #
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
SCRIPT_NAME="edit-options.sh"
# SCRIPT_VERSION="20230126"
OPTIONS_FILE="88x2bu.conf"
# check to ensure sudo was used to start the script
if [ "$(id -u)" -ne 0 ]; then
echo "You must run this script with superuser (root) privileges." echo "You must run this script with superuser (root) privileges."
echo "Try: \"sudo ./${SCRIPT_NAME}\"" echo "Try: \"sudo ./${SCRIPT_NAME}\""
exit 1 exit 1
fi fi
nano /etc/modprobe.d/${OPTIONS_FILE} DEFAULT_EDITOR="$(cat default-editor.txt)"
# try to find the user's default text editor through the EDITORS_SEARCH array
read -p "Do you want to apply the new options by rebooting now? [y/N] " -n 1 -r for TEXT_EDITOR in "${VISUAL}" "${EDITOR}" "${DEFAULT_EDITOR}" vi; do
echo # move to a new line command -v "${TEXT_EDITOR}" >/dev/null 2>&1 && break
if [[ $REPLY =~ ^[Yy]$ ]] done
then # failure message if no editor was found
reboot if ! command -v "${TEXT_EDITOR}" >/dev/null 2>&1; then
echo "No text editor was found (default: ${DEFAULT_EDITOR})."
echo "Please install ${DEFAULT_EDITOR} or edit the file 'default-editor.txt' to specify your editor."
echo "Once complete, please run \"sudo ./${SCRIPT_NAME}\""
exit 1
fi fi
exit 0 ${TEXT_EDITOR} /etc/modprobe.d/${OPTIONS_FILE}
printf "Do you want to apply the new options by rebooting now? (recommended) [y/N] "
read -r REPLY
case "$REPLY" in
[yY]*) reboot ;;
esac

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/sh
#
SCRIPT_NAME="save-log.sh"
#
# Purpose: Save a log file with RTW lines only. # Purpose: Save a log file with RTW lines only.
# #
# To make this file executable: # To make this file executable:
@ -11,24 +9,25 @@ SCRIPT_NAME="save-log.sh"
# To execute this file: # To execute this file:
# #
# $ sudo ./edit-options.sh # $ sudo ./edit-options.sh
#
if [[ $EUID -ne 0 ]]; then SCRIPT_NAME="save-log.sh"
if [ "$(id -u)" -ne 0 ]; then
echo "You must run this script with superuser (root) privileges." echo "You must run this script with superuser (root) privileges."
echo "Try: \"sudo ./${SCRIPT_NAME}\"" echo "Try: \"sudo ./${SCRIPT_NAME}\""
exit 1 exit 1
fi fi
# Deletes existing log # deletes existing log
rm -f -- rtw.log rm -f -- rtw.log
dmesg | cut -d"]" -f2- | grep "RTW" >> rtw.log dmesg | cut -d"]" -f2- | grep "RTW" >> rtw.log
RESULT=$? RESULT=$?
if [[ "$RESULT" != "0" ]]; then if [ "$RESULT" != "0" ]; then
echo "An error occurred while running: ${SCRIPT_NAME}" echo "An error occurred while running: ${SCRIPT_NAME}"
echo "Did you set a log level > 0 ?" echo "Did you set a log level > 0 ?"
exit 1 exit 1
else else
echo "rtw.log saved successfully." echo "rtw.log saved successfully."
exit 0
fi fi