From c7cc1825cd9f69bebfdbe230543374da75cef566 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Mon, 28 Dec 2020 21:52:45 +0100 Subject: [PATCH] Update wifi related patches and (temprally) disable 8188EU since it breaks K5.10.y --- lib/compilation-prepare.sh | 2 +- .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ .../wifi-4003-fix-sha256_state-clashes.patch | 62 ------------------- .../wifi-4004-fix-cfg80211-for-5.8.patch | 59 ------------------ 35 files changed, 1 insertion(+), 2058 deletions(-) diff --git a/lib/compilation-prepare.sh b/lib/compilation-prepare.sh index 500d93716d..881072a284 100644 --- a/lib/compilation-prepare.sh +++ b/lib/compilation-prepare.sh @@ -428,7 +428,7 @@ compilation_prepare() # Wireless drivers for Realtek 8188EU 8188EUS and 8188ETV chipsets - if linux-version compare "${version}" ge 3.14 && [ "$EXTRAWIFI" == yes ]; then + if linux-version compare "${version}" ge 3.14 && linux-version compare "${version}" le 5.9 && [ "$EXTRAWIFI" == yes ]; then # attach to specifics tag or branch local rtl8188euver="branch:v5.7.6.1" diff --git a/patch/kernel/imx6-current/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/imx6-current/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/imx6-current/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/imx6-current/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/imx6-current/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/imx6-current/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/imx6-current/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/imx6-current/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/meson-current/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/meson-current/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/meson-current/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/meson-current/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/meson-current/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/meson-current/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/meson-current/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/meson-current/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/meson64-current/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/meson64-current/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/meson64-current/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/meson64-current/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/meson64-current/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/meson64-current/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/meson64-current/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/meson64-current/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/meson64-dev/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/meson64-dev/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/meson64-dev/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/meson64-dev/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/meson64-dev/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/meson64-dev/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/meson64-dev/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/meson64-dev/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/mvebu-current/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/mvebu-current/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/mvebu-current/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/mvebu-current/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/mvebu-current/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/mvebu-current/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/mvebu-current/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/mvebu-current/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/mvebu-dev/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/mvebu-dev/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/mvebu-dev/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/mvebu-dev/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/mvebu-dev/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/mvebu-dev/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/mvebu-dev/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/mvebu-dev/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/mvebu64-current/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/mvebu64-current/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/mvebu64-current/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/mvebu64-current/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/mvebu64-current/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/mvebu64-current/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/mvebu64-current/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/mvebu64-current/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/mvebu64-dev/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/mvebu64-dev/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/mvebu64-dev/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/mvebu64-dev/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/mvebu64-dev/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/mvebu64-dev/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/mvebu64-dev/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/mvebu64-dev/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/odroidxu4-dev/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/odroidxu4-dev/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/odroidxu4-dev/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/odroidxu4-dev/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/odroidxu4-dev/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/odroidxu4-dev/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/odroidxu4-dev/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/odroidxu4-dev/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/rk322x-current/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/rk322x-current/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/rk322x-current/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/rk322x-current/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/rk322x-current/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/rk322x-current/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/rk322x-current/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/rk322x-current/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/rk322x-dev/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/rk322x-dev/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/rk322x-dev/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/rk322x-dev/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/rk322x-dev/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/rk322x-dev/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/rk322x-dev/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/rk322x-dev/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/rockchip-current/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/rockchip-current/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/rockchip-current/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/rockchip-current/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/rockchip-current/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/rockchip-current/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/rockchip-current/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/rockchip-current/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/rockchip-dev/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/rockchip-dev/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/rockchip-dev/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/rockchip-dev/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/rockchip-dev/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/rockchip-dev/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/rockchip-dev/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/rockchip-dev/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/rockchip64-current/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/rockchip64-current/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/rockchip64-current/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/rockchip64-current/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/rockchip64-current/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/rockchip64-current/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/rockchip64-current/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/rockchip64-current/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/rockchip64-dev/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/rockchip64-dev/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/rockchip64-dev/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/rockchip64-dev/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/rockchip64-dev/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/rockchip64-dev/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/rockchip64-dev/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/rockchip64-dev/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/sunxi-current/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/sunxi-current/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/sunxi-current/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/sunxi-current/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/sunxi-current/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/sunxi-current/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/sunxi-current/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/sunxi-current/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif diff --git a/patch/kernel/sunxi-dev/wifi-4003-fix-sha256_state-clashes.patch b/patch/kernel/sunxi-dev/wifi-4003-fix-sha256_state-clashes.patch index 3cb306a025..d2b82f1c11 100644 --- a/patch/kernel/sunxi-dev/wifi-4003-fix-sha256_state-clashes.patch +++ b/patch/kernel/sunxi-dev/wifi-4003-fix-sha256_state-clashes.patch @@ -60,65 +60,3 @@ index b537a26..f8c42f4 100755 size_t i; sha256_init(&ctx); -diff --git a/drivers/net/wireless/rtl8188eu/include/rtw_security.h b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -index 0adc700..2a9cf9d 100644 ---- a/drivers/net/wireless/rtl8188eu/include/rtw_security.h -+++ b/drivers/net/wireless/rtl8188eu/include/rtw_security.h -@@ -249,7 +249,7 @@ struct security_priv { - #define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE - #endif - --struct sha256_state { -+struct rtl_sha256_state { - u64 length; - u32 state[8], curlen; - u8 buf[64]; -diff --git a/drivers/net/wireless/rtl8188eu/core/rtw_security.c b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -index 5807521..0b3eed2 100644 ---- a/drivers/net/wireless/rtl8188eu/core/rtw_security.c -+++ b/drivers/net/wireless/rtl8188eu/core/rtw_security.c -@@ -2133,7 +2133,7 @@ BIP_exit: - #ifndef PLATFORM_FREEBSD - #if defined(CONFIG_TDLS) - /* compress 512-bits */ --static int sha256_compress(struct sha256_state *md, unsigned char *buf) -+static int sha256_compress(struct rtl_sha256_state *md, unsigned char *buf) - { - u32 S[8], W[64], t0, t1; - u32 t; -@@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf) - } - - /* Initialize the hash state */ --static void sha256_init(struct sha256_state *md) -+static void sha256_init(struct rtl_sha256_state *md) - { - md->curlen = 0; - md->length = 0; -@@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md) - @param inlen The length of the data (octets) - @return CRYPT_OK if successful - */ --static int sha256_process(struct sha256_state *md, unsigned char *in, -+static int sha256_process(struct rtl_sha256_state *md, unsigned char *in, - unsigned long inlen) - { - unsigned long n; -@@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in, - @param out [out] The destination of the hash (32 bytes) - @return CRYPT_OK if successful - */ --static int sha256_done(struct sha256_state *md, unsigned char *out) -+static int sha256_done(struct rtl_sha256_state *md, unsigned char *out) - { - int i; - -@@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out) - static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len, - u8 *mac) - { -- struct sha256_state ctx; -+ struct rtl_sha256_state ctx; - size_t i; - - sha256_init(&ctx); diff --git a/patch/kernel/sunxi-dev/wifi-4004-fix-cfg80211-for-5.8.patch b/patch/kernel/sunxi-dev/wifi-4004-fix-cfg80211-for-5.8.patch index 210c3c43cd..00148fb1cf 100644 --- a/patch/kernel/sunxi-dev/wifi-4004-fix-cfg80211-for-5.8.patch +++ b/patch/kernel/sunxi-dev/wifi-4004-fix-cfg80211-for-5.8.patch @@ -57,62 +57,3 @@ index c0df148..9bff924 100755 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) .action = cfg80211_rtw_mgmt_tx, #endif -diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -index 721723e..62fd530 100644 ---- a/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/ioctl_cfg80211.c -@@ -7470,6 +7470,33 @@ exit: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ -+static void -+cfg80211_rtw_update_mgmt_frame_registrations(struct wiphy *wiphy, -+ struct wireless_dev *wdev, -+ struct mgmt_frame_regs *upd) -+{ -+ struct net_device *ndev = wdev_to_ndev(wdev); -+ struct rtw_wdev_priv *pwdev_priv; -+ _adapter *adapter; -+ -+ if (ndev == NULL) -+ return; -+ -+ adapter = (_adapter *)rtw_netdev_priv(ndev); -+ pwdev_priv = adapter_wdev_data(adapter); -+ -+#ifdef CONFIG_DEBUG_CFG80211 -+ RTW_INFO(FUNC_ADPT_FMT" stypes:%x\n", FUNC_ADPT_ARG(adapter), -+ upd->interface_stypes); -+#endif -+ -+ /* not implemented, see bellow */ -+} -+ -+#else -+ - static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) - struct wireless_dev *wdev, -@@ -7525,6 +7552,8 @@ exit: - return; - } - -+#endif -+ - #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) - static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, - struct net_device *ndev, -@@ -9903,7 +9932,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = { - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - .mgmt_tx = cfg80211_rtw_mgmt_tx, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) -+ .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_registrations, -+#else - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, -+#endif - #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) - .action = cfg80211_rtw_mgmt_tx, - #endif