]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
uqmi: fix data-format parsing
authorDavid Bauer <mail@david-bauer.net>
Sun, 14 Sep 2025 09:07:38 +0000 (11:07 +0200)
committerDavid Bauer <mail@david-bauer.net>
Thu, 18 Sep 2025 21:27:58 +0000 (23:27 +0200)
wda-get-data-format now returns an object instead of a single string.
Account for this change when reading the packet data format.

Suggested-by: Sebastian Ertz (https://github.com/sebastianertz)
Signed-off-by: David Bauer <mail@david-bauer.net>
package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh

index a6a3fdaa693297985d0825ce9174665833e0e8be..ebce281b80345241727d9cce4a45e5ce370f3724 100755 (executable)
@@ -232,9 +232,10 @@ proto_qmi_setup() {
        # Set IP format
        uqmi -s -d "$device" -t 1000 --set-data-format 802.3 > /dev/null 2>&1
        uqmi -s -d "$device" -t 1000 --wda-set-data-format 802.3 > /dev/null 2>&1
-       dataformat="$(uqmi -s -d "$device" -t 1000 --wda-get-data-format)"
+       json_load "$(uqmi -s -d "$device" -t 1000 --wda-get-data-format)"
+       json_get_var dataformat link-layer-protocol
 
-       if [ "$dataformat" = '"raw-ip"' ]; then
+       if [ "$dataformat" = "raw-ip" ]; then
 
                [ -f /sys/class/net/$ifname/qmi/raw_ip ] || {
                        echo "Device only supports raw-ip mode but is missing this required driver attribute: /sys/class/net/$ifname/qmi/raw_ip"