chore: sdk compiles almost w/o warnings?
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include "tcpip.h"
|
||||
#include <osdep_service.h>
|
||||
#include <device_lock.h>
|
||||
#include "wifi_promisc.h"
|
||||
// #include "dhcp.h"
|
||||
|
||||
#if CONFIG_EXAMPLE_WLAN_FAST_CONNECT || CONFIG_JD_SMART
|
||||
#include "wlan_fast_connect/example_wlan_fast_connect.h"
|
||||
@@ -67,7 +69,7 @@ static unsigned char ap_bssid[6];
|
||||
#if CONFIG_WIFI_IND_USE_THREAD
|
||||
static void* disconnect_sema = NULL;
|
||||
#endif
|
||||
extern rtw_mode_t wifi_mode;
|
||||
rtw_mode_t wifi_mode = RTW_MODE_STA;
|
||||
static rtw_wpa_mode wifi_wpa_mode = WPA_AUTO_MODE;
|
||||
|
||||
int error_flag = RTW_UNKNOWN;
|
||||
@@ -460,7 +462,7 @@ static void wifi_handshake_done_hdl( char* buf, int buf_len, int flags, void* us
|
||||
if(join_user_data != NULL)
|
||||
rtw_up_sema(&join_user_data->join_sema);
|
||||
}
|
||||
|
||||
extern void dhcp_stop(struct netif *netif);
|
||||
static void wifi_disconn_hdl( char* buf, int buf_len, int flags, void* userdata)
|
||||
{
|
||||
#define REASON_4WAY_HNDSHK_TIMEOUT 15
|
||||
@@ -871,7 +873,7 @@ int wifi_connect(
|
||||
|
||||
error:
|
||||
if(semaphore == NULL){
|
||||
rtw_free_sema( &join_semaphore);
|
||||
rtw_free_sema((_sema*)&join_semaphore);
|
||||
}
|
||||
join_user_data = NULL;
|
||||
rtw_free((u8*)join_result);
|
||||
@@ -1021,11 +1023,11 @@ int wifi_connect_bssid(
|
||||
rtw_free(join_result->network_info.password);
|
||||
}
|
||||
rtw_free((u8*)join_result);
|
||||
rtw_free_sema( &join_semaphore);
|
||||
rtw_free_sema((_sema*)&join_semaphore);
|
||||
result = RTW_TIMEOUT;
|
||||
goto error;
|
||||
} else {
|
||||
rtw_free_sema( &join_semaphore );
|
||||
rtw_free_sema((_sema*)&join_semaphore);
|
||||
if(join_result->network_info.password_len) {
|
||||
rtw_free(join_result->network_info.password);
|
||||
}
|
||||
@@ -1283,7 +1285,7 @@ int wifi_connect_concurrent(
|
||||
|
||||
error:
|
||||
if(semaphore == NULL){
|
||||
rtw_free_sema( &join_semaphore);
|
||||
rtw_free_sema((_sema*)&join_semaphore);
|
||||
}
|
||||
join_user_data = NULL;
|
||||
rtw_free((u8*)join_result);
|
||||
@@ -1433,11 +1435,11 @@ int wifi_connect_bssid_concurrent(
|
||||
rtw_free(join_result->network_info.password);
|
||||
}
|
||||
rtw_free((u8*)join_result);
|
||||
rtw_free_sema( &join_semaphore);
|
||||
rtw_free_sema((_sema*)&join_semaphore);
|
||||
result = RTW_TIMEOUT;
|
||||
goto error;
|
||||
} else {
|
||||
rtw_free_sema( &join_semaphore );
|
||||
rtw_free_sema((_sema*)&join_semaphore);
|
||||
if(join_result->network_info.password_len) {
|
||||
rtw_free(join_result->network_info.password);
|
||||
}
|
||||
@@ -1681,6 +1683,7 @@ int wifi_get_channel_plan(uint8_t *channel_plan)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
extern int rltk_wlan_get_sta_max_data_rate(u8 *inidata_rate);
|
||||
int wifi_get_sta_max_data_rate(OUT u8 * inidata_rate)
|
||||
{
|
||||
return rltk_wlan_get_sta_max_data_rate(inidata_rate);
|
||||
@@ -1995,7 +1998,7 @@ int wifi_set_power_mode(unsigned char ips_mode, unsigned char lps_mode)
|
||||
|
||||
int wifi_set_powersave_level(u8 level)
|
||||
{
|
||||
return rltk_set_lps_level(level);
|
||||
// return rltk_set_lps_level(level);
|
||||
}
|
||||
|
||||
int wifi_set_tdma_param(unsigned char slot_period, unsigned char rfon_period_len_1, unsigned char rfon_period_len_2, unsigned char rfon_period_len_3)
|
||||
@@ -2017,7 +2020,7 @@ static void wifi_ap_sta_assoc_hdl( char* buf, int buf_len, int flags, void* user
|
||||
{
|
||||
#ifdef CONFIG_PLATFORM_8711B
|
||||
if(enable_softap_adjust_phy){
|
||||
softap_adjust_phy();
|
||||
// softap_adjust_phy();
|
||||
}
|
||||
#endif
|
||||
//USER TODO
|
||||
@@ -2056,6 +2059,7 @@ int wifi_set_pmk_cache_enable(unsigned char value)
|
||||
}
|
||||
#endif
|
||||
|
||||
extern int set_hidden_ssid(const char *ifname, uint8_t value);
|
||||
int wifi_start_ap(
|
||||
char *ssid,
|
||||
rtw_security_t security_type,
|
||||
@@ -2154,7 +2158,7 @@ int wifi_start_ap(
|
||||
// for adjust/recover phy parameters before/after link on softap mode
|
||||
#ifdef CONFIG_PLATFORM_8711B
|
||||
if(enable_softap_adjust_phy){
|
||||
softap_adjust_phy();
|
||||
// softap_adjust_phy();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2523,7 +2527,7 @@ int wifi_scan_networks_with_ssid_by_extended_security(int (results_handler)(char
|
||||
return RTW_NOMEM;
|
||||
}
|
||||
|
||||
rltk_wlan_enable_scan_with_ssid_by_extended_security(1);
|
||||
// rltk_wlan_enable_scan_with_ssid_by_extended_security(1);
|
||||
|
||||
//set ssid
|
||||
memset(scan_buf.buf, 0, scan_buf.buf_len);
|
||||
@@ -2934,7 +2938,7 @@ int wifi_get_setting(const char *ifname, rtw_wifi_setting_t *pSetting)
|
||||
int ret = 0;
|
||||
int mode = 0;
|
||||
unsigned short security = 0;
|
||||
unsigned int auth_type = 0;
|
||||
u32 auth_type = 0;
|
||||
|
||||
memset(pSetting, 0, sizeof(rtw_wifi_setting_t));
|
||||
if(wext_get_mode(ifname, &mode) < 0)
|
||||
|
||||
Reference in New Issue
Block a user