From 0c31b3448e7b2e14988668ee0d143e765c5a9d7e Mon Sep 17 00:00:00 2001 From: user Date: Tue, 22 Mar 2022 15:01:18 -0300 Subject: [PATCH 1/2] Remove IPX support from driver, set as obsolete in Jan 2018. ref: https://github.com/aircrack-ng/rtl8814au/pull/82 --- core/rtw_br_ext.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c index 9a0effd..639c63a 100755 --- a/core/rtw_br_ext.c +++ b/core/rtw_br_ext.c @@ -17,7 +17,10 @@ #ifdef __KERNEL__ #include #include + #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) #include +#endif #include #include #include @@ -169,6 +172,7 @@ static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *network } +#ifdef _NET_INET_IPX_H_ static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr, unsigned int *ipxNetAddr, unsigned char *ipxNodeAddr) { @@ -189,6 +193,7 @@ static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsigned ch memcpy(networkAddr + 1, (unsigned char *)ipxNetAddr, 4); memcpy(networkAddr + 5, (unsigned char *)ipxSocketAddr, 2); } +#endif static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networkAddr, @@ -330,6 +335,7 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr) x = networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10]; return x & (NAT25_HASH_SIZE - 1); +#ifdef _NET_INET_IPX_H_ } else if (networkAddr[0] == NAT25_IPX) { unsigned long x; @@ -337,6 +343,7 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr) networkAddr[6] ^ networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10]; return x & (NAT25_HASH_SIZE - 1); +#endif } else if (networkAddr[0] == NAT25_APPLE) { unsigned long x; @@ -889,6 +896,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method) } } +#ifdef _NET_INET_IPX_H_ /*---------------------------------------------------*/ /* Handle IPX and Apple Talk frame */ /*---------------------------------------------------*/ @@ -1109,6 +1117,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method) return -1; } +#endif /*---------------------------------------------------*/ /* Handle PPPoE frame */ From a747e376466b470ef9950c291dba0e4f50768d24 Mon Sep 17 00:00:00 2001 From: user Date: Tue, 22 Mar 2022 15:06:47 -0300 Subject: [PATCH 2/2] Fixed gro_drop compilation error on kernels >=5.12. ref: https://github.com/aircrack-ng/rtl8814au/pull/73 --- os_dep/linux/recv_linux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/os_dep/linux/recv_linux.c b/os_dep/linux/recv_linux.c index da9a84b..ae8729e 100755 --- a/os_dep/linux/recv_linux.c +++ b/os_dep/linux/recv_linux.c @@ -355,8 +355,13 @@ static int napi_recv(_adapter *padapter, int budget) #ifdef CONFIG_RTW_GRO if (pregistrypriv->en_gro) { + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)) + rtw_napi_gro_receive(&padapter->napi, pskb); + rx_ok = _TRUE; + #else if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP) rx_ok = _TRUE; + #endif goto next; } #endif /* CONFIG_RTW_GRO */