Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wifi] fix onnetwork not working #162

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions component/common/api/lwip_netconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ uint8_t LwIP_DHCP6(uint8_t idx, uint8_t dhcp6_state)

/*Todo: error_flag for DHCPv6*/

#if CHIP_PROJECT
wifi_indication(WIFI_EVENT_DHCP6_DONE, NULL, 0, 0);
#ifdef CHIP_PROJECT
wifi_indication(WIFI_EVENT_DHCP6_DONE, NULL, 0, 0);
#endif
return DHCP6_ADDRESS_ASSIGNED;
}
Expand All @@ -619,7 +619,7 @@ uint8_t LwIP_DHCP6(uint8_t idx, uint8_t dhcp6_state)
if(idx == NET_IF_NUM -1) // This is the ethernet interface, set it up for static ip address
netif_set_up(pnetif);
#endif
#if CHIP_PROJECT
#ifdef CHIP_PROJECT
wifi_indication(WIFI_EVENT_DHCP6_DONE, NULL, 0, 0);
#endif
return DHCP6_TIMEOUT;
Expand Down
6 changes: 3 additions & 3 deletions component/common/api/wifi/wifi_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ extern int rltk_set_mode_posthandle(rtw_mode_t curr_mode, rtw_mode_t next_mode,
#ifdef CONFIG_PMKSA_CACHING
extern int wifi_set_pmk_cache_enable(unsigned char value);
#endif
#if CHIP_PROJECT
#ifdef CHIP_PROJECT
extern u8 matter_wifi_trigger;
extern void matter_wifi_autoreconnect_hdl(rtw_security_t security_type, char *ssid, int ssid_len, char *password, int password_len, int key_id);
#endif
Expand Down Expand Up @@ -694,7 +694,7 @@ static void wifi_disconn_hdl( char* buf, int buf_len, int flags, void* userdata)
}
#endif

#if CHIP_PROJECT
#ifdef CHIP_PROJECT
if(matter_wifi_trigger) {
join_user_data = NULL;

Expand Down Expand Up @@ -3365,7 +3365,7 @@ int wifi_config_autoreconnect(__u8 mode, __u8 retry_times, __u16 timeout)
{
if(mode == RTW_AUTORECONNECT_DISABLE)
p_wlan_autoreconnect_hdl = NULL;
#if CHIP_PROJECT
#ifdef CHIP_PROJECT
else if (matter_wifi_trigger)
p_wlan_autoreconnect_hdl = matter_wifi_autoreconnect_hdl;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ enum _WIFI_EVENT_INDICATE{
WIFI_EVENT_TARGET_SSID_RSSI = 26,
WIFI_EVENT_DHCP_RENEW = 27,
WIFI_EVENT_SWITCH_CHANNE = 28,
#if CHIP_PROJECT
#ifdef CHIP_PROJECT
WIFI_EVENT_DHCP6_DONE = 29,
#endif
WIFI_EVENT_MAX,
Expand Down
2 changes: 1 addition & 1 deletion component/common/network/lwip/lwip_v2.1.2/src/core/netif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit)

LWIP_ASSERT("netif_create_ip6_linklocal_address: invalid netif", netif != NULL);

#if CHIP_PROJECT
#ifdef CHIP_PROJECT
/*Realtek Added Start*/
if(ip6_addr_isvalid(netif_ip6_addr_state(netif, 0))){
printf("IPv6 Linklocal address already exist\n");
Expand Down