1. Reset Yun to factory default by:

reset-to-factory-anyway
reboot

( backup your own data )

2. Setup WIFI STA mode:

STA for managed (client) mode

3. SSH to wifi ip address:

nano /mnt/sda1/setwandhcp.sh
#!/bin/ash
uci set network.wan.proto=static
uci set network.wan.ipaddr=192.168.241.1
uci set network.wan.netmask=255.255.255.0
uci commit network
uci set dhcp.wan.start=100
uci set dhcp.wan.limit=150
uci set dhcp.wan.leasetime=12h
uci set dhcp.wan.ignore=0
uci commit dhcp
/etc/init.d/dnsmasq restart
/etc/init.d/network restart
chmod 755 /mnt/sda1/setwandhcp.sh

/mnt/sda1/setwandhcp.sh

4. Testing:

Connect ethernet cable between Yun and PC, PC as DHCP client.