From ab2b11f053aa767ff002935878ebfa9750a996e4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 10 Jun 2013 19:15:53 +0200 Subject: [PATCH] add autoconnect option for --start-network --- commands-wds.c | 8 ++++++++ commands-wds.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/commands-wds.c b/commands-wds.c index 8571550..58053c2 100644 --- a/commands-wds.c +++ b/commands-wds.c @@ -48,6 +48,14 @@ cmd_wds_set_password_prepare(struct qmi_dev *qmi, struct qmi_request *req, struc return QMI_CMD_DONE; } +#define cmd_wds_set_autoconnect_cb no_cb +static enum qmi_cmd_result +cmd_wds_set_autoconnect_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg) +{ + qmi_set_ptr(&wds_sn_req, enable_autoconnect, true); + return QMI_CMD_DONE; +} + static void cmd_wds_start_network_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg) { diff --git a/commands-wds.h b/commands-wds.h index 27d7776..bd4b221 100644 --- a/commands-wds.h +++ b/commands-wds.h @@ -3,6 +3,7 @@ __uqmi_command(wds_set_auth, auth-type, required, CMD_TYPE_OPTION), \ __uqmi_command(wds_set_username, username, required, CMD_TYPE_OPTION), \ __uqmi_command(wds_set_password, password, required, CMD_TYPE_OPTION), \ + __uqmi_command(wds_set_autoconnect, autoconnect, no, CMD_TYPE_OPTION), \ __uqmi_command(wds_get_packet_service_status, get-data-status, no, QMI_SERVICE_WDS), \ __uqmi_command(wds_reset, reset-wds, no, QMI_SERVICE_WDS) \ @@ -12,5 +13,6 @@ " --auth-type pap|chap|both|none: Use network authentication type\n" \ " --username : Use network username\n" \ " --password : Use network password\n" \ + " --autconnect: Enable automatic connect/reconnect\n" \ " --get-data-status: Get current data access status\n" \ -- 2.25.1