diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c index 88a517a..9c4ad22 100644 --- a/core/rtw_br_ext.c +++ b/core/rtw_br_ext.c @@ -22,7 +22,12 @@ #ifdef __KERNEL__ #include #include -#include + +#include +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) + #include +#endif + #include #include #include @@ -170,6 +175,7 @@ static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *network } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr, unsigned int *ipxNetAddr, unsigned char *ipxNodeAddr) { @@ -179,8 +185,10 @@ static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char memcpy(networkAddr+1, (unsigned char *)ipxNetAddr, 4); memcpy(networkAddr+5, ipxNodeAddr, 6); } +#endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsigned char *networkAddr, unsigned int *ipxNetAddr, unsigned short *ipxSocketAddr) { @@ -190,6 +198,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, @@ -930,6 +939,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method) /*---------------------------------------------------*/ /* Handle IPX and Apple Talk frame */ /*---------------------------------------------------*/ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) else if((protocol == __constant_htons(ETH_P_IPX)) || (protocol <= __constant_htons(ETH_FRAME_LEN))) { @@ -1190,6 +1200,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method) return -1; } +#endif /*---------------------------------------------------*/ /* Handle PPPoE frame */