return QMI_CMD_REQUEST;
}
+
+#define cmd_wds_set_lte_attach_pdn_cb no_cb
+
+static enum qmi_cmd_result
+cmd_wds_set_lte_attach_pdn_prepare(struct qmi_dev *qmi, struct qmi_request *req,
+ struct qmi_msg *msg, char *arg)
+{
+ uint16_t list[8] = {0};
+
+ char *s = arg;
+ int i = 0;
+
+ while (s) {
+ if (i >= 8) {
+ fprintf(stderr, "Only 8 attach PDN supported\n");
+ return QMI_CMD_EXIT;
+ }
+
+ list[i] = strtoul(s, &s, 10);
+ i++;
+ if (*s == ',') {
+ s++;
+ } else {
+ fprintf(stderr, "Invalid argument\n");
+ return QMI_CMD_EXIT;
+ }
+ }
+
+
+ struct qmi_wds_set_lte_attach_pdn_list_request lte_attach_pdn = {
+ QMI_INIT_ARRAY(list, list, i),
+ QMI_INIT(action, QMI_WDS_ATTACH_PDN_LIST_ACTION_DETACH_OR_PDN_DISCONNECT)
+ };
+
+ qmi_set_wds_set_lte_attach_pdn_list_request(msg, <e_attach_pdn);
+ return QMI_CMD_REQUEST;
+}
__uqmi_command(wds_get_current_settings, get-current-settings, no, QMI_SERVICE_WDS), \
__uqmi_command(wds_bind_mux, bind-mux, required, QMI_SERVICE_WDS), \
__uqmi_command(wds_ep_type, endpoint-type, required, CMD_TYPE_OPTION), \
- __uqmi_command(wds_ep_iface, endpoint-iface, required, CMD_TYPE_OPTION) \
+ __uqmi_command(wds_ep_iface, endpoint-iface, required, CMD_TYPE_OPTION), \
+ __uqmi_command(wds_set_lte_attach_pdn, lte-attach-pdn, required, QMI_SERVICE_WDS)
#define wds_helptext \
" --get-current-settings: Get current connection settings\n" \
" --bind-mux <id>: Bind data session to QMAP multiplex (use with options below)\n" \
" --endpoint-type <type>: Set endpoint interface type (hsusb, pcie)\n" \
- " --endpoint-iface <number>: Set endpoint interface number\n"
+ " --endpoint-iface <number>: Set endpoint interface number\n" \
+ " --set-lte-attach-pdn #,#,...: Set list of PDN connections used when attaching to LTE/5G\n"