mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2025-07-31 20:31:05 +00:00
update
This commit is contained in:
parent
3e8794a4a3
commit
20d954e09e
186 changed files with 357 additions and 447 deletions
|
|
@ -3,8 +3,6 @@
|
|||
*
|
||||
* Copyright (c) 2013 Realtek Semiconductor Corp.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#include "wps/wps_defs.h"
|
||||
#include <platform/platform_stdlib.h>
|
||||
|
||||
extern int wpas_wps_registrar_button_pushed();
|
||||
|
||||
/*
|
||||
* @brief struct wps_credential - WPS Credential
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -550,7 +550,7 @@ int wifi_connect(
|
|||
result = RTW_TIMEOUT;
|
||||
goto error;
|
||||
} else {
|
||||
if(wifi_is_connected_to_ap( ) != RTW_SUCCESS) {
|
||||
if(rltk_wlan_is_connected_to_ap( ) != RTW_SUCCESS) {
|
||||
result = RTW_ERROR;
|
||||
goto error;
|
||||
}
|
||||
|
|
@ -570,7 +570,7 @@ int wifi_connect(
|
|||
if (join_result->network_info.password_len) {
|
||||
rtw_free(join_result->network_info.password);
|
||||
}
|
||||
if (wifi_is_connected_to_ap() != RTW_SUCCESS) {
|
||||
if (rltk_wlan_is_connected_to_ap() != RTW_SUCCESS) {
|
||||
result = RTW_ERROR;
|
||||
goto error;
|
||||
}
|
||||
|
|
@ -889,6 +889,7 @@ int wifi_off(void) {
|
|||
|
||||
#if defined(CONFIG_ENABLE_WPS_AP) && CONFIG_ENABLE_WPS_AP
|
||||
// @todo
|
||||
extern void wpas_wps_deinit();
|
||||
wpas_wps_deinit();
|
||||
#endif
|
||||
rltk_wlan_deinit();
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ int wext_send_eapol(const char *ifname, char *buf, __u16 buf_len, __u16 flags) {
|
|||
return iw_ioctl(ifname, SIOCSIWEAPOLSEND, &iwr);
|
||||
}
|
||||
|
||||
#if CONFIG_ENABLE_P2P
|
||||
//#if CONFIG_ENABLE_P2P
|
||||
int wext_send_mgnt(const char *ifname, char *buf, __u16 buf_len, __u16 flags) {
|
||||
struct iwreq iwr;
|
||||
memset(&iwr, 0, sizeof(iwr));
|
||||
|
|
@ -909,7 +909,7 @@ int wext_send_mgnt(const char *ifname, char *buf, __u16 buf_len, __u16 flags) {
|
|||
iwr.u.data.flags = flags;
|
||||
return iw_ioctl(ifname, SIOCSIWMGNTSEND, &iwr);
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
int wext_set_gen_ie(const char *ifname, char *buf, __u16 buf_len, __u16 flags) {
|
||||
struct iwreq iwr;
|
||||
|
|
|
|||
|
|
@ -552,13 +552,21 @@ LOCAL int _wifi_on(rtw_mode_t mode) {
|
|||
chk_ap_netif_num();
|
||||
|
||||
// set wifi mib
|
||||
wext_set_adaptivity(wifi_cfg.adaptivity & 3); // rtw_adaptivity_mode_t
|
||||
// extern uint8_t rtw_adaptivity_en;
|
||||
// rtw_adaptivity_en = 0;
|
||||
// wext_set_adaptivity(RTW_ADAPTIVITY_DISABLE); // rtw_adaptivity_mode_t
|
||||
wext_set_adaptivity(wifi_cfg.adaptivity & 3);
|
||||
|
||||
debug_printf("Wlan0 init...\n");
|
||||
|
||||
ret = rltk_wlan_init(WLAN0_IDX, mode); // rtw_mode_t
|
||||
|
||||
debug_printf("netif_set_up 0...\n");
|
||||
|
||||
netif_set_up(&xnetif[0]);
|
||||
if (ret < 0) return ret;
|
||||
if(devnum) {
|
||||
debug_printf("Wlan1 init...\n");
|
||||
ret = rltk_wlan_init(WLAN1_IDX, mode);
|
||||
if (ret < 0) return ret;
|
||||
netif_set_up(&xnetif[1]);
|
||||
|
|
@ -567,15 +575,17 @@ LOCAL int _wifi_on(rtw_mode_t mode) {
|
|||
netif_set_down(&xnetif[1]);
|
||||
}
|
||||
|
||||
debug_printf("Wlan start...\n");
|
||||
|
||||
uint32 timeout = xTaskGetTickCount();
|
||||
rltk_wlan_start(WLAN0_IDX);
|
||||
if(devnum) rltk_wlan_start(WLAN1_IDX);
|
||||
while (1) {
|
||||
if (rltk_wlan_running(WLAN0_IDX)
|
||||
&& rltk_wlan_running(devnum) ) {
|
||||
#if CONFIG_DEBUG_LOG > 2
|
||||
printf("WIFI initialized (%d ms)\n", xTaskGetTickCount() - timeout);
|
||||
#endif
|
||||
//#if CONFIG_DEBUG_LOG > 2
|
||||
debug_printf("WIFI initialized (%d ms)\n", xTaskGetTickCount() - timeout);
|
||||
//#endif
|
||||
break;
|
||||
}
|
||||
if(xTaskGetTickCount() - timeout > wifi_test_timeout_ms/portTICK_RATE_MS) {
|
||||
|
|
@ -648,6 +658,10 @@ int wifi_run(rtw_mode_t mode) {
|
|||
error_printf("Wifi On failed!\n");
|
||||
goto error_end;
|
||||
};
|
||||
/*
|
||||
if(wifi_cfg.adaptivity)
|
||||
wext_set_adaptivity(wifi_cfg.adaptivity & 3);
|
||||
*/
|
||||
if(wifi_set_country(wifi_cfg.country_code) != RTW_SUCCESS) {
|
||||
error_printf("WiFi: Error set tx country_code (%d)!", wifi_cfg.country_code);
|
||||
};
|
||||
|
|
@ -692,9 +706,11 @@ int wifi_run(rtw_mode_t mode) {
|
|||
case RTW_MODE_STA:
|
||||
ret = wifi_run_st();
|
||||
if(_wext_set_lps_dtim(0, wifi_st_cfg.dtim)!= RTW_SUCCESS) {
|
||||
error_printf("WiFi: Error set DTIM(%d)!", wifi_st_cfg.dtim);
|
||||
error_printf("WiFi: Error set DTIM(%d)!", wifi_st_cfg.dtim);
|
||||
};
|
||||
if(_wext_enable_powersave(0, wifi_st_cfg.sleep & 1, (wifi_st_cfg.sleep >> 1) & 1) != RTW_SUCCESS) {
|
||||
// rtw_pm_set_ips(get_padaptern(0), wifi_st_cfg.sleep & 1 );
|
||||
// rtw_pm_set_lps(get_padaptern(0), (wifi_st_cfg.sleep >> 1) & 1 );
|
||||
error_printf("WiFi: Error set powersave mode!");
|
||||
};
|
||||
break;
|
||||
|
|
@ -887,3 +903,22 @@ int show_wifi_ap_clients(void) {
|
|||
printf("Get AP clients error!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
extern int max_skbbuf_used_num, skbbuf_used_num, max_skbdata_used_num, skbdata_used_num, max_timer_used_num;
|
||||
void show_wlan_info(int idx)
|
||||
{
|
||||
if(rltk_wlan_info[idx].enable) {
|
||||
struct net_device_stats * stats = rltk_wlan_info[idx].dev->get_stats(rltk_wlan_info[idx].dev);
|
||||
if(stats) {
|
||||
printf("\tTotal %d packets received (%d bytes), dropped %d\n", stats->rx_packets, stats->rx_bytes, stats->rx_dropped);
|
||||
printf("\tTotal %d packets transmitted (%d bytes), dropped %d\n", stats->tx_packets, stats->tx_bytes, stats->tx_dropped);
|
||||
printf("\tRX fifo overflow count %d\n", stats->rx_overflow);
|
||||
|
||||
printf("\tMax skb %d bufers used, buffers %d\n", max_skbbuf_used_num, skbbuf_used_num);
|
||||
printf("\tMax skb %d data used, data %d\n", max_skbdata_used_num, skbdata_used_num);
|
||||
printf("\tMax %d timers used\n", max_timer_used_num);
|
||||
// printf("\tMax %d timers used, timers %d\n", max_timer_used_num, timer_used_num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ void show_wifi_st_ip(void);
|
|||
void show_wifi_cfg(void);
|
||||
void show_wifi_st_cfg(void);
|
||||
void show_wifi_ap_cfg(void);
|
||||
void show_wlan_info(int idx);
|
||||
int show_wifi_ap_clients(void);
|
||||
uint32 read_wifi_cfg(uint32 flg);
|
||||
uint32 write_wifi_cfg(uint32 flg);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
*
|
||||
* Copyright (c) 2013 Realtek Semiconductor Corp.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*/
|
||||
|
||||
#ifndef _XMPORT_LOGUART_H_
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
*
|
||||
* Copyright (c) 2013 Realtek Semiconductor Corp.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*/
|
||||
|
||||
#ifndef _XMPORT_UART_H_
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
#ifndef __IEEE80211_H
|
||||
#define __IEEE80211_H
|
||||
|
||||
#include "wlan_bssdef.h"
|
||||
|
||||
#ifndef CONFIG_RTL8711FW
|
||||
|
||||
// #include <drv_types.h>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#ifndef __RTW_CMD_H_
|
||||
#define __RTW_CMD_H_
|
||||
|
||||
#include "drv_types.h"
|
||||
#include <rtw_rf.h>
|
||||
#include <rtw_led.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*
|
||||
*
|
||||
* Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved.
|
||||
******************************************************************************
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "osdep_service.h"
|
||||
#include "freertos/wrapper.h"
|
||||
#include "rtl_bios_data.h"
|
||||
#include "rtw_cmd.h"
|
||||
|
||||
#define _atr_aligned2_ __attribute__((aligned(2)))
|
||||
#define _atr_aligned4_ __attribute__((aligned(4)))
|
||||
|
|
@ -739,6 +740,23 @@ struct evt_priv {
|
|||
uint32_t evt_done_cnt;
|
||||
};
|
||||
|
||||
struct dvobj_priv {
|
||||
void *if1;
|
||||
void *if2;
|
||||
void *padapters[2];
|
||||
uint8_t iface_nums;
|
||||
uint8_t RtOutPipe[3];
|
||||
uint8_t Queue2Pipe[8];
|
||||
uint8_t irq_alloc;
|
||||
uint8_t irq_enabled;
|
||||
_lock irq_th_lock;
|
||||
};
|
||||
|
||||
struct fifo_more_data {
|
||||
uint32_t more_data;
|
||||
uint32_t len;
|
||||
};
|
||||
|
||||
struct _io_ops {
|
||||
int (*init_io_priv)(struct dvobj_priv *);
|
||||
int (*write8_endian)(struct dvobj_priv *, uint32_t, uint32_t, uint32_t);
|
||||
|
|
@ -1227,18 +1245,6 @@ typedef struct net_device *_nic_hdl;
|
|||
};
|
||||
*/
|
||||
|
||||
struct dvobj_priv {
|
||||
void *if1;
|
||||
void *if2;
|
||||
void *padapters[2];
|
||||
uint8_t iface_nums;
|
||||
uint8_t RtOutPipe[3];
|
||||
uint8_t Queue2Pipe[8];
|
||||
uint8_t irq_alloc;
|
||||
uint8_t irq_enabled;
|
||||
_lock irq_th_lock;
|
||||
};
|
||||
|
||||
struct phy_info {
|
||||
uint8_t RxPWDBAll;
|
||||
uint8_t SignalQuality;
|
||||
|
|
@ -1484,11 +1490,6 @@ struct sta_info {
|
|||
};
|
||||
*/
|
||||
|
||||
struct fifo_more_data {
|
||||
uint32_t more_data;
|
||||
uint32_t len;
|
||||
};
|
||||
|
||||
struct hw_xmit {
|
||||
_queue *sta_queue;
|
||||
int accnt;
|
||||
|
|
@ -1877,7 +1878,6 @@ enum _PS_BBRegBackup_ // : sint32_t
|
|||
};
|
||||
typedef struct _power_mgn_ Power_Mgn;
|
||||
|
||||
/*
|
||||
// hal_gpio.h
|
||||
enum $E1AD70AB12E7AA6E98B8D89D9B965EB5 //: sint32_t
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*
|
||||
*
|
||||
* Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved.
|
||||
******************************************************************************
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include <skbuff.h>
|
||||
#ifdef PLATFORM_FREERTOS
|
||||
#include "freertos_service.h"
|
||||
#include "osdep_service.h"
|
||||
#elif defined(PLATFORM_CMSIS_RTOS)
|
||||
#include "rtx_service.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
*
|
||||
* Copyright (c) 2014 Realtek Semiconductor Corp.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*/
|
||||
//#if FATFS_DISK_SD
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
*
|
||||
* Copyright (c) 2014 Realtek Semiconductor Corp.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*/
|
||||
#include "integer.h"
|
||||
#include <disk_if/inc/usbdisk.h>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
#ifndef MBED_EXT_FLASH_API_EXT_H
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2015, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "objects.h"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "objects.h"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2015, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "objects.h"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "objects.h"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
//#include "mbed_assert.h"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "objects.h"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2015, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************/
|
||||
#include "rtc_api.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*
|
||||
*******************************************************************************/
|
||||
#ifndef MBED_EXT_TIMER_API_EXT_H
|
||||
#define MBED_EXT_TIMER_API_EXT_H
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (c) 2014, Realtek Semiconductor Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This module is a confidential and proprietary property of RealTek and
|
||||
* possession or use of this module requires written permission of RealTek.
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "objects.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue