diff --git a/edit-options.sh b/edit-options.sh index b1f601e..e7acd6b 100755 --- a/edit-options.sh +++ b/edit-options.sh @@ -47,10 +47,16 @@ if ! command -v "${TEXT_EDITOR}" >/dev/null 2>&1; then exit 1 fi -${TEXT_EDITOR} /etc/modprobe.d/${OPTIONS_FILE} +if [ -f "/etc/modprobe.d/${OPTIONS_FILE}" ]; then + ${TEXT_EDITOR} /etc/modprobe.d/${OPTIONS_FILE} +else + cp -f ${OPTIONS_FILE} /etc/modprobe.d + ${TEXT_EDITOR} /etc/modprobe.d/${OPTIONS_FILE} +fi -printf "Do you want to apply the new options by rebooting now? (recommended) [y/N] " -read -r REPLY -case "$REPLY" in - [yY]*) reboot ;; +printf "Do you want to apply the new options by rebooting now? (recommended) [Y/n] " +read -r yn +case "$yn" in + [nN]) ;; + *) reboot ;; esac diff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c index ee12492..579e32d 100644 --- a/os_dep/linux/wifi_regd.c +++ b/os_dep/linux/wifi_regd.c @@ -405,7 +405,7 @@ int rtw_regd_init(struct wiphy *wiphy) wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS; #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 4)) wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF; #endif diff --git a/save-log.sh b/save-log.sh index 68e1c72..d328796 100755 --- a/save-log.sh +++ b/save-log.sh @@ -25,7 +25,7 @@ fi # deletes existing log rm -f -- rtw.log -dmesg | cut -d"]" -f2- | grep "RTW" >> rtw.log +dmesg | cut -d"]" -f2- | grep -i RTW >> rtw.log RESULT=$? if [ "$RESULT" != "0" ]; then @@ -33,5 +33,6 @@ if [ "$RESULT" != "0" ]; then echo "Did you set a log level > 0 ?" exit 1 else +# dmesg | cut -d"]" -f2- | grep -i USB >> rtw.log echo "rtw.log saved successfully." fi