Browse Source

uqmi: use unmodified upstream JSON files

Extend code generator to handle also identifiers starting with a
numerical character.

Suggested-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Acked-by: Oskari Lemmelä <oskari@lemmela.net>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle 2 years ago
parent
commit
20cd9075df
3 changed files with 6 additions and 5 deletions
  1. 1 0
      data/gen-common.pm
  2. 3 3
      data/qmi-service-nas.json
  3. 2 2
      data/qmi-service-wms.json

+ 1 - 0
data/gen-common.pm

@@ -32,6 +32,7 @@ sub gen_cname($) {
 	my $name = shift;
 
 	$name =~ s/[^a-zA-Z0-9_]/_/g;
+	$name = "_${name}" if $name =~ /^\d/;
 	return lc($name);
 }
 

+ 3 - 3
data/qmi-service-nas.json

@@ -2074,7 +2074,7 @@
                      "format"        : "guint8",
                      "public-format" : "gboolean" } ],
       "output" : [ { "common-ref" : "Operation Result" },
-                   { "name"     : "EONS PLMN Name 3GPP",
+                   { "name"     : "3GPP EONS PLMN Name",
                      "id"       : "0x10",
                      "type"     : "TLV",
                      "since"    : "1.28",
@@ -3765,7 +3765,7 @@
                                         "format" : "gint32" },
                                       { "name"   : "SINR",
                                         "format" : "gint32" } ] },
-                    { "name"      : "Signal Strength 5G",
+                    { "name"      : "5G Signal Strength",
                       "id"        : "0x17",
                       "type"      : "TLV",
                       "since"     : "1.26.2",
@@ -3774,7 +3774,7 @@
                                         "format" : "gint16" },
                                       { "name"   : "SNR",
                                         "format" : "gint16" } ] },
-                    { "name"      : "Signal Strength 5G Extended",
+                    { "name"      : "5G Signal Strength Extended",
                       "id"        : "0x18",
                       "type"      : "TLV",
                       "since"     : "1.26.2",

+ 2 - 2
data/qmi-service-wms.json

@@ -515,7 +515,7 @@
                                      { "name"          : "Success",
                                        "format"        : "guint8",
                                        "public-format" : "gboolean" } ] },
-		   { "name"      : "Failure Information 3GPP2",
+		   { "name"      : "3GPP2 Failure Information",
                      "id"        : "0x10",
                      "type"      : "TLV",
                      "since"     : "1.28",
@@ -526,7 +526,7 @@
                                      { "name"          : "Cause Code",
                                        "format"        : "guint8",
                                        "public-format" : "QmiWmsCdmaCauseCode" } ] },
-		   { "name"      : "Failure Information 3GPP",
+		   { "name"      : "3GPP Failure Information",
                      "id"        : "0x11",
                      "type"      : "TLV",
                      "since"     : "1.28",