mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2025-07-31 20:31:05 +00:00
update + NAT + rtlbtool
This commit is contained in:
parent
b381813514
commit
54bf751b9c
62 changed files with 2268 additions and 3067 deletions
|
|
@ -904,16 +904,17 @@ int wifi_off(void) {
|
|||
|
||||
uint32 timeout = xTaskGetTickCount();
|
||||
|
||||
if ((rltk_wlan_running(WLAN0_IDX) == 0)
|
||||
&& (rltk_wlan_running(WLAN1_IDX) == 0)) {
|
||||
info_printf("WIFI is not running\n");
|
||||
wifi_mode = RTW_MODE_NONE;
|
||||
return 0;
|
||||
}
|
||||
#if CONFIG_LWIP_LAYER
|
||||
dhcps_deinit();
|
||||
LwIP_DHCP(0, DHCP_STOP);
|
||||
LwIP_DHCP(1, DHCP_STOP);
|
||||
#endif
|
||||
if ((rltk_wlan_running(WLAN0_IDX) == 0)
|
||||
&& (rltk_wlan_running(WLAN1_IDX) == 0)) {
|
||||
info_printf("WIFI is not running\n");
|
||||
return 0;
|
||||
}
|
||||
info_printf("Deinitializing WIFI ...\n");
|
||||
|
||||
#if defined(CONFIG_ENABLE_WPS_AP) && CONFIG_ENABLE_WPS_AP
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
#include "main.h"
|
||||
#include "wifi_user_set.h"
|
||||
|
||||
#if 1
|
||||
#if 0
|
||||
#undef debug_printf
|
||||
#define debug_printf(fmt, ...) rtl_printf(fmt, ##__VA_ARGS__)
|
||||
#undef info_printf
|
||||
|
|
@ -701,6 +701,9 @@ int wifi_run(rtw_mode_t mode) {
|
|||
switch(mode) {
|
||||
case RTW_MODE_STA_AP:
|
||||
ret = wifi_run_ap() | wifi_run_st();
|
||||
#if IP_NAPT
|
||||
xnetif[WLAN_AP_NETIF_NUM].napt = 1;
|
||||
#endif
|
||||
// _wext_enable_powersave(0, 0, 0);
|
||||
break;
|
||||
case RTW_MODE_STA:
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "wifi_constants.h"
|
||||
#include "queue.h"
|
||||
|
||||
/* Get one byte from the 4-byte address */
|
||||
#ifndef ip4_addr1
|
||||
#define ip4_addr1(ipaddr) (((uint8_t*)(ipaddr))[0])
|
||||
#define ip4_addr2(ipaddr) (((uint8_t*)(ipaddr))[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue