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] remove storing wifi into dct during wifi_connect #94

Merged
merged 1 commit into from
Apr 4, 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
16 changes: 0 additions & 16 deletions component/common/api/wifi/wifi_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#include <osdep_service.h>
#include <device_lock.h>

#if CONFIG_EXAMPLE_MATTER
#include "chip_porting.h"
#endif

#if CONFIG_EXAMPLE_WLAN_FAST_CONNECT || CONFIG_JD_SMART
#include "wlan_fast_connect/example_wlan_fast_connect.h"
#if defined(CONFIG_FAST_DHCP) && CONFIG_FAST_DHCP
Expand Down Expand Up @@ -993,18 +989,6 @@ int wifi_connect(

result = RTW_SUCCESS;

// we store the wifi ssid and password in dct
// because for Matter onnetwork commissioning,
// these won't be added to network lists and won't be persisted
#if CONFIG_EXAMPLE_MATTER
// these keys need to match exactly the same keys in matter sdk, AmebaUtils.cpp
const char kWiFiSSIDKeyName[] = "wifi-ssid";
const char kWiFiCredentialsKeyName[] = "wifi-pass";

setPref_new(kWiFiSSIDKeyName, kWiFiSSIDKeyName, (uint8_t*) ssid, ssid_len);
setPref_new(kWiFiCredentialsKeyName, kWiFiCredentialsKeyName, (uint8_t*) password, password_len);
#endif

#if CONFIG_LWIP_LAYER
#if defined(CONFIG_MBED_ENABLED) || defined(CONFIG_PLATFOMR_CUSTOMER_RTOS)
//TODO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ int matter_wifi_connect(
return err;
}

int matter_get_sta_wifi_info(rtw_wifi_setting_t *pSetting)
{
return wifi_get_setting((u8*)WLAN0_NAME, pSetting);
}

int matter_wifi_disconnect(void)
{
return wifi_disconnect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ int matter_wifi_connect(
int password_len,
int key_id,
void *semaphore);
int matter_get_sta_wifi_info(rtw_wifi_setting_t *pSetting);
int matter_wifi_disconnect(void);
int matter_wifi_on(rtw_mode_t mode);
int matter_wifi_set_mode(rtw_mode_t mode);
Expand Down