base-files: add protocol qmi/mbim support for ucidef_set_interface()
authorAndrey Butirsky <butirsky@gmail.com>
Wed, 7 Sep 2022 13:54:00 +0000 (16:54 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 18 Oct 2022 13:09:23 +0000 (15:09 +0200)
Make it possible to setup default WAN interface for devices with built-in LTE
modems, using QMI or MBIM.

Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
Reviewed-by: Lech Perczak <lech.perczak@gmail.com>
package/base-files/files/bin/config_generate

index 38362813d1924c715235c8259b593f0335029b9c..0001f887466196373077d6ba01e47dbde9aabfbb 100755 (executable)
@@ -207,6 +207,14 @@ generate_network() {
                                EOF
                        }
                ;;
+
+               qmi|\
+               mbim)
+                       uci -q batch <<-EOF
+                               set network.$1.proto='${protocol}'
+                               set network.$1.pdptype='ipv4'
+                       EOF
+               ;;
        esac
 }