Linux QMI driver build error

i’m trying to build driver to use EM7511 and MC7430
here’s some error

[kevin@localhost GobiSerial] make rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order .cache.mk make -C /lib/modules/3.10.0-957.21.2.el7.x86_64/build M=/home/kevin/Downloads/orinigin/GobiSerial modules make[1]: Entering directory `/usr/src/kernels/3.10.0-957.21.2.el7.x86_64' CC [M] /home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.o /home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.c:232:2: warning: #warning "Assuming disc_mutex is locked external to the module" [-Wcpp] #warning "Assuming disc_mutex is locked external to the module" ^ /home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.c: In function ‘Gobi_portremove’: /home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.c:561:26: error: ‘struct usb_serial_port’ has no member named ‘number’ port_number = (u8)port->number; ^ make[2]: *** [/home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.o] Error 1 make[1]: *** [_module_/home/kevin/Downloads/orinigin/GobiSerial] Error 2 make[1]: Leaving directory `/usr/src/kernels/3.10.0-957.21.2.el7.x86_64' make: *** [all] Error 2 [kevin@localhost GobiSerial]

[kevin@localhost GobiNet] make make -C /lib/modules/3.10.0-957.21.2.el7.x86_64/build M=/home/kevin/Downloads/orinigin/GobiNet modules make[1]: Entering directory `/usr/src/kernels/3.10.0-957.21.2.el7.x86_64' CC [M] /home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.o In file included from include/net/sock.h:62:0, from include/net/inet_sock.h:27, from include/net/ip.h:30, from /home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.c:94: include/linux/memcontrol.h: In function ‘task_in_memcg_oom’: include/linux/memcontrol.h:141:2: warning: return makes integer from pointer without a cast [enabled by default] return p->memcg_oom.memcg; ^ /home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.c: In function ‘GobiUSBNetProbe’: /home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.c:2963:14: error: ‘struct net_device_ops’ has no member named ‘ndo_change_mtu’ pNetDevOps->ndo_change_mtu = GobiUSBNetChangeMTU; ^ make[2]: *** [/home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.o] Error 1 make[1]: *** [_module_/home/kevin/Downloads/orinigin/GobiNet] Error 2 make[1]: Leaving directory `/usr/src/kernels/3.10.0-957.21.2.el7.x86_64' make: *** [all] Error 2 [kevin@localhost GobiNet]

I don’t see problem to compile the driver SierraLinuxQMIdriversS2.37N2.57 on Ubuntu 14.04:

owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial$ sudo make
rm -rf *.o ~ core .depend ..cmd *.ko .mod.c .tmp_versions Module. modules.order .cache.mk
make -C /lib/modules/3.13.0-158-generic/build M=/home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial modules
make[1]: Entering directory /usr/src/linux-headers-3.13.0-158-generic' CC [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial/GobiSerial.o /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial/GobiSerial.c:232:2: warning: #warning "Assuming disc_mutex is locked external to the module" [-Wcpp] #warning "Assuming disc_mutex is locked external to the module" ^ Building modules, stage 2. MODPOST 1 modules CC /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial/GobiSerial.mod.o LD [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial/GobiSerial.ko make[1]: Leaving directory/usr/src/linux-headers-3.13.0-158-generic’

owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial$ cd …
owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57$ cd GobiNet/
owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet$ sudo make
make -C /lib/modules/3.13.0-158-generic/build M=/home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet modules
make[1]: Entering directory /usr/src/linux-headers-3.13.0-158-generic' CC [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.o In file included from include/net/sock.h:57:0, from include/net/inet_sock.h:27, from include/net/ip.h:30, from /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.c:94: include/linux/memcontrol.h: In function ‘task_in_memcg_oom’: include/linux/memcontrol.h:154:2: warning: return makes integer from pointer without a cast [enabled by default] return p->memcg_oom.memcg; ^ /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.c: At top level: /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.c:109:2: warning: #warning "Remove memcontrol.h task_in_memcg_oom warning : replace 'return p->memcg_oom.memcg;' to 'return p->memcg_oom.memcg==NULL ? 0 : 1;' in function task_in_memcg_oom" [-Wcpp] #warning "Remove memcontrol.h task_in_memcg_oom warning : replace 'return p->memcg_oom.memcg;' to 'return p->memcg_oom.memcg==NULL ? 0 : 1;' in function task_in_memcg_oom" ^ /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.c:110:2: warning: #warning "Commnet '#define MEMCG_NOT_FIX' above after fix applied." [-Wcpp] #warning "Commnet '#define MEMCG_NOT_FIX' above after fix applied." ^ CC [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/QMIDevice.o CC [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/QMI.o LD [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiNet.o Building modules, stage 2. MODPOST 1 modules CC /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiNet.mod.o LD [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiNet.ko make[1]: Leaving directory/usr/src/linux-headers-3.13.0-158-generic’
owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet$

i’m using CentOs 7.6

Can you have a try on this version? (i can compile in CentOS7.6)
S2.28N2.42.zip (107.9 KB)