From b85a75766ae5e535b39aadd8af36b4686e27c29f Mon Sep 17 00:00:00 2001 From: morrownr Date: Mon, 5 Dec 2022 00:02:20 -0600 Subject: [PATCH] attempted fix for country code issues --- 8821cu.conf | 6 ++++-- README.md | 22 ++++++++++++++++++++++ include/autoconf.h | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/8821cu.conf b/8821cu.conf index f38db09..32fcbbc 100644 --- a/8821cu.conf +++ b/8821cu.conf @@ -8,7 +8,7 @@ # documentation. # # Edit the following line to change, add or delete options: -options 8821cu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgnt=1 rtw_dfs_region_domain=0 +options 8821cu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgnt=1 # # After editing is complete, save this file (if using nano: Ctrl + x, y, Enter) # and reboot to activate the changes. @@ -65,7 +65,7 @@ options 8821cu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgn # # ----- # -# Country Code options ( rtw_country_code ) +# ISO 3166-1 alpha-2 Country Code options ( rtw_country_code ) # # Note: Allows the Country Code to be set in cases where it is unable to # be obtained from the operating system. @@ -75,6 +75,8 @@ options 8821cu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgn # Example for Norway: rtw_country_code=NO # Example for Kuwait: rtw_country_code=KW # Example for Taiwan: rtw_country_code=TW +# +# ISO 3166-1 alpha-2 codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 # # ----- # diff --git a/README.md b/README.md index 25d8042..36a600f 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,24 @@ 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. +Please ensure the ISO 3166-1 alpha-2 Country Code is set in your Linux distro. +If it is not set, you will likely have problems accessing some channels, especially +5 Ghz and 6 GHz channels. To set your Country Code: + +``` +iw reg set US +``` + +If you are not in the US, please use the country code for your country. See: + +ISO 3166-1 alpha-2 codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 + +To check if your country code is properly set: + +``` +iw reg get +``` + ### Installation Steps Note: The installation instructions are for the novice user. Experienced users are @@ -258,6 +276,10 @@ sudo reboot #### Step 3: Install the required packages (select the option for the OS you are using) +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. + - Option for Raspberry Pi OS (ARM/ARM64) ``` diff --git a/include/autoconf.h b/include/autoconf.h index 7925f59..edbcd72 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -21,6 +21,7 @@ #define AUTOCONF_INCLUDED #define RTL871X_MODULE_NAME "8821CU" #define DRV_NAME "rtl8821cu" +#define CONFIG_REGD_SRC_FROM_OS /* Set CONFIG_RTL8821C from Makefile */ #ifndef CONFIG_RTL8821C