mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
USB: serial: option: add MEDIATEK FM350-GL module usb mode support
This commit is contained in:
parent
9e29b15c05
commit
784b562e90
26
target/linux/generic/hack-6.1/930-usb-net-for-fm350.patch
Normal file
26
target/linux/generic/hack-6.1/930-usb-net-for-fm350.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- a/drivers/usb/serial/option.c
|
||||
+++ b/drivers/usb/serial/option.c
|
||||
@@ -589,6 +589,7 @@
|
||||
|
||||
|
||||
static const struct usb_device_id option_ids[] = {
|
||||
+ { USB_DEVICE(MEDIATEK_VENDOR_ID, 0x7127) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_LIGHT) },
|
||||
@@ -2210,6 +2211,15 @@
|
||||
if (device_flags & NUMEP2 && iface_desc->bNumEndpoints != 2)
|
||||
return -ENODEV;
|
||||
|
||||
+ if(id->idVendor == MEDIATEK_VENDOR_ID &&
|
||||
+ (id->idProduct == cpu_to_le16(0x7127) &&
|
||||
+ ((serial->interface->cur_altsetting->desc.bInterfaceNumber <= 5) ||
|
||||
+ (serial->interface->cur_altsetting->desc.bInterfaceNumber >= 7))))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Discovery the interface for Fibocom & MEDIATEK.");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
/* Store the device flags so we can use them during attach. */
|
||||
usb_set_serial_data(serial, (void *)device_flags);
|
||||
|
26
target/linux/generic/hack-6.6/930-usb-net-for-fm350.patch
Normal file
26
target/linux/generic/hack-6.6/930-usb-net-for-fm350.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- a/drivers/usb/serial/option.c
|
||||
+++ b/drivers/usb/serial/option.c
|
||||
@@ -589,6 +589,7 @@
|
||||
|
||||
|
||||
static const struct usb_device_id option_ids[] = {
|
||||
+ { USB_DEVICE(MEDIATEK_VENDOR_ID, 0x7127) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
|
||||
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_LIGHT) },
|
||||
@@ -2210,6 +2211,15 @@
|
||||
if (device_flags & NUMEP2 && iface_desc->bNumEndpoints != 2)
|
||||
return -ENODEV;
|
||||
|
||||
+ if(id->idVendor == MEDIATEK_VENDOR_ID &&
|
||||
+ (id->idProduct == cpu_to_le16(0x7127) &&
|
||||
+ ((serial->interface->cur_altsetting->desc.bInterfaceNumber <= 5) ||
|
||||
+ (serial->interface->cur_altsetting->desc.bInterfaceNumber >= 7))))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Discovery the interface for Fibocom & MEDIATEK.");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
/* Store the device flags so we can use them during attach. */
|
||||
usb_set_serial_data(serial, (void *)device_flags);
|
||||
|
Loading…
Reference in New Issue
Block a user