Compile with kernel v5.15

This commit is contained in:
Andrew N. Shalaev 2021-12-20 18:51:39 +05:00
parent 6146193406
commit f4f35e67c3
2 changed files with 10 additions and 0 deletions

View File

@ -15,9 +15,12 @@
#define _RTW_BR_EXT_C_ #define _RTW_BR_EXT_C_
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/version.h>
#include <linux/if_arp.h> #include <linux/if_arp.h>
#include <net/ip.h> #include <net/ip.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#include <net/ipx.h> #include <net/ipx.h>
#endif
#include <linux/atalk.h> #include <linux/atalk.h>
#include <linux/udp.h> #include <linux/udp.h>
#include <linux/if_pppox.h> #include <linux/if_pppox.h>
@ -948,6 +951,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
} }
} }
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
/* IPX */ /* IPX */
if (ipx != NULL) { if (ipx != NULL) {
switch (method) { switch (method) {
@ -1016,8 +1020,12 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
} }
} }
/* AARP */ /* AARP */
else if (ea != NULL) { else if (ea != NULL) {
#else
if (ea != NULL) {
#endif
/* Sanity check fields. */ /* Sanity check fields. */
if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) { if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n"); DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");

View File

@ -1831,11 +1831,13 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
ptable->func = &OnAuth; ptable->func = &OnAuth;
else else
ptable->func = &OnAuthClient; ptable->func = &OnAuthClient;
_mgt_dispatcher(padapter, ptable, precv_frame);
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
__attribute__ ((fallthrough)); __attribute__ ((fallthrough));
#else #else
__attribute__ ((__fallthrough__)); __attribute__ ((__fallthrough__));
#endif #endif
break;
case WIFI_ASSOCREQ: case WIFI_ASSOCREQ:
case WIFI_REASSOCREQ: case WIFI_REASSOCREQ:
_mgt_dispatcher(padapter, ptable, precv_frame); _mgt_dispatcher(padapter, ptable, precv_frame);