Lines Matching refs:request
354 int createFeatureRequest(WifiRequest& request, int subcmd, int enable) { in createFeatureRequest() argument
356 int result = request.create(GOOGLE_OUI, subcmd); in createFeatureRequest()
361 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createFeatureRequest()
362 result = request.put_u32(GSCAN_ATTRIBUTE_ENABLE_FEATURE, enable); in createFeatureRequest()
367 request.attr_end(data); in createFeatureRequest()
382 int createRequest(WifiRequest& request, int subcmd, int enable) { in createRequest() argument
383 int result = request.create(GOOGLE_OUI, subcmd); in createRequest()
388 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createRequest()
389 result = request.put_u32(GSCAN_ENABLE_FULL_SCAN_RESULTS, enable); in createRequest()
394 request.attr_end(data); in createRequest()
401 WifiRequest request(familyId(), ifaceId()); in start() local
402 int result = createRequest(request, GSCAN_SUBCMD_ENABLE_FULL_SCAN_RESULTS, 1); in start()
410 result = requestResponse(request); in start()
423 WifiRequest request(familyId(), ifaceId()); in cancel() local
424 int result = createRequest(request, GSCAN_SUBCMD_ENABLE_FULL_SCAN_RESULTS, 0); in cancel()
428 result = requestResponse(request); in cancel()
462 int createSetupRequest(WifiRequest& request) { in createSetupRequest() argument
463 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_CONFIG); in createSetupRequest()
468 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createSetupRequest()
469 result = request.put_u32(GSCAN_ATTRIBUTE_BASE_PERIOD, mParams->base_period); in createSetupRequest()
474 result = request.put_u32(GSCAN_ATTRIBUTE_NUM_BUCKETS, mParams->num_buckets); in createSetupRequest()
480 nlattr * bucket = request.attr_start(i); // next bucket in createSetupRequest()
481 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_ID, mParams->buckets[i].bucket); in createSetupRequest()
485 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_PERIOD, mParams->buckets[i].period); in createSetupRequest()
489 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKETS_BAND, in createSetupRequest()
494 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_STEP_COUNT, in createSetupRequest()
499 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_MAX_PERIOD, in createSetupRequest()
504 result = request.put_u32(GSCAN_ATTRIBUTE_REPORT_EVENTS, in createSetupRequest()
510 result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_NUM_CHANNELS, in createSetupRequest()
517 nlattr *channels = request.attr_start(GSCAN_ATTRIBUTE_BUCKET_CHANNELS); in createSetupRequest()
520 result = request.put_u32(j, mParams->buckets[i].channels[j].channel); in createSetupRequest()
527 request.attr_end(channels); in createSetupRequest()
530 request.attr_end(bucket); in createSetupRequest()
533 request.attr_end(data); in createSetupRequest()
537 int createScanConfigRequest(WifiRequest& request) { in createScanConfigRequest() argument
538 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_SCAN_CONFIG); in createScanConfigRequest()
543 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createScanConfigRequest()
544 result = request.put_u32(GSCAN_ATTRIBUTE_NUM_AP_PER_SCAN, mParams->max_ap_per_scan); in createScanConfigRequest()
549 result = request.put_u32(GSCAN_ATTRIBUTE_REPORT_THRESHOLD, in createScanConfigRequest()
557 result = request.put_u32(GSCAN_ATTRIBUTE_NUM_SCANS_TO_CACHE, num_scans); in createScanConfigRequest()
562 request.attr_end(data); in createScanConfigRequest()
566 int createStartRequest(WifiRequest& request) { in createStartRequest() argument
567 return createFeatureRequest(request, GSCAN_SUBCMD_ENABLE_GSCAN, 1); in createStartRequest()
570 int createStopRequest(WifiRequest& request) { in createStopRequest() argument
571 return createFeatureRequest(request, GSCAN_SUBCMD_ENABLE_GSCAN, 0); in createStopRequest()
576 WifiRequest request(familyId(), ifaceId()); in start() local
577 int result = createSetupRequest(request); in start()
583 result = requestResponse(request); in start()
589 request.destroy(); in start()
591 result = createScanConfigRequest(request); in start()
597 result = requestResponse(request); in start()
605 result = createStartRequest(request); in start()
615 result = requestResponse(request); in start()
629 WifiRequest request(familyId(), ifaceId()); in cancel() local
630 int result = createStopRequest(request); in cancel()
634 result = requestResponse(request); in cancel()
832 int createRequest(WifiRequest& request, int num, byte flush) { in createRequest() argument
833 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_GET_SCAN_RESULTS); in createRequest()
838 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createRequest()
839 result = request.put_u32(GSCAN_ATTRIBUTE_NUM_OF_RESULTS, num); in createRequest()
844 result = request.put_u8(GSCAN_ATTRIBUTE_FLUSH_RESULTS, flush); in createRequest()
849 request.attr_end(data); in createRequest()
854 WifiRequest request(familyId(), ifaceId()); in execute() local
860 int result = createRequest(request, num_to_retrieve, mFlush); in execute()
868 result = requestResponse(request); in execute()
880 request.destroy(); in execute()
1002 int createSetupRequest(WifiRequest& request) { in createSetupRequest() argument
1003 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_HOTLIST); in createSetupRequest()
1008 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createSetupRequest()
1009 result = request.put_u8(GSCAN_ATTRIBUTE_HOTLIST_FLUSH, 1); in createSetupRequest()
1014 result = request.put_u32(GSCAN_ATTRIBUTE_LOST_AP_SAMPLE_SIZE, mParams.lost_ap_sample_size); in createSetupRequest()
1019 struct nlattr * attr = request.attr_start(GSCAN_ATTRIBUTE_HOTLIST_BSSIDS); in createSetupRequest()
1021 nlattr *attr2 = request.attr_start(GSCAN_ATTRIBUTE_HOTLIST_ELEM); in createSetupRequest()
1025 result = request.put_addr(GSCAN_ATTRIBUTE_BSSID, mParams.ap[i].bssid); in createSetupRequest()
1029 result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_HIGH, mParams.ap[i].high); in createSetupRequest()
1033 result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_LOW, mParams.ap[i].low); in createSetupRequest()
1037 request.attr_end(attr2); in createSetupRequest()
1040 request.attr_end(attr); in createSetupRequest()
1041 request.attr_end(data); in createSetupRequest()
1045 int createTeardownRequest(WifiRequest& request) { in createTeardownRequest() argument
1046 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_HOTLIST); in createTeardownRequest()
1051 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createTeardownRequest()
1052 result = request.put_u8(GSCAN_ATTRIBUTE_HOTLIST_FLUSH, 1); in createTeardownRequest()
1057 struct nlattr * attr = request.attr_start(GSCAN_ATTRIBUTE_HOTLIST_BSSIDS); in createTeardownRequest()
1058 request.attr_end(attr); in createTeardownRequest()
1059 request.attr_end(data); in createTeardownRequest()
1065 WifiRequest request(familyId(), ifaceId()); in start() local
1066 int result = createSetupRequest(request); in start()
1071 result = requestResponse(request); in start()
1080 result = createFeatureRequest(request, GSCAN_SUBCMD_ENABLE_GSCAN, 1); in start()
1088 result = requestResponse(request); in start()
1104 WifiRequest request(familyId(), ifaceId()); in cancel() local
1105 int result = createTeardownRequest(request); in cancel()
1110 result = requestResponse(request); in cancel()
1176 int createSetupRequest(WifiRequest& request) { in createSetupRequest() argument
1177 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_EPNO_SSID); in createSetupRequest()
1181 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createSetupRequest()
1182 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_FLUSH, 1); in createSetupRequest()
1187 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_5G_RSSI_THR, in createSetupRequest()
1192 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_2G_RSSI_THR, in createSetupRequest()
1197 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_INIT_SCORE_MAX, in createSetupRequest()
1202 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_CUR_CONN_BONUS, in createSetupRequest()
1207 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_SAME_NETWORK_BONUS, in createSetupRequest()
1212 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_SECURE_BONUS, in createSetupRequest()
1217 result = request.put_u16(GSCAN_ATTRIBUTE_EPNO_5G_BONUS, in createSetupRequest()
1222 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_SSID_NUM, in createSetupRequest()
1227 struct nlattr * attr = request.attr_start(GSCAN_ATTRIBUTE_EPNO_SSID_LIST); in createSetupRequest()
1230 nlattr *attr2 = request.attr_start(i); in createSetupRequest()
1234 result = request.put(GSCAN_ATTRIBUTE_EPNO_SSID, ssid_list[i].ssid, DOT11_MAX_SSID_LEN); in createSetupRequest()
1241 result = request.put_u32(GSCAN_ATTRIBUTE_EPNO_SSID_LEN, strlen(ssid_list[i].ssid)); in createSetupRequest()
1245 result = request.put_u32(GSCAN_ATTRIBUTE_EPNO_FLAGS, ssid_list[i].flags); in createSetupRequest()
1249 result = request.put_u32(GSCAN_ATTRIBUTE_EPNO_AUTH, ssid_list[i].auth_bit_field); in createSetupRequest()
1253 request.attr_end(attr2); in createSetupRequest()
1255 request.attr_end(attr); in createSetupRequest()
1256 request.attr_end(data); in createSetupRequest()
1260 int createTeardownRequest(WifiRequest& request) { in createTeardownRequest() argument
1261 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_EPNO_SSID); in createTeardownRequest()
1266 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createTeardownRequest()
1267 result = request.put_u8(GSCAN_ATTRIBUTE_EPNO_FLUSH, 1); in createTeardownRequest()
1271 request.attr_end(data); in createTeardownRequest()
1277 WifiRequest request(familyId(), ifaceId()); in start() local
1278 int result = createSetupRequest(request); in start()
1283 result = requestResponse(request); in start()
1300 WifiRequest request(familyId(), ifaceId()); in cancel() local
1301 int result = createTeardownRequest(request); in cancel()
1306 result = requestResponse(request); in cancel()
1406 int createSetupRequest(WifiRequest& request) { in createSetupRequest() argument
1407 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_SIGNIFICANT_CHANGE_CONFIG); in createSetupRequest()
1412 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createSetupRequest()
1413 result = request.put_u8(GSCAN_ATTRIBUTE_SIGNIFICANT_CHANGE_FLUSH, 1); in createSetupRequest()
1417 result = request.put_u16(GSCAN_ATTRIBUTE_RSSI_SAMPLE_SIZE, mParams.rssi_sample_size); in createSetupRequest()
1421 result = request.put_u16(GSCAN_ATTRIBUTE_LOST_AP_SAMPLE_SIZE, mParams.lost_ap_sample_size); in createSetupRequest()
1425 result = request.put_u16(GSCAN_ATTRIBUTE_MIN_BREACHING, mParams.min_breaching); in createSetupRequest()
1430 struct nlattr * attr = request.attr_start(GSCAN_ATTRIBUTE_SIGNIFICANT_CHANGE_BSSIDS); in createSetupRequest()
1433 nlattr *attr2 = request.attr_start(i); in createSetupRequest()
1437 result = request.put_addr(GSCAN_ATTRIBUTE_BSSID, mParams.ap[i].bssid); in createSetupRequest()
1441 result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_HIGH, mParams.ap[i].high); in createSetupRequest()
1445 result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_LOW, mParams.ap[i].low); in createSetupRequest()
1449 request.attr_end(attr2); in createSetupRequest()
1452 request.attr_end(attr); in createSetupRequest()
1453 request.attr_end(data); in createSetupRequest()
1458 int createTeardownRequest(WifiRequest& request) { in createTeardownRequest() argument
1459 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_SET_SIGNIFICANT_CHANGE_CONFIG); in createTeardownRequest()
1464 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createTeardownRequest()
1465 result = request.put_u16(GSCAN_ATTRIBUTE_SIGNIFICANT_CHANGE_FLUSH, 1); in createTeardownRequest()
1470 request.attr_end(data); in createTeardownRequest()
1476 WifiRequest request(familyId(), ifaceId()); in start() local
1478 int result = createSetupRequest(request); in start()
1483 result = requestResponse(request); in start()
1491 result = createFeatureRequest(request, GSCAN_SUBCMD_ENABLE_GSCAN, 1); in start()
1498 result = requestResponse(request); in start()
1513 WifiRequest request(familyId(), ifaceId()); in cancel() local
1515 int result = createTeardownRequest(request); in cancel()
1520 result = requestResponse(request); in cancel()
1649 int createRequest(WifiRequest& request) { in createRequest() argument
1650 int result = request.create(GOOGLE_OUI, WIFI_SUBCMD_SET_BSSID_BLACKLIST); in createRequest()
1655 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createRequest()
1656 result = request.put_u32(GSCAN_ATTRIBUTE_NUM_BSSID, mParams->num_bssid); in createRequest()
1661 result = request.put_u32(GSCAN_ATTRIBUTE_BSSID_BLACKLIST_FLUSH, 1); in createRequest()
1667 result = request.put_addr(GSCAN_ATTRIBUTE_BLACKLIST_BSSID, mParams->bssids[i]); in createRequest()
1672 request.attr_end(data); in createRequest()
1678 WifiRequest request(familyId(), ifaceId()); in start() local
1679 int result = createRequest(request); in start()
1684 result = requestResponse(request); in start()
1734 int createRequest(WifiRequest& request, int val) { in createRequest() argument
1736 int result = request.create(GOOGLE_OUI, GSCAN_SUBCMD_ANQPO_CONFIG); in createRequest()
1737 result = request.put_u32(GSCAN_ATTRIBUTE_ANQPO_HS_LIST_SIZE, num_hs); in createRequest()
1742 nlattr *data = request.attr_start(NL80211_ATTR_VENDOR_DATA); in createRequest()
1744 struct nlattr * attr = request.attr_start(GSCAN_ATTRIBUTE_ANQPO_HS_LIST); in createRequest()
1746 nlattr *attr2 = request.attr_start(i); in createRequest()
1750 result = request.put_u32(GSCAN_ATTRIBUTE_ANQPO_HS_NETWORK_ID, mNetworks[i].id); in createRequest()
1754 result = request.put(GSCAN_ATTRIBUTE_ANQPO_HS_NAI_REALM, mNetworks[i].realm, 256); in createRequest()
1758 result = request.put(GSCAN_ATTRIBUTE_ANQPO_HS_ROAM_CONSORTIUM_ID, in createRequest()
1763 result = request.put(GSCAN_ATTRIBUTE_ANQPO_HS_PLMN, mNetworks[i].plmn, 3); in createRequest()
1768 request.attr_end(attr2); in createRequest()
1771 request.attr_end(attr); in createRequest()
1772 request.attr_end(data); in createRequest()
1779 WifiRequest request(familyId(), ifaceId()); in start() local
1780 int result = createRequest(request, num_hs); in start()
1788 result = requestResponse(request); in start()
1800 WifiRequest request(familyId(), ifaceId()); in cancel() local
1801 int result = createRequest(request, 0); in cancel()
1805 result = requestResponse(request); in cancel()