Compile under Linux (Ubuntu)

I need to get the Gobi driver to run for some future SDK fun. But something is wrong when I try to compile the GobiNet driver.
The package I’m trying : SierraLinuxQMIdriversS2.22N2.29.tar.bz2 from source.sierrawireless.com

My System:
uname -a
Linux HP-Elite2 3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16 17:15:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I get an error when trying to compile… Any ideas why??

Before :
Make sure you have a network connection and issue the following commands:
sudo apt-get install build-essential make gcc
sudo apt-get install linux-headers-uname -r

Building and Installing the Drivers
cd GobiSerial; make; sudo make install
cd GobiNet; make; sudo make install
sudo modprobe GobiSerial [debug=Y]
sudo modprobe GobiNet [debug=Y]

Output:
rm -rf *.o ~ core .depend ..cmd *.ko .mod.c .tmp_versions Module. modules.order
make -C /lib/modules/3.19.0-22-generic/build M=/tmp/GobiNet modules
make[1]: Entering directory ‘/usr/src/linux-headers-3.19.0-22-generic’
CC [M] /tmp/GobiNet/GobiUSBNet.o
/tmp/GobiNet/GobiUSBNet.c:1028:1: warning: data definition has no type or storage class
MODULE_DEVICE_TABLE( usb, GobiVIDPIDTable );
^
/tmp/GobiNet/GobiUSBNet.c:1028:1: error: type defaults to ‘int’ in declaration of ‘MODULE_DEVICE_TABLE’ [-Werror=implicit-int]
/tmp/GobiNet/GobiUSBNet.c:1028:1: warning: parameter names (without types) in function declaration
/tmp/GobiNet/GobiUSBNet.c:65:24: error: expected declaration specifiers or ‘…’ before string constant
#define DRIVER_VERSION “2011-07-29-1026”
^
/tmp/GobiNet/GobiUSBNet.c:1239:17: note: in expansion of macro ‘DRIVER_VERSION’
MODULE_VERSION( DRIVER_VERSION );
^
/tmp/GobiNet/GobiUSBNet.c:66:23: error: expected declaration specifiers or ‘…’ before string constant
#define DRIVER_AUTHOR “Qualcomm Innovation Center”
^
/tmp/GobiNet/GobiUSBNet.c:1240:16: note: in expansion of macro ‘DRIVER_AUTHOR’
MODULE_AUTHOR( DRIVER_AUTHOR );
^
/tmp/GobiNet/GobiUSBNet.c:67:21: error: expected declaration specifiers or ‘…’ before string constant
#define DRIVER_DESC “GobiNet”
^
/tmp/GobiNet/GobiUSBNet.c:1241:21: note: in expansion of macro ‘DRIVER_DESC’
MODULE_DESCRIPTION( DRIVER_DESC );
^
/tmp/GobiNet/GobiUSBNet.c:1242:16: error: expected declaration specifiers or ‘…’ before string constant
MODULE_LICENSE(“Dual BSD/GPL”);
^
/tmp/GobiNet/GobiUSBNet.c:1249:22: error: expected ‘)’ before ‘bool’
module_param( debug, bool, S_IRUGO | S_IWUSR );
^
/tmp/GobiNet/GobiUSBNet.c:1250:26: error: expected ‘)’ before string constant
MODULE_PARM_DESC( debug, “Debuging enabled or not” );
^
/tmp/GobiNet/GobiUSBNet.c:1252:30: error: expected ‘)’ before ‘bool’
module_param( interruptible, bool, S_IRUGO | S_IWUSR );
^
/tmp/GobiNet/GobiUSBNet.c:1253:34: error: expected ‘)’ before string constant
MODULE_PARM_DESC( interruptible, “Listen for and return on user interrupt” );
^
/tmp/GobiNet/GobiUSBNet.c:1255:30: error: expected ‘)’ before ‘int’
module_param( txQueueLength, int, S_IRUGO | S_IWUSR );
^
/tmp/GobiNet/GobiUSBNet.c:1257:19: error: expected ‘)’ before string constant
“Number of IP packets which may be queued up for transmit” );
^
cc1: some warnings being treated as errors
scripts/Makefile.build:257: recipe for target ‘/tmp/GobiNet/GobiUSBNet.o’ failed
make[2]: *** [/tmp/GobiNet/GobiUSBNet.o] Error 1
Makefile:1394: recipe for target ‘module/tmp/GobiNet’ failed
make[1]: *** [module/tmp/GobiNet] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-3.19.0-22-generic’
Makefile:8: recipe for target ‘all’ failed
make: *** [all] Error 2

Hi suneandersen,

The driver version you are using is outdated, please refer to QMI driver history:
http://source.sierrawireless.com/resources/airprime/software/usb-drivers-linux-qmi-software-history-item/

If possible, please try the latest one available which should give you less error.
The remaining error was because of kernel change in 3.19, which was fixed in upcoming driver.

If you want, you can change manually below in QMIDevice.c (S2.24N2.33) to solve the compile issue:

pFilp->f_op = pFilp->f_dentry->d_inode->i_fop;
   to
pFilp->f_op = pFilp->f_path.dentry->d_inode->i_fop;

Also seems like inappropriate section, it should be under “MC/EM Series”.
Hope it helps.
Thx