1
0
mirror of https://github.com/morrownr/8821cu-20210916.git synced 2024-11-22 05:24:47 +00:00

support for kernel 6.7

This commit is contained in:
morrownr 2023-11-25 14:10:47 -06:00
parent fdbb62727c
commit 07bc2163cc
4 changed files with 21 additions and 40 deletions

View File

@ -32,6 +32,12 @@ EXTRA_CFLAGS += -DCONFIG_LED_ENABLE
EXTRA_CFLAGS += -Wno-address EXTRA_CFLAGS += -Wno-address
EXTRA_CFLAGS += -Wframe-larger-than=1648 EXTRA_CFLAGS += -Wframe-larger-than=1648
# gcc-13
EXTRA_CFLAGS += -Wno-enum-int-mismatch
EXTRA_CFLAGS += -Wno-stringop-overread
EXTRA_CFLAGS += -Wno-enum-conversion
EXTRA_CFLAGS += -Wno-int-in-bool-context
GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc ) GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
ifeq ($(GCC_VER_49),1) ifeq ($(GCC_VER_49),1)
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
@ -2504,7 +2510,8 @@ sign:
@mokutil --import MOK.der @mokutil --import MOK.der
@$(KSRC)/scripts/sign-file sha256 MOK.priv MOK.der 8821cu.ko @$(KSRC)/scripts/sign-file sha256 MOK.priv MOK.der 8821cu.ko
sign-install: sign install sign-install:
sign install
backup_rtlwifi: backup_rtlwifi:
@echo "Making backup rtlwifi drivers" @echo "Making backup rtlwifi drivers"

View File

@ -65,7 +65,7 @@ the hardware to test the above.
### Compatible Kernels ### Compatible Kernels
- Kernels: 4.19 - 5.11 (Realtek) - Kernels: 4.19 - 5.11 (Realtek)
- Kernels: 5.12 - 6.6 (community support) - Kernels: 5.12 - 6.7 (community support)
Note: Kernels earlier than 4.19 may work but are not tested or Note: Kernels earlier than 4.19 may work but are not tested or
supported. supported.

View File

@ -5326,8 +5326,11 @@ static int cfg80211_rtw_add_beacon(struct wiphy *wiphy, struct net_device *ndev,
} }
rtw_mi_scan_abort(adapter, _TRUE); rtw_mi_scan_abort(adapter, _TRUE);
rtw_mi_buddy_set_scan_deny(adapter, 300); rtw_mi_buddy_set_scan_deny(adapter, 300);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
ret = rtw_add_beacon(adapter, ap->beacon.head, ap->beacon.head_len, ap->beacon.tail, ap->beacon.tail_len);
#else
ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len); ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len);
#endif
exit: exit:
return ret; return ret;
} }
@ -5449,7 +5452,11 @@ exit:
} }
static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
struct cfg80211_ap_update *ap)
#else
struct cfg80211_beacon_data *info) struct cfg80211_beacon_data *info)
#endif
{ {
int ret = 0; int ret = 0;
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
@ -5469,7 +5476,11 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
if (info->assocresp_ies_len > 0) if (info->assocresp_ies_len > 0)
rtw_cfg80211_set_assocresp_ies(ndev, info->assocresp_ies, info->assocresp_ies_len); rtw_cfg80211_set_assocresp_ies(ndev, info->assocresp_ies, info->assocresp_ies_len);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
ret = rtw_add_beacon(adapter, ap->beacon.head, ap->beacon.head_len, ap->beacon.tail, ap->beacon.tail_len);
#else
ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len); ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len);
#endif
return ret; return ret;
} }

View File

@ -1,37 +0,0 @@
#!/bin/sh
# Purpose: Save a log file with RTW lines only.
#
# To make this file executable:
#
# $ chmod +x save-log.sh
#
# To execute this file:
#
# $ sudo ./save-log.sh
#
# or
#
# $ sudo sh save-log.sh
SCRIPT_NAME="save-log.sh"
if [ "$(id -u)" -ne 0 ]; then
echo "You must run this script with superuser (root) privileges."
echo "Try: \"sudo ./${SCRIPT_NAME}\""
exit 1
fi
# deletes existing log
rm -f -- rtw.log
dmesg | cut -d"]" -f2- | grep "RTW" >> rtw.log
RESULT=$?
if [ "$RESULT" != "0" ]; then
echo "An error occurred while running: ${SCRIPT_NAME}"
echo "Did you set a log level > 0 ?"
exit 1
else
echo "rtw.log saved successfully."
fi