mirror of
https://github.com/morrownr/8821cu-20210916.git
synced 2024-12-22 06:15:50 +00:00
cleanup code and minor mods to docs
This commit is contained in:
parent
589ec21474
commit
8c45ce6dae
4
Makefile
4
Makefile
@ -11,7 +11,7 @@ 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
|
||||
@ -122,7 +122,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
|
||||
|
@ -563,10 +563,9 @@ as good as it.
|
||||
To-Do:
|
||||
|
||||
- Improve secure boot support.
|
||||
- Add driver compression for kernels > 5.3.
|
||||
- Detect and alert users when Airplane Mode is on.
|
||||
- Test for installation in VM's.
|
||||
- Installation script needs to check country code setup.
|
||||
- Check country code setup.
|
||||
- Reduce the size of the README while keeping the needed information.
|
||||
- Optimize scripts.
|
||||
|
||||
@ -575,4 +574,3 @@ To-Do:
|
||||
#### [Go to Main Menu](https://github.com/morrownr/USB-WiFi)
|
||||
|
||||
-----
|
||||
|
||||
|
@ -1207,18 +1207,20 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta)
|
||||
_exit_critical_bh(&psta->lock, &irqL);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RTW_80211K
|
||||
static void update_rm_cap(u8 *frame_head, _adapter *pa, u32 pktlen, int offset)
|
||||
{
|
||||
u8 *res;
|
||||
sint len;
|
||||
|
||||
res = rtw_get_ie(frame_head + offset, _EID_RRM_EN_CAP_IE_, &len,
|
||||
pktlen - offset);
|
||||
if (res != NULL)
|
||||
_rtw_memcpy((void *)pa->rmpriv.rm_en_cap_def, (res + 2), len);
|
||||
}
|
||||
#endif
|
||||
// nrm
|
||||
// not used
|
||||
//#ifdef CONFIG_RTW_80211K
|
||||
//static void update_rm_cap(u8 *frame_head, _adapter *pa, u32 pktlen, int offset)
|
||||
//{
|
||||
// u8 *res;
|
||||
// sint len;
|
||||
//
|
||||
// res = rtw_get_ie(frame_head + offset, _EID_RRM_EN_CAP_IE_, &len,
|
||||
// pktlen - offset);
|
||||
// if (res != NULL)
|
||||
// _rtw_memcpy((void *)pa->rmpriv.rm_en_cap_def, (res + 2), len);
|
||||
//}
|
||||
//#endif
|
||||
|
||||
static void update_ap_info(_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
SCRIPT_NAME="install-driver.sh"
|
||||
SCRIPT_VERSION="20230126"
|
||||
SCRIPT_VERSION="20230221"
|
||||
MODULE_NAME="8821cu"
|
||||
DRV_VERSION="5.12.0.4"
|
||||
|
||||
@ -188,6 +188,9 @@ fi
|
||||
#fi
|
||||
|
||||
echo ": ---------------------------"
|
||||
echo
|
||||
echo "Checking for previously installed drivers."
|
||||
|
||||
|
||||
# check for and remove non-dkms installations
|
||||
# standard naming
|
||||
@ -200,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
|
||||
@ -213,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
|
||||
@ -228,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
|
||||
@ -239,10 +248,13 @@ 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 "Starting installation."
|
||||
echo "Installing ${OPTIONS_FILE} to /etc/modprobe.d"
|
||||
cp -f ${OPTIONS_FILE} /etc/modprobe.d
|
||||
|
||||
@ -310,6 +322,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
|
||||
@ -328,6 +341,7 @@ else
|
||||
exit $RESULT
|
||||
else
|
||||
echo "The driver was built by dkms successfully."
|
||||
echo ": ---------------------------"
|
||||
fi
|
||||
|
||||
dkms install -m ${DRV_NAME} -v ${DRV_VERSION}
|
||||
@ -342,6 +356,7 @@ else
|
||||
exit $RESULT
|
||||
else
|
||||
echo "The driver was installed by dkms successfully."
|
||||
echo ": ---------------------------"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -354,6 +369,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
|
||||
|
Loading…
Reference in New Issue
Block a user