return QMI_CMD_REQUEST;
}
+#define cmd_wds_set_autoconnect_setting_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_autoconnect_setting_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_wds_set_autoconnect_setting_request ac_req;
+ const char *modes[] = {
+ [QMI_WDS_AUTOCONNECT_DISABLED] = "disabled",
+ [QMI_WDS_AUTOCONNECT_ENABLED] = "enabled",
+ [QMI_WDS_AUTOCONNECT_PAUSED] = "paused",
+ };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(modes); i++) {
+ if (strcasecmp(modes[i], arg) != 0)
+ continue;
+
+ qmi_set(&ac_req, setting, i);
+ qmi_set_wds_set_autoconnect_setting_request(msg, &ac_req);
+ return QMI_CMD_DONE;
+ }
+
+ uqmi_add_error("Invalid value (valid: disabled, enabled, paused)");
+ return QMI_CMD_EXIT;
+}
+
#define cmd_wds_reset_cb no_cb
static enum qmi_cmd_result
cmd_wds_reset_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
__uqmi_command(wds_set_autoconnect, autoconnect, no, CMD_TYPE_OPTION), \
__uqmi_command(wds_stop_network, stop-network, required, QMI_SERVICE_WDS), \
__uqmi_command(wds_get_packet_service_status, get-data-status, no, QMI_SERVICE_WDS), \
+ __uqmi_command(wds_set_autoconnect_setting, set-autoconnect, required, QMI_SERVICE_WDS), \
__uqmi_command(wds_reset, reset-wds, no, QMI_SERVICE_WDS) \
" --stop-network <pdh>: Stop network connection (use with option below)\n" \
" --autoconnect: Disable automatic connect/reconnect\n" \
" --get-data-status: Get current data access status\n" \
+ " --set-autoconnect <val>: Get current data access status (disabled, enabled, paused)\n" \
"public-format" : "QmiWdsExtendedTechnologyPreference",
"prerequisites" : [ { "common-ref" : "Success" } ] } ] },
+ // *********************************************************************************
+ { "name" : "Get Autoconnect Setting",
+ "type" : "Message",
+ "service" : "WDS",
+ "id" : "0x0034",
+ "version" : "1.0",
+ "output" : [ { "common-ref" : "Operation Result" },
+ { "name" : "Setting",
+ "id" : "0x01",
+ "mandatory" : "yes",
+ "type" : "TLV",
+ "format" : "gint8",
+ "public-format" : "QmiWdsAutoconnectSetting",
+ "prerequisites" : [ { "common-ref" : "Success" } ] },
+ { "name" : "Roaming",
+ "id" : "0x10",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "gint8",
+ "public-format" : "gboolean",
+ "prerequisites" : [ { "common-ref" : "Success" } ] } ] },
+
// *********************************************************************************
{ "name" : "Get Data Bearer Technology",
"type" : "Message",
"type" : "TLV",
"format" : "guint8",
"public-format" : "QmiWdsIpFamily" } ],
+ "output" : [ { "common-ref" : "Operation Result" } ] },
+
+
+ // *********************************************************************************
+ { "name" : "Set Autoconnect Setting",
+ "type" : "Message",
+ "service" : "WDS",
+ "id" : "0x0051",
+ "version" : "1.0",
+ "input" : [ { "name" : "Setting",
+ "id" : "0x01",
+ "mandatory" : "yes",
+ "type" : "TLV",
+ "format" : "guint8",
+ "public-format" : "QmiWdsAutoconnectSetting" },
+ { "name" : "Roaming",
+ "id" : "0x10",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "guint8",
+ "public-format" : "gboolean" } ],
"output" : [ { "common-ref" : "Operation Result" } ] }
]
QMI_WDS_DS_PROFILE_ERROR_3GPP2_INVALID_PROFILE_ID = 1101,
} QmiWdsDsProfileError;
+/**
+ * QmiWdsAutoconnectSetting:
+ * @QMI_WDS_AUTOCONNECT_DISABLED: Disabled
+ * @QMI_WDS_AUTOCONNECT_ENABLED: Enabled
+ * @QMI_WDS_AUTOCONNECT_PAUSED: Paused (resume on power cycle)
+ */
+typedef enum {
+ QMI_WDS_AUTOCONNECT_DISABLED = 0,
+ QMI_WDS_AUTOCONNECT_ENABLED = 1,
+ QMI_WDS_AUTOCONNECT_PAUSED = 2,
+} QmiWdsAutoconnectSetting;
+
#endif /* _LIBQMI_GLIB_QMI_ENUMS_WDS_H_ */