SHA256
1
0
forked from pool/rtl8812au
Dominique Leuenberger 2022-04-08 20:45:45 +00:00 committed by Git OBS Bridge
commit d0f26e2f46
7 changed files with 23 additions and 180 deletions

View File

@ -1,165 +0,0 @@
From d85350854da575e1407328199062b4fd26722137 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Mon, 15 Nov 2021 11:15:42 +0100
Subject: [PATCH] Drop ipx support on Linux 5.15
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
core/rtw_br_ext.c | 61 ++++++++++++++++++++++++++++++++++-------------
1 file changed, 45 insertions(+), 16 deletions(-)
diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c
index 9a0effd..236d242 100644
--- a/core/rtw_br_ext.c
+++ b/core/rtw_br_ext.c
@@ -14,15 +14,6 @@
*****************************************************************************/
#define _RTW_BR_EXT_C_
-#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>
-#endif
-
#if 1 /* rtw_wifi_driver */
#include <drv_types.h>
#else /* rtw_wifi_driver */
@@ -38,6 +29,17 @@
#include "./8192cd_debug.h"
#endif /* rtw_wifi_driver */
+#ifdef __KERNEL__
+ #include <linux/if_arp.h>
+ #include <net/ip.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
+ #include <net/ipx.h>
+#endif
+ #include <linux/atalk.h>
+ #include <linux/udp.h>
+ #include <linux/if_pppox.h>
+#endif
+
#ifdef CL_IPV6_PASS
#ifdef __KERNEL__
#include <linux/ipv6.h>
@@ -169,6 +171,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)
{
@@ -189,6 +192,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,
@@ -892,39 +896,56 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
/*---------------------------------------------------*/
/* Handle IPX and Apple Talk frame */
/*---------------------------------------------------*/
- else if ((protocol == __constant_htons(ETH_P_IPX)) ||
- (protocol == __constant_htons(ETH_P_ATALK)) ||
+ else if ((protocol == __constant_htons(ETH_P_ATALK)) ||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
+ (protocol == __constant_htons(ETH_P_IPX)) ||
+#endif
(protocol == __constant_htons(ETH_P_AARP))) {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
unsigned char ipx_header[2] = {0xFF, 0xFF};
struct ipxhdr *ipx = NULL;
+#endif
struct elapaarp *ea = NULL;
struct ddpehdr *ddp = NULL;
unsigned char *framePtr = skb->data + ETH_HLEN;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
if (protocol == __constant_htons(ETH_P_IPX)) {
RTW_INFO("NAT25: Protocol=IPX (Ethernet II)\n");
ipx = (struct ipxhdr *)framePtr;
- } else { /* if(protocol <= __constant_htons(ETH_FRAME_LEN)) */
+ } else
+#endif
+ { /* if(protocol <= __constant_htons(ETH_FRAME_LEN)) */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
if (!memcmp(ipx_header, framePtr, 2)) {
RTW_INFO("NAT25: Protocol=IPX (Ethernet 802.3)\n");
ipx = (struct ipxhdr *)framePtr;
- } else {
+ } else
+#endif
+ {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
unsigned char ipx_8022_type = 0xE0;
+#endif
unsigned char snap_8022_type = 0xAA;
if (*framePtr == snap_8022_type) {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
unsigned char ipx_snap_id[5] = {0x0, 0x0, 0x0, 0x81, 0x37}; /* IPX SNAP ID */
+#endif
unsigned char aarp_snap_id[5] = {0x00, 0x00, 0x00, 0x80, 0xF3}; /* Apple Talk AARP SNAP ID */
unsigned char ddp_snap_id[5] = {0x08, 0x00, 0x07, 0x80, 0x9B}; /* Apple Talk DDP SNAP ID */
framePtr += 3; /* eliminate the 802.2 header */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
if (!memcmp(ipx_snap_id, framePtr, 5)) {
framePtr += 5; /* eliminate the SNAP header */
RTW_INFO("NAT25: Protocol=IPX (Ethernet SNAP)\n");
ipx = (struct ipxhdr *)framePtr;
- } else if (!memcmp(aarp_snap_id, framePtr, 5)) {
+ } else
+#endif
+ if (!memcmp(aarp_snap_id, framePtr, 5)) {
framePtr += 5; /* eliminate the SNAP header */
ea = (struct elapaarp *)framePtr;
@@ -937,7 +958,9 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
framePtr[1], framePtr[2], framePtr[3], framePtr[4]);
return -1;
}
- } else if (*framePtr == ipx_8022_type) {
+ } else
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
+ if (*framePtr == ipx_8022_type) {
framePtr += 3; /* eliminate the 802.2 header */
if (!memcmp(ipx_header, framePtr, 2)) {
@@ -946,9 +969,13 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
} else
return -1;
}
+#else
+ return -1;
+#endif
}
}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
/* IPX */
if (ipx != NULL) {
switch (method) {
@@ -1018,7 +1045,9 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
}
/* AARP */
- else if (ea != NULL) {
+ else
+#endif
+ 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");
--
2.33.1

View File

@ -1,9 +1,9 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/gordboy/rtl8812au-5.9.3.2.git</param>
<param name="url">https://github.com/morrownr/8812au-20210629.git</param>
<param name="filename">rtl8812au</param>
<param name="versionformat">5.9.3.2+git%cd.%h</param>
<param name="versionformat">5.13.6+git%cd.%h</param>
<param name="revision">main</param>
</service>
<service name="set_version" mode="disabled"/>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:24b4f37bcbec3f83e970d5dfcb249fe9f59626adafcc1bf20004c6fc6ba9acc0
size 15271949

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:93e43567573d972e0370b00f1c34d0b3523cca5933ac891c4bfd644812ab77d8
size 14402061

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Apr 8 06:16:25 UTC 2022 - Antonio Larrosa <alarrosa@suse.com>
- Move upstream repository to
https://github.com/morrownr/8812au-20210629 since
https://github.com/gordboy/rtl8812au-5.9.3.2 is now archived
and the morrownr repository is the recommended alternative.
- Update version to 5.13.6+git20220308.0ae0e77 which is the
version in the new upstream.
- Drop patch. Linux 5.15 support is already included in the new
upstream:
* Drop-ipx-support-on-Linux-5.15.patch
-------------------------------------------------------------------
Mon Nov 15 11:25:06 UTC 2021 - Michal Suchanek <msuchanek@suse.de>

View File

@ -1,5 +1,4 @@
name: rtl8812au
version: 5.9.3.2+git20210427.6ef5d8f
mtime: 1619523090
commit: 6ef5d8fcdb0b94b7490a9a38353877708fca2cd4
version: 5.13.6+git20220308.0ae0e77
mtime: 1646764515
commit: 0ae0e77ce386baba816ad30d27ede2e6bd7bef14

View File

@ -1,7 +1,7 @@
#
# spec file for package rtl8812au
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -19,7 +19,7 @@
%{?!kernel_module_directory:%define kernel_module_directory /lib/modules}
Name: rtl8812au
Version: 5.9.3.2+git20210427.6ef5d8f
Version: 5.13.6+git20220308.0ae0e77
Release: 0
Summary: Kernel driver for Realtek 802.11ac 8812au wifi cards
License: GPL-2.0-only
@ -33,8 +33,6 @@ Source2: LICENSE
Patch0: fix-backported-ndo_select_queue.patch
# PATCH-FIX-OPENSUSE fix-backported-update_mgmt_frame_registrations.patch
Patch1: fix-backported-update_mgmt_frame_registrations.patch
# PATCH-FIX-OPENSUSE fix-backported-update_mgmt_frame_registrations.patch
Patch2: Drop-ipx-support-on-Linux-5.15.patch
BuildRequires: %{kernel_module_package_buildreqs}
BuildRequires: bc
BuildRequires: binutils
@ -76,8 +74,6 @@ https://github.com/maurossi/rtl8812au/ .
%patch1 -p1
%endif
%patch2 -p1
set -- *
mkdir source
mv "$@" source/