qmi_set_wds_reset_request(msg);
return QMI_CMD_REQUEST;
}
+
+#define cmd_wds_set_ip_family_cb no_cb
+static enum qmi_cmd_result
+cmd_wds_set_ip_family_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_wds_set_ip_family_request ipf_req;
+ const struct ip_modes {
+ const char *name;
+ const QmiWdsIpFamily mode;
+ } modes[] = {
+ { "ipv4", QMI_WDS_IP_FAMILY_IPV4 },
+ { "ipv6", QMI_WDS_IP_FAMILY_IPV6 },
+ { "unspecified", QMI_WDS_IP_FAMILY_UNSPECIFIED },
+ };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(modes); i++) {
+ if (strcasecmp(modes[i].name, arg) != 0)
+ continue;
+
+ qmi_set(&ipf_req, preference, modes[i].mode);
+ qmi_set_wds_set_ip_family_request(msg, &ipf_req);
+ return QMI_CMD_REQUEST;
+ }
+
+ uqmi_add_error("Invalid value (valid: ipv4, ipv6, unspecified)");
+ return QMI_CMD_EXIT;
+}
__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_ip_family, ip-family, required, CMD_TYPE_OPTION), \
__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), \
" --auth-type pap|chap|both|none: Use network authentication type\n" \
" --username <name>: Use network username\n" \
" --password <password>: Use network password\n" \
+ " --ip-family <family>: Use ip-family for the connection (ipv4, ipv6, unspecified)\n" \
" --autoconnect: Enable automatic connect/reconnect\n" \
" --stop-network <pdh>: Stop network connection (use with option below)\n" \
" --autoconnect: Disable automatic connect/reconnect\n" \