Is the modem just a modem or is it a modem/router. ADSL only modems are not very common.
Now if the switch is managed and supports vlans and you have multiple wall jacks going to the location where the router is.
You can define a vlan to include the port going to the modem and to the port that goes to the WAN port on the router. You would then place all the other ports in a second vlan connecting the pc and the port that goes to the router lan port to this vlan.
You have in effect done modem----vlan1----router--vlan2. Even though the both vlans are on the same switch they act as 2 separate connections.