return QMI_CMD_REQUEST;
}
+#define cmd_nas_set_network_preference_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_network_preference_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ QmiNasGsmWcdmaAcquisitionOrderPreference pref = QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC;
+
+ if (!strcmp(arg, "gsm"))
+ pref = QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM;
+ else if (!strcmp(arg, "wcdma"))
+ pref = QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA;
+
+ qmi_set(&sel_req, gsm_wcdma_acquisition_order_preference, pref);
+ qmi_set_nas_set_system_selection_preference_request(msg, &sel_req);
+ return QMI_CMD_REQUEST;
+}
+
#define cmd_nas_initiate_network_register_cb no_cb
static enum qmi_cmd_result
cmd_nas_initiate_network_register_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
__uqmi_command(nas_set_network_modes, set-network-modes, required, QMI_SERVICE_NAS), \
__uqmi_command(nas_initiate_network_register, network-register, no, QMI_SERVICE_NAS), \
__uqmi_command(nas_get_signal_info, get-signal-info, no, QMI_SERVICE_NAS), \
- __uqmi_command(nas_get_serving_system, get-serving-system, no, QMI_SERVICE_NAS) \
+ __uqmi_command(nas_get_serving_system, get-serving-system, no, QMI_SERVICE_NAS), \
+ __uqmi_command(nas_set_network_preference, set-network-preference, required, QMI_SERVICE_NAS) \
#define nas_helptext \
- " --set-network-modes <modes>: Set preferred network mode (Syntax: <mode1>[,<mode2>,...])\n" \
+ " --set-network-modes <modes>: Set usable network modes (Syntax: <mode1>[,<mode2>,...])\n" \
" Available modes: all, lte, umts, gsm, cdma, td-scdma\n" \
+ " --set-network-preference <mode> Set preferred network mode to <mode>\n" \
+ " Available modes: auto, gsm, wcdma\n" \
" --network-register: Initiate network register\n" \
" --get-signal-info: Get signal strength info\n" \
" --get-serving-system: Get serving system info\n" \