Rockpi4c 4gb using Ubuntu 20.04 from dlpage has very slow WIFI pings

Hi, I’m gettting very slow wifi response pings when I ping the rockpi4, and it also locks up for a few seconds when ssh’ing. I tried the ethernet and it’s fine when using ethernet.

My wifi doesn’t have a password and I’ve tried both
sudo nmcli dev wifi connect “mywifi”
and
sudo nmcli dev wifi connect “mywifi” password “”

rock@rockpi4c:~$ nmcli dev wifi
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY

  •   38:XX:XX:XX:XX  mywifi  Infra  149   540 Mbit/s  92      ▂▄▆█  
    

ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.21 netmask 255.255.255.0 broadcast 192.168.10.255
ether 2e:XX:XX:XX:XX:XX txqueuelen 1000 (Ethernet)
RX packets 11430 bytes 1857088 (1.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7256 bytes 1039723 (1.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 24

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1 (Local Loopback)
RX packets 273 bytes 24768 (24.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 273 bytes 24768 (24.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.157 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 2e:XX:XX:XX:XX:XX prefixlen 64 scopeid 0x20
ether c0:XX:XX:XX:XX txqueuelen 1000 (Ethernet)
RX packets 898 bytes 139423 (139.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 331 bytes 38624 (38.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

dmesg
[ 1788.289212] wl_bss_connect_done succeeded with 38:XX:XX:XX:XX
[ 2096.322497] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 2096.322517] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 2096.322533] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 2096.322546] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 2096.322562] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 2096.322573] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!

I forgot to mention, the pings are great on ethernet, but the lag is on wifi, and sometimes gets up into the few seconds or down to 35ms, but the lag/lockup I get in ssh is also present in the wifi pings.

ip a

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether c0:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
inet 192.168.10.157/24 brd 192.168.10.255 scope global dynamic noprefixroute wlan0
valid_lft 85476sec preferred_lft 85476sec
inet 192.168.10.158/24 brd 192.168.10.255 scope global secondary noprefixroute wlan0
valid_lft forever preferred_lft forever
inet6 XX:XX:XX:XX:XX:::x::/64 scope link noprefixroute
valid_lft forever preferred_lft forever