From: Nickolay Ledovskikh Date: Wed, 7 Dec 2016 17:12:54 +0000 (+0300) Subject: uqmi: Add sync command to release all cids. X-Git-Url: http://git.openwrt.org/?p=project%2Fuqmi.git;a=commitdiff_plain;h=1dc7be1a2c5fa6c56b6293ae4540bdc16fbe2cb2 uqmi: Add sync command to release all cids. Signed-off-by: Nickolay Ledovskikh Signed-off-by: Felix Fietkau [add command line help] --- diff --git a/commands.c b/commands.c index 04ca238..ff9d3ac 100644 --- a/commands.c +++ b/commands.c @@ -64,6 +64,14 @@ cmd_version_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg return QMI_CMD_REQUEST; } +#define cmd_sync_cb no_cb +static enum qmi_cmd_result +cmd_sync_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg) +{ + qmi_set_ctl_sync_request(msg); + return QMI_CMD_DONE; +} + #define cmd_get_client_id_cb no_cb static enum qmi_cmd_result cmd_get_client_id_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg) diff --git a/commands.h b/commands.h index 28823f3..f409ec4 100644 --- a/commands.h +++ b/commands.h @@ -55,6 +55,7 @@ struct uqmi_cmd { #define __uqmi_commands \ __uqmi_command(version, get-versions, no, QMI_SERVICE_CTL), \ + __uqmi_command(sync, sync, no, QMI_SERVICE_CTL), \ __uqmi_command(set_client_id, set-client-id, required, CMD_TYPE_OPTION), \ __uqmi_command(get_client_id, get-client-id, required, QMI_SERVICE_CTL), \ __uqmi_command(ctl_set_data_format, set-data-format, required, QMI_SERVICE_CTL), \ diff --git a/main.c b/main.c index 25ec992..9b43e5e 100644 --- a/main.c +++ b/main.c @@ -66,6 +66,7 @@ static int usage(const char *progname) " (implies --keep-client-id)\n" " --get-client-id : Connect and get Client ID for service \n" " (implies --keep-client-id)\n" + " --sync: Release all Client IDs\n" wds_helptext dms_helptext uim_helptext