add autoconnect option for --start-network
authorFelix Fietkau <nbd@openwrt.org>
Mon, 10 Jun 2013 17:15:53 +0000 (19:15 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 10 Jun 2013 17:15:53 +0000 (19:15 +0200)
commands-wds.c
commands-wds.h

index 857155017ed4ca2fc8b04f66b3dae2b768aba728..58053c2a0b73d1d632fce6c679cda4f1f37e88c0 100644 (file)
@@ -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)
 {
index 27d77765e60e7d126162896a9b13bbbc9defb11a..bd4b221bba7071c6eb011ae556c9f8f2138d4208 100644 (file)
@@ -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" \