Lines Matching refs:le32toh

43 #define le32toh(x) (uint32_t)(x)  macro
65 #define le32toh(x) __bswap32(x) macro
1009 mbim_debug("%s MessageLength = %u", direction, le32toh(pMsg->MessageLength)); in mbim_dump_header()
1010 …%s MessageType = %s (0x%08x)", direction, MBIMMSGTypeStr(le32toh(pMsg->MessageType)), le32toh(pMs… in mbim_dump_header()
1011 mbim_debug("%s TransactionId = %u", direction, le32toh(pMsg->TransactionId)); in mbim_dump_header()
1017 … mbim_debug("%s CID = %s (%u)", direction, CID2Str(le32toh(pCmdMsg->CID)), le32toh(pCmdMsg->CID)); in mbim_dump_command_msg()
1018 …im_debug("%s CommandType = %s (%u)", direction, le32toh(pCmdMsg->CommandType) ? "set" : "query", l… in mbim_dump_command_msg()
1019 …mbim_debug("%s InformationBufferLength = %u", direction, le32toh(pCmdMsg->InformationBufferLength)… in mbim_dump_command_msg()
1024 …mbim_debug("%s CID = %s (%u)", direction, CID2Str(le32toh(pCmdDone->CID)), le32toh(pCmdDone->CID)); in mbim_dump_command_done()
1025 mbim_debug("%s Status = %u", direction, le32toh(pCmdDone->Status)); in mbim_dump_command_done()
1026 …mbim_debug("%s InformationBufferLength = %u", direction, le32toh(pCmdDone->InformationBufferLength… in mbim_dump_command_done()
1032 …mbim_debug("%s CID = %s (%u)", direction, MS_CID2Str(le32toh(pIndMsg->CID)), le32toh(pIndMsg->CID)… in mbim_dump_indicate_msg()
1034 … mbim_debug("%s CID = %s (%u)", direction, CID2Str(le32toh(pIndMsg->CID)), le32toh(pIndMsg->CID)); in mbim_dump_indicate_msg()
1035 …mbim_debug("%s InformationBufferLength = %u", direction, le32toh(pIndMsg->InformationBufferLength)… in mbim_dump_indicate_msg()
1039 mbim_debug("%s SessionId = %u", direction, le32toh(pInfo->SessionId)); in mbim_dump_connect()
1040 …tionState = %s (%u)", direction, MBIMActivationStateStr(le32toh(pInfo->ActivationState)), le32toh(… in mbim_dump_connect()
1041 mbim_debug("%s IPType = %s", direction, MBIMContextIPTypeStr(le32toh(pInfo->IPType))); in mbim_dump_connect()
1042 …mbim_debug("%s VoiceCallState = %s", direction, MBIMVoiceCallStateStr(le32toh(pInfo->VoiceCallStat… in mbim_dump_connect()
1044 mbim_debug("%s NwError = %u", direction, le32toh(pInfo->NwError)); in mbim_dump_connect()
1049 mbim_debug("%s Rssi = %u", direction, le32toh(pInfo->Rssi)); in mbim_dump_signal_state()
1050 mbim_debug("%s ErrorRate = %u", direction, le32toh(pInfo->ErrorRate)); in mbim_dump_signal_state()
1051 mbim_debug("%s SignalStrengthInterval = %u", direction, le32toh(pInfo->SignalStrengthInterval)); in mbim_dump_signal_state()
1052 mbim_debug("%s RssiThreshold = %u", direction, le32toh(pInfo->RssiThreshold)); in mbim_dump_signal_state()
1053 mbim_debug("%s ErrorRateThreshold = %u", direction, le32toh(pInfo->ErrorRateThreshold)); in mbim_dump_signal_state()
1058 mbim_debug("%s NwError = %u", direction, le32toh(pInfo->NwError)); in mbim_dump_packet_service()
1059 …mbim_debug("%s PacketServiceState = %s", direction, MBIMPacketServiceStateStr(le32toh(pInfo->Packe… in mbim_dump_packet_service()
1060 …mbim_debug("%s HighestAvailableDataClass = %s", direction, MBIMDataClassStr(le32toh(pInfo->Highest… in mbim_dump_packet_service()
1067 …mbim_debug("%s ReadyState = %s", direction, MBIMSubscriberReadyStateStr(le32toh(pInfo->ReadyState)… in mbim_dump_subscriber_status()
1068 …g("%s SIMICCID = %s", direction, mbim_get_segment(pInfo, le32toh(pInfo->SimIccIdOffset), le32toh(p… in mbim_dump_subscriber_status()
1069 …SubscriberID = %s", direction, mbim_get_segment(pInfo, le32toh(pInfo->SubscriberIdOffset), le32toh in mbim_dump_subscriber_status()
1072 for (idx = 0; idx < le32toh(pInfo->ElementCount); idx++) { in mbim_dump_subscriber_status()
1075 …mbim_debug("%s Number = %s", direction, mbim_get_segment(pInfo, le32toh(offset), le32toh(length))); in mbim_dump_subscriber_status()
1081 mbim_debug("%s NwError = %u", direction, le32toh(pInfo->NwError)); in mbim_dump_regiester_status()
1082 …mbim_debug("%s RegisterState = %s", direction, MBIMRegisterStateStr(le32toh(pInfo->RegisterState))… in mbim_dump_regiester_status()
1083 … mbim_debug("%s RegisterMode = %s", direction, MBIMRegisterModeStr(le32toh(pInfo->RegisterMode))); in mbim_dump_regiester_status()
1090 mbim_debug("%s SessionId = %u", direction, le32toh(pInfo->SessionId)); in mbim_dump_ipconfig()
1091 …mbim_debug("%s IPv4ConfigurationAvailable = 0x%x", direction, le32toh(pInfo->IPv4ConfigurationAvai… in mbim_dump_ipconfig()
1092 …mbim_debug("%s IPv6ConfigurationAvailable = 0x%x", direction, le32toh(pInfo->IPv6ConfigurationAvai… in mbim_dump_ipconfig()
1093 mbim_debug("%s IPv4AddressCount = 0x%x", direction, le32toh(pInfo->IPv4AddressCount)); in mbim_dump_ipconfig()
1094 mbim_debug("%s IPv4AddressOffset = 0x%x", direction, le32toh(pInfo->IPv4AddressOffset)); in mbim_dump_ipconfig()
1095 mbim_debug("%s IPv6AddressCount = 0x%x", direction, le32toh(pInfo->IPv6AddressCount)); in mbim_dump_ipconfig()
1096 mbim_debug("%s IPv6AddressOffset = 0x%x", direction, le32toh(pInfo->IPv6AddressOffset)); in mbim_dump_ipconfig()
1099 if (le32toh(pInfo->IPv4ConfigurationAvailable)&0x1) { in mbim_dump_ipconfig()
1100 …MBIM_IPV4_ELEMENT_T *pAddress = (MBIM_IPV4_ELEMENT_T *)(&pInfo->DataBuffer[le32toh(pInfo->IPv4Addr… in mbim_dump_ipconfig()
1101 prefix = le32toh(pAddress->OnLinkPrefixLength); in mbim_dump_ipconfig()
1105 if (le32toh(pInfo->IPv4ConfigurationAvailable)&0x2) { in mbim_dump_ipconfig()
1106 …gw = (UINT8 *)(&pInfo->DataBuffer[le32toh(pInfo->IPv4GatewayOffset)-sizeof(MBIM_IP_CONFIGURATION_I… in mbim_dump_ipconfig()
1109 if (le32toh(pInfo->IPv4ConfigurationAvailable)&0x3) { in mbim_dump_ipconfig()
1110 …dns1 = (UINT8 *)(&pInfo->DataBuffer[le32toh(pInfo->IPv4DnsServerOffset) -sizeof(MBIM_IP_CONFIGURAT… in mbim_dump_ipconfig()
1112 if (le32toh(pInfo->IPv4DnsServerCount) == 2) { in mbim_dump_ipconfig()
1117 if (le32toh(pInfo->IPv4Mtu)) mbim_debug("%s ipv4 mtu = %u", direction, le32toh(pInfo->IPv4Mtu)); in mbim_dump_ipconfig()
1120 if (le32toh(pInfo->IPv6ConfigurationAvailable)&0x1) { in mbim_dump_ipconfig()
1121 …MBIM_IPV6_ELEMENT_T *pAddress = (MBIM_IPV6_ELEMENT_T *)(&pInfo->DataBuffer[le32toh(pInfo->IPv6Addr… in mbim_dump_ipconfig()
1122 prefix = le32toh(pAddress->OnLinkPrefixLength); in mbim_dump_ipconfig()
1128 if (le32toh(pInfo->IPv6ConfigurationAvailable)&0x2) { in mbim_dump_ipconfig()
1129 …gw = (UINT8 *)(&pInfo->DataBuffer[le32toh(pInfo->IPv6GatewayOffset)-sizeof(MBIM_IP_CONFIGURATION_I… in mbim_dump_ipconfig()
1134 if (le32toh(pInfo->IPv6ConfigurationAvailable)&0x3) { in mbim_dump_ipconfig()
1135 …dns1 = (UINT8 *)(&pInfo->DataBuffer[le32toh(pInfo->IPv6DnsServerOffset)-sizeof(MBIM_IP_CONFIGURATI… in mbim_dump_ipconfig()
1139 if (le32toh(pInfo->IPv6DnsServerCount) == 2) { in mbim_dump_ipconfig()
1146 if (le32toh(pInfo->IPv6Mtu)) mbim_debug("%s ipv6 mtu = %u", direction, le32toh(pInfo->IPv6Mtu)); in mbim_dump_ipconfig()
1151 const char *direction = (le32toh(pMsg->MessageType) & 0x80000000) ? "<" : ">"; in mbim_dump()
1164 _tmp[0] = (le32toh(pMsg->MessageType) & 0x80000000) ? '<' : '>'; in mbim_dump()
1166 for (i = 0; i < le32toh(pMsg->MessageLength) && i < 4096; i++) in mbim_dump()
1174 switch (le32toh(pMsg->MessageType)) { in mbim_dump()
1177 mbim_debug("%s MaxControlTransfer = %u", direction, le32toh(pOpenMsg->MaxControlTransfer)); in mbim_dump()
1182 mbim_debug("%s Status = %u", direction, le32toh(pOpenDone->Status)); in mbim_dump()
1191 mbim_debug("%s Status = %u", direction, le32toh(pCloseDone->Status)); in mbim_dump()
1199 switch (le32toh(pCmdMsg->CID)) { in mbim_dump()
1202 mbim_debug("%s SessionId = %u", direction, le32toh(pInfo->SessionId)); in mbim_dump()
1207 mbim_debug("%s SessionId = %u", direction, le32toh(pInfo->SessionId)); in mbim_dump()
1220 if (le32toh(pCmdDone->InformationBufferLength) == 0) in mbim_dump()
1224 switch (le32toh(pCmdDone->CID)) { in mbim_dump()
1260 if (le32toh(pIndMsg->InformationBufferLength) == 0) in mbim_dump()
1264 switch (le32toh(pIndMsg->CID)) { in mbim_dump()
1300 mbim_debug("%s ErrorStatusCode = %u", direction, le32toh(pErrMsg->ErrorStatusCode)); in mbim_dump()
1319 …else if (mbim_pRequest && le32toh(mbim_pRequest->TransactionId) == le32toh(pResponse->TransactionI… in mbim_recv_command()
1320 mbim_pResponse = mbim_alloc(le32toh(pResponse->MessageLength)); in mbim_recv_command()
1322 memcpy(mbim_pResponse, pResponse, le32toh(pResponse->MessageLength)); in mbim_recv_command()
1325 else if (le32toh(pResponse->MessageType) == MBIM_INDICATE_STATUS_MSG) { in mbim_recv_command()
1330 switch (le32toh(pIndMsg->CID)) { in mbim_recv_command()
1333 if (oldReadyState != le32toh(pInfo->ReadyState)) in mbim_recv_command()
1339 if (oldRegisterState != le32toh(pInfo->RegisterState)) in mbim_recv_command()
1345 MBIM_PACKET_SERVICE_STATE_E state = le32toh(pInfo->PacketServiceState); in mbim_recv_command()
1355 MBIM_ACTIVATION_STATE_E state = le32toh(pInfo->ActivationState); in mbim_recv_command()
1400 ret = write(mbim_fd, pRequest, le32toh(pRequest->MessageLength)); in mbim_send_command()
1402 if (ret > 0 && (uint32_t)ret == le32toh(pRequest->MessageLength)) { in mbim_send_command()
1424 if (nreads == sizeof(MBIM_MESSAGE_HEADER) && le32toh(pResponse->MessageLength) <= size) { in mbim_proxy_read()
1425 … nreads += read(fd, pResponse+1, le32toh(pResponse->MessageLength) - sizeof(MBIM_MESSAGE_HEADER)); in mbim_proxy_read()
1541 switch (le32toh(pMsgHdr->MessageType)) { in mbim_status_code()
1544 status = le32toh(pOpenDone->Status); in mbim_status_code()
1549 status = le32toh(pCloseDone->Status); in mbim_status_code()
1554 status = le32toh(pCmdDone->Status); in mbim_status_code()
1559 status = le32toh(pErrMsg->ErrorStatusCode); in mbim_status_code()
1595 err = le32toh(pOpenDone->Status); in mbim_open_device()
1611 err = le32toh(pCloseDone->Status); in mbim_close_device()
1630 if (le32toh(pCmdDone->InformationBufferLength)) in mbim_query_connect()
1633 ActivationState = le32toh(pInfo->ActivationState); in mbim_query_connect()
1661 if (le32toh(pCmdDone->InformationBufferLength)) { in mbim_ms_version_query()
1686 for (i = 0; i < le32toh(pInfo->DeviceServicesCount) ; i++) { in mbim_device_services_query()
1688 UINT32 offset = le32toh(pInfo->DeviceServicesRefList[i].offset); in mbim_device_services_query()
1694 for (cid = 0; cid < le32toh(pSrvEle->CidCount); cid++) { in mbim_device_services_query()
1695 if (MBIM_CID_MS_VERSION == le32toh(pSrvEle->CidList[cid])) { in mbim_device_services_query()
1721 if (le32toh(pCmdDone->InformationBufferLength)) { in mbim_device_caps_query()
1725 if (le32toh(pInfo->DeviceIdOffset) && le32toh(pInfo->DeviceIdSize)) { in mbim_device_caps_query()
1726 …wchar2char((const char *)pInfo + le32toh(pInfo->DeviceIdOffset), le32toh(pInfo->DeviceIdSize), tmp… in mbim_device_caps_query()
1729 if (le32toh(pInfo->FirmwareInfoOffset) && le32toh(pInfo->FirmwareInfoSize)) { in mbim_device_caps_query()
1730 …wchar2char((const char *)pInfo + le32toh(pInfo->FirmwareInfoOffset), le32toh(pInfo->FirmwareInfoSi… in mbim_device_caps_query()
1734 if (le32toh(pInfo->HardwareInfoOffset) && le32toh(pInfo->HardwareInfoSize)) { in mbim_device_caps_query()
1735 …wchar2char((const char *)pInfo + le32toh(pInfo->HardwareInfoOffset), le32toh(pInfo->HardwareInfoSi… in mbim_device_caps_query()
1774 if (le32toh(pCmdDone->InformationBufferLength)) { in mbim_set_radio_state()
1776 …mbim_debug("HwRadioState: %d, SwRadioState: %d", le32toh(pInfo->HwRadioState), le32toh(pInfo->SwRa… in mbim_set_radio_state()
1792 if (le32toh(pCmdDone->InformationBufferLength)) { in mbim_subscriber_status_query()
1796 …wchar2char((const char *)pInfo + le32toh(pInfo->SubscriberIdOffset), le32toh(pInfo->SubscriberIdSi… in mbim_subscriber_status_query()
1798 …wchar2char((const char *)pInfo + le32toh(pInfo->SimIccIdOffset), le32toh(pInfo->SimIccIdSize), tmp… in mbim_subscriber_status_query()
1800 ReadyState = le32toh(pInfo->ReadyState); in mbim_subscriber_status_query()
1817 if (le32toh(pCmdDone->InformationBufferLength)) { in mbim_register_state_query()
1819 RegisterState = le32toh(pInfo->RegisterState); in mbim_register_state_query()
1836 if (le32toh(pCmdDone->InformationBufferLength)) { in mbim_packet_service_query()
1838 PacketServiceState = le32toh(pInfo->PacketServiceState); in mbim_packet_service_query()
1841 if (le32toh(pCmdDone->InformationBufferLength) == sizeof(MBIM_PACKET_SERVICE_INFO_V2_T)) { in mbim_packet_service_query()
1843 mbim_debug("CurrentDataClass = %s", MBIMDataClassStr(le32toh(pInfo->CurrentDataClass))); in mbim_packet_service_query()
1861 if (le32toh(pCmdDone->InformationBufferLength)) { in mbim_packet_service_set()
1863 PacketServiceState = le32toh(pInfo->PacketServiceState); in mbim_packet_service_set()
1942 if (le32toh(pCmdDone->InformationBufferLength)) { in mbim_set_connect()
1944 ActivationState = le32toh(pInfo->ActivationState); in mbim_set_connect()
1965 if (le32toh(pCmdDone->InformationBufferLength)) { in mbim_ip_config()
1971 if (le32toh(pInfo->IPv4ConfigurationAvailable)&0x1) { in mbim_ip_config()
1972 …MBIM_IPV4_ELEMENT_T *pAddress = (MBIM_IPV4_ELEMENT_T *)(&pInfo->DataBuffer[le32toh(pInfo->IPv4Addr… in mbim_ip_config()
1973 prefix = le32toh(pAddress->OnLinkPrefixLength); in mbim_ip_config()
1976 if (le32toh(pInfo->IPv4ConfigurationAvailable)&0x2) in mbim_ip_config()
1977 …gw = (UINT8 *)(&pInfo->DataBuffer[le32toh(pInfo->IPv4GatewayOffset)-sizeof(MBIM_IP_CONFIGURATION_I… in mbim_ip_config()
1979 if (le32toh(pInfo->IPv4ConfigurationAvailable)&0x4) { in mbim_ip_config()
1980 …dns1 = (UINT8 *)(&pInfo->DataBuffer[le32toh(pInfo->IPv4DnsServerOffset)-sizeof(MBIM_IP_CONFIGURATI… in mbim_ip_config()
1981 if (le32toh(pInfo->IPv4DnsServerCount) == 2) in mbim_ip_config()
1985 if (le32toh(pInfo->IPv4ConfigurationAvailable)&0x8) in mbim_ip_config()
1986 mtu = le32toh(pInfo->IPv4Mtu); in mbim_ip_config()
2000 if (le32toh(pInfo->IPv6ConfigurationAvailable)&0x1) { in mbim_ip_config()
2001 …MBIM_IPV6_ELEMENT_T *pAddress = (MBIM_IPV6_ELEMENT_T *)(&pInfo->DataBuffer[le32toh(pInfo->IPv6Addr… in mbim_ip_config()
2002 prefix = le32toh(pAddress->OnLinkPrefixLength); in mbim_ip_config()
2005 if (le32toh(pInfo->IPv6ConfigurationAvailable)&0x2) in mbim_ip_config()
2006 …gw = (UINT8 *)(&pInfo->DataBuffer[le32toh(pInfo->IPv6GatewayOffset)-sizeof(MBIM_IP_CONFIGURATION_I… in mbim_ip_config()
2008 if (le32toh(pInfo->IPv6ConfigurationAvailable)&0x4) { in mbim_ip_config()
2009 …dns1 = (UINT8 *)(&pInfo->DataBuffer[le32toh(pInfo->IPv6DnsServerOffset)-sizeof(MBIM_IP_CONFIGURATI… in mbim_ip_config()
2010 if (le32toh(pInfo->IPv6DnsServerCount) == 2) in mbim_ip_config()
2014 if (le32toh(pInfo->IPv6ConfigurationAvailable)&0x8) in mbim_ip_config()
2015 mtu = le32toh(pInfo->IPv6Mtu); in mbim_ip_config()