Home | History | Annotate | Download | only in wifi_hal

Lines Matching refs:pReq

23 int NanCommand::putNanEnable(transaction_id id, const NanEnableRequest *pReq)
28 if (pReq == NULL) {
35 pReq->config_support_5g ? (SIZEOF_TLV_HDR + \
36 sizeof(pReq->support_5g_val)) : 0 \
39 pReq->config_sid_beacon ? (SIZEOF_TLV_HDR + \
40 sizeof(pReq->sid_beacon_val)) : 0 \
43 pReq->config_2dot4g_rssi_close ? (SIZEOF_TLV_HDR + \
44 sizeof(pReq->rssi_close_2dot4g_val)) : 0 \
47 pReq->config_2dot4g_rssi_middle ? (SIZEOF_TLV_HDR + \
48 sizeof(pReq->rssi_middle_2dot4g_val)) : 0 \
51 pReq->config_hop_count_limit ? (SIZEOF_TLV_HDR + \
52 sizeof(pReq->hop_count_limit_val)) : 0 \
55 pReq->config_2dot4g_support ? (SIZEOF_TLV_HDR + \
56 sizeof(pReq->support_2dot4g_val)) : 0 \
59 pReq->config_2dot4g_beacons ? (SIZEOF_TLV_HDR + \
60 sizeof(pReq->beacon_2dot4g_val)) : 0 \
63 pReq->config_2dot4g_sdf ? (SIZEOF_TLV_HDR + \
64 sizeof(pReq->sdf_2dot4g_val)) : 0 \
67 pReq->config_5g_beacons ? (SIZEOF_TLV_HDR + \
68 sizeof(pReq->beacon_5g_val)) : 0 \
71 pReq->config_5g_sdf ? (SIZEOF_TLV_HDR + \
72 sizeof(pReq->sdf_5g_val)) : 0 \
75 pReq->config_5g_rssi_close ? (SIZEOF_TLV_HDR + \
76 sizeof(pReq->rssi_close_5g_val)) : 0 \
79 pReq->config_5g_rssi_middle ? (SIZEOF_TLV_HDR + \
80 sizeof(pReq->rssi_middle_5g_val)) : 0 \
83 pReq->config_2dot4g_rssi_proximity ? (SIZEOF_TLV_HDR + \
84 sizeof(pReq->rssi_proximity_2dot4g_val)) : 0 \
87 pReq->config_5g_rssi_close_proximity ? (SIZEOF_TLV_HDR + \
88 sizeof(pReq->rssi_close_proximity_5g_val)) : 0 \
91 pReq->config_rssi_window_size ? (SIZEOF_TLV_HDR + \
92 sizeof(pReq->rssi_window_size_val)) : 0 \
95 pReq->config_oui ? (SIZEOF_TLV_HDR + \
96 sizeof(pReq->oui_val)) : 0 \
99 pReq->config_intf_addr ? (SIZEOF_TLV_HDR + \
100 sizeof(pReq->intf_addr_val)) : 0 \
103 pReq->config_cluster_attribute_val ? (SIZEOF_TLV_HDR + \
104 sizeof(pReq->config_cluster_attribute_val)) : 0 \
107 pReq->config_scan_params ? (SIZEOF_TLV_HDR + \
111 pReq->config_random_factor_force ? (SIZEOF_TLV_HDR + \
112 sizeof(pReq->random_factor_force_val)) : 0 \
115 pReq->config_hop_count_force ? (SIZEOF_TLV_HDR + \
116 sizeof(pReq->hop_count_force_val)) : 0 \
119 pReq->config_24g_channel ? (SIZEOF_TLV_HDR + \
123 pReq->config_5g_channel ? (SIZEOF_TLV_HDR + \
143 tlvs = addTlv(NAN_TLV_TYPE_CLUSTER_ID_LOW, sizeof(pReq->cluster_low),
144 (const u8*)&pReq->cluster_low, tlvs);
145 tlvs = addTlv(NAN_TLV_TYPE_CLUSTER_ID_HIGH, sizeof(pReq->cluster_high),
146 (const u8*)&pReq->cluster_high, tlvs);
147 tlvs = addTlv(NAN_TLV_TYPE_MASTER_PREFERENCE, sizeof(pReq->master_pref),
148 (const u8*)&pReq->master_pref, tlvs);
149 if (pReq->config_support_5g) {
150 tlvs = addTlv(NAN_TLV_TYPE_5G_SUPPORT, sizeof(pReq->support_5g_val),
151 (const u8*)&pReq->support_5g_val, tlvs);
153 if (pReq->config_sid_beacon) {
154 tlvs = addTlv(NAN_TLV_TYPE_SID_BEACON, sizeof(pReq->sid_beacon_val),
155 (const u8*)&pReq->sid_beacon_val, tlvs);
157 if (pReq->config_2dot4g_rssi_close) {
159 sizeof(pReq->rssi_close_2dot4g_val),
160 (const u8*)&pReq->rssi_close_2dot4g_val, tlvs);
162 if (pReq->config_2dot4g_rssi_middle) {
164 sizeof(pReq->rssi_middle_2dot4g_val),
165 (const u8*)&pReq->rssi_middle_2dot4g_val, tlvs);
167 if (pReq->config_hop_count_limit) {
169 sizeof(pReq->hop_count_limit_val),
170 (const u8*)&pReq->hop_count_limit_val, tlvs);
172 if (pReq->config_2dot4g_support) {
173 tlvs = addTlv(NAN_TLV_TYPE_24G_SUPPORT, sizeof(pReq->support_2dot4g_val),
174 (const u8*)&pReq->support_2dot4g_val, tlvs);
176 if (pReq->config_2dot4g_beacons) {
177 tlvs = addTlv(NAN_TLV_TYPE_24G_BEACON, sizeof(pReq->beacon_2dot4g_val),
178 (const u8*)&pReq->beacon_2dot4g_val, tlvs);
180 if (pReq->config_2dot4g_sdf) {
181 tlvs = addTlv(NAN_TLV_TYPE_24G_SDF, sizeof(pReq->sdf_2dot4g_val),
182 (const u8*)&pReq->sdf_2dot4g_val, tlvs);
184 if (pReq->config_5g_beacons) {
185 tlvs = addTlv(NAN_TLV_TYPE_5G_BEACON, sizeof(pReq->beacon_5g_val),
186 (const u8*)&pReq->beacon_5g_val, tlvs);
188 if (pReq->config_5g_sdf) {
189 tlvs = addTlv(NAN_TLV_TYPE_5G_SDF, sizeof(pReq->sdf_5g_val),
190 (const u8*)&pReq->sdf_5g_val, tlvs);
192 if (pReq->config_2dot4g_rssi_proximity) {
194 sizeof(pReq->rssi_proximity_2dot4g_val),
195 (const u8*)&pReq->rssi_proximity_2dot4g_val, tlvs);
198 if (pReq->config_5g_rssi_close) {
199 tlvs = addTlv(NAN_TLV_TYPE_5G_RSSI_CLOSE, sizeof(pReq->rssi_close_5g_val),
200 (const u8*)&pReq->rssi_close_5g_val, tlvs);
202 if (pReq->config_5g_rssi_middle) {
203 tlvs = addTlv(NAN_TLV_TYPE_5G_RSSI_MIDDLE, sizeof(pReq->rssi_middle_5g_val),
204 (const u8*)&pReq->rssi_middle_5g_val, tlvs);
206 if (pReq->config_5g_rssi_close_proximity) {
208 sizeof(pReq->rssi_close_proximity_5g_val),
209 (const u8*)&pReq->rssi_close_proximity_5g_val, tlvs);
211 if (pReq->config_rssi_window_size) {
212 tlvs = addTlv(NAN_TLV_TYPE_RSSI_AVERAGING_WINDOW_SIZE, sizeof(pReq->rssi_window_size_val),
213 (const u8*)&pReq->rssi_window_size_val, tlvs);
215 if (pReq->config_oui) {
216 tlvs = addTlv(NAN_TLV_TYPE_CLUSTER_OUI_NETWORK_ID, sizeof(pReq->oui_val),
217 (const u8*)&pReq->oui_val, tlvs);
219 if (pReq->config_intf_addr) {
220 tlvs = addTlv(NAN_TLV_TYPE_SOURCE_MAC_ADDRESS, sizeof(pReq->intf_addr_val),
221 (const u8*)&pReq->intf_addr_val[0], tlvs);
223 if (pReq->config_cluster_attribute_val) {
224 tlvs = addTlv(NAN_TLV_TYPE_CLUSTER_ATTRIBUTE_IN_SDF, sizeof(pReq->config_cluster_attribute_val),
225 (const u8*)&pReq->config_cluster_attribute_val, tlvs);
227 if (pReq->config_scan_params) {
230 fillNanSocialChannelParamVal(&pReq->scan_params_val,
239 if (pReq->config_random_factor_force) {
241 sizeof(pReq->random_factor_force_val),
242 (const u8*)&pReq->random_factor_force_val, tlvs);
244 if (pReq->config_hop_count_force) {
246 sizeof(pReq->hop_count_force_val),
247 (const u8*)&pReq->hop_count_force_val, tlvs);
249 if (pReq->config_24g_channel) {
252 (const u8*)&pReq->channel_24g_val, tlvs);
254 if (pReq->config_5g_channel) {
257 (const u8*)&pReq->channel_5g_val, tlvs);
304 int NanCommand::putNanConfig(transaction_id id, const NanConfigRequest *pReq)
310 if (pReq == NULL ||
311 pReq->num_config_discovery_attr > NAN_MAX_POSTDISCOVERY_LEN) {
320 pReq->config_sid_beacon ? (SIZEOF_TLV_HDR + \
321 sizeof(pReq->sid_beacon)) : 0 \
324 pReq->config_master_pref ? (SIZEOF_TLV_HDR + \
325 sizeof(pReq->master_pref)) : 0 \
328 pReq->config_rssi_proximity ? (SIZEOF_TLV_HDR + \
329 sizeof(pReq->rssi_proximity)) : 0 \
332 pReq->config_5g_rssi_close_proximity ? (SIZEOF_TLV_HDR + \
333 sizeof(pReq->rssi_close_proximity_5g_val)) : 0 \
336 pReq->config_rssi_window_size ? (SIZEOF_TLV_HDR + \
337 sizeof(pReq->rssi_window_size_val)) : 0 \
340 pReq->config_cluster_attribute_val ? (SIZEOF_TLV_HDR + \
341 sizeof(pReq->config_cluster_attribute_val)) : 0 \
344 pReq->config_scan_params ? (SIZEOF_TLV_HDR + \
348 pReq->config_random_factor_force ? (SIZEOF_TLV_HDR + \
349 sizeof(pReq->random_factor_force_val)) : 0 \
352 pReq->config_hop_count_force ? (SIZEOF_TLV_HDR + \
353 sizeof(pReq->hop_count_force_val)) : 0 \
356 pReq->config_conn_capability ? (SIZEOF_TLV_HDR + \
360 if (pReq->num_config_discovery_attr) {
361 for (idx = 0; idx < pReq->num_config_discovery_attr; idx ++) {
363 calcNanTransmitPostDiscoverySize(&pReq->discovery_attr_val[idx]);
367 if (pReq->config_fam && \
368 calcNanFurtherAvailabilityMapSize(&pReq->fam_val)) {
370 calcNanFurtherAvailabilityMapSize(&pReq->fam_val));
387 if (pReq->config_sid_beacon) {
388 tlvs = addTlv(NAN_TLV_TYPE_SID_BEACON, sizeof(pReq->sid_beacon),
389 (const u8*)&pReq->sid_beacon, tlvs);
391 if (pReq->config_master_pref) {
392 tlvs = addTlv(NAN_TLV_TYPE_MASTER_PREFERENCE, sizeof(pReq->master_pref),
393 (const u8*)&pReq->master_pref, tlvs);
396 if (pReq->config_rssi_window_size) {
397 tlvs = addTlv(NAN_TLV_TYPE_RSSI_AVERAGING_WINDOW_SIZE, sizeof(pReq->rssi_window_size_val),
398 (const u8*)&pReq->rssi_window_size_val, tlvs);
400 if (pReq->config_rssi_proximity) {
401 tlvs = addTlv(NAN_TLV_TYPE_24G_RSSI_CLOSE_PROXIMITY, sizeof(pReq->rssi_proximity),
402 (const u8*)&pReq->rssi_proximity, tlvs);
404 if (pReq->config_scan_params) {
407 fillNanSocialChannelParamVal(&pReq->scan_params_val,
416 if (pReq->config_random_factor_force) {
418 sizeof(pReq->random_factor_force_val),
419 (const u8*)&pReq->random_factor_force_val, tlvs);
421 if (pReq->config_hop_count_force) {
423 sizeof(pReq->hop_count_force_val),
424 (const u8*)&pReq->hop_count_force_val, tlvs);
426 if (pReq->config_conn_capability) {
428 getNanTransmitPostConnectivityCapabilityVal(&pReq->conn_capability_val);
432 if (pReq->num_config_discovery_attr) {
433 for (idx = 0; idx < pReq->num_config_discovery_attr; idx ++) {
434 fillNanTransmitPostDiscoveryVal(&pReq->discovery_attr_val[idx],
438 &pReq->discovery_attr_val[idx]),
442 if (pReq->config_fam && \
443 calcNanFurtherAvailabilityMapSize(&pReq->fam_val)) {
444 fillNanFurtherAvailabilityMapVal(&pReq->fam_val,
447 calcNanFurtherAvailabilityMapSize(&pReq->fam_val),
465 int NanCommand::putNanPublish(transaction_id id, const NanPublishRequest *pReq)
468 if (pReq == NULL) {
475 (pReq->service_name_len ? SIZEOF_TLV_HDR + pReq->service_name_len : 0) +
476 (pReq->service_specific_info_len ? SIZEOF_TLV_HDR + pReq->service_specific_info_len : 0) +
477 (pReq->rx_match_filter_len ? SIZEOF_TLV_HDR + pReq->rx_match_filter_len : 0) +
478 (pReq->tx_match_filter_len ? SIZEOF_TLV_HDR + pReq->tx_match_filter_len : 0);
491 if (pReq->publish_id == 0) {
494 pFwReq->fwHeader.handle = pReq->publish_id;
498 pFwReq->publishServiceReqParams.ttl = pReq->ttl;
499 pFwReq->publishServiceReqParams.period = pReq->period;
501 pFwReq->publishServiceReqParams.publishType = pReq->publish_type;
502 pFwReq->publishServiceReqParams.txType = pReq->tx_type;
504 pFwReq->publishServiceReqParams.rssiThresholdFlag = pReq->rssi_threshold_flag;
505 pFwReq->publishServiceReqParams.matchAlg = pReq->publish_match_indicator;
506 pFwReq->publishServiceReqParams.count = pReq->publish_count;
507 pFwReq->publishServiceReqParams.connmap = pReq->connmap;
509 (pReq->recv_indication_cfg & BIT_0) ? 1 : 0;
511 (pReq->recv_indication_cfg & BIT_1) ? 1 : 0;
513 (pReq->recv_indication_cfg & BIT_2) ? 1 : 0;
518 if (pReq->service_name_len) {
519 tlvs = addTlv(NAN_TLV_TYPE_SERVICE_NAME, pReq->service_name_len,
520 (const u8*)&pReq->service_name[0], tlvs);
522 if (pReq->service_specific_info_len) {
523 tlvs = addTlv(NAN_TLV_TYPE_SERVICE_SPECIFIC_INFO, pReq->service_specific_info_len,
524 (const u8*)&pReq->service_specific_info[0], tlvs);
526 if (pReq->rx_match_filter_len) {
527 tlvs = addTlv(NAN_TLV_TYPE_RX_MATCH_FILTER, pReq->rx_match_filter_len,
528 (const u8*)&pReq->rx_match_filter[0], tlvs);
530 if (pReq->tx_match_filter_len) {
531 tlvs = addTlv(NAN_TLV_TYPE_TX_MATCH_FILTER, pReq->tx_match_filter_len,
532 (const u8*)&pReq->tx_match_filter[0], tlvs);
548 int NanCommand::putNanPublishCancel(transaction_id id, const NanPublishCancelRequest *pReq)
551 if (pReq == NULL) {
569 pFwReq->fwHeader.handle = pReq->publish_id;
586 const NanSubscribeRequest *pReq)
590 if (pReq == NULL) {
597 (pReq->service_name_len ? SIZEOF_TLV_HDR + pReq->service_name_len : 0) +
598 (pReq->service_specific_info_len ? SIZEOF_TLV_HDR + pReq->service_specific_info_len : 0) +
599 (pReq->rx_match_filter_len ? SIZEOF_TLV_HDR + pReq->rx_match_filter_len : 0) +
600 (pReq->tx_match_filter_len ? SIZEOF_TLV_HDR + pReq->tx_match_filter_len : 0);
603 (pReq->num_intf_addr_present * (SIZEOF_TLV_HDR + NAN_MAC_ADDR_LEN));
616 if (pReq->subscribe_id == 0) {
619 pFwReq->fwHeader.handle = pReq->subscribe_id;
623 pFwReq->subscribeServiceReqParams.ttl = pReq->ttl;
624 pFwReq->subscribeServiceReqParams.period = pReq->period;
625 pFwReq->subscribeServiceReqParams.subscribeType = pReq->subscribe_type;
626 pFwReq->subscribeServiceReqParams.srfAttr = pReq->serviceResponseFilter;
627 pFwReq->subscribeServiceReqParams.srfInclude = pReq->serviceResponseInclude;
628 pFwReq->subscribeServiceReqParams.srfSend = pReq->useServiceResponseFilter;
629 pFwReq->subscribeServiceReqParams.ssiRequired = pReq->ssiRequiredForMatchIndication;
630 pFwReq->subscribeServiceReqParams.matchAlg = pReq->subscribe_match_indicator;
631 pFwReq->subscribeServiceReqParams.count = pReq->subscribe_count;
632 pFwReq->subscribeServiceReqParams.rssiThresholdFlag = pReq->rssi_threshold_flag;
634 (pReq->recv_indication_cfg & BIT_0) ? 1 : 0;
636 (pReq->recv_indication_cfg & BIT_1) ? 1 : 0;
638 (pReq->recv_indication_cfg & BIT_2) ? 1 : 0;
639 pFwReq->subscribeServiceReqParams.connmap = pReq->connmap;
643 if (pReq->service_name_len) {
644 tlvs = addTlv(NAN_TLV_TYPE_SERVICE_NAME, pReq->service_name_len,
645 (const u8*)&pReq->service_name[0], tlvs);
647 if (pReq->service_specific_info_len) {
648 tlvs = addTlv(NAN_TLV_TYPE_SERVICE_SPECIFIC_INFO, pReq->service_specific_info_len,
649 (const u8*)&pReq->service_specific_info[0], tlvs);
651 if (pReq->rx_match_filter_len) {
652 tlvs = addTlv(NAN_TLV_TYPE_RX_MATCH_FILTER, pReq->rx_match_filter_len,
653 (const u8*)&pReq->rx_match_filter[0], tlvs);
655 if (pReq->tx_match_filter_len) {
656 tlvs = addTlv(NAN_TLV_TYPE_TX_MATCH_FILTER, pReq->tx_match_filter_len,
657 (const u8*)&pReq->tx_match_filter[0], tlvs);
661 for (i = 0; i < pReq->num_intf_addr_present; i++)
665 (const u8*)&pReq->intf_addr[i][0], tlvs);
681 const NanSubscribeCancelRequest *pReq)
684 if (pReq == NULL) {
702 pFwReq->fwHeader.handle = pReq->subscribe_id;
719 const NanTransmitFollowupRequest *pReq)
722 if (pReq == NULL) {
729 (pReq->service_specific_info_len ? SIZEOF_TLV_HDR +
730 pReq->service_specific_info_len : 0);
733 message_len += (SIZEOF_TLV_HDR + sizeof(pReq->addr));
746 pFwReq->fwHeader.handle = pReq->publish_subscribe_id;
749 pFwReq->transmitFollowupReqParams.matchHandle = pReq->requestor_instance_id;
750 if (pReq->priority != NAN_TX_PRIORITY_HIGH) {
755 pFwReq->transmitFollowupReqParams.window = pReq->dw_or_faw;
757 (pReq->recv_indication_cfg & BIT_0) ? 1 : 0;
763 tlvs = addTlv(NAN_TLV_TYPE_MAC_ADDRESS, sizeof(pReq->addr),
764 (const u8*)&pReq->addr[0], tlvs);
767 if (pReq->service_specific_info_len) {
768 tlvs = addTlv(tlv_type, pReq->service_specific_info_len,
769 (const u8*)&pReq->service_specific_info[0], tlvs);
785 int NanCommand::putNanStats(transaction_id id, const NanStatsRequest *pReq)
788 if (pReq == NULL) {
808 pFwReq->statsReqParams.statsType = pReq->stats_type;
809 pFwReq->statsReqParams.clear = pReq->clear;
825 int NanCommand::putNanTCA(transaction_id id, const NanTCARequest *pReq)
828 if (pReq == NULL) {
851 tcaReqParams[0] = (pReq->rising_direction_evt_flag & 0x01);
852 tcaReqParams[0] |= (pReq->falling_direction_evt_flag & 0x01) << 1;
853 tcaReqParams[0] |= (pReq->clear & 0x01) << 2;
854 tcaReqParams[1] = pReq->threshold;
858 if (pReq->tca_type == NAN_TCA_ID_CLUSTER_SIZE) {
863 ALOGE("%s: Unrecognized tca_type:%u", __FUNCTION__, pReq->tca_type);
882 const NanBeaconSdfPayloadRequest *pReq)
885 if (pReq == NULL) {
891 pReq->vsa.vsa_len;
909 temp = pReq->vsa.payload_transmit_flag & 0x01;
910 temp |= (pReq->vsa.tx_in_discovery_beacon & 0x01) << 1;
911 temp |= (pReq->vsa.tx_in_sync_beacon & 0x01) << 2;
912 temp |= (pReq->vsa.tx_in_service_discovery & 0x01) << 3;
913 temp |= (pReq->vsa.vendor_oui & 0x00FFFFFF) << 8;
915 int tlv_len = sizeof(u32) + pReq->vsa.vsa_len;
925 memcpy((tempBuf + sizeof(u32)), pReq->vsa.vsa, pReq->vsa.vsa_len);