从linux-3.10.11移植qmi_wwan.c到MT7620原生SDK使用的linux-2.6.36.x
该驱动对应使用 Qualcomm MSM Interface (QMI)的2G/4G dongle,源码中解释如下:
/* This driver supports wwan (3G/LTE/?) devices using a vendor
* specific management protocol called Qualcomm MSM Interface (QMI) -
* in addition to the more common AT commands over serial interface
* management
*
* QMI is wrapped in CDC, using CDC encapsulated commands on the
* control ("master") interface of a two-interface CDC Union
* resembling standard CDC ECM. The devices do not use the control
* interface for any other CDC messages. Most likely because the
* management protocol is used in place of the standard CDC
* notifications NOTIFY_NETWORK_CONNECTION and NOTIFY_SPEED_CHANGE
*
* Alternatively, control and data functions can be combined in a
* single USB interface.
*
* Handling a protocol like QMI is out of the scope for any driver.
* It is exported as a character device using the cdc-wdm driver as
* a subdriver, enabling userspace applications ("modem managers") to
* handle it.
*
* These devices may alternatively/additionally be configured using AT
* commands on a serial interface
*/
首先拷贝"linux-3.10.11\drivers\net\usb\qmi_wwan.c"到“linux-2.6.36.x\drivers\net\usb\”目录,以及修改该目录的makefile,kconfig;编译时会有错误,需要在做一些工作,其中的一部分如下所示:
1)修改“linux-2.6.36.x\include\linux\mod_devicetable.h” 增加“__u8 bInterfaceNumber;”
/**
* struct usb_device_id - identifie