+#include "qmi-message.h"
+
static struct qmi_wds_start_network_request wds_sn_req = {
QMI_INIT(authentication_preference,
QMI_WDS_AUTHENTICATION_PAP | QMI_WDS_AUTHENTICATION_CHAP),
qmi_set_ptr(&wds_sn_req, password, arg);
return QMI_CMD_DONE;
}
+
+static void
+cmd_wds_start_network_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+ struct qmi_wds_start_network_response res;
+
+ qmi_parse_wds_start_network_response(msg, &res);
+ if (res.set.packet_data_handle)
+ blobmsg_add_u32(&status, "handle", res.data.packet_data_handle);
+}
+
+static enum qmi_cmd_result
+cmd_wds_start_network_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_ptr(&wds_sn_req, apn, arg);
+ qmi_set_wds_start_network_request(msg, &wds_sn_req);
+ return QMI_CMD_REQUEST;
+}
#define __uqmi_wds_commands \
- __uqmi_command(wds_set_auth, set-auth, required, QMI_SERVICE_WDS), \
- __uqmi_command(wds_set_username, set-username, required, QMI_SERVICE_WDS), \
- __uqmi_command(wds_set_password, set-password, required, QMI_SERVICE_WDS)
+ __uqmi_command(wds_start_network, start-network, required, QMI_SERVICE_WDS), \
+ __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)
#define wds_helptext \
- " --set-auth pap|chap|both|none: Set network authentication type\n" \
- " --set-username: Set network username\n" \
- " --set-password: Set network password\n" \
+ " --start-network <apn>: Start network connection (use with options below)\n" \
+ " --auth-type pap|chap|both|none: Use network authentication type\n" \
+ " --username <name>: Use network username\n" \
+ " --password <password>: Use network password\n" \