[Feature][ZXW-285]merge P56U05 version
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: Ied657102425a179a89ef41847170152e8a5d437c
diff --git a/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c b/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c
index 14f7110..3af0113 100755
--- a/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c
+++ b/ap/app/zte_comm/wlan/src/wifi_ap_ctrl.c
@@ -1491,7 +1491,6 @@
}
}
}
-//zw.wang WiFi for MAC is obtained from firmware and set on 20240508 start
#if defined(CONFIG_WIFI_EFUSE_MAC)
int wifi_fw_mac_config_ssid(struct wlan_ap_server *ap_svr)
{
@@ -1516,12 +1515,13 @@
sc_cfg_set("at_wifi_mac", fake_at_wifi_mac);
get_mac_config_ssid_key_nv();
- //wlan_ap_get_para(ap_svr);
- //wlan_ap_save_config(ap_svr);
+#ifndef USE_CAP_SUPPORT
+ wlan_ap_get_para(ap_svr);//D80 update when ap start
+ wlan_ap_save_config(ap_svr);
+#endif
}
return 0;
}
-//zw.wang WiFi for MAC is obtained from firmware and set on 20240508 end
#endif
#ifdef USE_CAP_SUPPORT
@@ -2499,9 +2499,9 @@
*/
void wlan_basic_restart_apsta()
{
- char m_ssid_enable[8] = {0};
- sc_cfg_get("m_ssid_enable", m_ssid_enable, sizeof (m_ssid_enable));
- if (strcmp(m_ssid_enable, "1") == 0) {
+ //when multi-ssid to apsta, goahead has set m_ssid_enable to 0
+ //sc_cfg_get("m_ssid_enable", m_ssid_enable, sizeof (m_ssid_enable));
+ if (1 == ap_server->ap1_state) {
write_status (WIFISTATUS, WIFI_CLOSED);
clear_sta_count_nv();
//close mssid
diff --git a/ap/app/zte_comm/wlan/src/wlan-station.c b/ap/app/zte_comm/wlan/src/wlan-station.c
index 1be786d..ea2efcd 100755
--- a/ap/app/zte_comm/wlan/src/wlan-station.c
+++ b/ap/app/zte_comm/wlan/src/wlan-station.c
@@ -1607,6 +1607,14 @@
//channel
#ifdef USE_CAP_SUPPORT
+ if (signal <= 0 && signal > -128) {
+ scan_result->signal_db = (signed char)signal;
+ }
+ else {
+ scan_result->signal_db = (signed char)(-128);
+ }
+ //scan_result->ch_freq = frequency;
+
scan_result->channel = frequency_to_channel(frequency);
#else
switch (frequency) {
@@ -2897,7 +2905,9 @@
scan_list.info[i].auth = transe_sta_auth_mode(g_scan_result_list_p[i]->auth_mode);
scan_list.info[i].cipher = transe_sta_encrypt_type(g_scan_result_list_p[i]->encrypt_type);
scan_list.info[i].channel = g_scan_result_list_p[i]->channel;
+ //scan_list.info[i].frequency = g_scan_result_list_p[i]->ch_freq;
scan_list.info[i].signal_level = g_scan_result_list_p[i]->signal;
+ scan_list.info[i].signal = g_scan_result_list_p[i]->signal_db;
strncpy(scan_list.info[i].essid, g_scan_result_list_p[i]->ssid, sizeof(scan_list.info[i].essid)-1);
strncpy(scan_list.info[i].bssid, g_scan_result_list_p[i]->mac, sizeof(scan_list.info[i].bssid)-1);
scan_list.cnt++;
diff --git a/ap/app/zte_comm/wlan/src/wlan_config_ssid.c b/ap/app/zte_comm/wlan/src/wlan_config_ssid.c
index 663203f..307fd22 100755
--- a/ap/app/zte_comm/wlan/src/wlan_config_ssid.c
+++ b/ap/app/zte_comm/wlan/src/wlan_config_ssid.c
@@ -341,11 +341,11 @@
//snprintf(mac_cmd, sizeof(mac_cmd), "MAC_A1=%s\n", mac);
wf_log ("set_mac_conf:[%s]", mac_cmd);
wlan_write_file("/etc_rw/aic_macconfig.txt", mac_cmd);
-//zw.wang WiFi for MAC is obtained from firmware and set on 20240508 start
-#endif
+#endif
return 0;
}
-static int set_mac_at (char *mac, char *mac2)
+
+static int set_mac_at(char *mac, char *mac2)
{
#if defined(CONFIG_WIFI_EFUSE_MAC)
char mac_cmd[128]={0};
@@ -362,7 +362,7 @@
#endif
return 0;
}
-//zw.wang WiFi for MAC is obtained from firmware and set on 20240508 end
+
static VOID setWifiKeyForImei (CHAR* outkey, CHAR* imeistr, UINT32 num)
{
CHAR old_key[WLAN_NV_WPAPSK1_LENGTH] = {0};
@@ -552,9 +552,8 @@
make_user_mac (read_mac);
set_mac_conf(mac, m_mac);
-//zw.wang WiFi for MAC is obtained from firmware and set on 20240508 start
+
set_mac_at(read_mac, m_read_mac);
-//zw.wang WiFi for MAC is obtained from firmware and set on 20240508 end
}
diff --git a/ap/app/zte_comm/wlan/src/wlan_main.c b/ap/app/zte_comm/wlan/src/wlan_main.c
index bd738d5..d655641 100755
--- a/ap/app/zte_comm/wlan/src/wlan_main.c
+++ b/ap/app/zte_comm/wlan/src/wlan_main.c
@@ -898,10 +898,10 @@
if (idx == IN_WIFI_AP_INDEX_MAX) {
if (g_work_mode == IN_WIFI_WORK_MODE_AP1) {
- idx == IN_WIFI_AP_INDEX_AP1;
+ idx = IN_WIFI_AP_INDEX_AP1;
}
else {
- idx == IN_WIFI_AP_INDEX_AP0;
+ idx = IN_WIFI_AP_INDEX_AP0;
}
}
@@ -2049,7 +2049,7 @@
#endif
#endif
-#if !(defined(CONFIG_WIFI_EFUSE_MAC)) //zw.wang WiFi for MAC is obtained from firmware and set on 20240508
+#if !(defined(CONFIG_WIFI_EFUSE_MAC))
send_get_mac_req();
#endif
@@ -2067,7 +2067,7 @@
init_config();
-#if !(defined(CONFIG_WIFI_EFUSE_MAC)) //zw.wang WiFi for MAC is obtained from firmware and set on 20240508
+#if !(defined(CONFIG_WIFI_EFUSE_MAC))
get_mac_config_ssid_key_nv();
#endif
@@ -2114,7 +2114,7 @@
return -1;
}
-#if defined(CONFIG_WIFI_EFUSE_MAC) //zw.wang WiFi for MAC is obtained from firmware and set on 20240508
+#if defined(CONFIG_WIFI_EFUSE_MAC)
wifi_fw_mac_config_ssid(ap_server);
#endif