Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save tnishinaga/018b3054bb64e10a9c2723e679bb4dda to your computer and use it in GitHub Desktop.

Select an option

Save tnishinaga/018b3054bb64e10a9c2723e679bb4dda to your computer and use it in GitHub Desktop.
docomo L-03Fに適切なドライバを当てるためのパッチ。私の環境では3Gの電波しか掴まずネットに繋がらなかった。
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index f04da7332..a3e636dbc 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1445,6 +1445,7 @@ static const struct usb_device_id products[] = {
{QMI_QUIRK_SET_DTR(0x1546, 0x1342, 4)}, /* u-blox LARA-L6 */
{QMI_QUIRK_SET_DTR(0x33f8, 0x0104, 4)}, /* Rolling RW101 RMNET */
{QMI_FIXED_INTF(0x2dee, 0x4d22, 5)}, /* MeiG Smart SRM825L */
+ {QMI_FIXED_INTF(0x1004, 0x6366, 2)}, /* Docomo L-03F */
/* 4. Gobi 1000 devices */
{QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index 13c664317..4b230e784 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -26,6 +26,7 @@ enum qcserial_layouts {
QCSERIAL_G1K = 1, /* Gobi 1000 */
QCSERIAL_SWI = 2, /* Sierra Wireless */
QCSERIAL_HWI = 3, /* Huawei */
+ QCSERIAL_L03F = 4,
};
#define DEVICE_G1K(v, p) \
@@ -192,6 +193,9 @@ static const struct usb_device_id id_table[] = {
/* Huawei devices */
{DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */
+ /* other */
+ {USB_DEVICE(0x1004, 0x6366),.driver_info=QCSERIAL_L03F}, /* Docomo L03F */
+
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table);
@@ -403,6 +407,27 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
intf->desc.bInterfaceProtocol);
}
break;
+ case QCSERIAL_L03F:
+ /*
+ * Docomo L-03F Wireless layout:
+ * 0: DM/DIAG (use libqcdm from ModemManager for communication)
+ * 1: AT-capable modem port
+ * 2: QMI/net
+ */
+ switch (ifnum) {
+ case 0:
+ dev_dbg(dev, "DM/DIAG interface found\n");
+ break;
+ case 1:
+ dev_dbg(dev, "Modem port found\n");
+ sendsetup = true;
+ break;
+ default:
+ /* Don't claim the QMI/net interface */
+ altsetting = -1;
+ break;
+ }
+ break;
default:
dev_err(dev, "unsupported device layout type: %lu\n",
id->driver_info);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment