WiFi AP mode

/etc/config/dhcp

Add:

config dhcp 'wifi'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option interface 'wifi'

/etc/config/wireless

Change:

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11ng'
        option macaddr 'c4:93:00:00:26:d6'  <<< replace with your MAC it will not work othervise
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'RX-STBC1'
        list ht_capab 'DSSS_CCK-40'
        option disabled '0'
        option txpower '5'

config wifi-iface
        option device 'radio0'
        option network  wifi
        option encryption 'psk2'
        option mode 'ap'
        option ssid 'Carambola2'
        option key 'slaptas231'

/etc/config/network

Change:

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'eth1'
        option proto 'dhcp'

config interface 'wifi'
        option auto '1'
        option proto 'static'
        option ipaddr '192.168.9.1'
        option netmask '255.255.255.0'

/etc/config/firewall

Run UCI commands:

uci add firewall zone
uci set firewall.@zone[0].name=wifi
uci set firewall.@zone[0].network=wifi
uci set firewall.@zone[0].input=ACCEPT
uci set firewall.@zone[0].output=ACCEPT
uci commit