Wireless capped at 2mbps, but only when connecting to devices on same router

I did the google speed test from my wirelessly connected laptop and measured 20mbps down, 10mbps up (about as expected for my internet connection).
However, any speed test (using iperf) from my laptop to anything physically connected to the router (tried my ubuntu samba server and my raspberry pi) is limited to 2mbps.
The connection between the pi and the samba server (physically connected but via a second router) was 50mbps.
There isn’t anything in simple queues that looks like it would cause this and I have no idea where else to look.