四、添加兼容处理
如果需要对MBIM,GobiNet或者QMI_WWAN拨号模式的支持,则需要做兼容处理,我们接下来会做GobiNet拨号方式的支持,所以需要做兼容处理:
在drivers/usb/serial/option.c文件中的int option_probe函数中增加:
#if 1 //Added by Quectel
//Quectel modules’s interface 4 can be used as USB network device
if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
//some interfaces can be used as USB Network device (ecm, rndis, mbim)
if (serial->interface->cur_altsetting->desc.bInterfaceClass != 0xFF) {
return -ENODEV;
}
//interface 4 can be used as USB Network device (qmi)
else if (serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4) {
return -ENODEV;
}
}
#endif
效果如下: