Hope that your printer was in DHCP mode initially. If yes, just login into modem web interface , disable its security , enable its dhcp , let printer take the IP. There will be optionin Modem interface to check which devices are connected using wireless. Login into Printers web interface , setup the wireless security key and ip address you want and reboot the printer . Now setup up same key in wifi modem and reboot.
You should get the thing working. One more thing You might have to change the IP port in printer driver already installed.