From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH 2/9] rtl8189es: update to e58bd86c9d9408c648b1246a0dd76b16856ec172 Date: Sat, 07 Jan 2023 11:46:54 +0000 Message-ID: <20230107114701.4075482-3-arne_f@ipfire.org> In-Reply-To: <20230107114701.4075482-1-arne_f@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5965984121636484961==" List-Id: --===============5965984121636484961== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable this is needed for kernel 6.1.x --- lfs/rtl8189es | 9 +- src/patches/rtl8189es/remove-ipx.patch | 319 ------------------------- 2 files changed, 4 insertions(+), 324 deletions(-) delete mode 100644 src/patches/rtl8189es/remove-ipx.patch diff --git a/lfs/rtl8189es b/lfs/rtl8189es index bd373facb..c829769ac 100644 --- a/lfs/rtl8189es +++ b/lfs/rtl8189es @@ -1,7 +1,7 @@ ############################################################################= ### # = # # IPFire.org - A linux based firewall = # -# Copyright (C) 2007-2021 IPFire Team = # +# Copyright (C) 2007-2023 IPFire Team = # # = # # This program is free software: you can redistribute it and/or modify = # # it under the terms of the GNU General Public License as published by = # @@ -27,7 +27,7 @@ include Config VERSUFIX =3D ipfire$(KCFG) MODPATH =3D /lib/modules/$(KVER)-$(VERSUFIX)/extra/wlan =20 -VER =3D 03ac413135a355b55b693154c44b70f86a39732e +VER =3D e58bd86c9d9408c648b1246a0dd76b16856ec172 =20 THISAPP =3D rtl8189ES_linux-$(VER) DL_FILE =3D $(THISAPP).tar.gz @@ -43,7 +43,7 @@ objects =3D $(DL_FILE) =20 $(DL_FILE) =3D $(DL_FROM)/$(DL_FILE) =20 -$(DL_FILE)_BLAKE2 =3D 3cc2d7bb7ba01e90a1190a74dfdfaac4f377c1565cb97cb40c2132= 69a3c2fbe853c8c22769554a3d4ad47e0d1461058de9fc4dba7599c8f6afd50e8ea89e5138 +$(DL_FILE)_BLAKE2 =3D a2898188d6ed215b9a8f6bfd5684f4df1ad448b69537119c663310= 0db06349538b1e0491887f3c705bac1dcd79cf18e27084da34719745bfd54e9530793aa4da =20 install : $(TARGET) =20 @@ -76,9 +76,8 @@ $(subst %,%_BLAKE2,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/rtl8189es/remove-ipx.p= atch cd $(DIR_APP) && CONFIG_RTL8189ES=3Dm make $(MAKETUNING) \ - -C /lib/modules/$(KVER)-$(VERSUFIX)/build/ M=3D$(DIR_APP)/ modules + -C /lib/modules/$(KVER)-$(VERSUFIX)/build/ M=3D$(DIR_APP) modules =20 # Install the built kernel modules. mkdir -p $(MODPATH) diff --git a/src/patches/rtl8189es/remove-ipx.patch b/src/patches/rtl8189es/r= emove-ipx.patch deleted file mode 100644 index 1340fa39c..000000000 --- a/src/patches/rtl8189es/remove-ipx.patch +++ /dev/null @@ -1,319 +0,0 @@ -diff -Naur rtl8189ES_linux-03ac413135a355b55b693154c44b70f86a39732e.org/core= /rtw_br_ext.c rtl8189ES_linux-03ac413135a355b55b693154c44b70f86a39732e/core/r= tw_br_ext.c ---- rtl8189ES_linux-03ac413135a355b55b693154c44b70f86a39732e.org/core/rtw_br= _ext.c 2021-03-02 18:42:47.000000000 +0100 -+++ rtl8189ES_linux-03ac413135a355b55b693154c44b70f86a39732e/core/rtw_br_ext= .c 2021-11-04 18:21:00.965922215 +0100 -@@ -22,7 +22,6 @@ - #ifdef __KERNEL__ - #include - #include --#include - #include - #include - #include -@@ -171,39 +170,6 @@ - } -=20 -=20 --static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned= char *networkAddr, -- unsigned int *ipxNetAddr, unsigned char *ipxNodeAddr) --{ -- memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN); -- -- networkAddr[0] =3D NAT25_IPX; -- memcpy(networkAddr+1, (unsigned char *)ipxNetAddr, 4); -- memcpy(networkAddr+5, ipxNodeAddr, 6); --} -- -- --static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsign= ed char *networkAddr, -- unsigned int *ipxNetAddr, unsigned short *ipxSocketAddr) --{ -- memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN); -- -- networkAddr[0] =3D NAT25_IPX; -- memcpy(networkAddr+1, (unsigned char *)ipxNetAddr, 4); -- memcpy(networkAddr+5, (unsigned char *)ipxSocketAddr, 2); --} -- -- --static __inline__ void __nat25_generate_apple_network_addr(unsigned char *n= etworkAddr, -- unsigned short *network, unsigned char *node) --{ -- memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN); -- -- networkAddr[0] =3D NAT25_APPLE; -- memcpy(networkAddr+1, (unsigned char *)network, 2); -- networkAddr[3] =3D *node; --} -- -- - static __inline__ void __nat25_generate_pppoe_network_addr(unsigned char *n= etworkAddr, - unsigned char *ac_mac, unsigned short *sid) - { -@@ -929,267 +895,6 @@ - } -=20 - /*---------------------------------------------------*/ -- /* Handle IPX and Apple Talk frame */ -- /*---------------------------------------------------*/ -- else if((protocol =3D=3D __constant_htons(ETH_P_IPX)) ||=20 -- (protocol =3D=3D __constant_htons(ETH_P_ATALK)) || -- (protocol =3D=3D __constant_htons(ETH_P_AARP))) -- { -- unsigned char ipx_header[2] =3D {0xFF, 0xFF}; -- struct ipxhdr *ipx =3D NULL; -- struct elapaarp *ea =3D NULL; -- struct ddpehdr *ddp =3D NULL; -- unsigned char *framePtr =3D skb->data + ETH_HLEN; -- -- if(protocol =3D=3D __constant_htons(ETH_P_IPX)) -- { -- DBG_871X("NAT25: Protocol=3DIPX (Ethernet II)\n"); -- ipx =3D (struct ipxhdr *)framePtr; -- } -- else //if(protocol <=3D __constant_htons(ETH_FRAME_LEN)) -- { -- if(!memcmp(ipx_header, framePtr, 2)) -- { -- DBG_871X("NAT25: Protocol=3DIPX (Ethernet 802.3)\n"); -- ipx =3D (struct ipxhdr *)framePtr; -- } -- else -- { -- unsigned char ipx_8022_type =3D 0xE0; -- unsigned char snap_8022_type =3D 0xAA; -- -- if(*framePtr =3D=3D snap_8022_type) -- { -- unsigned char ipx_snap_id[5] =3D {0x0, 0x0, 0x0, 0x81, 0x37}; // IPX = SNAP ID -- unsigned char aarp_snap_id[5] =3D {0x00, 0x00, 0x00, 0x80, 0xF3}; // A= pple Talk AARP SNAP ID -- unsigned char ddp_snap_id[5] =3D {0x08, 0x00, 0x07, 0x80, 0x9B}; // Ap= ple Talk DDP SNAP ID -- -- framePtr +=3D 3; // eliminate the 802.2 header -- -- if(!memcmp(ipx_snap_id, framePtr, 5)) -- { -- framePtr +=3D 5; // eliminate the SNAP header -- -- DBG_871X("NAT25: Protocol=3DIPX (Ethernet SNAP)\n"); -- ipx =3D (struct ipxhdr *)framePtr; -- } -- else if(!memcmp(aarp_snap_id, framePtr, 5)) -- { -- framePtr +=3D 5; // eliminate the SNAP header -- -- ea =3D (struct elapaarp *)framePtr; -- } -- else if(!memcmp(ddp_snap_id, framePtr, 5)) -- { -- framePtr +=3D 5; // eliminate the SNAP header -- -- ddp =3D (struct ddpehdr *)framePtr; -- } -- else -- { -- DEBUG_WARN("NAT25: Protocol=3DEthernet SNAP %02x%02x%02x%02x%02x\n", = framePtr[0], -- framePtr[1], framePtr[2], framePtr[3], framePtr[4]); -- return -1; -- } -- } -- else if(*framePtr =3D=3D ipx_8022_type) -- { -- framePtr +=3D 3; // eliminate the 802.2 header -- -- if(!memcmp(ipx_header, framePtr, 2)) -- { -- DBG_871X("NAT25: Protocol=3DIPX (Ethernet 802.2)\n"); -- ipx =3D (struct ipxhdr *)framePtr; -- } -- else -- return -1; -- } -- } -- } -- -- /* IPX */ -- if(ipx !=3D NULL) -- { -- switch(method) -- { -- case NAT25_CHECK: -- if(!memcmp(skb->data+ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) -- { -- DBG_871X("NAT25: Check IPX skb_copy\n"); -- return 0; -- } -- return -1; -- -- case NAT25_INSERT: -- { -- DBG_871X("NAT25: Insert IPX, Dest=3D%08x,%02x%02x%02x%02x%02x%02x,%04= x Source=3D%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)) -- { -- DBG_871X("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_sou= rce.node, GET_MY_HWADDR(priv), ETH_ALEN); -- } -- else -- { -- __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_s= ource.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(pr= iv), ipx->ipx_dest.node, ETH_ALEN)) -- { -- DBG_871X("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_d= est.net, ipx->ipx_dest.node); -- -- __nat25_db_network_lookup_and_replace(priv, skb, networkAddr); -- } -- } -- return 0; -- -- default: -- return -1; -- } -- } -- -- /* AARP */ -- else if(ea !=3D NULL) -- { -- /* Sanity check fields. */ -- if(ea->hw_len !=3D ETH_ALEN || ea->pa_len !=3D AARP_PA_ALEN) -- { -- DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n"); -- return -1; -- } -- -- switch(method) -- { -- case NAT25_CHECK: -- return 0; -- -- case NAT25_INSERT: -- { -- // change to AARP source mac address to wlan STA address -- memcpy(ea->hw_src, GET_MY_H= WADDR(priv), ETH_ALEN); -- -- DBG_871X("NAT25: Insert AARP, Source=3D%d,%d Destination=3D%d,%d\n", -- ea->pa_src_net, -- ea->pa_src_node, -- ea->pa_dst_net, -- ea->pa_dst_node); -- -- __nat25_generate_apple_network_addr(networkAddr, &ea->pa_src_net, &ea= ->pa_src_node); -- -- __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr); -- -- __nat25_db_print(priv); -- } -- return 0; -- -- case NAT25_LOOKUP: -- { -- DBG_871X("NAT25: Lookup AARP, Source=3D%d,%d Destination=3D%d,%d\n", -- ea->pa_src_net, -- ea->pa_src_node, -- ea->pa_dst_net, -- ea->pa_dst_node); -- -- __nat25_generate_apple_network_addr(networkAddr, &ea->pa_dst_net, &ea= ->pa_dst_node); -- -- __nat25_db_network_lookup_and_replace(priv, skb, networkAddr); -- -- // change to AARP destination mac address to Lookup result -- memcpy(ea->hw_dst, skb->data, ETH_ALEN); -- } -- return 0; -- -- default: -- return -1; -- } -- } -- -- /* DDP */ -- else if(ddp !=3D NULL) -- { -- switch(method) -- { -- case NAT25_CHECK: -- return -1; -- -- case NAT25_INSERT: -- { -- DBG_871X("NAT25: Insert DDP, Source=3D%d,%d Destination=3D%d,%d\n", -- ddp->deh_snet, -- ddp->deh_snode, -- ddp->deh_dnet, -- ddp->deh_dnode); -- -- __nat25_generate_apple_network_addr(networkAddr, &ddp->deh_snet, &ddp= ->deh_snode); -- -- __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr); -- -- __nat25_db_print(priv); -- } -- return 0; -- -- case NAT25_LOOKUP: -- { -- DBG_871X("NAT25: Lookup DDP, Source=3D%d,%d Destination=3D%d,%d\n", -- ddp->deh_snet, -- ddp->deh_snode, -- ddp->deh_dnet, -- ddp->deh_dnode); -- -- __nat25_generate_apple_network_addr(networkAddr, &ddp->deh_dnet, &ddp= ->deh_dnode); -- -- __nat25_db_network_lookup_and_replace(priv, skb, networkAddr); -- } -- return 0; -- -- default: -- return -1; -- } -- } -- -- return -1; -- } -- -- /*---------------------------------------------------*/ - /* Handle PPPoE frame */ - /*---------------------------------------------------*/ - else if((protocol =3D=3D __constant_htons(ETH_P_PPP_DISC)) || --=20 2.34.1 --===============5965984121636484961==--