From e2299422dad4ba1ae4f23c4f11af3329f91c11f3 Mon Sep 17 00:00:00 2001 From: l30052082 Date: Wed, 20 Dec 2023 20:17:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9chr=E6=89=93=E7=82=B9wifi?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=A4=B1=E8=B4=A5=E7=8E=87=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: l30052082 --- .../wifi_manage/wifi_sta/sta_state_machine.cpp | 4 ++++ .../wifi_manage/wifi_sub_manage/wifi_sta_manager.cpp | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_sta/sta_state_machine.cpp b/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_sta/sta_state_machine.cpp index b60c4df2f..fc346b61b 100644 --- a/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_sta/sta_state_machine.cpp +++ b/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_sta/sta_state_machine.cpp @@ -1499,6 +1499,8 @@ ErrCode StaStateMachine::StartConnectToNetwork(int networkId) StopTimer(static_cast(CMD_NETWORK_CONNECT_TIMEOUT)); StartTimer(static_cast(CMD_NETWORK_CONNECT_TIMEOUT), STA_NETWORK_CONNECTTING_DELAY); + WriteWifiOperateStateHiSysEvent(static_cast(WifiOperateType::STA_CONNECT), + static_cast(WifiOperateState::STA_CONNECTING)); return WIFI_OPT_SUCCESS; } @@ -1765,6 +1767,8 @@ void StaStateMachine::OnNetworkConnectionEvent(int networkId, std::string bssid) msg->SetParam1(networkId); msg->AddStringMessageBody(bssid); SendMessage(msg); + WriteWifiOperateStateHiSysEvent(static_cast(WifiOperateType::STA_CONNECT), + static_cast(WifiOperateState::STA_CONNECTED)); } void StaStateMachine::OnNetworkDisconnectEvent(int reason) diff --git a/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_sub_manage/wifi_sta_manager.cpp b/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_sub_manage/wifi_sta_manager.cpp index 6be587b6c..9ad3125cf 100644 --- a/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_sub_manage/wifi_sta_manager.cpp +++ b/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_sub_manage/wifi_sta_manager.cpp @@ -249,14 +249,6 @@ void WifiStaManager::DealStaConnChanged(OperateResState state, const WifiLinkedI } } switch (state) { - case OperateResState::CONNECT_CONNECTING: - WriteWifiOperateStateHiSysEvent(static_cast(WifiOperateType::STA_CONNECT), - static_cast(WifiOperateState::STA_CONNECTING)); - break; - case OperateResState::CONNECT_AP_CONNECTED: - WriteWifiOperateStateHiSysEvent(static_cast(WifiOperateType::STA_CONNECT), - static_cast(WifiOperateState::STA_CONNECTED)); - break; case OperateResState::DISCONNECT_DISCONNECTED: WriteWifiOperateStateHiSysEvent(static_cast(WifiOperateType::STA_CONNECT), static_cast(WifiOperateState::STA_DISCONNECTED));