Lines Matching refs:result
340 wifi_scan_result *result = results + i; in parseScanResults() local
345 strncpy(result->ssid, (char *) it2.get_data(), it2.get_len()); in parseScanResults()
346 result->ssid[it2.get_len()] = 0; in parseScanResults()
348 memcpy(result->bssid, (byte *) it2.get_data(), sizeof(mac_addr)); in parseScanResults()
350 result->ts = it2.get_u64(); in parseScanResults()
352 result->ts = it2.get_u16(); in parseScanResults()
354 result->rssi = it2.get_u8(); in parseScanResults()
356 result->rtt = it2.get_u64(); in parseScanResults()
358 result->rtt_sd = it2.get_u64(); in parseScanResults()
373 int result = request.create(GOOGLE_OUI, subcmd); in createFeatureRequest() local
374 if (result < 0) { in createFeatureRequest()
375 return result; in createFeatureRequest()
379 result = request.put_u32(GSCAN_ATTRIBUTE_ENABLE_FEATURE, enable); in createFeatureRequest()
380 if (result < 0) { in createFeatureRequest()
381 return result; in createFeatureRequest()
400 int result = request.create(GOOGLE_OUI, subcmd); in createRequest() local
401 if (result < 0) { in createRequest()
402 return result; in createRequest()
406 result = request.put_u32(GSCAN_ENABLE_FULL_SCAN_RESULTS, enable); in createRequest()
407 if (result < 0) { in createRequest()
408 return result; in createRequest()
419 int result = createRequest(request, GSCAN_SUBCMD_ENABLE_FULL_SCAN_RESULTS, 1); in start() local
420 if (result != WIFI_SUCCESS) { in start()
421 ALOGE("failed to create request; result = %d", result); in start()
422 return result; in start()
427 result = requestResponse(request); in start()
428 if (result != WIFI_SUCCESS) { in start()
429 ALOGE("failed to enable full scan results; result = %d", result); in start()
431 return result; in start()
434 return result; in start()
441 int result = createRequest(request, GSCAN_SUBCMD_ENABLE_FULL_SCAN_RESULTS, 0); in cancel() local
442 if (result != WIFI_SUCCESS) { in cancel()
443 ALOGE("failed to create request; result = %d", result); in cancel()
445 result = requestResponse(request); in cancel()
446 if (result != WIFI_SUCCESS) { in cancel()
447 ALOGE("failed to disable full scan results;result = %d", result); in cancel()
480 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_CONFIG); in createSetupRequest() local
481 if (result < 0) { in createSetupRequest()
482 return result; in createSetupRequest()
486 result = request.put_u32(GSCAN_ATTRIBUTE_BASE_PERIOD, mParams->base_period); in createSetupRequest()
487 if (result < 0) { in createSetupRequest()
488 return result; in createSetupRequest()
491 result = request.put_u32(GSCAN_ATTRIBUTE_NUM_BUCKETS, mParams->num_buckets); in createSetupRequest()
492 if (result < 0) { in createSetupRequest()
493 return result; in createSetupRequest()
498 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_ID, mParams->buckets[i].bucket); in createSetupRequest()
499 if (result < 0) { in createSetupRequest()
500 return result; in createSetupRequest()
502 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_PERIOD, mParams->buckets[i].period); in createSetupRequest()
503 if (result < 0) { in createSetupRequest()
504 return result; in createSetupRequest()
506 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKETS_BAND, in createSetupRequest()
508 if (result < 0) { in createSetupRequest()
509 return result; in createSetupRequest()
511 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_STEP_COUNT, in createSetupRequest()
513 if (result < 0) { in createSetupRequest()
514 return result; in createSetupRequest()
516 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_MAX_PERIOD, in createSetupRequest()
518 if (result < 0) { in createSetupRequest()
519 return result; in createSetupRequest()
521 result = request.put_u32(GSCAN_ATTRIBUTE_REPORT_EVENTS, in createSetupRequest()
523 if (result < 0) { in createSetupRequest()
524 return result; in createSetupRequest()
527 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_NUM_CHANNELS, in createSetupRequest()
529 if (result < 0) { in createSetupRequest()
530 return result; in createSetupRequest()
537 result = request.put_u32(j, mParams->buckets[i].channels[j].channel); in createSetupRequest()
540 if (result < 0) { in createSetupRequest()
541 return result; in createSetupRequest()
555 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_SCAN_CONFIG); in createScanConfigRequest() local
556 if (result < 0) { in createScanConfigRequest()
557 return result; in createScanConfigRequest()
561 result = request.put_u32(GSCAN_ATTRIBUTE_NUM_AP_PER_SCAN, mParams->max_ap_per_scan); in createScanConfigRequest()
562 if (result < 0) { in createScanConfigRequest()
563 return result; in createScanConfigRequest()
566 result = request.put_u32(GSCAN_ATTRIBUTE_REPORT_THRESHOLD, in createScanConfigRequest()
568 if (result < 0) { in createScanConfigRequest()
569 return result; in createScanConfigRequest()
574 result = request.put_u32(GSCAN_ATTRIBUTE_NUM_SCANS_TO_CACHE, num_scans); in createScanConfigRequest()
575 if (result < 0) { in createScanConfigRequest()
576 return result; in createScanConfigRequest()
594 int result = createSetupRequest(request); in start() local
595 if (result != WIFI_SUCCESS) { in start()
596 ALOGE("failed to create setup request; result = %d", result); in start()
597 return result; in start()
600 result = requestResponse(request); in start()
601 if (result != WIFI_SUCCESS) { in start()
602 ALOGE("failed to configure setup; result = %d", result); in start()
603 return result; in start()
608 result = createScanConfigRequest(request); in start()
609 if (result != WIFI_SUCCESS) { in start()
610 ALOGE("failed to create scan config request; result = %d", result); in start()
611 return result; in start()
614 result = requestResponse(request); in start()
615 if (result != WIFI_SUCCESS) { in start()
616 ALOGE("failed to configure scan; result = %d", result); in start()
617 return result; in start()
622 result = createStartRequest(request); in start()
623 if (result != WIFI_SUCCESS) { in start()
624 ALOGE("failed to create start request; result = %d", result); in start()
625 return result; in start()
632 result = requestResponse(request); in start()
633 if (result != WIFI_SUCCESS) { in start()
634 ALOGE("failed to start scan; result = %d", result); in start()
638 return result; in start()
640 return result; in start()
647 int result = createStopRequest(request); in cancel() local
648 if (result != WIFI_SUCCESS) { in cancel()
649 ALOGE("failed to create stop request; result = %d", result); in cancel()
651 result = requestResponse(request); in cancel()
652 if (result != WIFI_SUCCESS) { in cancel()
653 ALOGE("failed to stop scan; result = %d", result); in cancel()
706 wifi_error result = wifi_register_cmd(handle, id, cmd); in wifi_start_gscan() local
707 if (result != WIFI_SUCCESS) { in wifi_start_gscan()
709 return result; in wifi_start_gscan()
711 result = (wifi_error)cmd->start(); in wifi_start_gscan()
712 if (result != WIFI_SUCCESS) { in wifi_start_gscan()
715 return result; in wifi_start_gscan()
717 return result; in wifi_start_gscan()
753 wifi_error result = wifi_register_cmd(handle, id, cmd); in wifi_enable_full_scan_results() local
754 if (result != WIFI_SUCCESS) { in wifi_enable_full_scan_results()
756 return result; in wifi_enable_full_scan_results()
758 result = (wifi_error)cmd->start(); in wifi_enable_full_scan_results()
759 if (result != WIFI_SUCCESS) { in wifi_enable_full_scan_results()
762 return result; in wifi_enable_full_scan_results()
764 return result; in wifi_enable_full_scan_results()
850 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_GET_SCAN_RESULTS); in createRequest() local
851 if (result < 0) { in createRequest()
852 return result; in createRequest()
856 result = request.put_u32(GSCAN_ATTRIBUTE_NUM_OF_RESULTS, num); in createRequest()
857 if (result < 0) { in createRequest()
858 return result; in createRequest()
861 result = request.put_u8(GSCAN_ATTRIBUTE_FLUSH_RESULTS, flush); in createRequest()
862 if (result < 0) { in createRequest()
863 return result; in createRequest()
877 int result = createRequest(request, num_to_retrieve, mFlush); in execute() local
878 if (result < 0) { in execute()
880 return result; in execute()
885 result = requestResponse(request); in execute()
887 if (result != WIFI_SUCCESS) { in execute()
888 ALOGE("failed to retrieve scan results; result = %d", result); in execute()
889 return result; in execute()
964 wifi_gscan_result_t *result = &results[i]; in handleResponse() local
965 convert_to_hal_result(&mScanResults[i], result); in handleResponse()
968 result->ssid, result->bssid[0], result->bssid[1], result->bssid[2], in handleResponse()
969 result->bssid[3], result->bssid[4], result->bssid[5], in handleResponse()
970 result->rssi); in handleResponse()
1020 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_HOTLIST); in createSetupRequest() local
1021 if (result < 0) { in createSetupRequest()
1022 return result; in createSetupRequest()
1026 result = request.put_u8(GSCAN_ATTRIBUTE_HOTLIST_FLUSH, 1); in createSetupRequest()
1027 if (result < 0) { in createSetupRequest()
1028 return result; in createSetupRequest()
1031 result = request.put_u32(GSCAN_ATTRIBUTE_LOST_AP_SAMPLE_SIZE, mParams.lost_ap_sample_size); in createSetupRequest()
1032 if (result < 0) { in createSetupRequest()
1033 return result; in createSetupRequest()
1036 result = request.put_u32(GSCAN_ATTRIBUTE_HOTLIST_BSSID_COUNT, mParams.num_bssid); in createSetupRequest()
1037 if (result < 0) { in createSetupRequest()
1038 return result; in createSetupRequest()
1047 result = request.put_addr(GSCAN_ATTRIBUTE_BSSID, mParams.ap[i].bssid); in createSetupRequest()
1048 if (result < 0) { in createSetupRequest()
1049 return result; in createSetupRequest()
1051 result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_HIGH, mParams.ap[i].high); in createSetupRequest()
1052 if (result < 0) { in createSetupRequest()
1053 return result; in createSetupRequest()
1055 result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_LOW, mParams.ap[i].low); in createSetupRequest()
1056 if (result < 0) { in createSetupRequest()
1057 return result; in createSetupRequest()
1064 return result; in createSetupRequest()
1068 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_HOTLIST); in createTeardownRequest() local
1069 if (result < 0) { in createTeardownRequest()
1070 return result; in createTeardownRequest()
1074 result = request.put_u8(GSCAN_ATTRIBUTE_HOTLIST_FLUSH, 1); in createTeardownRequest()
1075 if (result < 0) { in createTeardownRequest()
1076 return result; in createTeardownRequest()
1082 return result; in createTeardownRequest()
1088 int result = createSetupRequest(request); in start() local
1089 if (result < 0) { in start()
1090 return result; in start()
1093 result = requestResponse(request); in start()
1094 if (result < 0) { in start()
1095 ALOGI("Failed to execute hotlist setup request, result = %d", result); in start()
1098 return result; in start()
1102 result = createFeatureRequest(request, GSCAN_SUBCMD_ENABLE_GSCAN, 1); in start()
1103 if (result < 0) { in start()
1104 return result; in start()
1110 result = requestResponse(request); in start()
1111 if (result < 0) { in start()
1114 return result; in start()
1118 return result; in start()
1127 int result = createTeardownRequest(request); in cancel() local
1128 if (result < 0) { in cancel()
1129 return result; in cancel()
1132 result = requestResponse(request); in cancel()
1133 if (result < 0) { in cancel()
1134 return result; in cancel()
1138 return result; in cancel()
1203 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_EPNO_SSID); in createSetupRequest() local
1204 if (result < 0) { in createSetupRequest()
1205 return result; in createSetupRequest()
1208 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_FLUSH, 1); in createSetupRequest()
1209 if (result < 0) { in createSetupRequest()
1210 return result; in createSetupRequest()
1213 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_5G_RSSI_THR, in createSetupRequest()
1215 if (result < 0) { in createSetupRequest()
1216 return result; in createSetupRequest()
1218 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_2G_RSSI_THR, in createSetupRequest()
1220 if (result < 0) { in createSetupRequest()
1221 return result; in createSetupRequest()
1223 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_INIT_SCORE_MAX, in createSetupRequest()
1225 if (result < 0) { in createSetupRequest()
1226 return result; in createSetupRequest()
1228 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_CUR_CONN_BONUS, in createSetupRequest()
1230 if (result < 0) { in createSetupRequest()
1231 return result; in createSetupRequest()
1233 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_SAME_NETWORK_BONUS, in createSetupRequest()
1235 if (result < 0) { in createSetupRequest()
1236 return result; in createSetupRequest()
1238 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_SECURE_BONUS, in createSetupRequest()
1240 if (result < 0) { in createSetupRequest()
1241 return result; in createSetupRequest()
1243 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_5G_BONUS, in createSetupRequest()
1245 if (result < 0) { in createSetupRequest()
1246 return result; in createSetupRequest()
1248 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_SSID_NUM, in createSetupRequest()
1250 if (result < 0) { in createSetupRequest()
1251 return result; in createSetupRequest()
1260 result = request.put(GSCAN_ATTRIBUTE_EPNO_SSID, ssid_list[i].ssid, DOT11_MAX_SSID_LEN); in createSetupRequest()
1264 if (result < 0) { in createSetupRequest()
1265 return result; in createSetupRequest()
1267 result = request.put_u32(GSCAN_ATTRIBUTE_EPNO_SSID_LEN, strlen(ssid_list[i].ssid)); in createSetupRequest()
1268 if (result < 0) { in createSetupRequest()
1269 return result; in createSetupRequest()
1271 result = request.put_u32(GSCAN_ATTRIBUTE_EPNO_FLAGS, ssid_list[i].flags); in createSetupRequest()
1272 if (result < 0) { in createSetupRequest()
1273 return result; in createSetupRequest()
1275 result = request.put_u32(GSCAN_ATTRIBUTE_EPNO_AUTH, ssid_list[i].auth_bit_field); in createSetupRequest()
1276 if (result < 0) { in createSetupRequest()
1277 return result; in createSetupRequest()
1283 return result; in createSetupRequest()
1287 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_EPNO_SSID); in createTeardownRequest() local
1288 if (result < 0) { in createTeardownRequest()
1289 return result; in createTeardownRequest()
1293 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_FLUSH, 1); in createTeardownRequest()
1294 if (result < 0) { in createTeardownRequest()
1295 return result; in createTeardownRequest()
1298 return result; in createTeardownRequest()
1304 int result = createSetupRequest(request); in start() local
1305 if (result < 0) { in start()
1306 return result; in start()
1309 result = requestResponse(request); in start()
1310 if (result < 0) { in start()
1311 ALOGI("Failed to execute ePNO setup request, result = %d", result); in start()
1313 return result; in start()
1319 return result; in start()
1327 int result = createTeardownRequest(request); in cancel() local
1328 if (result < 0) { in cancel()
1329 return result; in cancel()
1332 result = requestResponse(request); in cancel()
1333 if (result < 0) { in cancel()
1334 return result; in cancel()
1338 return result; in cancel()
1388 wifi_error result = wifi_register_cmd(handle, id, cmd); in wifi_set_bssid_hotlist() local
1389 if (result != WIFI_SUCCESS) { in wifi_set_bssid_hotlist()
1391 return result; in wifi_set_bssid_hotlist()
1393 result = (wifi_error)cmd->start(); in wifi_set_bssid_hotlist()
1394 if (result != WIFI_SUCCESS) { in wifi_set_bssid_hotlist()
1397 return result; in wifi_set_bssid_hotlist()
1399 return result; in wifi_set_bssid_hotlist()
1433 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_SIGNIFICANT_CHANGE_CONFIG); in createSetupRequest() local
1434 if (result < 0) { in createSetupRequest()
1435 return result; in createSetupRequest()
1439 result = request.put_u8(GSCAN_ATTRIBUTE_SIGNIFICANT_CHANGE_FLUSH, 1); in createSetupRequest()
1440 if (result < 0) { in createSetupRequest()
1441 return result; in createSetupRequest()
1443 result = request.put_u16(GSCAN_ATTRIBUTE_RSSI_SAMPLE_SIZE, mParams.rssi_sample_size); in createSetupRequest()
1444 if (result < 0) { in createSetupRequest()
1445 return result; in createSetupRequest()
1447 result = request.put_u16(GSCAN_ATTRIBUTE_LOST_AP_SAMPLE_SIZE, mParams.lost_ap_sample_size); in createSetupRequest()
1448 if (result < 0) { in createSetupRequest()
1449 return result; in createSetupRequest()
1451 result = request.put_u16(GSCAN_ATTRIBUTE_MIN_BREACHING, mParams.min_breaching); in createSetupRequest()
1452 if (result < 0) { in createSetupRequest()
1453 return result; in createSetupRequest()
1455 result = request.put_u16(GSCAN_ATTRIBUTE_NUM_BSSID, mParams.num_bssid); in createSetupRequest()
1456 if (result < 0) { in createSetupRequest()
1457 return result; in createSetupRequest()
1470 result = request.put_addr(GSCAN_ATTRIBUTE_BSSID, mParams.ap[i].bssid); in createSetupRequest()
1471 if (result < 0) { in createSetupRequest()
1472 return result; in createSetupRequest()
1474 result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_HIGH, mParams.ap[i].high); in createSetupRequest()
1475 if (result < 0) { in createSetupRequest()
1476 return result; in createSetupRequest()
1478 result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_LOW, mParams.ap[i].low); in createSetupRequest()
1479 if (result < 0) { in createSetupRequest()
1480 return result; in createSetupRequest()
1489 return result; in createSetupRequest()
1493 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_SIGNIFICANT_CHANGE_CONFIG); in createTeardownRequest() local
1494 if (result < 0) { in createTeardownRequest()
1495 return result; in createTeardownRequest()
1499 result = request.put_u16(GSCAN_ATTRIBUTE_SIGNIFICANT_CHANGE_FLUSH, 1); in createTeardownRequest()
1500 if (result < 0) { in createTeardownRequest()
1501 return result; in createTeardownRequest()
1505 return result; in createTeardownRequest()
1512 int result = createSetupRequest(request); in start() local
1513 if (result < 0) { in start()
1514 return result; in start()
1517 result = requestResponse(request); in start()
1518 if (result < 0) { in start()
1519 ALOGI("failed to set significant wifi change config %d", result); in start()
1520 return result; in start()
1525 result = createFeatureRequest(request, GSCAN_SUBCMD_ENABLE_GSCAN, 1); in start()
1526 if (result < 0) { in start()
1527 return result; in start()
1532 result = requestResponse(request); in start()
1533 if (result < 0) { in start()
1535 return result; in start()
1539 return result; in start()
1549 int result = createTeardownRequest(request); in cancel() local
1550 if (result < 0) { in cancel()
1551 return result; in cancel()
1554 result = requestResponse(request); in cancel()
1555 if (result < 0) { in cancel()
1556 return result; in cancel()
1560 return result; in cancel()
1618 wifi_error result = wifi_register_cmd(handle, id, cmd); in wifi_set_significant_change_handler() local
1619 if (result != WIFI_SUCCESS) { in wifi_set_significant_change_handler()
1621 return result; in wifi_set_significant_change_handler()
1623 result = (wifi_error)cmd->start(); in wifi_set_significant_change_handler()
1624 if (result != WIFI_SUCCESS) { in wifi_set_significant_change_handler()
1627 return result; in wifi_set_significant_change_handler()
1629 return result; in wifi_set_significant_change_handler()
1660 wifi_error result = wifi_register_cmd(handle, id, cmd); in wifi_set_epno_list() local
1661 if (result != WIFI_SUCCESS) { in wifi_set_epno_list()
1663 return result; in wifi_set_epno_list()
1665 result = (wifi_error)cmd->start(); in wifi_set_epno_list()
1666 if (result != WIFI_SUCCESS) { in wifi_set_epno_list()
1669 return result; in wifi_set_epno_list()
1671 return result; in wifi_set_epno_list()
1694 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_ANQPO_CONFIG); in createRequest() local
1695 result = request.put_u32(GSCAN_ATTRIBUTE_ANQPO_HS_LIST_SIZE, num_hs); in createRequest()
1696 if (result < 0) { in createRequest()
1697 return result; in createRequest()
1708 result = request.put_u32(GSCAN_ATTRIBUTE_ANQPO_HS_NETWORK_ID, mNetworks[i].id); in createRequest()
1709 if (result < 0) { in createRequest()
1710 return result; in createRequest()
1712 result = request.put(GSCAN_ATTRIBUTE_ANQPO_HS_NAI_REALM, mNetworks[i].realm, 256); in createRequest()
1713 if (result < 0) { in createRequest()
1714 return result; in createRequest()
1716 result = request.put(GSCAN_ATTRIBUTE_ANQPO_HS_ROAM_CONSORTIUM_ID, in createRequest()
1718 if (result < 0) { in createRequest()
1719 return result; in createRequest()
1721 result = request.put(GSCAN_ATTRIBUTE_ANQPO_HS_PLMN, mNetworks[i].plmn, 3); in createRequest()
1722 if (result < 0) { in createRequest()
1723 return result; in createRequest()
1738 int result = createRequest(request, num_hs); in start() local
1739 if (result != WIFI_SUCCESS) { in start()
1740 ALOGE("failed to create request; result = %d", result); in start()
1741 return result; in start()
1746 result = requestResponse(request); in start()
1747 if (result != WIFI_SUCCESS) { in start()
1748 ALOGE("failed to set ANQPO networks; result = %d", result); in start()
1750 return result; in start()
1753 return result; in start()
1759 int result = createRequest(request, 0); in cancel() local
1760 if (result != WIFI_SUCCESS) { in cancel()
1761 ALOGE("failed to create request; result = %d", result); in cancel()
1763 result = requestResponse(request); in cancel()
1764 if (result != WIFI_SUCCESS) { in cancel()
1765 ALOGE("failed to reset ANQPO networks;result = %d", result); in cancel()
1836 wifi_error result = wifi_register_cmd(handle, id, cmd); in wifi_set_passpoint_list() local
1837 if (result != WIFI_SUCCESS) { in wifi_set_passpoint_list()
1839 return result; in wifi_set_passpoint_list()
1841 result = (wifi_error)cmd->start(); in wifi_set_passpoint_list()
1842 if (result != WIFI_SUCCESS) { in wifi_set_passpoint_list()
1845 return result; in wifi_set_passpoint_list()
1847 return result; in wifi_set_passpoint_list()