I've dealt with this PS3 wireless error quite a bit and I just figured out a resolution. Go into your wi-fi router's settings, go to the DHCP/wi-fi settings, look for your primary and secondary DNS servers, enter the same IP address as your gateway IP. For example (this differs from different wi-fi router brands), if your gateway IP address is 192.1.1.0, then make your primary and secondary DNS servers 192.1.1.0.
Also, I changed the channel on my 2.4 GHz frequency from auto to 5, auto is the default.
You can assign an IP address to your PS3 but make sure it's within the range of your DHCP pool, for example if the range is 192.1.1.1 -192.1.1.199, then choose 192.1.1.10, or whatever other number you want as long as it's within this range.
On your PS3 this has to be all done manually on wireless IP, subnet, gateway and DNS settings, leave all other settings on default.
On a side note, I hope Sony makes it easier for people to connect their wireless since I never have this problem on my iPhone, TV, DirecTV wi-fi AP, laptop or tablet, and they're all connected on the same wi-fi router.
Also, why Sony doesn't include WPS in addition to the AOSS standard for connecting wireless devices? WPS is far more prevalent than AOSS, which is usually only used by Buffao wi-fi routers. WPS is more universal while AOSS is not. Enabling WPS would bypass all of these problems.