diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-06-10 19:15:53 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-06-10 19:15:53 +0200 |
commit | ab2b11f053aa767ff002935878ebfa9750a996e4 (patch) | |
tree | acc56073e69e309e6920700e7b309961cf95ed50 | |
parent | 7fe36553d1cf57f4daacfc0359d960e4d5bc0985 (diff) |
add autoconnect option for --start-network
-rw-r--r-- | commands-wds.c | 8 | ||||
-rw-r--r-- | commands-wds.h | 2 |
2 files changed, 10 insertions, 0 deletions
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 <name>: Use network username\n" \ " --password <password>: Use network password\n" \ + " --autconnect: Enable automatic connect/reconnect\n" \ " --get-data-status: Get current data access status\n" \ |