Pynq z2 tl-wn823n wifi slow

I have been trying to use a tTL-WN823N v3 WiFi dongle with my pynq z2 board, which works right off the bet when I plug the device into the usb port. The problem is that the connection speed is too slow to use it with jupyter notebooks over the network - I can see that the download/upload rates are not great (less than 30kbps) and I would like to try and fix this. I remembered that one way to fix this is to install the rtl8192eu driver, which I did for my jetson nano board and it worked. I would like to know how to properly install this driver in the Pynq board.

I tried installing the rtl8192eu driver following the github instructions found in GitHub - Mange/rtl8192eu-linux-driver: Drivers for the rtl8192eu chipset for wireless adapters (D-Link DWA-131 rev E1 included!), but I get so many errors I have no idea what to do.

The first problem I get is that after running the command sudo dkms install rtl8192eu/1.0 I get compilation errors related to a conflict between arm and armv7l architectures. This problem can be fixed following the instructions in `dkms build` looks for 'armv7l' folder instead of 'arm' folder · Issue #103 · diederikdehaas/rtl8812AU · GitHub.

However, I get the following new compilation errors:

DKMS make.log for rtl8192eu-1.0 for kernel 5.4.0-xilinx-v2020.2 (armv7l)
Tue 26 Jul 2022 08:15:23 PM PDT
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/5.4.0-xilinx-v2020.2/build M=/var/lib/dkms/rtl8192eu/1.0/build  modules
make[1]: Entering directory '/lib/modules/5.4.0-xilinx-v2020.2/build'
  CC [M]  /var/lib/dkms/rtl8192eu/1.0/build/core/rtw_cmd.o
In file included from ./include/asm-generic/int-ll64.h:11,
                 from ./arch/armv7l/include/uapi/asm/types.h:5,
                 from ./include/uapi/linux/types.h:5,
                 from ./include/linux/types.h:6,
                 from /var/lib/dkms/rtl8192eu/1.0/build/include/basic_types.h:36,
                 from /var/lib/dkms/rtl8192eu/1.0/build/include/drv_types.h:26,
                 from /var/lib/dkms/rtl8192eu/1.0/build/core/rtw_cmd.c:17:
./include/uapi/asm-generic/int-ll64.h:12:10: fatal error: asm/bitsperlong.h: No such file or directory
   12 | #include <asm/bitsperlong.h>
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/ /var/lib/dkms/rtl8192eu/1.0/build/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1652: /var/lib/dkms/rtl8192eu/1.0/build] Error 2
make[1]: Leaving directory '/lib/modules/5.4.0-xilinx-v2020.2/build'
make: *** [Makefile:2287: modules] Error 2

I tried replacing the include line from <asm/ to <asm-generic/ as someone suggested on stack-overflow, but after doing it manually for 7+ files the error still persists. Then I tried to replace all ocurrences in all include files and the compile error just increased (obviously lol).

My question is: has someone managed to get this driver working in Pynq Z2? What is the correct procedure?