diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000..19477df --- /dev/null +++ b/FAQ.md @@ -0,0 +1,182 @@ +### FAQ + +Question: Is WPA3 supported? + +Answer: WPA3-SAE is supported. It works well on most modern Linux distros +but not all. Generally the reason for WPA3 not working on Linux distros is +that the distro has an old version of wpa_supplicant or Network Manager. +Your options are to upgrade to a more modern distro (distros released after +mid 2022) or compile and install new versions of wpa_supplicant and/or +Network Manager. + +----- + +Question: I bought two usb wifi adapters based on this chipset and am +planning to use both in the same computer. How do I set that up? + +Answer: Realtek drivers do not support more than one adapter with the +same chipset in the same computer. You can have multiple Realtek based +adapters in the same computer as long as the adapters are based on +different chipsets. + +----- + +Question: Why do you recommend Mediatek based adapters when you maintain +this repo for a Realtek driver? + +Answer: Many new and existing Linux users already have adapters based on +Realtek chipsets. This repo is for Linux users to support their existing +adapters but my STRONG recommendation is for Linux users to seek out USB +WiFi solutions based on Mediatek chipsets. Mediatek is making and +supporting their drivers per Linux Wireless Standards guidance per the +Linux Foundation. This results in far fewer compatibility and support +problems. More information and recommended adapters shown at the +following site: + +https://github.com/morrownr/USB-WiFi + +----- + +Question: Will you put volunteers to work? + +Answer: Yes. Post a message in `Issues` or `Discussions` if interested. + +----- + +Question: I am having problems with my adapter and I use Virtualbox? + +Answer: This [article](https://null-byte.wonderhowto.com/forum/wifi-hacking-attach-usb-wireless-adapter-with-virtual-box-0324433/) may help. + +----- + +Secure Boot Information + +Question: The driver installation script completed successfully and the +driver is installed but does not seem to be working. What is wrong? + +Answer: This question often comes up after installing the driver to a +system that has Secure Boot on. To test if there is a Secure Boot related +problem, turn secure boot off in the system BIOS and reboot. If the driver +works as expected after reboot, them the problem is likely related to +Secure Boot. + +What will increase my chances of having a sucessessful installation on a +system that has Secure Boot on? + +First and foremost, make sure Secure Boot is on when you initially install +your Linux distro. If your Linux distro was installed with Secure Boot off, +the easiest solution is likely to do a clean reinstallation with Secure Boot +on. + +Ubuntu is used as the example but other distros should be similar to one +degree or another. During the installation there will be a box on one of +installation pages that will appear if the installation program detects +that Secure Boot is on. You will need to check the appropriate box and +supply a password. You can use the same password that you use for the system +if you wish. After the installation and reboot completes, the first screen +you should see is the mokutil screen. Mokutil will guide you through the +process of setting up your system to support Secure Boot. If you are unsure +what to do, I recommend you seek guidance from your distro documentation or +user forums. Having Secure Boot properly set up in your installation is very +important. + +The `install-driver.sh` script currently supports Secure Boot if `dkms` +is installed. Here is a link to the `dkms` website. There is information +regarding Secure Boot in two sections in the `README`. + +https://github.com/dell/dkms + +Here is a link regarding Debian and Secure Boot: + +https://wiki.debian.org/SecureBoot + +There is work underway to add Secure Boot suuport for systems that do not +have `dkms` available or if a manual installation is desired. + +----- + +Question: Can you provide additional information about monitor mode? + +Answer: I have a repo that is setup to help with monitor mode: + +https://github.com/morrownr/Monitor_Mode + +Work to improve monitor mode is ongoing with this driver. Your reports of +success or failure are needed. If you have yet to buy an adapter to use with +monitor mode, there are adapters available that are known to work very well +with monitor mode. My recommendation for those looking to buy an adapter for +monitor mode is to buy adapters based on the following chipsets: mt7921au, +mt7612u, mt7610u, rtl8821cu, and rtl8812bu. My specific recommendations for +adapters in order of preference currently are: + +ALFA AWUS036ACHM - long range - in-kernel driver + +ALFA AWUS036ACM - in-kernel driver + +ALFA AWUS036ACU - in-kernel driver (as of kernel 6.2) and [out-of-kernel driver](https://github.com/morrownr/8821cu) + +To ask questions, go to [USB-WiFi](https://github.com/morrownr/USB-WiFi) +and post in `Discussions` or `Issues`. + +----- + +Question: How do I forget a saved WiFi network on a Raspberry Pi? + +Note: This answer is for the Raspberry Pi OS without Network Manager active. + +Step 1: Edit `wpa_supplicant.conf` + +``` +sudo ${EDITOR} /etc/wpa_supplicant/wpa_supplicant.conf +``` + +Note: Replace ${EDITOR} with the name of the text editor you wish to use. + +#### Step 2: Delete the relevant WiFi network block (including the '`network=`' and opening/closing braces). + +#### Step 3: Save the file. + +#### Step 4: Reboot + +----- + +Question: How do I disable the onboard WiFi in a Raspberry Pi? + +Note: This answer is for the Raspberry Pi OS. + +Answer: + +Add the following line to `/boot/config.txt` + +``` +dtoverlay=disable-wifi +``` + +----- + +Question: Were compromises made to make this work on EL8 (RHEL, CentOS, +Rocky, etc) distributions? + +Answer: Yes. EL8 distribution kernels contain many backports of features +and fixes from newer kernels, but sometimes in ways that break drivers +that are not specifically tested against. For EL 8.6 specifically, the +driver contains a significant hack that ignores the current link state +of the adapter when transmitting or receiving frames. This matches the +behavior of ancient drivers for other chipsets that do work on EL 8.6 +(as they do not check link status at all), but is really a kludge to +work around a station accounting issue on these kernels. Only Ad-Hoc and +Station mode have been tested. + +----- + +Question: Are there any known problems with AP mode? + +Answer: Overall this driver does a good job with AP mode. During testing +and work prior to making this driver available, the team working on this +driver noticed some problems in AP mode if used with a Raspberry Pi 4B. +We were unable to discover or fix the exact cause of the problem but +the workaround is to keep the driver in USB2 mode. This workaround only +applies to AP mode with Raspberry Pi 4B. No problems were noted with +systems that use x86 or amd64 processors. + +----- diff --git a/Makefile b/Makefile index 81c3e66..da8cc57 100644 --- a/Makefile +++ b/Makefile @@ -11,13 +11,14 @@ EXTRA_CFLAGS += -Wno-unused-variable #EXTRA_CFLAGS += -Wno-unused-value #EXTRA_CFLAGS += -Wno-unused-label #EXTRA_CFLAGS += -Wno-unused-parameter -EXTRA_CFLAGS += -Wno-unused-function +#EXTRA_CFLAGS += -Wno-unused-function #EXTRA_CFLAGS += -Wno-unused #EXTRA_CFLAGS += -Wno-uninitialized #EXTRA_CFLAGS += -Wno-vla EXTRA_CFLAGS += -Wno-misleading-indentation EXTRA_CFLAGS += -Wno-implicit-fallthrough #EXTRA_CFLAGS += -Wno-return-type +#EXTRA_CFLAGS += -Wno-discarded-qualifiers # Activates Concurrent Mode if uncommented #EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE @@ -94,11 +95,10 @@ CONFIG_RTW_CHPLAN = 0xFF CONFIG_RTW_ADAPTIVITY_EN = disable CONFIG_RTW_ADAPTIVITY_MODE = normal CONFIG_SIGNAL_SCALE_MAPPING = n -# necessary for WPA3 support CONFIG_80211W = y CONFIG_REDUCE_TX_CPU_LOADING = n CONFIG_BR_EXT = y -CONFIG_TDLS = y +CONFIG_TDLS = n CONFIG_WIFI_MONITOR = y CONFIG_MCC_MODE = n CONFIG_APPEND_VENDOR_IE_ENABLE = n @@ -127,7 +127,7 @@ CONFIG_RTW_DEBUG = y CONFIG_RTW_LOG_LEVEL = 1 # enable /proc/net/rtlxxxx/ debug interfaces -CONFIG_PROC_DEBUG = y +CONFIG_PROC_DEBUG = n ######################## Wake On Lan ########################## CONFIG_WOWLAN = n @@ -2516,6 +2516,13 @@ uninstall: rm -f $(MODDESTDIR)$(MODULE_NAME).ko /sbin/depmod -a ${KVER} +sign: + @openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Custom MOK/" + @mokutil --import MOK.der + @$(KSRC)/scripts/sign-file sha256 MOK.priv MOK.der 8821cu.ko + +sign-install: all sign install + backup_rtlwifi: @echo "Making backup rtlwifi drivers" ifneq (,$(wildcard $(STAGINGMODDIR)/rtl*)) diff --git a/README.md b/README.md index 50d7ba4..b6c8eeb 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Note: Please read "supported-device-IDs" for information about how to confirm that this is the correct driver for your adapter. -### Features +### Supported Features - IEEE 802.11 b/g/n/ac WiFi compliant - 802.1x, WEP, WPA TKIP and WPA2 AES/Mixed mode for PSK and TLS (Radius) @@ -29,7 +29,7 @@ confirm that this is the correct driver for your adapter. - AP mode DFS channel support - Supported interface modes * Managed - * Monitor (see FAQ) + * Monitor (see FAQ) (see [Monitor_Mode](https://github.com/morrownr/Monitor_Mode) * AP (see FAQ) * P2P-client * P2P-GO @@ -40,9 +40,15 @@ confirm that this is the correct driver for your adapter. - AP mode DFS channel control - USB mode control -### A FAQ is available at the end of this document. +### Not supported -### Additional documentation is in the file `88x2bu.conf`. +- hcxdumptool + +### A FAQ is available in this repo with the name `FAQ.md` + +- Please read the FAQ and this document before posting issues. + +### Additional documentation is in the file `88x2bu.conf` ### Compatible CPU Architectures @@ -65,32 +71,32 @@ confirm that this is the correct driver for your adapter. Note: The information in this section depends largely on user reports which can be provided via PR or message in Issues. -- Arch Linux (kernels 5.4 and 5.11) +- [Arch Linux](https://www.archlinux.org) (kernels 5.4 and 5.11) -- Armbian_22.11.1 (kernel 5.15) (Rock 4 SE (Rock 4b image with xfce)) +- [Armbian](https://www.armbian.com/) (kernel 5.15) (Rock 4 SE (Rock 4b image with xfce)) -- Debian 11 (kernels 5.10 and 5.15) +- [Debian](https://www.debian.org/) (kernels 5.10 and 5.15) -- Fedora 37 (kernel 6.0) +- [Fedora](https://getfedora.org) (kernel 6.0) -- Kali Linux (kernel 5.10) +- [Kali Linux](https://www.kali.org/) (kernel 5.10) -- Manjaro 21.1 (kernel 5.13) +- [Manjaro](https://manjaro.org) (kernel 5.13) -- openSUSE Tumbleweed (rolling) (kernel 5.15) +- [openSUSE](https://www.opensuse.org/) Tumbleweed (rolling) (kernel 5.15) -- Raspberry Pi OS (2022-09-22) (ARM 32 bit and 64 bit) (kernel 5.15) +- [Raspberry Pi OS](https://www.raspberrypi.org) (2022-09-22) (ARM 32 bit and 64 bit) (kernel 5.15) -- Raspberry Pi Desktop (2022-07-01) (x86 32 bit) (kernel 5.10) +- [Raspberry Pi Desktop](https://www.raspberrypi.org) (2022-07-01) (x86 32 bit) (kernel 5.10) + +- [SkiffOS](https://github.com/skiffos/skiffos/) for Odroid XU4 (ARM 32 bit) (kernel 6.0.7) + +- [Ubuntu](https://www.ubuntu.com) 22.04 (kernel 5.15) and 22.10 (kernel 5.19) (kernel 6.2) + +- [Void Linux](https://voidlinux.org/) (kernel 5.18) - RHEL 8.4 and 8.6 (kernel 4.18.0) -- SkiffOS for Odroid XU4 (ARM 32 bit) (kernel 6.0.7) - -- Ubuntu 22.04 (kernel 5.15) and 22.10 (kernel 5.19) (kernel 6.2) - -- Void Linux (kernel 5.18) - Note: Red Hat Enterprise Linux (RHEL) and distros based on RHEL are not supported due to the way kernel patches are handled. I will support knowledgable RHEL developers if they want to merge the required @@ -101,29 +107,6 @@ knowledgable Android developers if they want to merge and keep current the required support (most likely just instructions about how to compile and maybe a modification or two to the Makefile). - -### Download Locations for Tested Linux Distributions - -- [Arch Linux](https://www.archlinux.org) -- [Armbian](https://www.armbian.com/) -- [Debian](https://www.debian.org/) -- [Fedora](https://getfedora.org) -- [Kali Linux](https://www.kali.org/) -- [Manjaro](https://manjaro.org) -- [openSUSE](https://www.opensuse.org/) -- [Raspberry Pi OS](https://www.raspberrypi.org) -- [RHEL](https://www.redhat.com) -- [SkiffOS](https://github.com/skiffos/skiffos/) -- [Ubuntu](https://www.ubuntu.com) -- [Void Linux](https://voidlinux.org/) - -### Tested Hardware - -- [EDUP EP-AC1605GS WiFi Adapter 1300Mbps USB 3.0 High Gain Wireless Adapter](https://www.amazon.com/gp/product/B07Q56K68T) -- [FIDECO 6B21-AC1200M WiFi Adapter - AC1200 Dual Band](https://www.amazon.co.uk/gp/product/B08523KPP9) -- [Cudy WU1400 AC 1300Mbps USB 3.0 WiFi Adapter](https://www.amazon.com/Cudy-WU1200-AC1200Mbps-Wireless-Compatible/dp/B07Q9KY4NT) -- [jjPlus WMU6202 miniPCIe - USB - WIFI2.4/5.0GHz Bluetooth (RTL8822BU)](https://techship.com/products/jjplus-wmu6202-mpcie-usb-wifi24-50ghz-bluetooth/) - ### Compatible Devices * [ALFA AWUS036ACU](https://store.rokland.com/collections/wi-fi-usb-adapters/products/alfa-awus036acu-802-11ac-ac1200-dual-band-wifi-usb-dongle-rp-sma-antennas) @@ -139,7 +122,8 @@ a modification or two to the Makefile). * Linksys WUSB6300 V2 * NetGear A6150 * TRENDnet TEW-808UBM -* Numerous additional products that are based on the supported chipsets +* jjPlus WMU6202 miniPCIe - USB +- Numerous adapters that are based on the supported chipsets 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 @@ -175,14 +159,10 @@ sudo dkms status ``` Warning: If you decide to upgrade to a new version of kernel such as -5.15 to 5.19, you need to upgrade the driver you have installed with +5.15 to 6.1, you need to upgrade the driver you have installed with the newest available before installing the new kernel. Use the following commands in the driver directory: -``` -sudo ./remove-driver.sh -``` - ``` git pull ``` @@ -217,25 +197,7 @@ It is recommended that you do not delete the driver directory after installation as the directory contains information and scripts that you may need in the future. -Secure Boot: The installation script, `install-driver.sh`, will -automatically support secure boot... if your distro supports the method -dkms uses. I regularly test the installation script on systems with -secure boot on. It works seemlessly on modern Ubuntu based distros as -long as secure boot was set up properly during the installation of the -operating system. Some distros, such as the Raspberry Pi OS, do not -support secure boot because the hardware they support does not support -secure boot making it unnecessary to attempt to support it. There are -distros that may require additional steps to sign the driver for secure -boot operation. Fedora is an example. In installation Step 3, note that -`openssl` must be installed as Fedora does not install it by default. -There will also be another step for Fedora after `install-driver.sh` -script is completed. This will be explained in the instructions at the -appropriate time. Overall, secure boot requires that -`openssl` and `mokutil` be installed and that additional steps be -performed if necessary. To test if secure boot is the problem: If you -install this driver and, after a reboot, the driver is not working, you -can go into the BIOS and temporarily turn secure boot off to see if -secure boot is the problem. +Secure Boot: see FAQ. ### Installation Steps @@ -248,7 +210,7 @@ on a best effort basis, based on the steps below. #### Step 2: Update and upgrade system packages (select the option for the distro you are using) Note: If your Linux distro does not fall into one of options listed -below, you will need to research how to update and upgrade your system +below, you will need to research how to `update` and `upgrade` your system packages. - Option for Debian based distributions such as Ubuntu, Kali, Armbian and Raspberry Pi OS @@ -293,7 +255,17 @@ sudo reboot Note: If your Linux distro does not fall into one of options listed below, you will need to research how to properly setup up the development -environment for your system. +environment for your system. General guidance is given the next paragraph. + +Development Environment Requirements: (package names may vary by distro) + +- Mandatory: `gcc` `make` `bc` `kernel-headers` `build-essential` `git` +- Highly recommended: `dkms` `rfkill` `iw` `ip` +- Mandatory if Secure Boot is active: `openssl` `mokutil` + +Note: The below options should take care of the mandatory and highly recommended +requirements but only you know if Secure Boot is active. If Secure Boot is +active on your system, please also install the mandatory packages for Secure Boot. - Option for Armbian (arm64) @@ -321,10 +293,8 @@ sudo apt install -y build-essential dkms git iw - Option for Fedora -Note: Installing `openssl` is only necessary for secure boot support. - ``` -sudo dnf -y install git dkms kernel-devel openssl +sudo dnf -y install git dkms kernel-devel ``` - Option for openSUSE @@ -350,7 +320,7 @@ sudo xbps-install linux-headers dkms git make If using pacman ``` -sudo pacman -S --noconfirm linux-headers dkms git bc +sudo pacman -S --noconfirm linux-headers dkms git bc iw ``` Note: The following is needed if using Manjaro for RasPi4B. @@ -580,173 +550,3 @@ After making and saving changes, reboot the router. - Some USB WiFi adapters require considerable electrical current and push the capabilities of the power available via USB port. One example is adapters that use the Realtek 8814au chipset. Using a powered multiport USB extension can be a good idea in cases like this. ----- - -### How to disable onboard WiFi on Raspberry Pi 3B, 3B+, 3A+, 4B and Zero W - -Add the following line to `/boot/config.txt` - -``` -dtoverlay=disable-wifi -``` - ------ - -### How to forget a saved WiFi network on a Raspberry Pi - -#### Step 1: Edit `wpa_supplicant.conf` - -``` -sudo ${EDITOR} /etc/wpa_supplicant/wpa_supplicant.conf -``` - -Note: Replace ${EDITOR} with the name of the text editor you wish to use. - -#### Step 2: Delete the relevant WiFi network block (including the '`network=`' and opening/closing braces). - -#### Step 3: Press ctrl-x followed by '`y`' and enter to save the file. - -#### Step 4: Reboot - ------ - -### FAQ - -Question: Is WPA3 supported? - -Answer: WPA3-SAE is supported. It works well on most modern Linux distros but -not all. Generally the reason for WPA3 not working on Linux distros is that the -distro has an old version of wpa_supplicant or Network Manager. Your options -are to upgrade to a more modern distro (distros released after mid 2022) or -compile and install new versions of wpa_supplicant and/or Network Manager. - ------ - -Question: I bought two usb wifi adapters based on this chipset and am planning -to use both in the same computer. How do I set that up? - -Answer: Realtek drivers do not support more than one adapter with the -same chipset in the same computer. You can have multiple Realtek based -adapters in the same computer as long as the adapters are based on -different chipsets. - ------ - -Question: Why do you recommend Mediatek based adapters when you maintain -this repo for a Realtek driver? - -Answer: Many new and existing Linux users already have adapters based on -Realtek chipsets. This repo is for Linux users to support their existing -adapters but my STRONG recommendation is for Linux users to seek out USB -WiFi solutions based on Mediatek chipsets: - -https://github.com/morrownr/USB-WiFi - ------ - -Question: Will you put volunteers to work? - -Answer: Yes. Post a message in `Issues` or `Discussions` if interested. - ------ - -Question: Were compromises made to make this work on EL8 (RHEL, CentOS, -Rocky, etc) distributions? - -Answer: Yes. EL8 distribution kernels contain many backports of features -and fixes from newer kernels, but sometimes in ways that break drivers -that are not specifically tested against. For EL 8.6 specifically, the -driver contains a significant hack that ignores the current link state -of the adapter when transmitting or receiving frames. This matches the -behavior of ancient drivers for other chipsets that do work on EL 8.6 -(as they do not check link status at all), but is really a kludge to -work around a station accounting issue on these kernels. Only Ad-Hoc and -Station mode have been tested. - ------ - -Question: I am having problems with my adapter and I use Virtualbox? - -Answer: This [article](https://null-byte.wonderhowto.com/forum/wifi-hacking-attach-usb-wireless-adapter-with-virtual-box-0324433/) may help. - ------ - -Question: The driver installation script completed successfully and the -driver is installed but does not seem to be working. What is wrong? - -Answer: Turn secure boot off to see if that allows the driver to work. -This driver is primarily tested on Debian based distros such as Ubuntu, -Raspberry Pi OS and Kali. In an attempt to make this driver work well on -many Linux distros, other distros, including the Arch based Manjaro is -used for testing. Currently I do not have installations of Fedora or -OpenSUSE available for testing and reply on user reports of success or -failure. I have two test systems with secure boot on so as to test secure -boot. I have not seen any secure boot problems with Debian based systems -and I don't remember problems with Manjaro. - -dkms is used in the installation script. It helps with a lot of issues that -will come up if a simple manual installation is used. dkms has the -capability to handle the needs of secure boot. dkms was written by and is -maintained by Dell. Dell has been offering some Ubuntu pre-loaded systems -for years so their devs likely test on Ubuntu. I suspect Fedora and -OpenSUSE may be handing their secure boot support differently than Debian -based systems and this is leading to problems. This and the other repos -I have are VERY heavily used and I am sure there are plenty of non-Debian -users that use this driver. Are they all turning off secure boot and not -reporting the problem? I don't know. What I do know is that reports like -this are rare. - -For the driver to compile and install correctly but not be available -tells me there is likely a key issue. Here is an interesting link -regarding Debian systems and secure boot: - -https://wiki.debian.org/SecureBoot - -That document contains a lot of information that can help an investigation -into what the real problem is and I invite you and other Fedora, OpemSUSE -and users of other distros that show this problem to investigate and -present what you know to the devs of your distro via their problem -reporting system. Turning off secure boot is NOT a fix. A real fix needs -to happen. - ------ - -Question: Can you provide additional information about monitor mode? - -Answer: I have a repo that is setup to help with monitor mode: - -https://github.com/morrownr/Monitor_Mode - -Work to improve monitor mode is ongoing with this driver. Your -reports of success or failure are needed. If you have yet to buy an -adapter to use with monitor mode, there are adapters available that are -known to work very well with monitor mode. My recommendation for those -looking to buy an adapter for monitor mode is to buy adapters based on -the following chipsets: mt7921au, mt7612u, mt7610u, rtl8812au, rtl8821cu and -rtl8811au. My specific recommendations for adapters in order of -preference are: - -ALFA AWUS036ACHM - long range - in-kernel driver - -ALFA AWUS036ACM - in-kernel driver - -ALFA AWUS036ACH - long range - [driver](https://github.com/morrownr/8812au-20210629) - -ALFA AWUS036ACS - [driver](https://github.com/morrownr/8821au-20210708) - -To ask questions, go to [USB-WiFi](https://github.com/morrownr/USB-WiFi) -and post in `Discussions` or `Issues`. - ------ - -Question: Are there any known problems with AP mode? - -Answer: Overall this driver does a good job with AP mode. During testing -and work prior to making this driver available, the team working on this -driver noticed some problems in AP mode if used with a Raspberry Pi 4B. -We were unable to discover or fix the exact cause of the problem but -the workaround is to keep the driver in USB2 mode. This workaround only -applies to AP mode with Raspberry Pi 4B. No problems were noted with -systems that use x86 or amd64 processors. - ------ - diff --git a/core/rtw_debug.c b/core/rtw_debug.c index 71d93ef..1b749e3 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -42,7 +42,7 @@ const char *rtw_log_level_str[] = { void dump_drv_version(void *sel) { RTW_PRINT_SEL(sel, "%s %s\n", DRV_NAME, DRIVERVERSION); -// RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__); +// nrm RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__); } #ifdef CONFIG_PROC_DEBUG diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index e0848dd..5efbc97 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -12246,7 +12246,7 @@ static void rtw_mlmeext_disconnect(_adapter *padapter) self_action = MLME_STA_DISCONNECTED; else if (MLME_IS_ADHOC(padapter) || MLME_IS_ADHOC_MASTER(padapter)) self_action = MLME_ADHOC_STOPPED; -/* nrm */ +// nrm #ifdef CONFIG_WIFI_MONITOR else if (MLME_IS_MONITOR(padapter)) self_action = MLME_ACTION_NONE; diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 0701b2e..d0e17fe 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -89,8 +89,7 @@ void _ips_enter(_adapter *padapter) if (rf_off == pwrpriv->change_rfpwrstate) { pwrpriv->bpower_saving = _TRUE; -/* nrm */ -// RTW_PRINT("nolinked power save enter\n"); +// nrm RTW_PRINT("nolinked power save enter\n"); if (pwrpriv->ips_mode == IPS_LEVEL_2) pwrpriv->bkeepfwalive = _TRUE; @@ -143,8 +142,7 @@ int _ips_leave(_adapter *padapter) pwrpriv->pwr_saving_time += rtw_get_passing_time_ms(pwrpriv->pwr_saving_start_time); #endif /* CONFIG_RTW_CFGVENDOR_LLSTATS */ -/* nrm */ -// RTW_PRINT("nolinked power save leave\n"); +// nrm RTW_PRINT("nolinked power save leave\n"); RTW_INFO("==> ips_leave.....LED(0x%08x)...\n", rtw_read32(padapter, 0x4c)); pwrpriv->bips_processing = _FALSE; diff --git a/hal/hal_dm.c b/hal/hal_dm.c index bed6f48..d9ea2a1 100644 --- a/hal/hal_dm.c +++ b/hal/hal_dm.c @@ -1392,6 +1392,7 @@ void dump_sta_info(void *sel, struct sta_info *psta) HDATA_RATE(curr_tx_rate), (curr_tx_sgi) ? "S" : "L"); RTW_PRINT_SEL(sel, "curr_tx_bw : %s\n", ch_width_str(ra_info->curr_tx_bw)); RTW_PRINT_SEL(sel, "curr_retry_ratio : %d\n", ra_info->curr_retry_ratio); +// nrm RTW_PRINT_SEL(sel, "ra_mask : 0x%016llx\n", ra_info->ramask); } diff --git a/hal/hal_dm_acs.c b/hal/hal_dm_acs.c index b553862..d78d964 100644 --- a/hal/hal_dm_acs.c +++ b/hal/hal_dm_acs.c @@ -291,6 +291,7 @@ void rtw_acs_info_dump(void *sel, _adapter *adapter) _RTW_PRINT_SEL(sel, "========== ACS (VER-%d) ==========\n", RTK_ACS_VERSION); _RTW_PRINT_SEL(sel, "Best 24G Channel:%d\n", hal_data->acs.best_chan_24g); +// nrm _RTW_PRINT_SEL(sel, "Best 5G Channel:%d\n", hal_data->acs.best_chan_5g); #ifdef CONFIG_RTW_ACS_DBG diff --git a/hal/halmac/halmac_88xx/halmac_8822b/halmac_init_8822b.c b/hal/halmac/halmac_88xx/halmac_8822b/halmac_init_8822b.c index 80dffea..5127848 100644 --- a/hal/halmac/halmac_88xx/halmac_8822b/halmac_init_8822b.c +++ b/hal/halmac/halmac_88xx/halmac_8822b/halmac_init_8822b.c @@ -988,10 +988,9 @@ pre_init_system_cfg_8822b(struct halmac_adapter *adapter) enable_bb = 0; set_hw_value_88xx(adapter, HALMAC_HW_EN_BB_RF, &enable_bb); -/* nrm */ if (HALMAC_REG_R8(REG_SYS_CFG1 + 2) & BIT(4)) { PLTFM_MSG_ERR("[ERR]test mode!!\n"); -// return HALMAC_RET_WLAN_MODE_FAIL; +// nrm return HALMAC_RET_WLAN_MODE_FAIL; } PLTFM_MSG_TRACE("[TRACE]%s <===\n", __func__); diff --git a/hal/halmac/halmac_88xx/halmac_8822b/halmac_usb_8822b.c b/hal/halmac/halmac_88xx/halmac_8822b/halmac_usb_8822b.c index 04c2d78..841ee40 100644 --- a/hal/halmac/halmac_88xx/halmac_8822b/halmac_usb_8822b.c +++ b/hal/halmac/halmac_88xx/halmac_8822b/halmac_usb_8822b.c @@ -87,8 +87,7 @@ mac_pwr_switch_usb_8822b(struct halmac_adapter *adapter, HALMAC_REG_W8_CLR(REG_SYS_STATUS1 + 1, BIT(0)); if ((HALMAC_REG_R8(REG_SW_MDIO + 3) & BIT(0)) == BIT(0)) -/* nrm */ -// PLTFM_MSG_ALWAYS("[ALWAYS]shall R reg twice!!\n"); +// nrm PLTFM_MSG_ALWAYS("[ALWAYS]shall R reg twice!!\n"); adapter->halmac_state.mac_pwr = HALMAC_MAC_POWER_ON; } diff --git a/include/autoconf.h b/include/autoconf.h index 84caaf5..3ce3079 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -42,7 +42,6 @@ #endif #ifdef CONFIG_80211AC_VHT - /* nrm - activates beamforming */ #define CONFIG_BEAMFORMING #endif @@ -178,7 +177,7 @@ #define CONFIG_RTW_LED #ifdef CONFIG_RTW_LED -// #define CONFIG_RTW_SW_LED +// nrm #define CONFIG_RTW_SW_LED #ifdef CONFIG_RTW_SW_LED /* #define CONFIG_RTW_LED_HANDLED_BY_CMD_THREAD */ #endif @@ -187,6 +186,7 @@ #define USB_INTERFERENCE_ISSUE /* this should be checked in all usb interface */ #define CONFIG_GLOBAL_UI_PID +// nrm #define CONFIG_RTW_80211K /*#define CONFIG_ADAPTOR_INFO_CACHING_FILE */ /* now just applied on 8192cu only, should make it general... */ diff --git a/install-driver.sh b/install-driver.sh index 25966df..9d7329d 100755 --- a/install-driver.sh +++ b/install-driver.sh @@ -6,11 +6,15 @@ # # To make this file executable: # -# $ chmod +x edit-options.sh +# $ chmod +x install-driver.sh # # To execute this file: # -# $ sudo ./edit-options.sh +# $ sudo ./install-driver.sh +# +# or +# +# $ sudo sh install-driver.sh # # Copyright(c) 2023 Nick Morrow # @@ -121,10 +125,10 @@ for TEXT_EDITOR in "${VISUAL}" "${EDITOR}" "${DEFAULT_EDITOR}" vi; do done # fail if no editor was found if ! command -v "${TEXT_EDITOR}" >/dev/null 2>&1; then - echo "No text editor 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 + echo "No text editor 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 echo ": ---------------------------" @@ -184,6 +188,9 @@ fi #fi echo ": ---------------------------" +echo +echo "Checking for previously installed drivers." + # check for and remove non-dkms installations # standard naming @@ -196,6 +203,8 @@ if [ -f "${MODDESTDIR}${MODULE_NAME}.ko" ]; then echo "Removing source files from /usr/src/${DRV_NAME}-${DRV_VERSION}" rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION} make clean >/dev/null 2>&1 + echo "Removal complete." + echo ": ---------------------------" fi # check for and remove non-dkms installations @@ -209,6 +218,8 @@ if [ -f "${MODDESTDIR}rtl${MODULE_NAME}.ko" ]; then echo "Removing source files from /usr/src/${DRV_NAME}-${DRV_VERSION}" rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION} make clean >/dev/null 2>&1 + echo "Removal complete." + echo ": ---------------------------" fi # check for and remove non-dkms installations @@ -224,6 +235,8 @@ if [ -f "/usr/lib/modules/${KVER}/kernel/drivers/net/wireless/${DRV_NAME}/${MODU echo "Removing source files from /usr/src/${DRV_NAME}-${DRV_VERSION}" rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION} make clean >/dev/null 2>&1 + echo "Removal complete." + echo ": ---------------------------" fi # check for and remove dkms installations @@ -235,10 +248,14 @@ if command -v dkms >/dev/null 2>&1; then rm -f /etc/modprobe.d/${OPTIONS_FILE} echo "Removing source files from /usr/src/${DRV_NAME}-${DRV_VERSION}" rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION} + echo "Removal complete." + echo ": ---------------------------" fi fi # sets module parameters (driver options) and blacklisted modules +echo +echo "Starting installation." echo "Installing ${OPTIONS_FILE} to /etc/modprobe.d" cp -f ${OPTIONS_FILE} /etc/modprobe.d @@ -306,6 +323,7 @@ else fi else echo "The driver was added to dkms successfully." + echo ": ---------------------------" fi if command -v /usr/bin/time >/dev/null 2>&1; then @@ -324,6 +342,7 @@ else exit $RESULT else echo "The driver was built by dkms successfully." + echo ": ---------------------------" fi dkms install -m ${DRV_NAME} -v ${DRV_VERSION} @@ -338,6 +357,7 @@ else exit $RESULT else echo "The driver was installed by dkms successfully." + echo ": ---------------------------" fi fi @@ -350,6 +370,7 @@ fi # if NoPrompt is not used, ask user some questions if [ $NO_PROMPT -ne 1 ]; then + echo printf "Do you want to edit the driver options file now? [y/N] " read -r REPLY case "$REPLY" in diff --git a/os_dep/linux/recv_linux.c b/os_dep/linux/recv_linux.c index deae367..14fc295 100644 --- a/os_dep/linux/recv_linux.c +++ b/os_dep/linux/recv_linux.c @@ -139,7 +139,6 @@ int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8 precvframe->u.hdr.pkt = rtw_skb_clone(pskb); if (precvframe->u.hdr.pkt) { - RTW_INFO("%s: rtw_skb_clone success, RX throughput may be low!\n", __FUNCTION__); precvframe->u.hdr.pkt->dev = padapter->pnetdev; precvframe->u.hdr.rx_head = precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pdata; precvframe->u.hdr.rx_end = pdata + alloc_sz; diff --git a/remove-driver.sh b/remove-driver.sh index ecd7182..74b7e69 100755 --- a/remove-driver.sh +++ b/remove-driver.sh @@ -6,11 +6,15 @@ # # To make this file executable: # -# $ chmod +x edit-options.sh +# $ chmod +x remove-driver.sh # # To execute this file: # -# $ sudo ./edit-options.sh +# $ sudo ./remove-driver.sh +# +# or +# +# $ sudo sh remove-driver.sh # # Copyright(c) 2023 Nick Morrow # diff --git a/save-log.sh b/save-log.sh index 06559ba..68e1c72 100755 --- a/save-log.sh +++ b/save-log.sh @@ -8,7 +8,11 @@ # # To execute this file: # -# $ sudo ./edit-options.sh +# $ sudo ./save-log.sh +# +# or +# +# $ sudo sh save-log.sh SCRIPT_NAME="save-log.sh"