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
#
# 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: 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:
#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)
# 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
#
# 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
tristate "Realtek 8822B USB WiFi"
depends on USB
select WIRELESS_EXT
help
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
* under the terms of version 2 of the GNU General Public License as

View File

@ -2513,7 +2513,7 @@ install:
/sbin/depmod -a ${KVER}
uninstall:
rm -f $(MODDESTDIR)/$(MODULE_NAME).ko
rm -f $(MODDESTDIR)$(MODULE_NAME).ko
/sbin/depmod -a ${KVER}
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_VERSION="5.13.1"
MAKE[0]="'make' -j$(nproc) KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]="88x2bu"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
AUTOINSTALL="yes"
MAKE="./dkms-make.sh"
CLEAN="'make' clean"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"

View File

@ -1,10 +1,9 @@
#!/bin/bash
#
OPTIONS_FILE="88x2bu.conf"
SCRIPT_NAME="edit-options.sh"
#
#!/bin/sh
# Purpose: Make it easier to edit the driver options file.
#
# Flexible editor support.
#
# To make this file executable:
#
# $ chmod +x edit-options.sh
@ -13,20 +12,45 @@ SCRIPT_NAME="edit-options.sh"
#
# $ sudo ./edit-options.sh
#
if [[ $EUID -ne 0 ]]
then
# Copyright(c) 2023 Nick Morrow
#
# 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 "Try: \"sudo ./${SCRIPT_NAME}\""
exit 1
fi
nano /etc/modprobe.d/${OPTIONS_FILE}
read -p "Do you want to apply the new options by rebooting now? [y/N] " -n 1 -r
echo # move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
reboot
DEFAULT_EDITOR="$(cat default-editor.txt)"
# try to find the user's default text editor through the EDITORS_SEARCH array
for TEXT_EDITOR in "${VISUAL}" "${EDITOR}" "${DEFAULT_EDITOR}" vi; do
command -v "${TEXT_EDITOR}" >/dev/null 2>&1 && break
done
# failure message if no editor was found
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
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
#
SCRIPT_NAME="save-log.sh"
#
#!/bin/sh
# Purpose: Save a log file with RTW lines only.
#
# To make this file executable:
@ -11,24 +9,25 @@ SCRIPT_NAME="save-log.sh"
# To execute this file:
#
# $ 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 "Try: \"sudo ./${SCRIPT_NAME}\""
exit 1
fi
# Deletes existing log
# deletes existing log
rm -f -- rtw.log
dmesg | cut -d"]" -f2- | grep "RTW" >> rtw.log
RESULT=$?
if [[ "$RESULT" != "0" ]]; then
if [ "$RESULT" != "0" ]; then
echo "An error occurred while running: ${SCRIPT_NAME}"
echo "Did you set a log level > 0 ?"
exit 1
else
echo "rtw.log saved successfully."
exit 0
fi