Add mandatory field to Initiate Network Register
authorSławomir Demeszko <s.demeszko@wireless-instruments.com>
Wed, 17 Dec 2014 18:06:16 +0000 (19:06 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 18 Dec 2014 12:05:04 +0000 (13:05 +0100)
According to json data Action field in Initiate Network Register
is mandatory. I get "Missing argument" from qmi without it.

Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
commands-nas.c

index ccc58abd39728cab1b6a1356ef41c84269da2f8e..be06ee4ff59ad0c2f3c9ef4b858881a467a184e6 100644 (file)
@@ -103,7 +103,10 @@ cmd_nas_set_roaming_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct
 static enum qmi_cmd_result
 cmd_nas_initiate_network_register_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
 {
-       static struct qmi_nas_initiate_network_register_request register_req;
+       static struct qmi_nas_initiate_network_register_request register_req = {
+               QMI_INIT(action, QMI_NAS_NETWORK_REGISTER_TYPE_AUTOMATIC)
+       };
+
        qmi_set_nas_initiate_network_register_request(msg, &register_req);
        return QMI_CMD_REQUEST;
 }