• Home
  • Raw
  • Download

Lines Matching refs:in

105     const struct chreWifiScanResult *in, struct ChppWifiScanResult *out) {  in chppWifiConvertScanResultFromChre()  argument
106 out->ageMs = in->ageMs; in chppWifiConvertScanResultFromChre()
107 out->capabilityInfo = in->capabilityInfo; in chppWifiConvertScanResultFromChre()
108 out->ssidLen = in->ssidLen; in chppWifiConvertScanResultFromChre()
109 memcpy(out->ssid, in->ssid, sizeof(out->ssid)); in chppWifiConvertScanResultFromChre()
110 memcpy(out->bssid, in->bssid, sizeof(out->bssid)); in chppWifiConvertScanResultFromChre()
111 out->flags = in->flags; in chppWifiConvertScanResultFromChre()
112 out->rssi = in->rssi; in chppWifiConvertScanResultFromChre()
113 out->band = in->band; in chppWifiConvertScanResultFromChre()
114 out->primaryChannel = in->primaryChannel; in chppWifiConvertScanResultFromChre()
115 out->centerFreqPrimary = in->centerFreqPrimary; in chppWifiConvertScanResultFromChre()
116 out->centerFreqSecondary = in->centerFreqSecondary; in chppWifiConvertScanResultFromChre()
117 out->channelWidth = in->channelWidth; in chppWifiConvertScanResultFromChre()
118 out->securityMode = in->securityMode; in chppWifiConvertScanResultFromChre()
119 out->radioChain = in->radioChain; in chppWifiConvertScanResultFromChre()
120 out->rssiChain0 = in->rssiChain0; in chppWifiConvertScanResultFromChre()
121 out->rssiChain1 = in->rssiChain1; in chppWifiConvertScanResultFromChre()
125 static void chppWifiConvertScanEventFromChre(const struct chreWifiScanEvent *in, in chppWifiConvertScanEventFromChre() argument
131 out->resultCount = in->resultCount; in chppWifiConvertScanEventFromChre()
132 out->resultTotal = in->resultTotal; in chppWifiConvertScanEventFromChre()
133 out->eventIndex = in->eventIndex; in chppWifiConvertScanEventFromChre()
134 out->scanType = in->scanType; in chppWifiConvertScanEventFromChre()
135 out->ssidSetSize = in->ssidSetSize; in chppWifiConvertScanEventFromChre()
136 out->scannedFreqListLen = in->scannedFreqListLen; in chppWifiConvertScanEventFromChre()
137 out->referenceTime = in->referenceTime; in chppWifiConvertScanEventFromChre()
139 (uint16_t)(in->scannedFreqListLen * sizeof(uint32_t)); in chppWifiConvertScanEventFromChre()
144 memcpy(&payload[*vlaOffset], in->scannedFreqList, in chppWifiConvertScanEventFromChre()
145 in->scannedFreqListLen * sizeof(uint32_t)); in chppWifiConvertScanEventFromChre()
155 (uint16_t)(in->resultCount * sizeof(struct ChppWifiScanResult)); in chppWifiConvertScanEventFromChre()
159 for (size_t i = 0; i < in->resultCount; i++) { in chppWifiConvertScanEventFromChre()
160 chppWifiConvertScanResultFromChre(&in->results[i], &results[i]); in chppWifiConvertScanEventFromChre()
167 out->radioChainPref = in->radioChainPref; in chppWifiConvertScanEventFromChre()
171 const struct chreWifiSsidListItem *in, struct ChppWifiSsidListItem *out) { in chppWifiConvertSsidListItemFromChre() argument
172 out->ssidLen = in->ssidLen; in chppWifiConvertSsidListItemFromChre()
173 memcpy(out->ssid, in->ssid, sizeof(out->ssid)); in chppWifiConvertSsidListItemFromChre()
177 const struct chreWifiScanParams *in, struct ChppWifiScanParams *out, in chppWifiConvertScanParamsFromChre() argument
179 out->scanType = in->scanType; in chppWifiConvertScanParamsFromChre()
180 out->maxScanAgeMs = in->maxScanAgeMs; in chppWifiConvertScanParamsFromChre()
181 out->frequencyListLen = in->frequencyListLen; in chppWifiConvertScanParamsFromChre()
183 (uint16_t)(in->frequencyListLen * sizeof(uint32_t)); in chppWifiConvertScanParamsFromChre()
187 memcpy(&payload[*vlaOffset], in->frequencyList, in chppWifiConvertScanParamsFromChre()
188 in->frequencyListLen * sizeof(uint32_t)); in chppWifiConvertScanParamsFromChre()
194 out->ssidListLen = in->ssidListLen; in chppWifiConvertScanParamsFromChre()
199 (uint16_t)(in->ssidListLen * sizeof(struct ChppWifiSsidListItem)); in chppWifiConvertScanParamsFromChre()
203 for (size_t i = 0; i < in->ssidListLen; i++) { in chppWifiConvertScanParamsFromChre()
204 chppWifiConvertSsidListItemFromChre(&in->ssidList[i], &ssidList[i]); in chppWifiConvertScanParamsFromChre()
211 out->radioChainPref = in->radioChainPref; in chppWifiConvertScanParamsFromChre()
212 out->channelSet = in->channelSet; in chppWifiConvertScanParamsFromChre()
215 static void chppWifiConvertLciFromChre(const struct chreWifiLci *in, in chppWifiConvertLciFromChre() argument
217 out->latitude = in->latitude; in chppWifiConvertLciFromChre()
218 out->longitude = in->longitude; in chppWifiConvertLciFromChre()
219 out->altitude = in->altitude; in chppWifiConvertLciFromChre()
220 out->latitudeUncertainty = in->latitudeUncertainty; in chppWifiConvertLciFromChre()
221 out->longitudeUncertainty = in->longitudeUncertainty; in chppWifiConvertLciFromChre()
222 out->altitudeType = in->altitudeType; in chppWifiConvertLciFromChre()
223 out->altitudeUncertainty = in->altitudeUncertainty; in chppWifiConvertLciFromChre()
227 const struct chreWifiRangingResult *in, struct ChppWifiRangingResult *out) { in chppWifiConvertRangingResultFromChre() argument
228 out->timestamp = in->timestamp; in chppWifiConvertRangingResultFromChre()
229 memcpy(out->macAddress, in->macAddress, sizeof(out->macAddress)); in chppWifiConvertRangingResultFromChre()
230 out->status = in->status; in chppWifiConvertRangingResultFromChre()
231 out->rssi = in->rssi; in chppWifiConvertRangingResultFromChre()
232 out->distance = in->distance; in chppWifiConvertRangingResultFromChre()
233 out->distanceStdDev = in->distanceStdDev; in chppWifiConvertRangingResultFromChre()
234 chppWifiConvertLciFromChre(&in->lci, &out->lci); in chppWifiConvertRangingResultFromChre()
235 out->flags = in->flags; in chppWifiConvertRangingResultFromChre()
240 const struct chreWifiRangingEvent *in, struct ChppWifiRangingEvent *out, in chppWifiConvertRangingEventFromChre() argument
243 out->resultCount = in->resultCount; in chppWifiConvertRangingEventFromChre()
249 (uint16_t)(in->resultCount * sizeof(struct ChppWifiRangingResult)); in chppWifiConvertRangingEventFromChre()
253 for (size_t i = 0; i < in->resultCount; i++) { in chppWifiConvertRangingEventFromChre()
254 chppWifiConvertRangingResultFromChre(&in->results[i], &results[i]); in chppWifiConvertRangingEventFromChre()
264 const struct chreWifiRangingTarget *in, struct ChppWifiRangingTarget *out) { in chppWifiConvertRangingTargetFromChre() argument
265 memcpy(out->macAddress, in->macAddress, sizeof(out->macAddress)); in chppWifiConvertRangingTargetFromChre()
266 out->primaryChannel = in->primaryChannel; in chppWifiConvertRangingTargetFromChre()
267 out->centerFreqPrimary = in->centerFreqPrimary; in chppWifiConvertRangingTargetFromChre()
268 out->centerFreqSecondary = in->centerFreqSecondary; in chppWifiConvertRangingTargetFromChre()
269 out->channelWidth = in->channelWidth; in chppWifiConvertRangingTargetFromChre()
274 const struct chreWifiRangingParams *in, struct ChppWifiRangingParams *out, in chppWifiConvertRangingParamsFromChre() argument
276 out->targetListLen = in->targetListLen; in chppWifiConvertRangingParamsFromChre()
281 (uint16_t)(in->targetListLen * sizeof(struct ChppWifiRangingTarget)); in chppWifiConvertRangingParamsFromChre()
285 for (size_t i = 0; i < in->targetListLen; i++) { in chppWifiConvertRangingParamsFromChre()
286 chppWifiConvertRangingTargetFromChre(&in->targetList[i], &targetList[i]); in chppWifiConvertRangingParamsFromChre()
296 const struct chreWifiNanSubscribeConfig *in, in chppWifiConvertNanSubscribeConfigFromChre() argument
299 out->subscribeType = in->subscribeType; in chppWifiConvertNanSubscribeConfigFromChre()
300 if (in->service != NULL) { in chppWifiConvertNanSubscribeConfigFromChre()
301 size_t strSize = strlen(in->service) + 1; in chppWifiConvertNanSubscribeConfigFromChre()
302 memcpy(&payload[*vlaOffset], in->service, strSize); in chppWifiConvertNanSubscribeConfigFromChre()
312 (uint16_t)(in->serviceSpecificInfoSize * sizeof(uint8_t)); in chppWifiConvertNanSubscribeConfigFromChre()
317 memcpy(&payload[*vlaOffset], in->serviceSpecificInfo, in chppWifiConvertNanSubscribeConfigFromChre()
318 in->serviceSpecificInfoSize * sizeof(uint8_t)); in chppWifiConvertNanSubscribeConfigFromChre()
324 out->serviceSpecificInfoSize = in->serviceSpecificInfoSize; in chppWifiConvertNanSubscribeConfigFromChre()
325 out->matchFilter.length = (uint16_t)(in->matchFilterLength * sizeof(uint8_t)); in chppWifiConvertNanSubscribeConfigFromChre()
329 memcpy(&payload[*vlaOffset], in->matchFilter, in chppWifiConvertNanSubscribeConfigFromChre()
330 in->matchFilterLength * sizeof(uint8_t)); in chppWifiConvertNanSubscribeConfigFromChre()
336 out->matchFilterLength = in->matchFilterLength; in chppWifiConvertNanSubscribeConfigFromChre()
340 const struct chreWifiNanDiscoveryEvent *in, in chppWifiConvertNanDiscoveryEventFromChre() argument
343 out->subscribeId = in->subscribeId; in chppWifiConvertNanDiscoveryEventFromChre()
344 out->publishId = in->publishId; in chppWifiConvertNanDiscoveryEventFromChre()
345 memcpy(out->publisherAddress, in->publisherAddress, in chppWifiConvertNanDiscoveryEventFromChre()
348 (uint16_t)(in->serviceSpecificInfoSize * sizeof(uint8_t)); in chppWifiConvertNanDiscoveryEventFromChre()
353 memcpy(&payload[*vlaOffset], in->serviceSpecificInfo, in chppWifiConvertNanDiscoveryEventFromChre()
354 in->serviceSpecificInfoSize * sizeof(uint8_t)); in chppWifiConvertNanDiscoveryEventFromChre()
360 out->serviceSpecificInfoSize = in->serviceSpecificInfoSize; in chppWifiConvertNanDiscoveryEventFromChre()
364 const struct chreWifiNanSessionLostEvent *in, in chppWifiConvertNanSessionLostEventFromChre() argument
366 out->id = in->id; in chppWifiConvertNanSessionLostEventFromChre()
367 out->peerId = in->peerId; in chppWifiConvertNanSessionLostEventFromChre()
371 const struct chreWifiNanSessionTerminatedEvent *in, in chppWifiConvertNanSessionTerminatedEventFromChre() argument
373 out->id = in->id; in chppWifiConvertNanSessionTerminatedEventFromChre()
374 out->reason = in->reason; in chppWifiConvertNanSessionTerminatedEventFromChre()
375 memcpy(out->reserved, in->reserved, sizeof(out->reserved)); in chppWifiConvertNanSessionTerminatedEventFromChre()
379 const struct chreWifiNanRangingParams *in, in chppWifiConvertNanRangingParamsFromChre() argument
381 memcpy(out->macAddress, in->macAddress, sizeof(out->macAddress)); in chppWifiConvertNanRangingParamsFromChre()
386 bool chppWifiScanEventFromChre(const struct chreWifiScanEvent *in, in chppWifiScanEventFromChre() argument
392 size_t payloadSize = chppWifiSizeOfScanEventFromChre(in); in chppWifiScanEventFromChre()
397 chppWifiConvertScanEventFromChre(in, &(*out)->payload, payload, payloadSize, in chppWifiScanEventFromChre()
405 bool chppWifiScanParamsFromChre(const struct chreWifiScanParams *in, in chppWifiScanParamsFromChre() argument
411 size_t payloadSize = chppWifiSizeOfScanParamsFromChre(in); in chppWifiScanParamsFromChre()
416 chppWifiConvertScanParamsFromChre(in, &(*out)->payload, payload, in chppWifiScanParamsFromChre()
424 bool chppWifiRangingEventFromChre(const struct chreWifiRangingEvent *in, in chppWifiRangingEventFromChre() argument
430 size_t payloadSize = chppWifiSizeOfRangingEventFromChre(in); in chppWifiRangingEventFromChre()
435 chppWifiConvertRangingEventFromChre(in, &(*out)->payload, payload, in chppWifiRangingEventFromChre()
443 bool chppWifiRangingParamsFromChre(const struct chreWifiRangingParams *in, in chppWifiRangingParamsFromChre() argument
449 size_t payloadSize = chppWifiSizeOfRangingParamsFromChre(in); in chppWifiRangingParamsFromChre()
454 chppWifiConvertRangingParamsFromChre(in, &(*out)->payload, payload, in chppWifiRangingParamsFromChre()
463 const struct chreWifiNanSubscribeConfig *in, in chppWifiNanSubscribeConfigFromChre() argument
468 size_t payloadSize = chppWifiSizeOfNanSubscribeConfigFromChre(in); in chppWifiNanSubscribeConfigFromChre()
473 chppWifiConvertNanSubscribeConfigFromChre(in, &(*out)->payload, payload, in chppWifiNanSubscribeConfigFromChre()
482 const struct chreWifiNanDiscoveryEvent *in, in chppWifiNanDiscoveryEventFromChre() argument
487 size_t payloadSize = chppWifiSizeOfNanDiscoveryEventFromChre(in); in chppWifiNanDiscoveryEventFromChre()
492 chppWifiConvertNanDiscoveryEventFromChre(in, &(*out)->payload, payload, in chppWifiNanDiscoveryEventFromChre()
501 const struct chreWifiNanSessionLostEvent *in, in chppWifiNanSessionLostEventFromChre() argument
509 chppWifiConvertNanSessionLostEventFromChre(in, &(*out)->payload); in chppWifiNanSessionLostEventFromChre()
517 const struct chreWifiNanSessionTerminatedEvent *in, in chppWifiNanSessionTerminatedEventFromChre() argument
526 chppWifiConvertNanSessionTerminatedEventFromChre(in, &(*out)->payload); in chppWifiNanSessionTerminatedEventFromChre()
534 const struct chreWifiNanRangingParams *in, in chppWifiNanRangingParamsFromChre() argument
542 chppWifiConvertNanRangingParamsFromChre(in, &(*out)->payload); in chppWifiNanRangingParamsFromChre()
551 static bool chppWifiConvertScanResultToChre(const struct ChppWifiScanResult *in, in chppWifiConvertScanResultToChre() argument
553 out->ageMs = in->ageMs; in chppWifiConvertScanResultToChre()
554 out->capabilityInfo = in->capabilityInfo; in chppWifiConvertScanResultToChre()
555 out->ssidLen = in->ssidLen; in chppWifiConvertScanResultToChre()
556 memcpy(out->ssid, in->ssid, sizeof(out->ssid)); in chppWifiConvertScanResultToChre()
557 memcpy(out->bssid, in->bssid, sizeof(out->bssid)); in chppWifiConvertScanResultToChre()
558 out->flags = in->flags; in chppWifiConvertScanResultToChre()
559 out->rssi = in->rssi; in chppWifiConvertScanResultToChre()
560 out->band = in->band; in chppWifiConvertScanResultToChre()
561 out->primaryChannel = in->primaryChannel; in chppWifiConvertScanResultToChre()
562 out->centerFreqPrimary = in->centerFreqPrimary; in chppWifiConvertScanResultToChre()
563 out->centerFreqSecondary = in->centerFreqSecondary; in chppWifiConvertScanResultToChre()
564 out->channelWidth = in->channelWidth; in chppWifiConvertScanResultToChre()
565 out->securityMode = in->securityMode; in chppWifiConvertScanResultToChre()
566 out->radioChain = in->radioChain; in chppWifiConvertScanResultToChre()
567 out->rssiChain0 = in->rssiChain0; in chppWifiConvertScanResultToChre()
568 out->rssiChain1 = in->rssiChain1; in chppWifiConvertScanResultToChre()
574 static bool chppWifiConvertScanEventToChre(const struct ChppWifiScanEvent *in, in chppWifiConvertScanEventToChre() argument
578 out->resultCount = in->resultCount; in chppWifiConvertScanEventToChre()
579 out->resultTotal = in->resultTotal; in chppWifiConvertScanEventToChre()
580 out->eventIndex = in->eventIndex; in chppWifiConvertScanEventToChre()
581 out->scanType = in->scanType; in chppWifiConvertScanEventToChre()
582 out->ssidSetSize = in->ssidSetSize; in chppWifiConvertScanEventToChre()
583 out->scannedFreqListLen = in->scannedFreqListLen; in chppWifiConvertScanEventToChre()
584 out->referenceTime = in->referenceTime; in chppWifiConvertScanEventToChre()
586 if (in->scannedFreqList.length == 0) { in chppWifiConvertScanEventToChre()
589 if (in->scannedFreqList.offset + in->scannedFreqList.length > inSize || in chppWifiConvertScanEventToChre()
590 in->scannedFreqList.length != in chppWifiConvertScanEventToChre()
591 in->scannedFreqListLen * sizeof(uint32_t)) { in chppWifiConvertScanEventToChre()
596 chppMalloc(in->scannedFreqListLen * sizeof(uint32_t)); in chppWifiConvertScanEventToChre()
602 &((const uint8_t *)in)[in->scannedFreqList.offset], in chppWifiConvertScanEventToChre()
603 in->scannedFreqListLen * sizeof(uint32_t)); in chppWifiConvertScanEventToChre()
607 if (in->results.length == 0) { in chppWifiConvertScanEventToChre()
610 if (in->results.offset + in->results.length > inSize || in chppWifiConvertScanEventToChre()
611 in->results.length != in chppWifiConvertScanEventToChre()
612 in->resultCount * sizeof(struct ChppWifiScanResult)) { in chppWifiConvertScanEventToChre()
618 (const uint8_t *)in)[in->results.offset]; in chppWifiConvertScanEventToChre()
621 chppMalloc(in->resultCount * sizeof(struct chreWifiScanResult)); in chppWifiConvertScanEventToChre()
626 for (size_t i = 0; i < in->resultCount; i++) { in chppWifiConvertScanEventToChre()
634 out->radioChainPref = in->radioChainPref; in chppWifiConvertScanEventToChre()
640 const struct ChppWifiSsidListItem *in, struct chreWifiSsidListItem *out) { in chppWifiConvertSsidListItemToChre() argument
641 out->ssidLen = in->ssidLen; in chppWifiConvertSsidListItemToChre()
642 memcpy(out->ssid, in->ssid, sizeof(out->ssid)); in chppWifiConvertSsidListItemToChre()
647 static bool chppWifiConvertScanParamsToChre(const struct ChppWifiScanParams *in, in chppWifiConvertScanParamsToChre() argument
650 out->scanType = in->scanType; in chppWifiConvertScanParamsToChre()
651 out->maxScanAgeMs = in->maxScanAgeMs; in chppWifiConvertScanParamsToChre()
652 out->frequencyListLen = in->frequencyListLen; in chppWifiConvertScanParamsToChre()
654 if (in->frequencyList.length == 0) { in chppWifiConvertScanParamsToChre()
657 if (in->frequencyList.offset + in->frequencyList.length > inSize || in chppWifiConvertScanParamsToChre()
658 in->frequencyList.length != in->frequencyListLen * sizeof(uint32_t)) { in chppWifiConvertScanParamsToChre()
663 chppMalloc(in->frequencyListLen * sizeof(uint32_t)); in chppWifiConvertScanParamsToChre()
668 memcpy(frequencyListOut, &((const uint8_t *)in)[in->frequencyList.offset], in chppWifiConvertScanParamsToChre()
669 in->frequencyListLen * sizeof(uint32_t)); in chppWifiConvertScanParamsToChre()
673 out->ssidListLen = in->ssidListLen; in chppWifiConvertScanParamsToChre()
675 if (in->ssidList.length == 0) { in chppWifiConvertScanParamsToChre()
678 if (in->ssidList.offset + in->ssidList.length > inSize || in chppWifiConvertScanParamsToChre()
679 in->ssidList.length != in chppWifiConvertScanParamsToChre()
680 in->ssidListLen * sizeof(struct ChppWifiSsidListItem)) { in chppWifiConvertScanParamsToChre()
686 (const uint8_t *)in)[in->ssidList.offset]; in chppWifiConvertScanParamsToChre()
689 chppMalloc(in->ssidListLen * sizeof(struct chreWifiSsidListItem)); in chppWifiConvertScanParamsToChre()
694 for (size_t i = 0; i < in->ssidListLen; i++) { in chppWifiConvertScanParamsToChre()
702 out->radioChainPref = in->radioChainPref; in chppWifiConvertScanParamsToChre()
703 out->channelSet = in->channelSet; in chppWifiConvertScanParamsToChre()
708 static bool chppWifiConvertLciToChre(const struct ChppWifiLci *in, in chppWifiConvertLciToChre() argument
710 out->latitude = in->latitude; in chppWifiConvertLciToChre()
711 out->longitude = in->longitude; in chppWifiConvertLciToChre()
712 out->altitude = in->altitude; in chppWifiConvertLciToChre()
713 out->latitudeUncertainty = in->latitudeUncertainty; in chppWifiConvertLciToChre()
714 out->longitudeUncertainty = in->longitudeUncertainty; in chppWifiConvertLciToChre()
715 out->altitudeType = in->altitudeType; in chppWifiConvertLciToChre()
716 out->altitudeUncertainty = in->altitudeUncertainty; in chppWifiConvertLciToChre()
722 const struct ChppWifiRangingResult *in, struct chreWifiRangingResult *out) { in chppWifiConvertRangingResultToChre() argument
723 out->timestamp = in->timestamp; in chppWifiConvertRangingResultToChre()
724 memcpy(out->macAddress, in->macAddress, sizeof(out->macAddress)); in chppWifiConvertRangingResultToChre()
725 out->status = in->status; in chppWifiConvertRangingResultToChre()
726 out->rssi = in->rssi; in chppWifiConvertRangingResultToChre()
727 out->distance = in->distance; in chppWifiConvertRangingResultToChre()
728 out->distanceStdDev = in->distanceStdDev; in chppWifiConvertRangingResultToChre()
729 if (!chppWifiConvertLciToChre(&in->lci, &out->lci)) { in chppWifiConvertRangingResultToChre()
732 out->flags = in->flags; in chppWifiConvertRangingResultToChre()
739 const struct ChppWifiRangingEvent *in, struct chreWifiRangingEvent *out, in chppWifiConvertRangingEventToChre() argument
742 out->resultCount = in->resultCount; in chppWifiConvertRangingEventToChre()
745 if (in->results.length == 0) { in chppWifiConvertRangingEventToChre()
748 if (in->results.offset + in->results.length > inSize || in chppWifiConvertRangingEventToChre()
749 in->results.length != in chppWifiConvertRangingEventToChre()
750 in->resultCount * sizeof(struct ChppWifiRangingResult)) { in chppWifiConvertRangingEventToChre()
756 (const uint8_t *)in)[in->results.offset]; in chppWifiConvertRangingEventToChre()
759 chppMalloc(in->resultCount * sizeof(struct chreWifiRangingResult)); in chppWifiConvertRangingEventToChre()
764 for (size_t i = 0; i < in->resultCount; i++) { in chppWifiConvertRangingEventToChre()
776 const struct ChppWifiRangingTarget *in, struct chreWifiRangingTarget *out) { in chppWifiConvertRangingTargetToChre() argument
777 memcpy(out->macAddress, in->macAddress, sizeof(out->macAddress)); in chppWifiConvertRangingTargetToChre()
778 out->primaryChannel = in->primaryChannel; in chppWifiConvertRangingTargetToChre()
779 out->centerFreqPrimary = in->centerFreqPrimary; in chppWifiConvertRangingTargetToChre()
780 out->centerFreqSecondary = in->centerFreqSecondary; in chppWifiConvertRangingTargetToChre()
781 out->channelWidth = in->channelWidth; in chppWifiConvertRangingTargetToChre()
788 const struct ChppWifiRangingParams *in, struct chreWifiRangingParams *out, in chppWifiConvertRangingParamsToChre() argument
790 out->targetListLen = in->targetListLen; in chppWifiConvertRangingParamsToChre()
792 if (in->targetList.length == 0) { in chppWifiConvertRangingParamsToChre()
795 if (in->targetList.offset + in->targetList.length > inSize || in chppWifiConvertRangingParamsToChre()
796 in->targetList.length != in chppWifiConvertRangingParamsToChre()
797 in->targetListLen * sizeof(struct ChppWifiRangingTarget)) { in chppWifiConvertRangingParamsToChre()
803 (const uint8_t *)in)[in->targetList.offset]; in chppWifiConvertRangingParamsToChre()
806 chppMalloc(in->targetListLen * sizeof(struct chreWifiRangingTarget)); in chppWifiConvertRangingParamsToChre()
811 for (size_t i = 0; i < in->targetListLen; i++) { in chppWifiConvertRangingParamsToChre()
824 const struct ChppWifiNanSubscribeConfig *in, in chppWifiConvertNanSubscribeConfigToChre() argument
826 out->subscribeType = in->subscribeType; in chppWifiConvertNanSubscribeConfigToChre()
828 if (in->service.length == 0) { in chppWifiConvertNanSubscribeConfigToChre()
831 char *serviceOut = chppMalloc(in->service.length); in chppWifiConvertNanSubscribeConfigToChre()
836 memcpy(serviceOut, &((const uint8_t *)in)[in->service.offset], in chppWifiConvertNanSubscribeConfigToChre()
837 in->service.length); in chppWifiConvertNanSubscribeConfigToChre()
841 if (in->serviceSpecificInfo.length == 0) { in chppWifiConvertNanSubscribeConfigToChre()
844 if (in->serviceSpecificInfo.offset + in->serviceSpecificInfo.length > in chppWifiConvertNanSubscribeConfigToChre()
846 in->serviceSpecificInfo.length != in chppWifiConvertNanSubscribeConfigToChre()
847 in->serviceSpecificInfoSize * sizeof(uint8_t)) { in chppWifiConvertNanSubscribeConfigToChre()
852 chppMalloc(in->serviceSpecificInfoSize * sizeof(uint8_t)); in chppWifiConvertNanSubscribeConfigToChre()
858 &((const uint8_t *)in)[in->serviceSpecificInfo.offset], in chppWifiConvertNanSubscribeConfigToChre()
859 in->serviceSpecificInfoSize * sizeof(uint8_t)); in chppWifiConvertNanSubscribeConfigToChre()
863 out->serviceSpecificInfoSize = in->serviceSpecificInfoSize; in chppWifiConvertNanSubscribeConfigToChre()
865 if (in->matchFilter.length == 0) { in chppWifiConvertNanSubscribeConfigToChre()
868 if (in->matchFilter.offset + in->matchFilter.length > inSize || in chppWifiConvertNanSubscribeConfigToChre()
869 in->matchFilter.length != in->matchFilterLength * sizeof(uint8_t)) { in chppWifiConvertNanSubscribeConfigToChre()
874 chppMalloc(in->matchFilterLength * sizeof(uint8_t)); in chppWifiConvertNanSubscribeConfigToChre()
879 memcpy(matchFilterOut, &((const uint8_t *)in)[in->matchFilter.offset], in chppWifiConvertNanSubscribeConfigToChre()
880 in->matchFilterLength * sizeof(uint8_t)); in chppWifiConvertNanSubscribeConfigToChre()
884 out->matchFilterLength = in->matchFilterLength; in chppWifiConvertNanSubscribeConfigToChre()
890 const struct ChppWifiNanDiscoveryEvent *in, in chppWifiConvertNanDiscoveryEventToChre() argument
892 out->subscribeId = in->subscribeId; in chppWifiConvertNanDiscoveryEventToChre()
893 out->publishId = in->publishId; in chppWifiConvertNanDiscoveryEventToChre()
894 memcpy(out->publisherAddress, in->publisherAddress, in chppWifiConvertNanDiscoveryEventToChre()
897 if (in->serviceSpecificInfo.length == 0) { in chppWifiConvertNanDiscoveryEventToChre()
900 if (in->serviceSpecificInfo.offset + in->serviceSpecificInfo.length > in chppWifiConvertNanDiscoveryEventToChre()
902 in->serviceSpecificInfo.length != in chppWifiConvertNanDiscoveryEventToChre()
903 in->serviceSpecificInfoSize * sizeof(uint8_t)) { in chppWifiConvertNanDiscoveryEventToChre()
908 chppMalloc(in->serviceSpecificInfoSize * sizeof(uint8_t)); in chppWifiConvertNanDiscoveryEventToChre()
914 &((const uint8_t *)in)[in->serviceSpecificInfo.offset], in chppWifiConvertNanDiscoveryEventToChre()
915 in->serviceSpecificInfoSize * sizeof(uint8_t)); in chppWifiConvertNanDiscoveryEventToChre()
919 out->serviceSpecificInfoSize = in->serviceSpecificInfoSize; in chppWifiConvertNanDiscoveryEventToChre()
925 const struct ChppWifiNanSessionLostEvent *in, in chppWifiConvertNanSessionLostEventToChre() argument
927 out->id = in->id; in chppWifiConvertNanSessionLostEventToChre()
928 out->peerId = in->peerId; in chppWifiConvertNanSessionLostEventToChre()
934 const struct ChppWifiNanSessionTerminatedEvent *in, in chppWifiConvertNanSessionTerminatedEventToChre() argument
936 out->id = in->id; in chppWifiConvertNanSessionTerminatedEventToChre()
937 out->reason = in->reason; in chppWifiConvertNanSessionTerminatedEventToChre()
938 memcpy(out->reserved, in->reserved, sizeof(out->reserved)); in chppWifiConvertNanSessionTerminatedEventToChre()
944 const struct ChppWifiNanRangingParams *in, in chppWifiConvertNanRangingParamsToChre() argument
946 memcpy(out->macAddress, in->macAddress, sizeof(out->macAddress)); in chppWifiConvertNanRangingParamsToChre()
954 const struct ChppWifiScanEvent *in, size_t inSize) { in chppWifiScanEventToChre() argument
960 if (!chppWifiConvertScanEventToChre(in, out, inSize)) { in chppWifiScanEventToChre()
969 const struct ChppWifiScanParams *in, size_t inSize) { in chppWifiScanParamsToChre() argument
975 if (!chppWifiConvertScanParamsToChre(in, out, inSize)) { in chppWifiScanParamsToChre()
984 const struct ChppWifiRangingEvent *in, size_t inSize) { in chppWifiRangingEventToChre() argument
990 if (!chppWifiConvertRangingEventToChre(in, out, inSize)) { in chppWifiRangingEventToChre()
999 const struct ChppWifiRangingParams *in, size_t inSize) { in chppWifiRangingParamsToChre() argument
1005 if (!chppWifiConvertRangingParamsToChre(in, out, inSize)) { in chppWifiRangingParamsToChre()
1014 const struct ChppWifiNanSubscribeConfig *in, size_t inSize) { in chppWifiNanSubscribeConfigToChre() argument
1020 if (!chppWifiConvertNanSubscribeConfigToChre(in, out, inSize)) { in chppWifiNanSubscribeConfigToChre()
1029 const struct ChppWifiNanDiscoveryEvent *in, size_t inSize) { in chppWifiNanDiscoveryEventToChre() argument
1035 if (!chppWifiConvertNanDiscoveryEventToChre(in, out, inSize)) { in chppWifiNanDiscoveryEventToChre()
1044 const struct ChppWifiNanSessionLostEvent *in, size_t inSize) { in chppWifiNanSessionLostEventToChre() argument
1050 if (!chppWifiConvertNanSessionLostEventToChre(in, out)) { in chppWifiNanSessionLostEventToChre()
1060 const struct ChppWifiNanSessionTerminatedEvent *in, size_t inSize) { in chppWifiNanSessionTerminatedEventToChre() argument
1066 if (!chppWifiConvertNanSessionTerminatedEventToChre(in, out)) { in chppWifiNanSessionTerminatedEventToChre()
1075 const struct ChppWifiNanRangingParams *in, size_t inSize) { in chppWifiNanRangingParamsToChre() argument
1081 if (!chppWifiConvertNanRangingParamsToChre(in, out)) { in chppWifiNanRangingParamsToChre()