Build errors for SierraLinuxQMIdrivers on Ubuntu-22.04

In the past I was successfully building the SierraLinuxQMIdrivers-S2.42N2.64 driver with Ubuntu 20.04 for the WWAN-Card MC7700. After an upgrade to Ubuntu 22.04, I’m trying to build the SierraLinuxQMIdrivers-S2.42N2.64 with kernel 5.15.0-40 on Ubuntu 22.04 and get the following build error:

DKMS make.log for SierraLinuxQMIdrivers-S2.42N2.64 for kernel 5.15.0-40-generic (x86_64)
Tue Jun 28 12:15:08 CEST 2022
make: Entering directory '/var/lib/dkms/SierraLinuxQMIdrivers/S2.42N2.64/build/GobiSerial'
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order *.o.ur-safe
make -C /lib/modules/5.15.0-40-generic/build M=/var/lib/dkms/SierraLinuxQMIdrivers/S2.42N2.64/build/GobiSerial modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-40-generic'
  CC [M]  /var/lib/dkms/SierraLinuxQMIdrivers/S2.42N2.64/build/GobiSerial/GobiSerial.o
/var/lib/dkms/SierraLinuxQMIdrivers/S2.42N2.64/build/GobiSerial/GobiSerial.c:242:2: warning: #warning "Assuming disc_mutex is locked external to the module" [-Wcpp]
  242 | #warning "Assuming disc_mutex is locked external to the module"
      |  ^~~~~~~
/var/lib/dkms/SierraLinuxQMIdrivers/S2.42N2.64/build/GobiSerial/GobiSerial.c:773:27: error: initialization of ‘void (*)(struct usb_serial_port *)’ from incompatible pointer type ‘int (*)(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types]
  773 |    .port_remove         = Gobi_portremove,
      |                           ^~~~~~~~~~~~~~~
/var/lib/dkms/SierraLinuxQMIdrivers/S2.42N2.64/build/GobiSerial/GobiSerial.c:773:27: note: (near initialization for ‘gGobiDevice.port_remove’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/ /var/lib/dkms/SierraLinuxQMIdrivers/S2.42N2.64/build/GobiSerial/GobiSerial.o] Fehler 1
make[1]: *** [Makefile:1875: /var/lib/dkms/SierraLinuxQMIdrivers/S2.42N2.64/build/GobiSerial] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-40-generic'
make: *** [Makefile:25: all] Error 2
make: Leaving directory '/var/lib/dkms/SierraLinuxQMIdrivers/S2.42N2.64/build/GobiSerial'

I found this other post which seems to be a similar problem: Build errors for SierraLinuxQMIdrivers on Ubuntu-20.04 (focal)

So I guess my build error also comes from a kernel incompatibility? Is there anything I can do to fix it, or will there be an update fixing this?

The download page says that the qml driver is end of line and one should switch to mbim. I was not able to find out, if my Card (MC7700) supports MBIM. Would I need to switch my card somehow like you can switch from DIP <-> QML-Mode? Will MBIM also work with the default Ubuntu 22.04 NetworkManager which is based on ModemManager? I read that ModemManager also supports MBIM via libmbim, but on my system the card always seems to be recognized as QML and the default qml drivers ‘qmi_wwan’ and ‘qcserial’ kick in.
Thanks for any help!

Hi hugo,

The Gobi driver is now EOL. Sierra Wireless recommends you move to MBPL on supported modules.
Please try it with the MBPL driver.
Mobile Broadband Package for Linux