various updates
This commit is contained in:
parent
46e2665214
commit
bcfd5dcc9f
@ -68,11 +68,11 @@ options 88x2bu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_switch_us
|
|||||||
#
|
#
|
||||||
# Beamforming options ( rtw_beamform_cap )
|
# Beamforming options ( rtw_beamform_cap )
|
||||||
#
|
#
|
||||||
# 0 = Disable (default)
|
# 0 = Disable
|
||||||
# 1 = SU Beamformer
|
# 1 = SU Beamformer
|
||||||
# 2 = SU Beamformee
|
# 2 = SU Beamformee
|
||||||
# 3 = SU Beamformer and SU Beamformee
|
# 3 = SU Beamformer and SU Beamformee
|
||||||
# 10= SU Beamformee and MU Beamformee
|
# 10= SU Beamformee and MU Beamformee (default)
|
||||||
# 11= SU Beamformer and SU Beamformee and MU Beamformee
|
# 11= SU Beamformer and SU Beamformee and MU Beamformee
|
||||||
#
|
#
|
||||||
# Note: MU Beamformer is not supported.
|
# Note: MU Beamformer is not supported.
|
||||||
|
|||||||
7
Makefile
7
Makefile
@ -75,7 +75,6 @@ CONFIG_GSPI_HCI = n
|
|||||||
CONFIG_AP_MODE = y
|
CONFIG_AP_MODE = y
|
||||||
CONFIG_P2P = y
|
CONFIG_P2P = y
|
||||||
CONFIG_MP_INCLUDED = n
|
CONFIG_MP_INCLUDED = n
|
||||||
CONFIG_CONCURRENT_MODE = n
|
|
||||||
CONFIG_POWER_SAVING = y
|
CONFIG_POWER_SAVING = y
|
||||||
CONFIG_IPS_MODE = default
|
CONFIG_IPS_MODE = default
|
||||||
CONFIG_LPS_MODE = default
|
CONFIG_LPS_MODE = default
|
||||||
@ -83,7 +82,7 @@ CONFIG_USB_AUTOSUSPEND = n
|
|||||||
CONFIG_HW_PWRP_DETECTION = n
|
CONFIG_HW_PWRP_DETECTION = n
|
||||||
CONFIG_BT_COEXIST = y
|
CONFIG_BT_COEXIST = y
|
||||||
CONFIG_WAPI_SUPPORT = n
|
CONFIG_WAPI_SUPPORT = n
|
||||||
CONFIG_EFUSE_CONFIG_FILE = y
|
CONFIG_EFUSE_CONFIG_FILE = n
|
||||||
CONFIG_EXT_CLK = n
|
CONFIG_EXT_CLK = n
|
||||||
CONFIG_TRAFFIC_PROTECT = n
|
CONFIG_TRAFFIC_PROTECT = n
|
||||||
CONFIG_LOAD_PHY_PARA_FROM_FILE = y
|
CONFIG_LOAD_PHY_PARA_FROM_FILE = y
|
||||||
@ -99,7 +98,7 @@ CONFIG_SIGNAL_SCALE_MAPPING = n
|
|||||||
CONFIG_80211W = y
|
CONFIG_80211W = y
|
||||||
CONFIG_REDUCE_TX_CPU_LOADING = n
|
CONFIG_REDUCE_TX_CPU_LOADING = n
|
||||||
CONFIG_BR_EXT = y
|
CONFIG_BR_EXT = y
|
||||||
CONFIG_TDLS = n
|
CONFIG_TDLS = y
|
||||||
CONFIG_WIFI_MONITOR = y
|
CONFIG_WIFI_MONITOR = y
|
||||||
CONFIG_MCC_MODE = n
|
CONFIG_MCC_MODE = n
|
||||||
CONFIG_APPEND_VENDOR_IE_ENABLE = n
|
CONFIG_APPEND_VENDOR_IE_ENABLE = n
|
||||||
@ -1394,7 +1393,7 @@ EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
|||||||
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
|
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
|
||||||
ARCH ?= $(SUBARCH)
|
ARCH ?= $(SUBARCH)
|
||||||
CROSS_COMPILE ?=
|
CROSS_COMPILE ?=
|
||||||
KVER := $(shell uname -r)
|
KVER := $(shell uname -r)
|
||||||
KSRC := /lib/modules/$(KVER)/build
|
KSRC := /lib/modules/$(KVER)/build
|
||||||
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
|
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
|
||||||
INSTALL_PREFIX :=
|
INSTALL_PREFIX :=
|
||||||
|
|||||||
16
README.md
16
README.md
@ -48,7 +48,7 @@ confirm that this is the correct driver for your adapter.
|
|||||||
### Compatible Kernels
|
### Compatible Kernels
|
||||||
|
|
||||||
- Kernels: 4.19 - 5.11 (Realtek)
|
- Kernels: 4.19 - 5.11 (Realtek)
|
||||||
- Kernels: 5.12 - 6.1 (community support)
|
- Kernels: 5.12 - 6.2 (community support)
|
||||||
|
|
||||||
### Tested Compilers
|
### Tested Compilers
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ be provided via PR or message in Issues.
|
|||||||
|
|
||||||
- SkiffOS for Odroid XU4 (ARM 32 bit) (kernel 6.0.7)
|
- SkiffOS for Odroid XU4 (ARM 32 bit) (kernel 6.0.7)
|
||||||
|
|
||||||
- Ubuntu 22.04 (kernel 5.15) and 22.10 (kernel 5.19)
|
- Ubuntu 22.04 (kernel 5.15) and 22.10 (kernel 5.19) (kernel 6.2 rc1)
|
||||||
|
|
||||||
- Void Linux (kernel 5.18)
|
- Void Linux (kernel 5.18)
|
||||||
|
|
||||||
@ -90,10 +90,10 @@ supported due to the way kernel patches are handled. I will support
|
|||||||
knowledgable RHEL developers if they want to merge the required
|
knowledgable RHEL developers if they want to merge the required
|
||||||
support and keep it current.
|
support and keep it current.
|
||||||
|
|
||||||
Note: Android is not supported but I will support knowledgable Android
|
Note: Android is supported in the driver according to Realtek. I will support
|
||||||
developers if they want to merge and keep current the required support
|
knowledgable Android developers if they want to merge and keep current the
|
||||||
(most likely just instructions about how to compile and maybe a modification
|
required support (most likely just instructions about how to compile and maybe
|
||||||
or two to the Makefile).
|
a modification or two to the Makefile).
|
||||||
|
|
||||||
|
|
||||||
### Download Locations for Tested Linux Distributions
|
### Download Locations for Tested Linux Distributions
|
||||||
@ -120,7 +120,7 @@ or two to the Makefile).
|
|||||||
|
|
||||||
### Compatible Devices
|
### Compatible Devices
|
||||||
|
|
||||||
Warning: If you are looking for information about what adapter to buy,
|
Note: If you are looking for information about what adapter to buy,
|
||||||
click [here](https://github.com/morrownr/USB-WiFi) and look for Main Menu
|
click [here](https://github.com/morrownr/USB-WiFi) and look for Main Menu
|
||||||
item 2 which will show information about and links to recommended adapters.
|
item 2 which will show information about and links to recommended adapters.
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ If it is not set, you will likely have problems accessing some channels, especia
|
|||||||
5 Ghz and 6 GHz channels. To set your Country Code:
|
5 Ghz and 6 GHz channels. To set your Country Code:
|
||||||
|
|
||||||
```
|
```
|
||||||
iw reg set US
|
sudo iw reg set US
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are not in the US, please use the country code for your country. See:
|
If you are not in the US, please use the country code for your country. See:
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
2022-12-18
|
2022-12-26
|
||||||
|
|
||||||
Instructions for setting the ISO 3166-1 alpha-2 Country Code in your Linux
|
Instructions for setting the ISO 3166-1 alpha-2 Country Code in your Linux
|
||||||
distro. If it is not set, you may have problems using some channels, especially
|
distro. If it is not set, you may have problems using some channels, especially
|
||||||
@ -23,30 +23,27 @@ iw reg get
|
|||||||
```
|
```
|
||||||
ISO 3166-1 alpha-2 Country Codes
|
ISO 3166-1 alpha-2 Country Codes
|
||||||
|
|
||||||
Name Code
|
Code Name
|
||||||
|
|
||||||
Afghanistan AF
|
AF Afghanistan
|
||||||
|
|
||||||
Aland
|
AX Aland Islands
|
||||||
Islands AX
|
|
||||||
|
|
||||||
Albania AL
|
AL Albania
|
||||||
|
|
||||||
Algeria DZ
|
DZ Algeria
|
||||||
|
|
||||||
American
|
AS American Samoa
|
||||||
Samoa AS
|
|
||||||
|
|
||||||
Andorra AD
|
AD Andorra
|
||||||
|
|
||||||
Angola AO
|
AO Angola
|
||||||
|
|
||||||
Anguilla AI
|
AI Anguilla
|
||||||
|
|
||||||
Antarctica AQ
|
AQ Antarctica
|
||||||
|
|
||||||
Antigua and
|
AG Antigua and Barbuda
|
||||||
Barbuda AG
|
|
||||||
|
|
||||||
Argentina AR
|
Argentina AR
|
||||||
|
|
||||||
@ -321,7 +318,7 @@ Liberia LR
|
|||||||
|
|
||||||
Libya LY
|
Libya LY
|
||||||
|
|
||||||
Liechtenstein LI
|
LI Liechtenstein
|
||||||
|
|
||||||
Lithuania LT
|
Lithuania LT
|
||||||
|
|
||||||
@ -401,7 +398,7 @@ Nigeria NG
|
|||||||
|
|
||||||
Niue NU
|
Niue NU
|
||||||
|
|
||||||
Norfolk Island NF
|
NF Norfolk Island
|
||||||
|
|
||||||
Northern
|
Northern
|
||||||
Mariana
|
Mariana
|
||||||
@ -461,11 +458,9 @@ and Nevis KN
|
|||||||
|
|
||||||
Saint Lucia LC
|
Saint Lucia LC
|
||||||
|
|
||||||
Saint Martin
|
MF Saint Martin (French part)
|
||||||
(French part) MF
|
|
||||||
|
|
||||||
Saint Pierre
|
PM Saint Pierre and Miquelon
|
||||||
and Miquelon PM
|
|
||||||
|
|
||||||
Saint Vincent
|
Saint Vincent
|
||||||
and the
|
and the
|
||||||
@ -475,10 +470,9 @@ Samoa WS
|
|||||||
|
|
||||||
San Marino SM
|
San Marino SM
|
||||||
|
|
||||||
Sao Tome
|
ST Sao Tome and Principe
|
||||||
and Principe ST
|
|
||||||
|
|
||||||
Saudi Arabia SA
|
SA Saudi Arabia
|
||||||
|
|
||||||
Senegal SN
|
Senegal SN
|
||||||
|
|
||||||
@ -486,12 +480,11 @@ Serbia RS
|
|||||||
|
|
||||||
Seychelles SC
|
Seychelles SC
|
||||||
|
|
||||||
Sierra Leone SL
|
SL Sierra Leone
|
||||||
|
|
||||||
Singapore SG
|
Singapore SG
|
||||||
|
|
||||||
Sint Maarten
|
SX Sint Maarten (Dutch part)
|
||||||
(Dutch part) SX
|
|
||||||
|
|
||||||
Slovakia SK
|
Slovakia SK
|
||||||
|
|
||||||
@ -502,7 +495,7 @@ Islands SB
|
|||||||
|
|
||||||
Somalia SO
|
Somalia SO
|
||||||
|
|
||||||
South Africa ZA
|
ZA South Africa
|
||||||
|
|
||||||
South
|
South
|
||||||
Georgia and
|
Georgia and
|
||||||
@ -557,7 +550,7 @@ Tunisia TN
|
|||||||
|
|
||||||
Turkey TR
|
Turkey TR
|
||||||
|
|
||||||
Turkmenistan TM
|
TM Turkmenistan
|
||||||
|
|
||||||
Turks and
|
Turks and
|
||||||
Caicos
|
Caicos
|
||||||
@ -572,9 +565,9 @@ Ukraine UA
|
|||||||
United Arab
|
United Arab
|
||||||
Emirates AE
|
Emirates AE
|
||||||
|
|
||||||
United Kingdom GB
|
GB United Kingdom
|
||||||
|
|
||||||
United States US
|
US United States
|
||||||
|
|
||||||
United States
|
United States
|
||||||
Minor
|
Minor
|
||||||
@ -597,14 +590,14 @@ British VG
|
|||||||
Virgin Islands,
|
Virgin Islands,
|
||||||
U.S. VI
|
U.S. VI
|
||||||
|
|
||||||
Wallis and
|
WF Wallis and Futuna
|
||||||
Futuna WF
|
|
||||||
|
|
||||||
Western Sahara EH
|
EH Western Sahara
|
||||||
|
|
||||||
Yemen YE
|
YE Yemen
|
||||||
|
|
||||||
Zambia ZM
|
ZM Zambia
|
||||||
|
|
||||||
|
ZW Zimbabwe
|
||||||
|
|
||||||
Zimbabwe ZW
|
|
||||||
```
|
```
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
2022-11-15
|
2022-12-27
|
||||||
|
|
||||||
What is Concurrent Mode?
|
What is Concurrent Mode?
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ single WiFi adapter.
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
Use station mode (called managed or client mode also) to connect with an
|
Use station mode (also called managed or client mode) to connect with an
|
||||||
AP to access the internet at the same time as it also performs as an AP
|
AP to access the internet at the same time as it also performs as an AP
|
||||||
to allow other devices to connect to the second interface.
|
to allow other devices to connect to the second interface.
|
||||||
|
|
||||||
@ -35,13 +35,13 @@ nano Makefile
|
|||||||
Change the following line:
|
Change the following line:
|
||||||
|
|
||||||
```
|
```
|
||||||
CONFIG_CONCURRENT_MODE = n
|
#EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
|
||||||
```
|
```
|
||||||
|
|
||||||
to
|
to
|
||||||
|
|
||||||
```
|
```
|
||||||
CONFIG_CONCURRENT_MODE = y
|
EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
|
||||||
```
|
```
|
||||||
|
|
||||||
and then install the driver per the installation steps. If
|
and then install the driver per the installation steps. If
|
||||||
@ -50,10 +50,15 @@ the driver is already installed, run the following first:
|
|||||||
```
|
```
|
||||||
sudo ./remove-driver.sh
|
sudo ./remove-driver.sh
|
||||||
```
|
```
|
||||||
|
and then reinstall the driver with:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo ./install-driver.sh
|
||||||
|
```
|
||||||
|
|
||||||
Once the driver is fully installed and you have rebooted the system, you
|
Once the driver is fully installed and you have rebooted the system, you
|
||||||
can verify that this works by typing the “iw dev” command, You should
|
can verify that this works by typing the “iw dev” command. You should
|
||||||
see two wireless interfaces, and the MAC address of secondary interface
|
see two wireless interfaces, and the MAC address of the secondary interface
|
||||||
is nearly the same as the first except for one digit.
|
is nearly the same as the first except for one digit.
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|||||||
@ -42,7 +42,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_80211AC_VHT
|
#ifdef CONFIG_80211AC_VHT
|
||||||
#define CONFIG_BEAMFORMING
|
/* nrm - activates beamforming */
|
||||||
|
/* #define CONFIG_BEAMFORMING */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* set CONFIG_IOCTL_CFG80211 from Makefile */
|
/* set CONFIG_IOCTL_CFG80211 from Makefile */
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
SCRIPT_NAME="install-driver.sh"
|
SCRIPT_NAME="install-driver.sh"
|
||||||
SCRIPT_VERSION="20221218"
|
SCRIPT_VERSION="20221228"
|
||||||
MODULE_NAME="88x2bu"
|
MODULE_NAME="88x2bu"
|
||||||
DRV_VERSION="5.13.1"
|
DRV_VERSION="5.13.1"
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ fi
|
|||||||
# check to ensure gcc is installed
|
# check to ensure gcc is installed
|
||||||
if ! command -v gcc >/dev/null 2>&1
|
if ! command -v gcc >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "A required package appears to not be installed."
|
echo "A required package is not installed."
|
||||||
echo "Please install the following package: gcc"
|
echo "Please install the following package: gcc"
|
||||||
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
||||||
exit 1
|
exit 1
|
||||||
@ -54,7 +54,7 @@ fi
|
|||||||
# check to ensure make is installed
|
# check to ensure make is installed
|
||||||
if ! command -v make >/dev/null 2>&1
|
if ! command -v make >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "A required package appears to not be installed."
|
echo "A required package is not installed."
|
||||||
echo "Please install the following package: make"
|
echo "Please install the following package: make"
|
||||||
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
||||||
exit 1
|
exit 1
|
||||||
@ -62,7 +62,7 @@ fi
|
|||||||
|
|
||||||
# check to see if header files are installed
|
# check to see if header files are installed
|
||||||
if [ ! -d "/lib/modules/$(uname -r)/build" ]; then
|
if [ ! -d "/lib/modules/$(uname -r)/build" ]; then
|
||||||
echo "Your kernel headers aren't properly installed."
|
echo "Your kernel header files aren't properly installed."
|
||||||
echo "Please consult your distro documentation."
|
echo "Please consult your distro documentation."
|
||||||
echo "Once the header files are installed, please run \"sudo ./${SCRIPT_NAME}\""
|
echo "Once the header files are installed, please run \"sudo ./${SCRIPT_NAME}\""
|
||||||
exit 1
|
exit 1
|
||||||
@ -71,7 +71,7 @@ fi
|
|||||||
# check to ensure iw is installed
|
# check to ensure iw is installed
|
||||||
if ! command -v iw >/dev/null 2>&1
|
if ! command -v iw >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "A required package appears to not be installed."
|
echo "A required package is not installed."
|
||||||
echo "Please install the following package: iw"
|
echo "Please install the following package: iw"
|
||||||
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
||||||
exit 1
|
exit 1
|
||||||
@ -80,7 +80,7 @@ fi
|
|||||||
# check to ensure rfkill is installed
|
# check to ensure rfkill is installed
|
||||||
if ! command -v rfkill >/dev/null 2>&1
|
if ! command -v rfkill >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "A required package appears to not be installed."
|
echo "A required package is not installed."
|
||||||
echo "Please install the following package: rfkill"
|
echo "Please install the following package: rfkill"
|
||||||
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
||||||
exit 1
|
exit 1
|
||||||
@ -89,7 +89,7 @@ fi
|
|||||||
# check to ensure nano is installed
|
# check to ensure nano is installed
|
||||||
if ! command -v nano >/dev/null 2>&1
|
if ! command -v nano >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "A required package appears to not be installed."
|
echo "A required package is not installed."
|
||||||
echo "Please install the following package: nano"
|
echo "Please install the following package: nano"
|
||||||
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\""
|
||||||
exit 1
|
exit 1
|
||||||
@ -115,16 +115,37 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# displays script name and version
|
# displays script name and version
|
||||||
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
echo "Script: ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
||||||
|
|
||||||
# check for and remove non-dkms installation
|
# check for and remove non-dkms installations
|
||||||
|
# standard naming
|
||||||
if [[ -f "${MODDESTDIR}${MODULE_NAME}.ko" ]]
|
if [[ -f "${MODDESTDIR}${MODULE_NAME}.ko" ]]
|
||||||
then
|
then
|
||||||
echo "Removing a non-dkms installation."
|
echo "Removing a non-dkms installation: ${MODDESTDIR}${MODULE_NAME}.ko"
|
||||||
rm -f ${MODDESTDIR}${MODULE_NAME}.ko
|
rm -f ${MODDESTDIR}${MODULE_NAME}.ko
|
||||||
/sbin/depmod -a ${KVER}
|
/sbin/depmod -a ${KVER}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check for and remove non-dkms installations
|
||||||
|
# with rtl added to module name (PClinuxOS)
|
||||||
|
if [[ -f "${MODDESTDIR}rtl${MODULE_NAME}.ko" ]]
|
||||||
|
then
|
||||||
|
echo "Removing a non-dkms installation: ${MODDESTDIR}rtl${MODULE_NAME}.ko"
|
||||||
|
rm -f ${MODDESTDIR}rtl${MODULE_NAME}.ko
|
||||||
|
/sbin/depmod -a ${KVER}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check for and remove non-dkms installations
|
||||||
|
# with compressed module in a unique non-standard location (Armbian)
|
||||||
|
# Example: /usr/lib/modules/5.15.80-rockchip64/kernel/drivers/net/wireless/rtl8821cu/8821cu.ko.xz
|
||||||
|
# Dear Armbiam, this is a really bad idea.
|
||||||
|
if [[ -f "/usr/lib/modules/${KVER}/kernel/drivers/net/wireless/${DRV_NAME}/${MODULE_NAME}.ko.xz" ]]
|
||||||
|
then
|
||||||
|
echo "Removing a non-dkms installation: /usr/lib/modules/${KVER}/kernel/drivers/net/wireless/${DRV_NAME}/${MODULE_NAME}.ko.xz"
|
||||||
|
rm -f /usr/lib/modules/${KVER}/kernel/drivers/net/wireless/${DRV_NAME}/${MODULE_NAME}.ko.xz
|
||||||
|
/sbin/depmod -a ${KVER}
|
||||||
|
fi
|
||||||
|
|
||||||
# check for existing dkms installations of any version of this driver
|
# check for existing dkms installations of any version of this driver
|
||||||
if command -v dkms >/dev/null 2>&1
|
if command -v dkms >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
@ -140,23 +161,23 @@ fi
|
|||||||
# information that helps with bug reports
|
# information that helps with bug reports
|
||||||
|
|
||||||
# display kernel version
|
# display kernel version
|
||||||
echo "Linux Kernel=${KVER}"
|
echo "Kernel: ${KVER}"
|
||||||
|
|
||||||
# display architecture
|
# display architecture
|
||||||
echo "CPU Architecture=${KARCH}"
|
echo "Arch: ${KARCH}"
|
||||||
|
|
||||||
# display gcc version
|
# display gcc version
|
||||||
gcc_ver=$(gcc --version | grep -i gcc)
|
gcc_ver=$(gcc --version | grep -i gcc)
|
||||||
echo "gcc --version="${gcc_ver}
|
echo "gcc: "${gcc_ver}
|
||||||
|
|
||||||
# display ISO 3166-1 alpha-2 Country Code
|
# display ISO 3166-1 alpha-2 Country Code
|
||||||
a2_country_code=$(iw reg get | grep -i country)
|
a2_country_code=$(iw reg get | grep -i country)
|
||||||
echo "Country Code="${a2_country_code}
|
echo "Country: "${a2_country_code}
|
||||||
if [[ $a2_country_code == *"00"* ]];
|
if [[ $a2_country_code == *"00"* ]];
|
||||||
then
|
then
|
||||||
echo "The Country Code may not be properly set."
|
echo "The Country Code may not be properly set."
|
||||||
echo "File alpha-2_Country_Codes is located in the driver directory."
|
echo "File alpha-2_Country_Codes is located in the driver directory."
|
||||||
echo "Please read and follow the directions in the file."
|
echo "Please read and follow the directions in the file after installation."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# display secure mode status
|
# display secure mode status
|
||||||
@ -167,7 +188,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# sets module parameters (driver options) and blacklisted modules
|
# sets module parameters (driver options) and blacklisted modules
|
||||||
echo "Installing ${OPTIONS_FILE} to: /etc/modprobe.d"
|
echo "Installing ${OPTIONS_FILE} to /etc/modprobe.d"
|
||||||
cp -f ${OPTIONS_FILE} /etc/modprobe.d
|
cp -f ${OPTIONS_FILE} /etc/modprobe.d
|
||||||
|
|
||||||
# determine if dkms is installed and run the appropriate routines
|
# determine if dkms is installed and run the appropriate routines
|
||||||
@ -177,14 +198,14 @@ then
|
|||||||
|
|
||||||
make clean >/dev/null 2>&1
|
make clean >/dev/null 2>&1
|
||||||
|
|
||||||
make
|
make -j$(nproc)
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
|
||||||
if [[ "$RESULT" != "0" ]]
|
if [[ "$RESULT" != "0" ]]
|
||||||
then
|
then
|
||||||
echo "An error occurred. Error = ${RESULT}"
|
echo "An error occurred: ${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 problem report."
|
||||||
echo "You will need to run the following before reattempting installation."
|
echo "You will need to run the following before reattempting installation."
|
||||||
echo "$ sudo ./remove-driver.sh"
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
@ -202,9 +223,9 @@ then
|
|||||||
make clean >/dev/null 2>&1
|
make clean >/dev/null 2>&1
|
||||||
echo "The driver was installed successfully."
|
echo "The driver was installed successfully."
|
||||||
else
|
else
|
||||||
echo "An error occurred. Error = ${RESULT}"
|
echo "An error occurred: ${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 problem report."
|
||||||
echo "You will need to run the following before reattempting installation."
|
echo "You will need to run the following before reattempting installation."
|
||||||
echo "$ sudo ./remove-driver.sh"
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
@ -213,7 +234,7 @@ else
|
|||||||
echo "The dkms installation routines are in use."
|
echo "The dkms installation routines are in use."
|
||||||
|
|
||||||
# the dkms add command requires source in /usr/src/${DRV_NAME}-${DRV_VERSION}
|
# the dkms add command requires source in /usr/src/${DRV_NAME}-${DRV_VERSION}
|
||||||
echo "Copying source files to: /usr/src/${DRV_NAME}-${DRV_VERSION}"
|
echo "Copying source files to /usr/src/${DRV_NAME}-${DRV_VERSION}"
|
||||||
cp -rf "${DRV_DIR}" /usr/src/${DRV_NAME}-${DRV_VERSION}
|
cp -rf "${DRV_DIR}" /usr/src/${DRV_NAME}-${DRV_VERSION}
|
||||||
|
|
||||||
dkms add -m ${DRV_NAME} -v ${DRV_VERSION}
|
dkms add -m ${DRV_NAME} -v ${DRV_VERSION}
|
||||||
@ -230,9 +251,9 @@ else
|
|||||||
echo "$ sudo ./remove-driver.sh"
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
else
|
else
|
||||||
echo "An error occurred. dkms add error = ${RESULT}"
|
echo "An error occurred. dkms add 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 problem report."
|
||||||
echo "Run the following before reattempting installation."
|
echo "Run the following before reattempting installation."
|
||||||
echo "$ sudo ./remove-driver.sh"
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
@ -241,14 +262,19 @@ else
|
|||||||
echo "The driver was added to dkms successfully."
|
echo "The driver was added to dkms successfully."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
|
if command -v /usr/bin/time >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
/usr/bin/time -f "Compile time: %U seconds" dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
|
||||||
|
else
|
||||||
|
dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
|
||||||
|
fi
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
|
||||||
if [[ "$RESULT" != "0" ]]
|
if [[ "$RESULT" != "0" ]]
|
||||||
then
|
then
|
||||||
echo "An error occurred. dkms build error = ${RESULT}"
|
echo "An error occurred. dkms build 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 problem report."
|
||||||
echo "Run the following before reattempting installation."
|
echo "Run the following before reattempting installation."
|
||||||
echo "$ sudo ./remove-driver.sh"
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
@ -261,9 +287,9 @@ else
|
|||||||
|
|
||||||
if [[ "$RESULT" != "0" ]]
|
if [[ "$RESULT" != "0" ]]
|
||||||
then
|
then
|
||||||
echo "An error occurred. dkms install error = ${RESULT}"
|
echo "An error occurred. dkms install 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 problem report."
|
||||||
echo "Run the following before reattempting installation."
|
echo "Run the following before reattempting installation."
|
||||||
echo "$ sudo ./remove-driver.sh"
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
@ -280,7 +306,7 @@ else
|
|||||||
echo "Unable to run $ rfkill unblock wlan"
|
echo "Unable to run $ rfkill unblock wlan"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if NoPrompt is not used, ask user some questions to complete installation
|
# if NoPrompt is not used, ask user some questions
|
||||||
if [ $NO_PROMPT -ne 1 ]
|
if [ $NO_PROMPT -ne 1 ]
|
||||||
then
|
then
|
||||||
read -p "Do you want to edit the driver options file now? [y/N] " -n 1 -r
|
read -p "Do you want to edit the driver options file now? [y/N] " -n 1 -r
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
SCRIPT_NAME="remove-driver.sh"
|
SCRIPT_NAME="remove-driver.sh"
|
||||||
SCRIPT_VERSION="20221218"
|
SCRIPT_VERSION="20221228"
|
||||||
MODULE_NAME="88x2bu"
|
MODULE_NAME="88x2bu"
|
||||||
DRV_VERSION="5.13.1"
|
DRV_VERSION="5.13.1"
|
||||||
|
|
||||||
@ -57,23 +57,44 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# displays script name and version
|
# displays script name and version
|
||||||
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
echo "Script: ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
||||||
|
|
||||||
# check for and remove non-dkms installation
|
# check for and remove non-dkms installations
|
||||||
|
# standard naming
|
||||||
if [[ -f "${MODDESTDIR}${MODULE_NAME}.ko" ]]
|
if [[ -f "${MODDESTDIR}${MODULE_NAME}.ko" ]]
|
||||||
then
|
then
|
||||||
echo "Removing a non-dkms installation."
|
echo "Removing a non-dkms installation: ${MODDESTDIR}${MODULE_NAME}.ko"
|
||||||
rm -f ${MODDESTDIR}${MODULE_NAME}.ko
|
rm -f ${MODDESTDIR}${MODULE_NAME}.ko
|
||||||
/sbin/depmod -a ${KVER}
|
/sbin/depmod -a ${KVER}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check for and remove non-dkms installations
|
||||||
|
# with rtl added to module name (PClinuxOS)
|
||||||
|
if [[ -f "${MODDESTDIR}rtl${MODULE_NAME}.ko" ]]
|
||||||
|
then
|
||||||
|
echo "Removing a non-dkms installation: ${MODDESTDIR}rtl${MODULE_NAME}.ko"
|
||||||
|
rm -f ${MODDESTDIR}rtl${MODULE_NAME}.ko
|
||||||
|
/sbin/depmod -a ${KVER}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check for and remove non-dkms installations
|
||||||
|
# with compressed module in a unique non-standard location (Armbian)
|
||||||
|
# Example: /usr/lib/modules/5.15.80-rockchip64/kernel/drivers/net/wireless/rtl8821cu/8821cu.ko.xz
|
||||||
|
# Dear Armbiam, this is a really bad idea.
|
||||||
|
if [[ -f "/usr/lib/modules/${KVER}/kernel/drivers/net/wireless/${DRV_NAME}/${MODULE_NAME}.ko.xz" ]]
|
||||||
|
then
|
||||||
|
echo "Removing a non-dkms installation: /usr/lib/modules/${KVER}/kernel/drivers/net/wireless/${DRV_NAME}/${MODULE_NAME}.ko.xz"
|
||||||
|
rm -f /usr/lib/modules/${KVER}/kernel/drivers/net/wireless/${DRV_NAME}/${MODULE_NAME}.ko.xz
|
||||||
|
/sbin/depmod -a ${KVER}
|
||||||
|
fi
|
||||||
|
|
||||||
# information that helps with bug reports
|
# information that helps with bug reports
|
||||||
|
|
||||||
# display kernel version
|
# display kernel version
|
||||||
echo "Linux Kernel=${KVER}"
|
echo "Kernel: ${KVER}"
|
||||||
|
|
||||||
# display architecture
|
# display architecture
|
||||||
echo "CPU Architecture=${KARCH}"
|
echo "Arch: ${KARCH}"
|
||||||
|
|
||||||
# determine if dkms is installed and run the appropriate routines
|
# determine if dkms is installed and run the appropriate routines
|
||||||
if command -v dkms >/dev/null 2>&1
|
if command -v dkms >/dev/null 2>&1
|
||||||
@ -94,7 +115,7 @@ then
|
|||||||
echo "${DRV_NAME}/${DRV_VERSION} has been removed"
|
echo "${DRV_NAME}/${DRV_VERSION} has been removed"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "An error occurred. dkms remove error = ${RESULT}"
|
echo "An error occurred. dkms remove error: ${RESULT}"
|
||||||
echo "Please report this error."
|
echo "Please report this error."
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
fi
|
fi
|
||||||
@ -108,7 +129,7 @@ make clean >/dev/null 2>&1
|
|||||||
echo "The driver was removed successfully."
|
echo "The driver was removed successfully."
|
||||||
echo "You may now delete the driver directory if desired."
|
echo "You may now delete the driver directory if desired."
|
||||||
|
|
||||||
# if NoPrompt is not used, ask user some questions to complete removal
|
# if NoPrompt is not used, ask user some questions
|
||||||
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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user