Cant's code against Yun Wireless Section
WiFi library won't work with the Yun: it's meant to work only with the WiFi shield.

On the Yun, everything but the pins is connected to the linux cpu. For the microcontroller to use all the devices available to linux, including wifi, you need to use the Bridge library. Try running example WifiStatus (Examples -> Bridge -> WifiStatus)

A drop in replacement (almost) of both Ethernet and WiFi libraries is the YunClient/YunServer pair, part of the Bridge library. Check out the docs at http://arduino.cc/en/Reference/YunBridgeLibrary.