On board chip antenna has average Gain -0.5 dBi v.s. typical antenna Gain of wifi device ~4 dBi
Yun's transmit power is only 17 dBm v.s. typical Gain wifi device transmit power 27~30 dBm
Friis Transmission Formula tell us Every 6 dBi antenna gain will be double the distance
Every 6 dBm Transmitter power gain will be double the distance. Here we could reduce the distance between Yun and router or add the high gain antenna.
http://forum.arduino.cc/index.php?topic=188976.msg1580756#msg1580756
The method to boost wifi signal strength by reduce the distance:
http://forum.arduino.cc/index.php?topic=188101.msg1597626#msg1597626
Any high gain 2.4 Ghz antenna will work.
http://forum.arduino.cc/index.php?topic=188976.msg1719588#msg1719588
To confirm wifi Signal level:
http://forum.arduino.cc/index.php?topic=188101.msg1583665#msg1583665
Understanding Wifi Signal Strength:
http://forum.arduino.cc/index.php?topic=188101.msg1597553#msg1597553
Connect Yun to router with ethernet for testing purpose. It can save you a lot of headaches