I am working on openwrt build 18.06.1.
I have configured wifi as sta but i am not able to ping.
cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan_eth0'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.5.1'
option netmask '255.255.255.0'
config interface 'wifi'
option proto 'dhcp'
cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel 'auto'
option country 'TW'
option hwmode '11g'
option path 'platform/10300000.wmac'
option htmode 'HT20'
option disabled '0'
config wifi-iface
option device 'radio0'
option network 'wifi'
option mode 'sta'
option seq '1'
option ssid 'Router'
option encryption 'psk2'
option key routermodem123''
root@openwrt:/# ifconfig
eth0 Link encap:Ethernet HWaddr 9C:65:F9:1B:F3:94
inet addr:192.168.5.1 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::9e65:f9ff:fe1b:f394/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17091 errors:0 dropped:0 overruns:0 frame:0
TX packets:17069 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1769750 (1.6 MiB) TX bytes:5305819 (5.0 MiB)
Interrupt:5
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1167 errors:0 dropped:0 overruns:0 frame:0
TX packets:1167 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:79420 (77.5 KiB) TX bytes:79420 (77.5 KiB)
wlan0 Link encap:Ethernet HWaddr 9C:30:32:39:39:65
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Below is error i got when i used the command /etc/init.d/network restart
[ 4619.753171] wlan0: deauthenticated from be:2f:3d:df:1d:df (Reason: 3=DEAUTH_LEAVING)
[ 4674.489826] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready