uqmi: Change returned value to QMI_CMD_REQUEST for 'sync' command.
[project/uqmi.git] / commands-nas.c
index 33477dd..5874bfb 100644 (file)
@@ -1,3 +1,24 @@
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
 #include "qmi-message.h"
 
 static struct qmi_nas_set_system_selection_preference_request sel_req;
@@ -343,7 +364,13 @@ cmd_nas_network_scan_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi
 static enum qmi_cmd_result
 cmd_nas_network_scan_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
 {
-       struct qmi_nas_network_scan_request sreq = {};
+       struct qmi_nas_network_scan_request sreq = {
+               QMI_INIT(network_type,
+                    QMI_NAS_NETWORK_SCAN_TYPE_GSM |
+                    QMI_NAS_NETWORK_SCAN_TYPE_UMTS |
+                    QMI_NAS_NETWORK_SCAN_TYPE_LTE |
+                    QMI_NAS_NETWORK_SCAN_TYPE_TD_SCDMA),
+       };
 
        qmi_set_nas_network_scan_request(msg, &sreq);
        return QMI_CMD_REQUEST;