From 036fe6a98808c60454cf262e9b17184b57a9554a Mon Sep 17 00:00:00 2001 From: fengye Date: Mon, 21 Nov 2022 02:16:10 +0000 Subject: [PATCH] fix Signed-off-by: fengye --- .../src/wifi_device_callback_stub_lite.cpp | 2 +- .../native/src/wifi_device_proxy_lite.cpp | 62 +++++++++---------- .../src/wifi_scan_callback_stub_lite.cpp | 2 +- .../native/src/wifi_scan_proxy_lite.cpp | 14 ++--- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/wifi/frameworks/native/src/wifi_device_callback_stub_lite.cpp b/wifi/frameworks/native/src/wifi_device_callback_stub_lite.cpp index baf1e4e7c..722278f7a 100644 --- a/wifi/frameworks/native/src/wifi_device_callback_stub_lite.cpp +++ b/wifi/frameworks/native/src/wifi_device_callback_stub_lite.cpp @@ -39,7 +39,7 @@ int WifiDeviceCallBackStub::OnRemoteRequest(uint32_t code, IpcIo *data) size_t length; uint16_t* interfaceRead = nullptr; - interfaceRead = ReadInterfaceToken(req, &length); + interfaceRead = ReadInterfaceToken(data, &length); for (size_t i = 0; i < length; i++) { if (i >= DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH || interfaceRead[i] != DECLARE_INTERFACE_DESCRIPTOR_L1[i]) { WIFI_LOGE("Sta stub token verification error: %{public}d", code); diff --git a/wifi/frameworks/native/src/wifi_device_proxy_lite.cpp b/wifi/frameworks/native/src/wifi_device_proxy_lite.cpp index aa46ba666..26da09324 100644 --- a/wifi/frameworks/native/src/wifi_device_proxy_lite.cpp +++ b/wifi/frameworks/native/src/wifi_device_proxy_lite.cpp @@ -307,7 +307,7 @@ ErrCode WifiDeviceProxy::EnableWifi() struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -338,7 +338,7 @@ ErrCode WifiDeviceProxy::DisableWifi() struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -369,7 +369,7 @@ ErrCode WifiDeviceProxy::InitWifiProtect(const WifiProtectType &protectType, con struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -402,7 +402,7 @@ ErrCode WifiDeviceProxy::GetWifiProtectRef(const WifiProtectMode &protectMode, c struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -435,7 +435,7 @@ ErrCode WifiDeviceProxy::PutWifiProtectRef(const std::string &protectName) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -531,7 +531,7 @@ ErrCode WifiDeviceProxy::AddDeviceConfig(const WifiDeviceConfig &config, int &re struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_BIG, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -565,7 +565,7 @@ ErrCode WifiDeviceProxy::UpdateDeviceConfig(const WifiDeviceConfig &config, int struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_BIG, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -598,7 +598,7 @@ ErrCode WifiDeviceProxy::RemoveDevice(int networkId) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -630,7 +630,7 @@ ErrCode WifiDeviceProxy::RemoveAllDevice() struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -661,7 +661,7 @@ ErrCode WifiDeviceProxy::GetDeviceConfigs(std::vector &result, struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -695,7 +695,7 @@ ErrCode WifiDeviceProxy::EnableDeviceConfig(int networkId, bool attemptEnable) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -728,7 +728,7 @@ ErrCode WifiDeviceProxy::DisableDeviceConfig(int networkId) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -760,7 +760,7 @@ ErrCode WifiDeviceProxy::ConnectToNetwork(int networkId, bool isCandidate) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -793,7 +793,7 @@ ErrCode WifiDeviceProxy::ConnectToDevice(const WifiDeviceConfig &config) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_BIG, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -824,7 +824,7 @@ ErrCode WifiDeviceProxy::IsConnected(bool &isConnected) char data[IPC_DATA_SIZE_SMALL]; struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -856,7 +856,7 @@ ErrCode WifiDeviceProxy::ReConnect() struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -887,7 +887,7 @@ ErrCode WifiDeviceProxy::ReAssociate(void) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -918,7 +918,7 @@ ErrCode WifiDeviceProxy::Disconnect(void) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -949,7 +949,7 @@ ErrCode WifiDeviceProxy::StartWps(const WpsConfig &config) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -983,7 +983,7 @@ ErrCode WifiDeviceProxy::CancelWps(void) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -1014,7 +1014,7 @@ ErrCode WifiDeviceProxy::IsWifiActive(bool &bActive) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -1046,7 +1046,7 @@ ErrCode WifiDeviceProxy::GetWifiState(int &state) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -1078,7 +1078,7 @@ ErrCode WifiDeviceProxy::GetLinkedInfo(WifiLinkedInfo &info) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -1110,7 +1110,7 @@ ErrCode WifiDeviceProxy::GetIpInfo(IpInfo &info) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -1142,7 +1142,7 @@ ErrCode WifiDeviceProxy::SetCountryCode(const std::string &countryCode) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -1174,7 +1174,7 @@ ErrCode WifiDeviceProxy::GetCountryCode(std::string &countryCode) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -1214,7 +1214,7 @@ ErrCode WifiDeviceProxy::RegisterCallBack(const std::shared_ptr= DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH || interfaceRead[i] != DECLARE_INTERFACE_DESCRIPTOR_L1[i]) { WIFI_LOGE("Scan stub token verification error: %{public}d", code); diff --git a/wifi/frameworks/native/src/wifi_scan_proxy_lite.cpp b/wifi/frameworks/native/src/wifi_scan_proxy_lite.cpp index 9138fc492..814059f0f 100644 --- a/wifi/frameworks/native/src/wifi_scan_proxy_lite.cpp +++ b/wifi/frameworks/native/src/wifi_scan_proxy_lite.cpp @@ -208,7 +208,7 @@ ErrCode WifiScanProxy::SetScanControlInfo(const ScanControlInfo &info) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&request, data, IPC_DATA_SIZE_BIG, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -257,7 +257,7 @@ ErrCode WifiScanProxy::Scan() struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -289,7 +289,7 @@ ErrCode WifiScanProxy::AdvanceScan(const WifiScanParams ¶ms) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&request, data, IPC_DATA_SIZE_MID, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -329,7 +329,7 @@ ErrCode WifiScanProxy::IsWifiClosedScan(bool &bOpen) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -361,7 +361,7 @@ ErrCode WifiScanProxy::GetScanInfoList(std::vector &result) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -401,7 +401,7 @@ ErrCode WifiScanProxy::RegisterCallBack(const std::shared_ptr struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; } @@ -435,7 +435,7 @@ ErrCode WifiScanProxy::GetSupportedFeatures(long &features) struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr}; IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT); - if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { + if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) { WIFI_LOGE("Write interface token error: %{public}s", __func__); return WIFI_OPT_FAILED; }