renderer: add mbim support

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2021-07-02 12:17:30 +02:00
parent de4e2a6352
commit 1c6efe8d91
4 changed files with 8 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ uplink.role = "upstream";
uplink.vlan = { id: 0 }; uplink.vlan = { id: 0 };
uplink.metric = 1; uplink.metric = 1;
if (broadband.protocol == "wwan" && broadband['modem-type'] == "qmi") { if (broadband.protocol == "wwan" && index([ "qmi", "mbim", "wwan" ], broadband['modem-type']) >= 0) {
let wwan = { }; let wwan = { };
wwan.protocol = 'wwan'; wwan.protocol = 'wwan';

View File

@@ -13,6 +13,8 @@ properties:
type: string type: string
enum: enum:
- qmi - qmi
- mbim
- wwan
access-point-name: access-point-name:
description: description:
Commonly known as APN. The name of a gateway between a mobile network Commonly known as APN. The name of a gateway between a mobile network

View File

@@ -1302,8 +1302,8 @@ function instantiateInterfaceBroadBandWwan(location, value, errors) {
if (type(value) != "string") if (type(value) != "string")
push(errors, [ location, "must be of type string" ]); push(errors, [ location, "must be of type string" ]);
if (!(value in [ "qmi" ])) if (!(value in [ "qmi", "mbim", "wwan" ]))
push(errors, [ location, "must be one of \"qmi\"" ]); push(errors, [ location, "must be one of \"qmi\", \"mbim\" or \"wwan\"" ]);
return value; return value;
} }

View File

@@ -562,7 +562,9 @@
"modem-type": { "modem-type": {
"type": "string", "type": "string",
"enum": [ "enum": [
"qmi" "qmi",
"mbim",
"wwan"
] ]
}, },
"access-point-name": { "access-point-name": {