If the switch needs to be connected directly to the router.

It would be best. Second best is a POWERLINE NETWORK BRIDGE and not so nice is a WiFi bridge.