Arduino mega 2560 how to connect to the ethernet shield.

I usually do not double post, but this may be important to you. Are you certain the wireless interface is not also 192.168.1.x/24 when it is active?

Maybe you should post the network settings for your wireless device when it is connected.