LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-12-2022, 09:45 AM   #1
fdahl_009
Member
 
Registered: Oct 2005
Location: Norway
Posts: 148

Rep: Reputation: 16
D-Link DWA-X1850 Slackware 15


Trying to get the D-Link DWA-X1850 working on Slackware 15.

Found this https://github.com/neojou/rtw89-usb and did as instructed but "nothing" seem to happen - what would be the next step?
 
Old 02-12-2022, 11:53 AM   #2
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 782
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
This suggests that you need rtl8832au, and links to another driver at github than the one you found.
 
Old 02-12-2022, 12:20 PM   #3
fdahl_009
Member
 
Registered: Oct 2005
Location: Norway
Posts: 148

Original Poster
Rep: Reputation: 16
Thank you for checking - I continued the search, found and tried that as well, exactly the patched version you link to.

make fails at
Code:
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:20:18: fatal error: net/ipx.h: No such file or directory
   20 |         #include <net/ipx.h>
      |                  ^~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:277: /home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.o] Error 1
make[1]: *** [Makefile:1868: /home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850] Error 2
make[1]: Leaving directory '/usr/src/linux-5.15.19'
make: *** [Makefile:629: modules] Error 2
fredrik@i7-2600k:~/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850$
 
Old 02-12-2022, 05:08 PM   #4
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 305

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
Quote:
Originally Posted by fdahl_009 View Post
...make fails at
Quote:
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:20:18: fatal error: net/ipx.h: No such file or directory
20 | #include <net/ipx.h>
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:277: /home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.o] Error 1
make[1]: *** [Makefile:1868: /home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850] Error 2
make[1]: Leaving directory '/usr/src/linux-5.15.19'
make: *** [Makefile:629: modules] Error 2
fredrik@i7-2600k:~/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850$
The file ipx.h was removed from the kernel starting at v5.15.

I have a different model of D-link DWA, and I hit the same snag. Try wrapping that include statement in the source with an if-statement with this patch:
Code:
diff -Naur old/core/rtw_br_ext.c new/core/rtw_br_ext.c
--- old/core/rtw_br_ext.c	2019-06-13 04:39:37.000000000 -0700
+++ new/core/rtw_br_ext.c	2021-10-23 05:09:02.000000000 -0700
@@ -15,9 +15,11 @@
 #define _RTW_BR_EXT_C_
 
 #ifdef __KERNEL__
+	#include <linux/version.h>
 	#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>

Last edited by JayByrd; 02-12-2022 at 08:17 PM. Reason: added emphasis.
 
Old 02-13-2022, 03:55 AM   #5
fdahl_009
Member
 
Registered: Oct 2005
Location: Norway
Posts: 148

Original Poster
Rep: Reputation: 16
Changed core/rtw_br_ext.c to this

Code:
#define _RTW_BR_EXT_C_

#ifdef __KERNEL__
	#include <linux/version.h>
	#include <linux/if_arp.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

Now the make process fails at

Code:
  CC [M]  /home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.o
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c: In function ‘nat25_db_handle’:
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:955:75: error: invalid use of undefined type ‘struct ipxhdr’
  955 |                                 if (!_rtw_memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
      |                                                                           ^~
In file included from ./include/linux/kernel.h:19,
                 from ./include/linux/skbuff.h:13,
                 from ./include/linux/if_arp.h:22,
                 from /home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:19:
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:963:45: error: invalid use of undefined type ‘struct ipxhdr’
  963 |                                          ipx->ipx_dest.net,
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:964:45: error: invalid use of undefined type ‘struct ipxhdr’
  964 |                                          ipx->ipx_dest.node[0],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:965:45: error: invalid use of undefined type ‘struct ipxhdr’
  965 |                                          ipx->ipx_dest.node[1],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:966:45: error: invalid use of undefined type ‘struct ipxhdr’
  966 |                                          ipx->ipx_dest.node[2],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:967:45: error: invalid use of undefined type ‘struct ipxhdr’
  967 |                                          ipx->ipx_dest.node[3],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:968:45: error: invalid use of undefined type ‘struct ipxhdr’
  968 |                                          ipx->ipx_dest.node[4],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:969:45: error: invalid use of undefined type ‘struct ipxhdr’
  969 |                                          ipx->ipx_dest.node[5],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:970:45: error: invalid use of undefined type ‘struct ipxhdr’
  970 |                                          ipx->ipx_dest.sock,
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:971:45: error: invalid use of undefined type ‘struct ipxhdr’
  971 |                                          ipx->ipx_source.net,
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:972:45: error: invalid use of undefined type ‘struct ipxhdr’
  972 |                                          ipx->ipx_source.node[0],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:973:45: error: invalid use of undefined type ‘struct ipxhdr’
  973 |                                          ipx->ipx_source.node[1],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:974:45: error: invalid use of undefined type ‘struct ipxhdr’
  974 |                                          ipx->ipx_source.node[2],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:975:45: error: invalid use of undefined type ‘struct ipxhdr’
  975 |                                          ipx->ipx_source.node[3],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:976:45: error: invalid use of undefined type ‘struct ipxhdr’
  976 |                                          ipx->ipx_source.node[4],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:977:45: error: invalid use of undefined type ‘struct ipxhdr’
  977 |                                          ipx->ipx_source.node[5],
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:978:45: error: invalid use of undefined type ‘struct ipxhdr’
  978 |                                          ipx->ipx_source.sock);
      |                                             ^~
./include/linux/printk.h:422:33: note: in definition of macro ‘printk_index_wrap’
  422 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/include/rtw_debug.h:58:26: note: in expansion of macro ‘printk’
   58 |         #define _dbgdump printk
      |                          ^~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:962:33: note: in expansion of macro ‘RTW_INFO’
  962 |                                 RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
      |                                 ^~~~~~~~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:980:75: error: invalid use of undefined type ‘struct ipxhdr’
  980 |                                 if (!_rtw_memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
      |                                                                           ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:983:104: error: invalid use of undefined type ‘struct ipxhdr’
  983 |                                         __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_source.net, &ipx->ipx_source.sock);
      |                                                                                                        ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:983:126: error: invalid use of undefined type ‘struct ipxhdr’
  983 |                                         __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_source.net, &ipx->ipx_source.sock);
      |                                                                                                                              ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:986:56: error: invalid use of undefined type ‘struct ipxhdr’
  986 |                                         _rtw_memcpy(ipx->ipx_source.node, GET_MY_HWADDR(priv), ETH_ALEN);
      |                                                        ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:988:102: error: invalid use of undefined type ‘struct ipxhdr’
  988 |                                         __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_source.net, ipx->ipx_source.node);
      |                                                                                                      ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:988:123: error: invalid use of undefined type ‘struct ipxhdr’
  988 |                                         __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_source.net, ipx->ipx_source.node);
      |                                                                                                                           ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:997:74: error: invalid use of undefined type ‘struct ipxhdr’
  997 |                                 if (!_rtw_memcmp(GET_MY_HWADDR(priv), ipx->ipx_dest.node, ETH_ALEN)) {
      |                                                                          ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:1000:104: error: invalid use of undefined type ‘struct ipxhdr’
 1000 |                                         __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_dest.net, &ipx->ipx_dest.sock);
      |                                                                                                        ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:1000:124: error: invalid use of undefined type ‘struct ipxhdr’
 1000 |                                         __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_dest.net, &ipx->ipx_dest.sock);
      |                                                                                                                            ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:1005:56: error: invalid use of undefined type ‘struct ipxhdr’
 1005 |                                         _rtw_memcpy(ipx->ipx_dest.node, skb->data, ETH_ALEN);
      |                                                        ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:1007:102: error: invalid use of undefined type ‘struct ipxhdr’
 1007 |                                         __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_dest.net, ipx->ipx_dest.node);
      |                                                                                                      ^~
/home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c:1007:121: error: invalid use of undefined type ‘struct ipxhdr’
 1007 |                                         __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_dest.net, ipx->ipx_dest.node);
      |                                                                                                                         ^~
make[2]: *** [scripts/Makefile.build:277: /home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.o] Error 1
make[1]: *** [Makefile:1868: /home/fredrik/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850] Error 2
make[1]: Leaving directory '/usr/src/linux-5.15.19'
make: *** [Makefile:629: modules] Error 2

Last edited by fdahl_009; 02-13-2022 at 03:57 AM.
 
Old 02-13-2022, 06:16 AM   #6
J_W
Member
 
Registered: Apr 2004
Location: Yamagata, JAPAN
Distribution: Slackware64-current
Posts: 192

Rep: Reputation: 130Reputation: 130
Hi, fdahl_009

I made a test patch like below.

rtw8852au_kernel-5.16.patch
Code:
--- RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/core/rtw_br_ext.c	2021-12-04 17:39:48.000000000 +0900
+++ RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850.new/core/rtw_br_ext.c	2022-02-13 20:41:20.076717012 +0900
@@ -17,7 +17,10 @@
 #ifdef __KERNEL__
 	#include <linux/if_arp.h>
 	#include <net/ip.h>
+	#include <linux/version.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>
@@ -159,6 +162,7 @@
 }
 
 
+#ifdef _NET_INET_IPX_H_
 static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr,
 		unsigned int *ipAddr)
 {
@@ -189,6 +193,7 @@
 	_rtw_memcpy(networkAddr + 1, (unsigned char *)ipxNetAddr, 4);
 	_rtw_memcpy(networkAddr + 5, (unsigned char *)ipxSocketAddr, 2);
 }
+#endif
 
 
 static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networkAddr,
@@ -330,6 +335,7 @@
 		x = networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10];
 
 		return x & (NAT25_HASH_SIZE - 1);
+#ifdef _NET_INET_IPX_H_
 	} else if (networkAddr[0] == NAT25_IPX) {
 		unsigned long x;
 
@@ -337,6 +343,7 @@
 		    networkAddr[6] ^ networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10];
 
 		return x & (NAT25_HASH_SIZE - 1);
+#endif
 	} else if (networkAddr[0] == NAT25_APPLE) {
 		unsigned long x;
 
@@ -782,7 +789,7 @@
 			if (iph->saddr == 0)
 				return 0;
 			RTW_INFO("NAT25: Insert IP, SA=%08x, DA=%08x\n", iph->saddr, iph->daddr);
-			__nat25_generate_ipv4_network_addr(networkAddr, &iph->saddr);
+			__nat25_generate_ipv6_network_addr(networkAddr, &iph->saddr);
 			/* record source IP address and , source mac address into db */
 			__nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
 
@@ -800,7 +807,7 @@
 			     (OPMODE & WIFI_ADHOC_STATE)))
 #endif
 			{
-				__nat25_generate_ipv4_network_addr(networkAddr, &iph->daddr);
+				__nat25_generate_ipv6_network_addr(networkAddr, &iph->daddr);
 
 				if (!__nat25_db_network_lookup_and_replace(priv, skb, networkAddr)) {
 					if (*((unsigned char *)&iph->daddr + 3) == 0xff) {
@@ -854,7 +861,7 @@
 			arp_ptr += arp->ar_hln;
 			sender = (unsigned int *)arp_ptr;
 
-			__nat25_generate_ipv4_network_addr(networkAddr, sender);
+			__nat25_generate_ipv6_network_addr(networkAddr, sender);
 
 			__nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
 
@@ -870,7 +877,7 @@
 			arp_ptr += (arp->ar_hln + arp->ar_pln);
 			target = (unsigned int *)arp_ptr;
 
-			__nat25_generate_ipv4_network_addr(networkAddr, target);
+			__nat25_generate_ipv6_network_addr(networkAddr, target);
 
 			__nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
 
@@ -886,6 +893,7 @@
 		}
 	}
 
+#ifdef _NET_INET_IPX_H_
 	/*---------------------------------------------------*/
 	/*         Handle IPX and Apple Talk frame          */
 	/*---------------------------------------------------*/
@@ -1106,6 +1114,7 @@
 
 		return -1;
 	}
+#endif
 
 	/*---------------------------------------------------*/
 	/*                Handle PPPoE frame                */
@@ -1558,7 +1567,7 @@
 
 	/* _rtw_spinlock_bh(&priv->br_ext_lock); */
 
-	__nat25_generate_ipv4_network_addr(networkAddr, (unsigned int *)ipAddr);
+	__nat25_generate_ipv6_network_addr(networkAddr, (unsigned int *)ipAddr);
 	hash = __nat25_network_hash(networkAddr);
 	db = priv->nethash[hash];
 	while (db != NULL) {
Compilation result was
Code:
# cd RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714
# patch -p1 < /PATH_TO/rtw8852au_kernel-5.16.patch
# make
....
  CC [M]  /root/work/build/test-build-220213/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/phl/hal_g6/phy/rf/halrf_8852a/halrf_psd_8852a.o
  LD [M]  /root/work/build/test-build-220213/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/8852au.o
  MODPOST /root/work/build/test-build-220213/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/Module.symvers
  CC [M]  /root/work/build/test-build-220213/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/8852au.mod.o
  LD [M]  /root/work/build/test-build-220213/RTL8852AU_WiFi_linux_v1.15.0.1-0-g487ee886.20210714-dwa-x1850/8852au.ko
make[1]: Leaving directory '/usr/src/linux-5.16.9'
The module "8852au.ko" was created successfully.
However, since I don't have the hardware of D-Link DWA-X1850, I have no chance to confirm that the created driver works correctly or not.
 
1 members found this post helpful.
Old 02-13-2022, 08:00 AM   #7
fdahl_009
Member
 
Registered: Oct 2005
Location: Norway
Posts: 148

Original Poster
Rep: Reputation: 16
Super - thank you so much J_W!

Patched, make, "su" make install, plugged in the dongle and it connected on first try.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Install D-Link DWA-125 on laptop running Slackware 13 adtf01 Linux - Newbie 6 12-18-2010 02:52 PM
[SOLVED] Instal D-link DWA 125 Wireless adaptor on Slackware 13.1 adtf01 Slackware 19 12-15-2010 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration