aports/community/rtl8821ce-lts/kernel-5.15.patch

104 lines
3.2 KiB
Diff

https://github.com/tomaspinho/rtl8821ce/pull/245
From 8d1fa1bdc38c31c4ae69d6dd48c0f8f70ed57f71 Mon Sep 17 00:00:00 2001
From: egnappahz <egnappah@gmail.com>
Date: Tue, 2 Nov 2021 18:46:42 +0100
Subject: [PATCH] Update rtw_br_ext.c
Fix for Linux 5.15
---
core/rtw_br_ext.c | 72 ++---------------------------------------------
1 file changed, 2 insertions(+), 70 deletions(-)
diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c
index 9a0effd..2cb0e19 100644
--- a/core/rtw_br_ext.c
+++ b/core/rtw_br_ext.c
@@ -17,7 +17,6 @@
#ifdef __KERNEL__
#include <linux/if_arp.h>
#include <net/ip.h>
- #include <net/ipx.h>
#include <linux/atalk.h>
#include <linux/udp.h>
#include <linux/if_pppox.h>
@@ -949,76 +948,9 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
}
}
- /* IPX */
- if (ipx != NULL) {
- switch (method) {
- case NAT25_CHECK:
- if (!memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
- RTW_INFO("NAT25: Check IPX skb_copy\n");
- return 0;
- }
- return -1;
-
- case NAT25_INSERT: {
- RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
- ipx->ipx_dest.net,
- ipx->ipx_dest.node[0],
- ipx->ipx_dest.node[1],
- ipx->ipx_dest.node[2],
- ipx->ipx_dest.node[3],
- ipx->ipx_dest.node[4],
- ipx->ipx_dest.node[5],
- ipx->ipx_dest.sock,
- ipx->ipx_source.net,
- ipx->ipx_source.node[0],
- ipx->ipx_source.node[1],
- ipx->ipx_source.node[2],
- ipx->ipx_source.node[3],
- ipx->ipx_source.node[4],
- ipx->ipx_source.node[5],
- ipx->ipx_source.sock);
-
- if (!memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
- RTW_INFO("NAT25: Use IPX Net, and Socket as network addr\n");
-
- __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_source.net, &ipx->ipx_source.sock);
-
- /* change IPX source node addr to wlan STA address */
- memcpy(ipx->ipx_source.node, GET_MY_HWADDR(priv), ETH_ALEN);
- } else
- __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_source.net, ipx->ipx_source.node);
-
- __nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
-
- __nat25_db_print(priv);
- }
- return 0;
-
- case NAT25_LOOKUP: {
- if (!memcmp(GET_MY_HWADDR(priv), ipx->ipx_dest.node, ETH_ALEN)) {
- RTW_INFO("NAT25: Lookup IPX, Modify Destination IPX Node addr\n");
-
- __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_dest.net, &ipx->ipx_dest.sock);
-
- __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-
- /* replace IPX destination node addr with Lookup destination MAC addr */
- memcpy(ipx->ipx_dest.node, skb->data, ETH_ALEN);
- } else {
- __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_dest.net, ipx->ipx_dest.node);
-
- __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
- }
- }
- return 0;
-
- default:
- return -1;
- }
- }
-
+ /* no more IPX since 5.15 */
/* AARP */
- else if (ea != NULL) {
+ if (ea != NULL) {
/* Sanity check fields. */
if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");