int qmi_set_wms_send_from_memory_storage_request(struct qmi_msg *msg, struct qmi_wms_send_from_memory_storage_request *req) { qmi_init_request_message(msg, QMI_SERVICE_WMS); msg->svc.message = cpu_to_le16(0x0042); if (req->set.information) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.information.storage_type, 1); put_tlv_var(uint32_t, cpu_to_le32(req->data.information.memory_index), 4); put_tlv_var(uint8_t, req->data.information.message_mode, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x01, ofs, buf); } if (req->set.sms_on_ims) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.sms_on_ims, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x10, ofs, buf); } return 0; }
int qmi_set_wms_get_routes_request(struct qmi_msg *msg) { qmi_init_request_message(msg, QMI_SERVICE_WMS); msg->svc.message = cpu_to_le16(0x0033); return 0; }
int qmi_set_pds_get_auto_tracking_state_request(struct qmi_msg *msg) { qmi_init_request_message(msg, QMI_SERVICE_PDS); msg->svc.message = cpu_to_le16(0x0030); return 0; }
int qmi_set_wms_modify_tag_request(struct qmi_msg *msg, struct qmi_wms_modify_tag_request *req) { qmi_init_request_message(msg, QMI_SERVICE_WMS); msg->svc.message = cpu_to_le16(0x0023); if (req->set.message_tag) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.message_tag.storage_type, 1); put_tlv_var(uint32_t, cpu_to_le32(req->data.message_tag.memory_index), 4); put_tlv_var(uint8_t, req->data.message_tag.message_tag, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x01, ofs, buf); } if (req->set.message_mode) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.message_mode, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x10, ofs, buf); } return 0; }
int qmi_set_pds_get_gps_service_state_request(struct qmi_msg *msg) { qmi_init_request_message(msg, QMI_SERVICE_PDS); msg->svc.message = cpu_to_le16(0x0020); return 0; }
int qmi_set_pds_reset_request(struct qmi_msg *msg) { qmi_init_request_message(msg, QMI_SERVICE_PDS); msg->svc.message = cpu_to_le16(0x0000); return 0; }
int qmi_set_wms_set_event_report_request(struct qmi_msg *msg, struct qmi_wms_set_event_report_request *req) { qmi_init_request_message(msg, QMI_SERVICE_WMS); msg->svc.message = cpu_to_le16(0x0001); if (req->set.new_mt_message_indicator) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.new_mt_message_indicator.report, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x10, ofs, buf); } return 0; }
int qmi_set_pds_set_auto_tracking_state_request(struct qmi_msg *msg, struct qmi_pds_set_auto_tracking_state_request *req) { qmi_init_request_message(msg, QMI_SERVICE_PDS); msg->svc.message = cpu_to_le16(0x0031); if (req->set.state) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.state.auto_tracking_state, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x01, ofs, buf); } return 0; }
int qmi_set_wms_set_routes_request(struct qmi_msg *msg, struct qmi_wms_set_routes_request *req) { qmi_init_request_message(msg, QMI_SERVICE_WMS); msg->svc.message = cpu_to_le16(0x0032); if (req->data.route_list) { void *buf; int ofs; int i; __qmi_alloc_reset(); put_tlv_var(uint16_t, cpu_to_le16(req->data.route_list_n), 2); for (i = 0; i < req->data.route_list_n; i++) { put_tlv_var(uint8_t, req->data.route_list[i].message_type, 1); put_tlv_var(uint8_t, req->data.route_list[i].message_class, 1); put_tlv_var(uint8_t, req->data.route_list[i].storage, 1); put_tlv_var(uint8_t, req->data.route_list[i].receipt_action, 1); } buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x01, ofs, buf); } if (req->set.transfer_status_report) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.transfer_status_report, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x10, ofs, buf); } return 0; }
int qmi_set_wms_raw_write_request(struct qmi_msg *msg, struct qmi_wms_raw_write_request *req) { qmi_init_request_message(msg, QMI_SERVICE_WMS); msg->svc.message = cpu_to_le16(0x0021); if (req->set.raw_message_data) { void *buf; int ofs; int i; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.raw_message_data.storage_type, 1); put_tlv_var(uint8_t, req->data.raw_message_data.format, 1); put_tlv_var(uint16_t, cpu_to_le16(req->data.raw_message_data.raw_data_n), 2); for (i = 0; i < req->data.raw_message_data.raw_data_n; i++) { put_tlv_var(uint8_t, req->data.raw_message_data.raw_data[i], 1); } buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x01, ofs, buf); } return 0; }
int qmi_set_wms_raw_send_request(struct qmi_msg *msg, struct qmi_wms_raw_send_request *req) { qmi_init_request_message(msg, QMI_SERVICE_WMS); msg->svc.message = cpu_to_le16(0x0020); if (req->set.raw_message_data) { void *buf; int ofs; int i; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.raw_message_data.format, 1); put_tlv_var(uint16_t, cpu_to_le16(req->data.raw_message_data.raw_data_n), 2); for (i = 0; i < req->data.raw_message_data.raw_data_n; i++) { put_tlv_var(uint8_t, req->data.raw_message_data.raw_data[i], 1); } buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x01, ofs, buf); } if (req->set.cdma_force_on_dc) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.cdma_force_on_dc.force, 1); put_tlv_var(uint8_t, req->data.cdma_force_on_dc.service_option, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x10, ofs, buf); } if (req->set.cdma_follow_on_dc) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.cdma_follow_on_dc.follow, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x11, ofs, buf); } if (req->set.gsm_wcdma_link_timer) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.gsm_wcdma_link_timer, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x12, ofs, buf); } if (req->set.sms_on_ims) { void *buf; int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.sms_on_ims, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x13, ofs, buf); } return 0; }
int qmi_set_pds_set_event_report_request(struct qmi_msg *msg, struct qmi_pds_set_event_report_request *req) { qmi_init_request_message(msg, QMI_SERVICE_PDS); msg->svc.message = cpu_to_le16(0x0001); if (req->set.nmea_position_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.nmea_position_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x10, ofs, buf); } if (req->set.extended_nmea_position_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.extended_nmea_position_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x11, ofs, buf); } if (req->set.parsed_position_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.parsed_position_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x12, ofs, buf); } if (req->set.external_xtra_data_request_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.external_xtra_data_request_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x13, ofs, buf); } if (req->set.external_time_injection_request_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.external_time_injection_request_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x14, ofs, buf); } if (req->set.external_wifi_position_request_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.external_wifi_position_request_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x15, ofs, buf); } if (req->set.satellite_information_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.satellite_information_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x16, ofs, buf); } if (req->set.vx_network_initiated_request_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.vx_network_initiated_request_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x17, ofs, buf); } if (req->set.supl_network_initiated_prompt_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.supl_network_initiated_prompt_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x18, ofs, buf); } if (req->set.umts_cp_network_initiated_prompt_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.umts_cp_network_initiated_prompt_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x19, ofs, buf); } if (req->set.pds_comm_event_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.pds_comm_event_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x1A, ofs, buf); } if (req->set.accelerometer_data_streaming_ready_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.accelerometer_data_streaming_ready_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x1B, ofs, buf); } if (req->set.gyro_data_streaming_ready_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.gyro_data_streaming_ready_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x1C, ofs, buf); } if (req->set.time_sync_request_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.time_sync_request_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x1D, ofs, buf); } if (req->set.position_reliability_indicator_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.position_reliability_indicator_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x1E, ofs, buf); } if (req->set.sensor_data_usage_indicator_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.sensor_data_usage_indicator_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x1F, ofs, buf); } if (req->set.time_source_information_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.time_source_information_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x20, ofs, buf); } if (req->set.heading_uncertainty_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.heading_uncertainty_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x21, ofs, buf); } if (req->set.nmea_debug_strings_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.nmea_debug_strings_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x22, ofs, buf); } if (req->set.extended_external_xtra_data_request_reporting) { void *buf; unsigned int ofs; __qmi_alloc_reset(); put_tlv_var(uint8_t, req->data.extended_external_xtra_data_request_reporting, 1); buf = __qmi_get_buf(&ofs); tlv_new(msg, 0x23, ofs, buf); } return 0; }