menu "WLAN"
menuconfig OS_USING_WIFI
    bool "Using Wi-Fi framework"
    default n

    if OS_USING_WIFI
        config OS_WLAN_DEVICE_STA_NAME
            string "The device name for station"
            default "wlan0"

        config OS_WLAN_DEVICE_AP_NAME
            string "The device name for ap"
            default "wlan1"

        config OS_WLAN_SSID_MAX_LENGTH
            int "SSID maximum length"
            default 32

        config OS_WLAN_PASSWORD_MAX_LENGTH
            int "Password maximum length"
            default 32

        config OS_WLAN_DEV_EVENT_NUM
            int "Driver events maxcount"
            default 2

        config OS_WLAN_MANAGE_ENABLE
            bool "Connection management Enable"
            default y

        if OS_WLAN_MANAGE_ENABLE
            config OS_WLAN_SCAN_WAIT_MS
                int "Set scan timeout time(ms)"
                default 10000

            config OS_WLAN_CONNECT_WAIT_MS
                int "Set connect timeout time(ms)"
                default 10000

            config OS_WLAN_SCAN_SORT
                bool "Automatic sorting of scan results"
                default y

            config OS_WLAN_MSH_CMD_ENABLE
                bool "MSH command Enable"
                default y

            config OS_WLAN_AUTO_CONNECT_ENABLE
                bool "Auto connect Enable"
                select OS_WLAN_CFG_ENABLE
                select OS_WLAN_WORK_TASK_ENABLE
                default y

            if OS_WLAN_AUTO_CONNECT_ENABLE
                config AUTO_CONNECTION_PERIOD_MS
                    int "Auto connect period(ms)"
                    default 2000
            endif
        endif

        config OS_WLAN_CFG_ENABLE
            bool "WiFi information automatically saved Enable"
            default y

        if OS_WLAN_CFG_ENABLE
            config OS_WLAN_CFG_INFO_MAX
                int "Maximum number of WiFi information automatically saved"
                default 3
        endif

        config OS_WLAN_PROT_ENABLE
            bool "Transport protocol manage Enable"
            default y

        if OS_WLAN_PROT_ENABLE
            config OS_WLAN_PROT_NAME_LEN
                int "Transport protocol name length"
                default 8

            config OS_WLAN_PROT_MAX
                int "Transport protocol maxcount"
                default 2

            config OS_WLAN_DEFAULT_PROT
                string "Default transport protocol"
                default "lwip"

            config OS_WLAN_PROT_LWIP_ENABLE
                bool "LWIP transport protocol Enable"
                select NET_USING_LWIP
                default y

            if OS_WLAN_PROT_LWIP_ENABLE
                config OS_WLAN_PROT_LWIP_NAME
                    string "LWIP transport protocol name"
                    default "lwip"

                config OS_WLAN_PROT_LWIP_PBUF_FORCE
                    bool "Forced use of PBUF transmission"
                    default n
            endif
        endif

        config OS_WLAN_WORK_TASK_ENABLE
            bool "WLAN work queue task Enable"
            default y

        if OS_WLAN_WORK_TASK_ENABLE
            config OS_WLAN_WORKQUEUE_TASK_NAME
                string "WLAN work queue task name"
                default "wlan"

            config OS_WLAN_WORKQUEUE_TASK_SIZE
                int "WLAN work queue task size"
                default 2048

            config OS_WLAN_WORKQUEUE_TASK_PRIO
                int "WLAN work queue task priority"
                default 15
        endif

        menuconfig OS_WLAN_DEBUG
            bool "Enable WLAN Debugging Options"
            default n

        if OS_WLAN_DEBUG
            config OS_WLAN_CMD_DEBUG
                bool "Enable Debugging of wlan_cmd.c"
                default n

            config OS_WLAN_MGNT_DEBUG
                bool "Enable Debugging of wlan_mgnt.c"
                default n

            config OS_WLAN_DEV_DEBUG
                bool "Enable Debugging of wlan_dev.c"
                default n

            config OS_WLAN_PROT_DEBUG
                bool "Enable Debugging of wlan_prot.c"
                default n

            config OS_WLAN_CFG_DEBUG
                bool "Enable Debugging of wlan_cfg.c"
                default n

            config OS_WLAN_LWIP_DEBUG
                bool "Enable Debugging of wlan_lwip.c"
                default n
        endif        
    endif
    
    source "$OS_ROOT/drivers/wlan/ap6181/Kconfig"
endmenu
