1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-25 14:44:09 +00:00

Better handling of kernel v5.15 support

This commit is contained in:
kimocoder 2022-12-19 23:18:56 +01:00
parent 3f572a0f34
commit d49d9d5a90
2 changed files with 1334 additions and 9 deletions

View File

@ -80,7 +80,7 @@
/* Find a tag in pppoe frame and return the pointer */ /* Find a tag in pppoe frame and return the pointer */
static __inline__ unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, unsigned short type) static unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, unsigned short type)
{ {
unsigned char *cur_ptr, *start_ptr; unsigned char *cur_ptr, *start_ptr;
unsigned short tagLen, tagType; unsigned short tagLen, tagType;
@ -98,7 +98,7 @@ static __inline__ unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, un
} }
static __inline__ int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_tag *tag) static int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_tag *tag)
{ {
struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN); struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN);
int data_len; int data_len;
@ -138,7 +138,7 @@ static int skb_pull_and_merge(struct sk_buff *skb, unsigned char *src, int len)
return 0; return 0;
} }
static __inline__ unsigned long __nat25_timeout(_adapter *priv) static unsigned long __nat25_timeout(_adapter *priv)
{ {
unsigned long timeout; unsigned long timeout;
@ -148,7 +148,7 @@ static __inline__ unsigned long __nat25_timeout(_adapter *priv)
} }
static __inline__ int __nat25_has_expired(_adapter *priv, static int __nat25_has_expired(_adapter *priv,
struct nat25_network_db_entry *fdb) struct nat25_network_db_entry *fdb)
{ {
if (time_before_eq(fdb->ageing_timer, __nat25_timeout(priv))) if (time_before_eq(fdb->ageing_timer, __nat25_timeout(priv)))
@ -158,7 +158,7 @@ static __inline__ int __nat25_has_expired(_adapter *priv,
} }
static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr, static void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr,
unsigned int *ipAddr) unsigned int *ipAddr)
{ {
memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN); memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
@ -167,7 +167,7 @@ static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *network
memcpy(networkAddr + 7, (unsigned char *)ipAddr, 4); memcpy(networkAddr + 7, (unsigned char *)ipAddr, 4);
} }
static __inline__ void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr, static void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
unsigned char *ac_mac, unsigned short *sid) unsigned char *ac_mac, unsigned short *sid)
{ {
memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN); memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
@ -287,7 +287,7 @@ static void convert_ipv6_mac_to_mc(struct sk_buff *skb)
#endif /* SUPPORT_RX_UNI2MCAST */ #endif /* SUPPORT_RX_UNI2MCAST */
static __inline__ int __nat25_network_hash(unsigned char *networkAddr) static int __nat25_network_hash(unsigned char *networkAddr)
{ {
if (networkAddr[0] == NAT25_IPV4) { if (networkAddr[0] == NAT25_IPV4) {
unsigned long x; unsigned long x;
@ -339,7 +339,7 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr)
} }
static __inline__ void __network_hash_link(_adapter *priv, static void __network_hash_link(_adapter *priv,
struct nat25_network_db_entry *ent, int hash) struct nat25_network_db_entry *ent, int hash)
{ {
/* Caller must _enter_critical_bh already! */ /* Caller must _enter_critical_bh already! */
@ -356,7 +356,7 @@ static __inline__ void __network_hash_link(_adapter *priv,
} }
static __inline__ void __network_hash_unlink(struct nat25_network_db_entry *ent) static void __network_hash_unlink(struct nat25_network_db_entry *ent)
{ {
/* Caller must _enter_critical_bh already! */ /* Caller must _enter_critical_bh already! */
/* _irqL irqL; */ /* _irqL irqL; */

1325
core/rtw_br_ext.c.orig Normal file

File diff suppressed because it is too large Load Diff