/* Copyright Statement: * * (C) 2005-2016 MediaTek Inc. All rights reserved. * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors. * Without the prior written permission of MediaTek and/or its licensors, * any reproduction, modification, use or disclosure of MediaTek Software, * and information contained herein, in whole or in part, shall be strictly prohibited. * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software * if you have agreed to and been bound by the applicable license agreement with * MediaTek ("License Agreement") and been granted explicit permission to do so within * the License Agreement ("Permitted User"). If you are not a Permitted User, * please cease any access or use of MediaTek Software immediately. * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE, * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. */ /** * @file wifi_nvdm_config.h * */ #ifndef __WIFI_NVDM_INIT_H__ #define __WIFI_NVDM_INIT_H__ #include #include "lwip/netif.h" #include "connsys_profile.h" #include "ethernetif.h" #include "dhcpd.h" #include "wifi_api.h" #include "wifi_scan.h" #ifdef __cplusplus extern "C" { #endif typedef struct { uint8_t opmode; uint8_t country_code[4]; uint8_t sta_ssid[32]; uint8_t sta_ssid_len; uint8_t sta_wpa_psk[64]; uint8_t sta_wpa_psk_len; uint8_t sta_default_key_id; uint8_t sta_bandwidth; uint8_t sta_wireless_mode; uint8_t sta_listen_interval; uint8_t sta_power_save_mode; uint8_t ap_ssid[32]; uint8_t ap_ssid_len; uint8_t ap_channel; uint8_t ap_bw; uint8_t ap_hide_ssid; uint8_t ap_auth_mode; uint8_t ap_encryp_type; uint8_t ap_wpa_psk[64]; uint8_t ap_wpa_psk_len; uint8_t ap_default_key_id; uint8_t ap_wireless_mode; uint8_t ap_dtim_interval; } wifi_cfg_t; void dhcpd_settings_init(const lwip_tcpip_config_t *tcpip_config, dhcpd_settings_t *dhcpd_settings); int32_t tcpip_config_init(lwip_tcpip_config_t *tcpip_config); int32_t wifi_config_init(wifi_cfg_t *wifi_config); int32_t dhcp_config_init(void); int32_t wifi_init_done_handler(wifi_event_t event, uint8_t *payload, uint32_t length); int save_cf_credential_to_nvdm(P_IOT_CONFIG_FREE_IE cred); int32_t save_cf_ready_to_nvdm(uint8_t config_ready); int32_t get_cf_ready_to_nvdm(uint8_t *config_ready); #ifdef __cplusplus } #endif #endif /* __WIFI_NVDM_INIT_H__ */