From 25a173f4037d825b619bbafbab16651f7415d0b7 Mon Sep 17 00:00:00 2001 From: morrownr Date: Sun, 15 Jan 2023 01:49:17 -0600 Subject: [PATCH] fix one thing then another --- 8821cu.conf | 45 ++++++++++++++++++++++----------------------- dkms-make.sh | 14 +++++--------- install-driver.sh | 6 +++--- 3 files changed, 30 insertions(+), 35 deletions(-) diff --git a/8821cu.conf b/8821cu.conf index 674b779..0886898 100644 --- a/8821cu.conf +++ b/8821cu.conf @@ -92,14 +92,18 @@ options 8821cu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgn # * # * BIT0: Enable VHT SU Beamformer # * BIT1: Enable VHT SU Beamformee -# * BIT2: Enable VHT MU Beamformer, depend on VHT SU Beamformer +# * BIT2: Enable VHT MU Beamformer, depend on VHT SU Beamformer (not supported) # * BIT3: Enable VHT MU Beamformee, depend on VHT SU Beamformee -# * BIT4: Enable HT Beamformer -# * BIT5: Enable HT Beamformee # */ # # ----- # +# USB options: ( rtw_switch_usb_mode ) +# +# Note: This option is not supported on this chipset. This chipset is USB2 only. +# +# ----- +# # DFS Options ( rtw_dfs_region_domain ) # # 0 = NONE (default) @@ -134,6 +138,21 @@ options 8821cu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgn # # ----- # +# Country Code options ( rtw_country_code ) +# +# Note: Allows the Country Code to be set in cases where it is unable to +# be obtained otherwise. +# +# URL: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 +# +# Example for the US: rtw_country_code=US +# Example for Panama: rtw_country_code=PA +# Example for Norway: rtw_country_code=NO +# Example for Kuwait: rtw_country_code=KW +# Example for Taiwan: rtw_country_code=TW +# +# ----- +# # Select RFE type ( rtw_RFE_type ) # # 0 = (2-Ant, DPDT), (2G_WLG, iPA, iLNA, iSW), (5G, iPA, iLNA, iSW) @@ -153,21 +172,6 @@ options 8821cu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgn # # ----- # -# Country Code options ( rtw_country_code ) -# -# Note: Allows the Country Code to be set in cases where it is unable to -# be obtained otherwise. -# -# URL: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 -# -# Example for the US: rtw_country_code=US -# Example for Panama: rtw_country_code=PA -# Example for Norway: rtw_country_code=NO -# Example for Kuwait: rtw_country_code=KW -# Example for Taiwan: rtw_country_code=TW -# -# ----- -# # To see all options that are available: # # $ ls /sys/module/8821cu/parameters/ @@ -197,8 +201,3 @@ options 8821cu rtw_drv_log_level=1 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgn # vht_capab=[MAX-MPDU-11454][SHORT-GI-80][HTC-VHT][MAX-A-MPDU-LEN-EXP7] # # ----- - - - - - diff --git a/dkms-make.sh b/dkms-make.sh index c6072de..6e8b96e 100755 --- a/dkms-make.sh +++ b/dkms-make.sh @@ -1,16 +1,10 @@ #!/bin/sh # SMEM needs to be set here if dkms build is not initiated by install-driver.sh -if [[ ! -z ${SMEM} ]] -then - SMEM=$(LANG=C free | awk '/Mem:/ { print $2 }') -fi +SMEM=$(LANG=C free | awk '/Mem:/ { print $2 }') -# SMEM needs to be set here if dkms build is not initiated by install-driver.sh -if [[ ! -z ${SPROC} ]] -then - SPROC=$(nproc) -fi +# 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 ] @@ -23,3 +17,5 @@ fi kernelver=${kernelver:-$(uname -r)} make "-j$SPROC" "KVER=$kernelver" "KSRC=/lib/modules/$kernelver/build" + +exit 0 diff --git a/install-driver.sh b/install-driver.sh index 1bdcf6e..8f20731 100755 --- a/install-driver.sh +++ b/install-driver.sh @@ -28,8 +28,8 @@ DRV_NAME="rtl${MODULE_NAME}" DRV_DIR="$(pwd)" OPTIONS_FILE="${MODULE_NAME}.conf" -export SMEM=$(LANG=C free | awk '/Mem:/ { print $2 }') -export SPROC=$(nproc) +SMEM=$(LANG=C free | awk '/Mem:/ { print $2 }') +SPROC=$(nproc) # check to ensure sudo was used if [[ $EUID -ne 0 ]] @@ -136,7 +136,7 @@ then fi fi # display total number of cpu cores / in use -echo ": ${SPROC}/$(nproc) (SPROC)" +echo ": ${SPROC}/$(nproc) (SPROC/NPROC)" # display kernel version echo ": ${KVER} (KVER)"