Skip to content

Commit

Permalink
[wifi] fix onnetwork not working
Browse files Browse the repository at this point in the history
* change definition in SHA:b29ab15276a98cdf2cfb053eebfebc4b20ebf54b from #if CHIP_PROJECT to #ifdef CHIP_PROJECT to trigger UpdateInternetConnectivityState() for onnetwork
  • Loading branch information
xshuqun committed Sep 12, 2023
1 parent bf1b08a commit 6929f3b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
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

0 comments on commit 6929f3b

Please sign in to comment.