luci-app-qmodem: add Qualcomm QMI WWAN Driver Selection option
This commit is contained in:
parent
335563892d
commit
0d996f0761
47
driver/fibocom_QMI_WWAN/Makefile
Normal file
47
driver/fibocom_QMI_WWAN/Makefile
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=qmi_wwan_f
|
||||||
|
PKG_VERSION:=1.0
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define KernelPackage/qmi_wwan_f
|
||||||
|
SUBMENU:=WWAN Support
|
||||||
|
TITLE:=Fibocom Linux USB QMI WWAN Driver
|
||||||
|
DEPENDS:=+kmod-usb-net +kmod-usb-wdm
|
||||||
|
FILES:=$(PKG_BUILD_DIR)/qmi_wwan_f.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,82,qmi_wwan_f)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/qmi_wwan_f/description
|
||||||
|
Fibocom Linux USB QMI WWAN Driver
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKE_OPTS:= \
|
||||||
|
ARCH="$(LINUX_KARCH)" \
|
||||||
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||||
|
CXXFLAGS="$(TARGET_CXXFLAGS)" \
|
||||||
|
M="$(PKG_BUILD_DIR)" \
|
||||||
|
$(EXTRA_KCONFIG)
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE) -C "$(LINUX_DIR)" \
|
||||||
|
$(MAKE_OPTS) \
|
||||||
|
modules
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,qmi_wwan_f))
|
38
driver/fibocom_QMI_WWAN/src/Makefile
Normal file
38
driver/fibocom_QMI_WWAN/src/Makefile
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
obj-m += qmi_wwan_f.o
|
||||||
|
|
||||||
|
PWD := $(shell pwd)
|
||||||
|
OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/
|
||||||
|
|
||||||
|
ifeq ($(ARCH),)
|
||||||
|
ARCH := $(shell uname -m)
|
||||||
|
endif
|
||||||
|
ifeq ($(CROSS_COMPILE),)
|
||||||
|
CROSS_COMPILE :=
|
||||||
|
endif
|
||||||
|
ifeq ($(KDIR),)
|
||||||
|
KDIR := /lib/modules/$(shell uname -r)/build
|
||||||
|
ifeq ($(ARCH),i686)
|
||||||
|
ifeq ($(wildcard $KDIR/arch/$ARCH),)
|
||||||
|
ARCH=i386
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(findstring &,${PWD}),)
|
||||||
|
$(warning "${PWD}")
|
||||||
|
$(warning "current directory contain special char '&' !")
|
||||||
|
$(error "please remove it!")
|
||||||
|
endif
|
||||||
|
|
||||||
|
default:
|
||||||
|
$(MAKE) ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} -C $(KDIR) M=$(PWD) modules
|
||||||
|
|
||||||
|
install: default
|
||||||
|
cp $(PWD)/qmi_wwan_f.ko /lib/modules/$(shell uname -r)/kernel/drivers/net/usb/
|
||||||
|
depmod
|
||||||
|
modprobe -r qmi_wwan_f
|
||||||
|
modprobe -r qmi_wwan
|
||||||
|
modprobe qmi_wwan_f
|
||||||
|
clean:
|
||||||
|
rm -rf *~ .tmp_versions modules.order Module.symvers
|
||||||
|
find . -type f -name "*~" -o -name "*.o" -o -name "*.ko" -o -name "*.cmd" -o -name "*.mod.c" | xargs rm -rf
|
2534
driver/fibocom_QMI_WWAN/src/qmi_wwan_f.c
Normal file
2534
driver/fibocom_QMI_WWAN/src/qmi_wwan_f.c
Normal file
File diff suppressed because it is too large
Load Diff
47
driver/meig_QMI_WWAN/Makefile
Normal file
47
driver/meig_QMI_WWAN/Makefile
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=qmi_wwan_m
|
||||||
|
PKG_VERSION:=1.0
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define KernelPackage/qmi_wwan_m
|
||||||
|
SUBMENU:=WWAN Support
|
||||||
|
TITLE:=Meig Linux USB QMI WWAN Driver
|
||||||
|
DEPENDS:=+kmod-usb-net +kmod-usb-wdm
|
||||||
|
FILES:=$(PKG_BUILD_DIR)/qmi_wwan_m.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,82,qmi_wwan_m)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/qmi_wwan_m/description
|
||||||
|
Meig Linux USB QMI WWAN Driver
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKE_OPTS:= \
|
||||||
|
ARCH="$(LINUX_KARCH)" \
|
||||||
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||||
|
CXXFLAGS="$(TARGET_CXXFLAGS)" \
|
||||||
|
M="$(PKG_BUILD_DIR)" \
|
||||||
|
$(EXTRA_KCONFIG)
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE) -C "$(LINUX_DIR)" \
|
||||||
|
$(MAKE_OPTS) \
|
||||||
|
modules
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,qmi_wwan_m))
|
35
driver/meig_QMI_WWAN/src/Makefile
Normal file
35
driver/meig_QMI_WWAN/src/Makefile
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
obj-m := qmi_wwan_m.o
|
||||||
|
GobiNet-objs := qmi_wwan_m.o
|
||||||
|
|
||||||
|
PWD := $(shell pwd)
|
||||||
|
OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/
|
||||||
|
|
||||||
|
ifeq ($(ARCH),)
|
||||||
|
ARCH := $(shell uname -m)
|
||||||
|
endif
|
||||||
|
ifeq ($(CROSS_COMPILE),)
|
||||||
|
CROSS_COMPILE :=
|
||||||
|
endif
|
||||||
|
ifeq ($(KDIR),)
|
||||||
|
KDIR := /lib/modules/$(shell uname -r)/build
|
||||||
|
ifeq ($(ARCH),i686)
|
||||||
|
ifeq ($(wildcard $KDIR/arch/$ARCH),)
|
||||||
|
ARCH=i386
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
default:
|
||||||
|
ln -sf makefile Makefile
|
||||||
|
$(MAKE) ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} -C $(KDIR) M=$(PWD) modules
|
||||||
|
|
||||||
|
install: default
|
||||||
|
mkdir -p $(OUTPUTDIR)
|
||||||
|
cp -f qmi_wwan_m.ko $(OUTPUTDIR)
|
||||||
|
depmod
|
||||||
|
modprobe -r qmi_wwan_m
|
||||||
|
modprobe qmi_wwan_m
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf Makefile
|
||||||
|
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order
|
997
driver/meig_QMI_WWAN/src/qmi_wwan_m.c
Normal file
997
driver/meig_QMI_WWAN/src/qmi_wwan_m.c
Normal file
@ -0,0 +1,997 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2012 Bjørn Mork <bjorn@mork.no>
|
||||||
|
*
|
||||||
|
* The probing code is heavily inspired by cdc_ether, which is:
|
||||||
|
* Copyright (C) 2003-2005 by David Brownell
|
||||||
|
* Copyright (C) 2006 by Ole Andre Vadla Ravnas (ActiveSync)
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* version 2 as published by the Free Software Foundation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/netdevice.h>
|
||||||
|
#include <linux/ethtool.h>
|
||||||
|
#include <linux/etherdevice.h>
|
||||||
|
#include <linux/mii.h>
|
||||||
|
#include <linux/usb.h>
|
||||||
|
#include <linux/usb/cdc.h>
|
||||||
|
#include <linux/usb/usbnet.h>
|
||||||
|
#include <linux/usb/cdc-wdm.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
//Added by zhangqingyun@meigsmart.com always need if not dhcp can't get ip address
|
||||||
|
struct sk_buff *qmi_wwan_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
|
||||||
|
{
|
||||||
|
if (dev->udev->descriptor.idVendor != cpu_to_le16(0x2C7C) &&
|
||||||
|
dev->udev->descriptor.idVendor != cpu_to_le16(0x05c6) &&
|
||||||
|
dev->udev->descriptor.idVendor != cpu_to_le16(0x2dee)){
|
||||||
|
dev_err(&dev->intf->dev,"zhangqingyun test 1");
|
||||||
|
return skb;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skip Ethernet header from message
|
||||||
|
if (skb_pull(skb, ETH_HLEN)) {
|
||||||
|
dev_err(&dev->intf->dev, "zhangqingyu test 2");
|
||||||
|
return skb;
|
||||||
|
} else {
|
||||||
|
dev_err(&dev->intf->dev, "Packet Dropped ");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter the packet out, release it
|
||||||
|
dev_kfree_skb_any(skb);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
|
/* driver specific data */
|
||||||
|
struct qmi_wwan_state {
|
||||||
|
struct usb_driver *subdriver;
|
||||||
|
atomic_t pmcount;
|
||||||
|
unsigned long unused;
|
||||||
|
struct usb_interface *control;
|
||||||
|
struct usb_interface *data;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* default ethernet address used by the modem */
|
||||||
|
static const u8 default_modem_addr[ETH_ALEN] = {0x02, 0x50, 0xf3};
|
||||||
|
|
||||||
|
#define QUEC_NET_MSG_SPEC (0x80)
|
||||||
|
|
||||||
|
#define QUEC_NET_MSG_ID_IP_DATA (0x00)
|
||||||
|
|
||||||
|
struct quec_net_package_header {
|
||||||
|
unsigned char msg_spec;
|
||||||
|
unsigned char msg_id;
|
||||||
|
unsigned short payload_len;
|
||||||
|
unsigned char reserve[16];
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
|
||||||
|
static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb) {
|
||||||
|
|
||||||
|
__be16 proto;
|
||||||
|
|
||||||
|
//this check is no longer done by usbnet
|
||||||
|
if (skb->len < dev->net->hard_header_len) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
switch (skb->data[0] & 0xf0) {
|
||||||
|
case 0x40:
|
||||||
|
proto = htons(ETH_P_IP);
|
||||||
|
break;
|
||||||
|
case 0x60:
|
||||||
|
proto = htons(ETH_P_IPV6);
|
||||||
|
break;
|
||||||
|
case 0x00:
|
||||||
|
if (is_multicast_ether_addr(skb->data)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
skb_reset_mac_header(skb);
|
||||||
|
goto fix_dest;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (skb_headroom(skb) < ETH_HLEN) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
skb_push(skb, ETH_HLEN);
|
||||||
|
skb_reset_mac_header(skb);
|
||||||
|
eth_hdr(skb)->h_proto = proto;
|
||||||
|
memset(eth_hdr(skb)->h_source, 0, ETH_ALEN);
|
||||||
|
//add by zhangqingyun@meigsmart.com
|
||||||
|
memcpy(eth_hdr(skb)->h_source, "\x00\x11\x22\x33\x44\x55", ETH_ALEN);
|
||||||
|
fix_dest:
|
||||||
|
memcpy(eth_hdr(skb)->h_dest, dev->net->dev_addr, ETH_ALEN);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* very simplistic detection of IPv4 or IPv6 headers */
|
||||||
|
static bool possibly_iphdr(const char *data)
|
||||||
|
{
|
||||||
|
return (data[0] & 0xd0) == 0x40;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* disallow addresses which may be confused with IP headers */
|
||||||
|
static int qmi_wwan_mac_addr(struct net_device *dev, void *p)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
struct sockaddr *addr = p;
|
||||||
|
|
||||||
|
ret = eth_prepare_mac_addr_change(dev, p);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
if (possibly_iphdr(addr->sa_data))
|
||||||
|
return -EADDRNOTAVAIL;
|
||||||
|
eth_commit_mac_addr_change(dev, p);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct net_device_ops qmi_wwan_netdev_ops = {
|
||||||
|
.ndo_open = usbnet_open,
|
||||||
|
.ndo_stop = usbnet_stop,
|
||||||
|
.ndo_start_xmit = usbnet_start_xmit,
|
||||||
|
.ndo_tx_timeout = usbnet_tx_timeout,
|
||||||
|
.ndo_change_mtu = usbnet_change_mtu,
|
||||||
|
// .ndo_get_stats64 = usbnet_get_stats64,
|
||||||
|
.ndo_set_mac_address = qmi_wwan_mac_addr,
|
||||||
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* using a counter to merge subdriver requests with our own into a
|
||||||
|
* combined state
|
||||||
|
*/
|
||||||
|
static int qmi_wwan_manage_power(struct usbnet *dev, int on)
|
||||||
|
{
|
||||||
|
struct qmi_wwan_state *info = (void *)&dev->data;
|
||||||
|
int rv;
|
||||||
|
|
||||||
|
dev_dbg(&dev->intf->dev, "%s() pmcount=%d, on=%d\n", __func__,
|
||||||
|
atomic_read(&info->pmcount), on);
|
||||||
|
|
||||||
|
if ((on && atomic_add_return(1, &info->pmcount) == 1) ||
|
||||||
|
(!on && atomic_dec_and_test(&info->pmcount))) {
|
||||||
|
/* need autopm_get/put here to ensure the usbcore sees
|
||||||
|
* the new value
|
||||||
|
*/
|
||||||
|
rv = usb_autopm_get_interface(dev->intf);
|
||||||
|
dev->intf->needs_remote_wakeup = on;
|
||||||
|
if (!rv)
|
||||||
|
usb_autopm_put_interface(dev->intf);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int qmi_wwan_cdc_wdm_manage_power(struct usb_interface *intf, int on)
|
||||||
|
{
|
||||||
|
struct usbnet *dev = usb_get_intfdata(intf);
|
||||||
|
|
||||||
|
/* can be called while disconnecting */
|
||||||
|
if (!dev)
|
||||||
|
return 0;
|
||||||
|
return qmi_wwan_manage_power(dev, on);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* collect all three endpoints and register subdriver */
|
||||||
|
static int qmi_wwan_register_subdriver(struct usbnet *dev)
|
||||||
|
{
|
||||||
|
int rv;
|
||||||
|
struct usb_driver *subdriver = NULL;
|
||||||
|
struct qmi_wwan_state *info = (void *)&dev->data;
|
||||||
|
|
||||||
|
/* collect bulk endpoints */
|
||||||
|
rv = usbnet_get_endpoints(dev, info->data);
|
||||||
|
if (rv < 0)
|
||||||
|
goto err;
|
||||||
|
|
||||||
|
/* update status endpoint if separate control interface */
|
||||||
|
if (info->control != info->data)
|
||||||
|
dev->status = &info->control->cur_altsetting->endpoint[0];
|
||||||
|
|
||||||
|
/* require interrupt endpoint for subdriver */
|
||||||
|
if (!dev->status) {
|
||||||
|
rv = -EINVAL;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* for subdriver power management */
|
||||||
|
atomic_set(&info->pmcount, 0);
|
||||||
|
|
||||||
|
/* register subdriver */
|
||||||
|
subdriver = usb_cdc_wdm_register(info->control, &dev->status->desc,
|
||||||
|
4096, &qmi_wwan_cdc_wdm_manage_power);
|
||||||
|
if (IS_ERR(subdriver)) {
|
||||||
|
dev_err(&info->control->dev, "subdriver registration failed\n");
|
||||||
|
rv = PTR_ERR(subdriver);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* prevent usbnet from using status endpoint */
|
||||||
|
dev->status = NULL;
|
||||||
|
|
||||||
|
/* save subdriver struct for suspend/resume wrappers */
|
||||||
|
info->subdriver = subdriver;
|
||||||
|
|
||||||
|
err:
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||||
|
{
|
||||||
|
int status = -1;
|
||||||
|
u8 *buf = intf->cur_altsetting->extra;
|
||||||
|
int len = intf->cur_altsetting->extralen;
|
||||||
|
struct usb_interface_descriptor *desc = &intf->cur_altsetting->desc;
|
||||||
|
struct usb_cdc_union_desc *cdc_union = NULL;
|
||||||
|
struct usb_cdc_ether_desc *cdc_ether = NULL;
|
||||||
|
u32 found = 0;
|
||||||
|
struct usb_driver *driver = driver_of(intf);
|
||||||
|
struct qmi_wwan_state *info = (void *)&dev->data;
|
||||||
|
|
||||||
|
BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data) <
|
||||||
|
sizeof(struct qmi_wwan_state)));
|
||||||
|
|
||||||
|
/* set up initial state */
|
||||||
|
info->control = intf;
|
||||||
|
info->data = intf;
|
||||||
|
/*add by zhangqingyun@meigsmart.com begain
|
||||||
|
/* and a number of CDC descriptors */
|
||||||
|
while (len > 3) {
|
||||||
|
struct usb_descriptor_header *h = (void *)buf;
|
||||||
|
|
||||||
|
/* ignore any misplaced descriptors */
|
||||||
|
if (h->bDescriptorType != USB_DT_CS_INTERFACE)
|
||||||
|
goto next_desc;
|
||||||
|
|
||||||
|
/* buf[2] is CDC descriptor subtype */
|
||||||
|
switch (buf[2]) {
|
||||||
|
case USB_CDC_HEADER_TYPE:
|
||||||
|
if (found & 1 << USB_CDC_HEADER_TYPE) {
|
||||||
|
dev_dbg(&intf->dev, "extra CDC header\n");
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
if (h->bLength != sizeof(struct usb_cdc_header_desc)) {
|
||||||
|
dev_dbg(&intf->dev, "CDC header len %u\n",
|
||||||
|
h->bLength);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case USB_CDC_UNION_TYPE:
|
||||||
|
if (found & 1 << USB_CDC_UNION_TYPE) {
|
||||||
|
dev_dbg(&intf->dev, "extra CDC union\n");
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
if (h->bLength != sizeof(struct usb_cdc_union_desc)) {
|
||||||
|
dev_dbg(&intf->dev, "CDC union len %u\n",
|
||||||
|
h->bLength);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
cdc_union = (struct usb_cdc_union_desc *)buf;
|
||||||
|
break;
|
||||||
|
case USB_CDC_ETHERNET_TYPE:
|
||||||
|
if (found & 1 << USB_CDC_ETHERNET_TYPE) {
|
||||||
|
dev_dbg(&intf->dev, "extra CDC ether\n");
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
if (h->bLength != sizeof(struct usb_cdc_ether_desc)) {
|
||||||
|
dev_dbg(&intf->dev, "CDC ether len %u\n",
|
||||||
|
h->bLength);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
cdc_ether = (struct usb_cdc_ether_desc *)buf;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remember which CDC functional descriptors we've seen. Works
|
||||||
|
* for all types we care about, of which USB_CDC_ETHERNET_TYPE
|
||||||
|
* (0x0f) is the highest numbered
|
||||||
|
*/
|
||||||
|
if (buf[2] < 32)
|
||||||
|
found |= 1 << buf[2];
|
||||||
|
|
||||||
|
next_desc:
|
||||||
|
len -= h->bLength;
|
||||||
|
buf += h->bLength;
|
||||||
|
}
|
||||||
|
/*add by zhangqingyun@meigsmart.com end*/
|
||||||
|
/* Use separate control and data interfaces if we found a CDC Union */
|
||||||
|
if (cdc_union) {
|
||||||
|
info->data = usb_ifnum_to_if(dev->udev,
|
||||||
|
cdc_union->bSlaveInterface0);
|
||||||
|
if (desc->bInterfaceNumber != cdc_union->bMasterInterface0 ||
|
||||||
|
!info->data) {
|
||||||
|
dev_err(&intf->dev,
|
||||||
|
"bogus CDC Union: master=%u, slave=%u\n",
|
||||||
|
cdc_union->bMasterInterface0,
|
||||||
|
cdc_union->bSlaveInterface0);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* errors aren't fatal - we can live with the dynamic address */
|
||||||
|
if (cdc_ether) {
|
||||||
|
dev->hard_mtu = le16_to_cpu(cdc_ether->wMaxSegmentSize);
|
||||||
|
usbnet_get_ethernet_addr(dev, cdc_ether->iMACAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* claim data interface and set it up */
|
||||||
|
if (info->control != info->data) {
|
||||||
|
status = usb_driver_claim_interface(driver, info->data, dev);
|
||||||
|
if (status < 0)
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = qmi_wwan_register_subdriver(dev);
|
||||||
|
if (status < 0 && info->control != info->data) {
|
||||||
|
usb_set_intfdata(info->data, NULL);
|
||||||
|
usb_driver_release_interface(driver, info->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Never use the same address on both ends of the link, even
|
||||||
|
* if the buggy firmware told us to.
|
||||||
|
*/
|
||||||
|
if (ether_addr_equal(dev->net->dev_addr, default_modem_addr))
|
||||||
|
eth_hw_addr_random(dev->net);
|
||||||
|
|
||||||
|
/* make MAC addr easily distinguishable from an IP header */
|
||||||
|
if (possibly_iphdr(dev->net->dev_addr)) {
|
||||||
|
dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */
|
||||||
|
dev->net->dev_addr[0] &= 0xbf; /* clear "IP" bit */
|
||||||
|
}
|
||||||
|
dev->net->netdev_ops = &qmi_wwan_netdev_ops;
|
||||||
|
|
||||||
|
//dev->rx_urb_size = 7600;
|
||||||
|
|
||||||
|
#if 1 //Added by zhangqingyun@meigsmart.com
|
||||||
|
if (dev->udev->descriptor.idVendor == cpu_to_le16(0x2C7C) ||
|
||||||
|
dev->udev->descriptor.idVendor == cpu_to_le16(0x05c6) ||
|
||||||
|
dev->udev->descriptor.idVendor == cpu_to_le16(0x2dee)) {
|
||||||
|
dev_info(&intf->dev, "MeigSmart slm750 slm730 srm815 work on RawIP mode\n");
|
||||||
|
dev->net->flags |= IFF_NOARP;
|
||||||
|
/* make MAC addr easily distinguishable from an IP header */
|
||||||
|
usb_control_msg(interface_to_usbdev(intf),
|
||||||
|
usb_sndctrlpipe(interface_to_usbdev(intf), 0),
|
||||||
|
0x22, //USB_CDC_REQ_SET_CONTROL_LINE_STATE
|
||||||
|
0x21, //USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE
|
||||||
|
1, //active CDC DTR
|
||||||
|
intf->cur_altsetting->desc.bInterfaceNumber,
|
||||||
|
NULL, 0, 100);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
err:
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void qmi_wwan_unbind(struct usbnet *dev, struct usb_interface *intf)
|
||||||
|
{
|
||||||
|
struct qmi_wwan_state *info = (void *)&dev->data;
|
||||||
|
struct usb_driver *driver = driver_of(intf);
|
||||||
|
struct usb_interface *other;
|
||||||
|
|
||||||
|
if (info->subdriver && info->subdriver->disconnect)
|
||||||
|
info->subdriver->disconnect(info->control);
|
||||||
|
|
||||||
|
/* allow user to unbind using either control or data */
|
||||||
|
if (intf == info->control)
|
||||||
|
other = info->data;
|
||||||
|
else
|
||||||
|
other = info->control;
|
||||||
|
|
||||||
|
/* only if not shared */
|
||||||
|
if (other && intf != other) {
|
||||||
|
usb_set_intfdata(other, NULL);
|
||||||
|
usb_driver_release_interface(driver, other);
|
||||||
|
}
|
||||||
|
|
||||||
|
info->subdriver = NULL;
|
||||||
|
info->data = NULL;
|
||||||
|
info->control = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* suspend/resume wrappers calling both usbnet and the cdc-wdm
|
||||||
|
* subdriver if present.
|
||||||
|
*
|
||||||
|
* NOTE: cdc-wdm also supports pre/post_reset, but we cannot provide
|
||||||
|
* wrappers for those without adding usbnet reset support first.
|
||||||
|
*/
|
||||||
|
static int qmi_wwan_suspend(struct usb_interface *intf, pm_message_t message)
|
||||||
|
{
|
||||||
|
struct usbnet *dev = usb_get_intfdata(intf);
|
||||||
|
struct qmi_wwan_state *info = (void *)&dev->data;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Both usbnet_suspend() and subdriver->suspend() MUST return 0
|
||||||
|
* in system sleep context, otherwise, the resume callback has
|
||||||
|
* to recover device from previous suspend failure.
|
||||||
|
*/
|
||||||
|
ret = usbnet_suspend(intf, message);
|
||||||
|
if (ret < 0)
|
||||||
|
goto err;
|
||||||
|
|
||||||
|
if (intf == info->control && info->subdriver &&
|
||||||
|
info->subdriver->suspend)
|
||||||
|
ret = info->subdriver->suspend(intf, message);
|
||||||
|
if (ret < 0)
|
||||||
|
usbnet_resume(intf);
|
||||||
|
err:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int qmi_wwan_resume(struct usb_interface *intf)
|
||||||
|
{
|
||||||
|
struct usbnet *dev = usb_get_intfdata(intf);
|
||||||
|
struct qmi_wwan_state *info = (void *)&dev->data;
|
||||||
|
int ret = 0;
|
||||||
|
bool callsub = (intf == info->control && info->subdriver &&
|
||||||
|
info->subdriver->resume);
|
||||||
|
|
||||||
|
if (callsub)
|
||||||
|
ret = info->subdriver->resume(intf);
|
||||||
|
if (ret < 0)
|
||||||
|
goto err;
|
||||||
|
ret = usbnet_resume(intf);
|
||||||
|
if (ret < 0 && callsub)
|
||||||
|
info->subdriver->suspend(intf, PMSG_SUSPEND);
|
||||||
|
err:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct driver_info qmi_wwan_info = {
|
||||||
|
.description = "WWAN/QMI device",
|
||||||
|
.flags = FLAG_WWAN | FLAG_SEND_ZLP,
|
||||||
|
.bind = qmi_wwan_bind,
|
||||||
|
.unbind = qmi_wwan_unbind,
|
||||||
|
.manage_power = qmi_wwan_manage_power,
|
||||||
|
.rx_fixup = qmi_wwan_rx_fixup,
|
||||||
|
#if 1 //Added by zhangqingyun@meigsmart.com
|
||||||
|
.tx_fixup = qmi_wwan_tx_fixup,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#define HUAWEI_VENDOR_ID 0x12D1
|
||||||
|
|
||||||
|
/* map QMI/wwan function by a fixed interface number */
|
||||||
|
#define QMI_FIXED_INTF(vend, prod, num) \
|
||||||
|
USB_DEVICE_INTERFACE_NUMBER(vend, prod, num), \
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info
|
||||||
|
|
||||||
|
/* Gobi 1000 QMI/wwan interface number is 3 according to qcserial */
|
||||||
|
#define QMI_GOBI1K_DEVICE(vend, prod) \
|
||||||
|
QMI_FIXED_INTF(vend, prod, 3)
|
||||||
|
|
||||||
|
/* Gobi 2000/3000 QMI/wwan interface number is 0 according to qcserial */
|
||||||
|
#define QMI_GOBI_DEVICE(vend, prod) \
|
||||||
|
QMI_FIXED_INTF(vend, prod, 0)
|
||||||
|
|
||||||
|
static const struct usb_device_id products[] = {
|
||||||
|
#if 1 //Added by Quectel
|
||||||
|
#ifndef QMI_FIXED_INTF
|
||||||
|
/* map QMI/wwan function by a fixed interface number */
|
||||||
|
#define QMI_FIXED_INTF(vend, prod, num) \
|
||||||
|
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, \
|
||||||
|
.idVendor = vend, \
|
||||||
|
.idProduct = prod, \
|
||||||
|
.bInterfaceClass = 0xff, \
|
||||||
|
.bInterfaceSubClass = 0xff, \
|
||||||
|
.bInterfaceProtocol = 0xff, \
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_force_int##num,
|
||||||
|
#endif
|
||||||
|
{ QMI_FIXED_INTF(0x2C7C, 0x0125, 4) }, /* Quectel EC25/EC20 R2.0 */
|
||||||
|
{ QMI_FIXED_INTF(0x2C7C, 0x0121, 4) }, /* Quectel EC21 */
|
||||||
|
{ QMI_FIXED_INTF(0x05c6, 0xf601, 5) }, /* MeigLink SLM750 SLM730 SLM750VR2.0*/
|
||||||
|
{ QMI_FIXED_INTF(0x2dee, 0x4d22, 5) }, /*MeigLink SRM815*/
|
||||||
|
#endif
|
||||||
|
/* 1. CDC ECM like devices match on the control interface */
|
||||||
|
{ /* Huawei E392, E398 and possibly others sharing both device id and more... */
|
||||||
|
USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 9),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Vodafone/Huawei K5005 (12d1:14c8) and similar modems */
|
||||||
|
USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 57),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* HUAWEI_INTERFACE_NDIS_CONTROL_QUALCOMM */
|
||||||
|
USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 0x01, 0x69),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* 2. Combined interface devices matching on class+protocol */
|
||||||
|
{ /* Huawei E367 and possibly others in "Windows mode" */
|
||||||
|
USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 7),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Huawei E392, E398 and possibly others in "Windows mode" */
|
||||||
|
USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 17),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* HUAWEI_NDIS_SINGLE_INTERFACE_VDF */
|
||||||
|
USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 0x01, 0x37),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* HUAWEI_INTERFACE_NDIS_HW_QUALCOMM */
|
||||||
|
USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 0x01, 0x67),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Pantech UML290, P4200 and more */
|
||||||
|
USB_VENDOR_AND_INTERFACE_INFO(0x106c, USB_CLASS_VENDOR_SPEC, 0xf0, 0xff),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Pantech UML290 - newer firmware */
|
||||||
|
USB_VENDOR_AND_INTERFACE_INFO(0x106c, USB_CLASS_VENDOR_SPEC, 0xf1, 0xff),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Novatel USB551L and MC551 */
|
||||||
|
USB_DEVICE_AND_INTERFACE_INFO(0x1410, 0xb001,
|
||||||
|
USB_CLASS_COMM,
|
||||||
|
USB_CDC_SUBCLASS_ETHERNET,
|
||||||
|
USB_CDC_PROTO_NONE),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Novatel E362 */
|
||||||
|
USB_DEVICE_AND_INTERFACE_INFO(0x1410, 0x9010,
|
||||||
|
USB_CLASS_COMM,
|
||||||
|
USB_CDC_SUBCLASS_ETHERNET,
|
||||||
|
USB_CDC_PROTO_NONE),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Novatel Expedite E371 */
|
||||||
|
USB_DEVICE_AND_INTERFACE_INFO(0x1410, 0x9011,
|
||||||
|
USB_CLASS_COMM,
|
||||||
|
USB_CDC_SUBCLASS_ETHERNET,
|
||||||
|
USB_CDC_PROTO_NONE),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Dell Wireless 5800 (Novatel E362) */
|
||||||
|
USB_DEVICE_AND_INTERFACE_INFO(0x413C, 0x8195,
|
||||||
|
USB_CLASS_COMM,
|
||||||
|
USB_CDC_SUBCLASS_ETHERNET,
|
||||||
|
USB_CDC_PROTO_NONE),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Dell Wireless 5800 V2 (Novatel E362) */
|
||||||
|
USB_DEVICE_AND_INTERFACE_INFO(0x413C, 0x8196,
|
||||||
|
USB_CLASS_COMM,
|
||||||
|
USB_CDC_SUBCLASS_ETHERNET,
|
||||||
|
USB_CDC_PROTO_NONE),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* Dell Wireless 5804 (Novatel E371) */
|
||||||
|
USB_DEVICE_AND_INTERFACE_INFO(0x413C, 0x819b,
|
||||||
|
USB_CLASS_COMM,
|
||||||
|
USB_CDC_SUBCLASS_ETHERNET,
|
||||||
|
USB_CDC_PROTO_NONE),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* ADU960S */
|
||||||
|
USB_DEVICE_AND_INTERFACE_INFO(0x16d5, 0x650a,
|
||||||
|
USB_CLASS_COMM,
|
||||||
|
USB_CDC_SUBCLASS_ETHERNET,
|
||||||
|
USB_CDC_PROTO_NONE),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
{ /* HP lt4112 LTE/HSPA+ Gobi 4G Module (Huawei me906e) */
|
||||||
|
USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x581d, USB_CLASS_VENDOR_SPEC, 1, 7),
|
||||||
|
.driver_info = (unsigned long)&qmi_wwan_info,
|
||||||
|
},
|
||||||
|
|
||||||
|
/* 3. Combined interface devices matching on interface number */
|
||||||
|
{QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x7000, 0)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x7001, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x7002, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x7101, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x7101, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x7101, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x7102, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x7102, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x7102, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x8000, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x8001, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9000, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9003, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9005, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x900a, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x900b, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x900c, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x900c, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x900c, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x900d, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x900f, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x900f, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x900f, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9010, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9010, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9011, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9011, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9021, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9022, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9025, 4)}, /* Alcatel-sbell ASB TL131 TDD LTE (China Mobile) */
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9026, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x902e, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9031, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9032, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9033, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9033, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9033, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9033, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9034, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9034, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9034, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9034, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9034, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9035, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9036, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9037, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9038, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x903b, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x903c, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x903d, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x903e, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9043, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9046, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9046, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9046, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9047, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9047, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9047, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9048, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9048, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9048, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9048, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9048, 8)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x904c, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x904c, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x904c, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x904c, 8)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9050, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9052, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9053, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9053, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9054, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9054, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9055, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9055, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9055, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9055, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9055, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9056, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9062, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9062, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9062, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9062, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9062, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9062, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9062, 8)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9062, 9)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9064, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9065, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9065, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9066, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9066, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9067, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9068, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9068, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9068, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9068, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9068, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9068, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9069, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9069, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9069, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9069, 8)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9070, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9070, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9075, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9076, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9076, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9076, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9076, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9076, 8)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9077, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9077, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9077, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9077, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9078, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9079, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9079, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9079, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9079, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9079, 8)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9080, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9080, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9080, 7)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9080, 8)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9083, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9084, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x920d, 0)},
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x920d, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x0846, 0x68a2, 8)},
|
||||||
|
{QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */
|
||||||
|
{QMI_FIXED_INTF(0x12d1, 0x14ac, 1)}, /* Huawei E1820 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x6003, 0)}, /* CMOTech 6003 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x6007, 0)}, /* CMOTech CHE-628S */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x6008, 0)}, /* CMOTech CMU-301 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x6280, 0)}, /* CMOTech CHU-628 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7001, 0)}, /* CMOTech CHU-720S */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7002, 0)}, /* CMOTech 7002 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7003, 4)}, /* CMOTech CHU-629K */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7004, 3)}, /* CMOTech 7004 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7006, 5)}, /* CMOTech CGU-629 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x700a, 4)}, /* CMOTech CHU-629S */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7211, 0)}, /* CMOTech CHU-720I */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7212, 0)}, /* CMOTech 7212 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7213, 0)}, /* CMOTech 7213 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7251, 1)}, /* CMOTech 7251 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7252, 1)}, /* CMOTech 7252 */
|
||||||
|
{QMI_FIXED_INTF(0x16d8, 0x7253, 1)}, /* CMOTech 7253 */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0002, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0012, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0017, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0019, 3)}, /* ONDA MT689DC */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0021, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0025, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0031, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0042, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0049, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0052, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0055, 1)}, /* ZTE (Vodafone) K3520-Z */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0058, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0063, 4)}, /* ZTE (Vodafone) K3565-Z */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0104, 4)}, /* ZTE (Vodafone) K4505-Z */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0113, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0118, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0121, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0123, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0124, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0125, 6)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0126, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0130, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0133, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0141, 5)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0157, 5)}, /* ZTE MF683 */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0158, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0167, 4)}, /* ZTE MF820D */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0168, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0176, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0178, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0191, 4)}, /* ZTE EuFi890 */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0199, 1)}, /* ZTE MF820S */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0200, 1)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0257, 3)}, /* ZTE MF821 */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0265, 4)}, /* ONDA MT8205 4G LTE */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0284, 4)}, /* ZTE MF880 */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0326, 4)}, /* ZTE MF821D */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x0412, 4)}, /* Telewell TW-LTE 4G */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1008, 4)}, /* ZTE (Vodafone) K3570-Z */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1010, 4)}, /* ZTE (Vodafone) K3571-Z */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1012, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1018, 3)}, /* ZTE (Vodafone) K5006-Z */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1021, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1245, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1247, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1252, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1254, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1255, 3)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1255, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1256, 4)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1270, 5)}, /* ZTE MF667 */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1401, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1402, 2)}, /* ZTE MF60 */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1424, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1425, 2)},
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1426, 2)}, /* ZTE MF91 */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */
|
||||||
|
{QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */
|
||||||
|
{QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */
|
||||||
|
{QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */
|
||||||
|
{QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x68c0, 8)}, /* Sierra Wireless MC73xx */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x68c0, 10)}, /* Sierra Wireless MC73xx */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x901f, 8)}, /* Sierra Wireless EM7355 */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9041, 8)}, /* Sierra Wireless MC7305/MC7355 */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9051, 8)}, /* Netgear AirCard 340U */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9053, 8)}, /* Sierra Wireless Modem */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9054, 8)}, /* Sierra Wireless Modem */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9055, 8)}, /* Netgear AirCard 341U */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9056, 8)}, /* Sierra Wireless Modem */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9057, 8)},
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9061, 8)}, /* Sierra Wireless Modem */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9070, 8)}, /* Sierra Wireless MC74xx/EM74xx */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9070, 10)}, /* Sierra Wireless MC74xx/EM74xx */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9071, 8)}, /* Sierra Wireless MC74xx */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9071, 10)}, /* Sierra Wireless MC74xx */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9079, 8)}, /* Sierra Wireless EM74xx */
|
||||||
|
{QMI_FIXED_INTF(0x1199, 0x9079, 10)}, /* Sierra Wireless EM74xx */
|
||||||
|
{QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */
|
||||||
|
{QMI_FIXED_INTF(0x1bbb, 0x0203, 2)}, /* Alcatel L800MA */
|
||||||
|
{QMI_FIXED_INTF(0x2357, 0x0201, 4)}, /* TP-LINK HSUPA Modem MA180 */
|
||||||
|
{QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */
|
||||||
|
{QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
|
||||||
|
{QMI_FIXED_INTF(0x1bc7, 0x1201, 2)}, /* Telit LE920 */
|
||||||
|
{QMI_FIXED_INTF(0x1c9e, 0x9b01, 3)}, /* XS Stick W100-2 from 4G Systems */
|
||||||
|
{QMI_FIXED_INTF(0x0b3c, 0xc000, 4)}, /* Olivetti Olicard 100 */
|
||||||
|
{QMI_FIXED_INTF(0x0b3c, 0xc001, 4)}, /* Olivetti Olicard 120 */
|
||||||
|
{QMI_FIXED_INTF(0x0b3c, 0xc002, 4)}, /* Olivetti Olicard 140 */
|
||||||
|
{QMI_FIXED_INTF(0x0b3c, 0xc004, 6)}, /* Olivetti Olicard 155 */
|
||||||
|
{QMI_FIXED_INTF(0x0b3c, 0xc005, 6)}, /* Olivetti Olicard 200 */
|
||||||
|
{QMI_FIXED_INTF(0x0b3c, 0xc00a, 6)}, /* Olivetti Olicard 160 */
|
||||||
|
{QMI_FIXED_INTF(0x0b3c, 0xc00b, 4)}, /* Olivetti Olicard 500 */
|
||||||
|
{QMI_FIXED_INTF(0x1e2d, 0x0060, 4)}, /* Cinterion PLxx */
|
||||||
|
{QMI_FIXED_INTF(0x1e2d, 0x0053, 4)}, /* Cinterion PHxx,PXxx */
|
||||||
|
{QMI_FIXED_INTF(0x413c, 0x81a2, 8)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */
|
||||||
|
{QMI_FIXED_INTF(0x413c, 0x81a3, 8)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */
|
||||||
|
{QMI_FIXED_INTF(0x413c, 0x81a4, 8)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */
|
||||||
|
{QMI_FIXED_INTF(0x413c, 0x81a8, 8)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card */
|
||||||
|
{QMI_FIXED_INTF(0x413c, 0x81a9, 8)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */
|
||||||
|
|
||||||
|
/* 4. Gobi 1000 devices */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x1410, 0xa001)}, /* Novatel/Verizon USB-1000 */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x1410, 0xa002)}, /* Novatel Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x1410, 0xa003)}, /* Novatel Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x1410, 0xa004)}, /* Novatel Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x1410, 0xa005)}, /* Novatel Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x1410, 0xa006)}, /* Novatel Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x1410, 0xa007)}, /* Novatel Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
|
||||||
|
{QMI_GOBI1K_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
|
||||||
|
|
||||||
|
/* 5. Gobi 2000 and 3000 devices */
|
||||||
|
{QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */
|
||||||
|
{QMI_GOBI_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */
|
||||||
|
{QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */
|
||||||
|
{QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
|
||||||
|
{QMI_GOBI_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */
|
||||||
|
{QMI_GOBI_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */
|
||||||
|
{QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9003, 4)}, /* Quectel UC20 */
|
||||||
|
{QMI_FIXED_INTF(0x05c6, 0x9215, 4)}, /* Quectel EC20 */
|
||||||
|
{QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */
|
||||||
|
{QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */
|
||||||
|
{QMI_GOBI_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */
|
||||||
|
{QMI_GOBI_DEVICE(0x0af0, 0x8120)}, /* Option GTM681W */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x68a5)}, /* Sierra Wireless Modem */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x68a9)}, /* Sierra Wireless Modem */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9001)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9002)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9003)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9004)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9005)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9006)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9007)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9008)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9009)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x900a)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9011)}, /* Sierra Wireless Gobi 2000 Modem device (MC8305) */
|
||||||
|
{QMI_GOBI_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */
|
||||||
|
{QMI_GOBI_DEVICE(0x05c6, 0x9205)}, /* Gobi 2000 Modem device */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */
|
||||||
|
{QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9015)}, /* Sierra Wireless Gobi 3000 Modem device */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x9019)}, /* Sierra Wireless Gobi 3000 Modem device */
|
||||||
|
{QMI_GOBI_DEVICE(0x1199, 0x901b)}, /* Sierra Wireless MC7770 */
|
||||||
|
{QMI_GOBI_DEVICE(0x12d1, 0x14f1)}, /* Sony Gobi 3000 Composite */
|
||||||
|
{QMI_GOBI_DEVICE(0x1410, 0xa021)}, /* Foxconn Gobi 3000 Modem device (Novatel E396) */
|
||||||
|
|
||||||
|
{ } /* END */
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(usb, products);
|
||||||
|
//zhangqingyun add pid+vid+interfacenumber determine is ndis port or not
|
||||||
|
static bool ndis_detected(struct usb_interface *intf)
|
||||||
|
{
|
||||||
|
struct usb_device *dev = interface_to_usbdev(intf);
|
||||||
|
|
||||||
|
if (dev->actconfig &&
|
||||||
|
le16_to_cpu(dev->descriptor.idVendor) == 0x05c6 &&
|
||||||
|
le16_to_cpu(dev->descriptor.idProduct) == 0x9215 &&
|
||||||
|
dev->actconfig->desc.bNumInterfaces == 5) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
/*zhangqingyun add start */
|
||||||
|
if (dev->actconfig &&
|
||||||
|
le16_to_cpu(dev->descriptor.idVendor) == 0x05c6 &&
|
||||||
|
le16_to_cpu(dev->descriptor.idProduct) == 0xf601 &&
|
||||||
|
dev->actconfig->desc.bNumInterfaces == 5) {
|
||||||
|
dev_dbg(&intf->dev, "zhangqingyun detemine interface 5 is ndis port");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (dev->actconfig &&
|
||||||
|
le16_to_cpu(dev->descriptor.idVendor) == 0x2dee &&
|
||||||
|
le16_to_cpu(dev->descriptor.idProduct) == 0x4d22 &&
|
||||||
|
dev->actconfig->desc.bNumInterfaces == 5){
|
||||||
|
dev_dbg(&intf->dev, "zhangqingyun detemine interface 5 is ndis port");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
/*zhangqingyun add end*/
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int qmi_wwan_probe(struct usb_interface *intf,
|
||||||
|
const struct usb_device_id *prod)
|
||||||
|
{
|
||||||
|
struct usb_device_id *id = (struct usb_device_id *)prod;
|
||||||
|
struct usb_interface_descriptor *desc = &intf->cur_altsetting->desc;
|
||||||
|
|
||||||
|
/* Workaround to enable dynamic IDs. This disables usbnet
|
||||||
|
* blacklisting functionality. Which, if required, can be
|
||||||
|
* reimplemented here by using a magic "blacklist" value
|
||||||
|
* instead of 0 in the static device id table
|
||||||
|
*/
|
||||||
|
if (!id->driver_info) {
|
||||||
|
dev_dbg(&intf->dev, "setting defaults for dynamic device id\n");
|
||||||
|
id->driver_info = (unsigned long)&qmi_wwan_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* where we've QMI on interface 5 instead of 0 */
|
||||||
|
if (ndis_detected(intf) && desc->bInterfaceNumber == 0) {
|
||||||
|
dev_dbg(&intf->dev, "skipping interface 0\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
return usbnet_probe(intf, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct usb_driver qmi_wwan_driver = {
|
||||||
|
.name = "qmi_wwan_m",
|
||||||
|
.id_table = products,
|
||||||
|
.probe = qmi_wwan_probe,
|
||||||
|
.disconnect = usbnet_disconnect,
|
||||||
|
.suspend = qmi_wwan_suspend,
|
||||||
|
.resume = qmi_wwan_resume,
|
||||||
|
.reset_resume = qmi_wwan_resume,
|
||||||
|
.supports_autosuspend = 1,
|
||||||
|
.disable_hub_initiated_lpm = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
module_usb_driver(qmi_wwan_driver);
|
||||||
|
|
||||||
|
MODULE_AUTHOR("Bjørn Mork <bjorn@mork.no>");
|
||||||
|
MODULE_DESCRIPTION("Qualcomm MSM Interface (QMI) WWAN driver");
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
|
47
driver/quectel_QMI_WWAN/Makefile
Normal file
47
driver/quectel_QMI_WWAN/Makefile
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=qmi_wwan_q
|
||||||
|
PKG_VERSION:=3.0
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define KernelPackage/qmi_wwan_q
|
||||||
|
SUBMENU:=WWAN Support
|
||||||
|
TITLE:=Quectel Linux USB QMI WWAN Driver
|
||||||
|
DEPENDS:=+kmod-usb-net +kmod-usb-wdm
|
||||||
|
FILES:=$(PKG_BUILD_DIR)/qmi_wwan_q.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,81,qmi_wwan_q)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/qmi_wwan_q/description
|
||||||
|
Quectel Linux USB QMI WWAN Driver
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKE_OPTS:= \
|
||||||
|
ARCH="$(LINUX_KARCH)" \
|
||||||
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||||
|
CXXFLAGS="$(TARGET_CXXFLAGS)" \
|
||||||
|
M="$(PKG_BUILD_DIR)" \
|
||||||
|
$(EXTRA_KCONFIG)
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE) -C "$(LINUX_DIR)" \
|
||||||
|
$(MAKE_OPTS) \
|
||||||
|
modules
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,qmi_wwan_q))
|
36
driver/quectel_QMI_WWAN/src/Makefile
Normal file
36
driver/quectel_QMI_WWAN/src/Makefile
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
obj-m += qmi_wwan_q.o
|
||||||
|
|
||||||
|
PWD := $(shell pwd)
|
||||||
|
OUTPUTDIR=/lib/modules/`uname -r`/kernel/drivers/net/usb/
|
||||||
|
|
||||||
|
ifeq ($(ARCH),)
|
||||||
|
ARCH := $(shell uname -m)
|
||||||
|
endif
|
||||||
|
ifeq ($(CROSS_COMPILE),)
|
||||||
|
CROSS_COMPILE :=
|
||||||
|
endif
|
||||||
|
ifeq ($(KDIR),)
|
||||||
|
KDIR := /lib/modules/$(shell uname -r)/build
|
||||||
|
ifeq ($(ARCH),i686)
|
||||||
|
ifeq ($(wildcard $KDIR/arch/$ARCH),)
|
||||||
|
ARCH=i386
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(findstring &,${PWD}),)
|
||||||
|
$(warning "${PWD}")
|
||||||
|
$(warning "current directory contain special char '&' !")
|
||||||
|
$(error "please remove it!")
|
||||||
|
endif
|
||||||
|
|
||||||
|
default:
|
||||||
|
$(MAKE) ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} -C $(KDIR) M=$(PWD) modules
|
||||||
|
|
||||||
|
install: default
|
||||||
|
cp $(PWD)/qmi_wwan_q.ko /lib/modules/$(shell uname -r)/kernel/drivers/net/usb/
|
||||||
|
depmod
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf *~ .tmp_versions modules.order Module.symvers
|
||||||
|
find . -type f -name "*~" -o -name "*.o" -o -name "*.ko" -o -name "*.cmd" -o -name "*.mod.c" | xargs rm -rf
|
146
driver/quectel_QMI_WWAN/src/ReleaseNote.txt
Normal file
146
driver/quectel_QMI_WWAN/src/ReleaseNote.txt
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
Release Notes
|
||||||
|
|
||||||
|
[V1.2.2]
|
||||||
|
Date: 9/7/2022
|
||||||
|
enhancement:
|
||||||
|
1. Optimization, the network card send queue wakeup is changed from callback to tasklet
|
||||||
|
2. Add the function of returning LAN packets in bridge mode
|
||||||
|
3. support ndo ioctl on kernel>5.14
|
||||||
|
4. Allow setting MTU greater than 1500
|
||||||
|
fix:
|
||||||
|
|
||||||
|
[V1.2.1]
|
||||||
|
Date: 9/26/2021
|
||||||
|
enhancement:
|
||||||
|
1. support IPQ5018's NSS
|
||||||
|
2. use 'qsdk/qca/src/data-kernel/drivers/rmnet-nss/rmnet_nss.c' instead myself rmnet_nss.c
|
||||||
|
and qmi_wwan_q.ko must load after rmnet_nss.ko
|
||||||
|
fix:
|
||||||
|
|
||||||
|
[V1.2.0.25]
|
||||||
|
Date: 9/17/2021
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. add sdx6x platfrom support
|
||||||
|
|
||||||
|
[V1.2.0.24]
|
||||||
|
Date: 9/6/2021
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. add BG95 support
|
||||||
|
2. support Linux 5.14.0
|
||||||
|
|
||||||
|
[V1.2.0.23]
|
||||||
|
Date: 3/23/2021
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. add sdx12 platfrom support
|
||||||
|
|
||||||
|
[V1.2.0.22]
|
||||||
|
Date: 2/5/2021
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. fix panic (memory-access-after-free) when do modem reboot stress test
|
||||||
|
|
||||||
|
[V1.2.0.21]
|
||||||
|
Date: 2/4/2021
|
||||||
|
enhancement:
|
||||||
|
1. Code refactoring - QMAP and rmnet
|
||||||
|
fix:
|
||||||
|
1. qmap_qmi_wwan_rx_fixup: change skb_dequeue to __skb_dequeue
|
||||||
|
|
||||||
|
[V1.2.0.20]
|
||||||
|
Date: 11/2/2020
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. LTE-A modems can not obtain IP by DHCP
|
||||||
|
|
||||||
|
[V1.2.0.19]
|
||||||
|
Date: 10/9/2020
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. X55 can not access internet after usb resume
|
||||||
|
|
||||||
|
[V1.2.0.18]
|
||||||
|
Date: 10/9/2020
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. X55: rename rmnet_usb0.1 to wwan0_1
|
||||||
|
1.1 if there is '.', openwrt will think it is vlan, and auto create vlan
|
||||||
|
1.2 if there is '.', android will think it is not vaild
|
||||||
|
1.3 if named as rmnet_usb0, and SOC is QCOM, QCOM's netmgr will auto manager it
|
||||||
|
|
||||||
|
[V1.2.0.17]
|
||||||
|
Date: 9/14/2020
|
||||||
|
enhancement:
|
||||||
|
1. Code refactoring - QMAP size and version
|
||||||
|
fix:
|
||||||
|
|
||||||
|
[V1.2.0.16]
|
||||||
|
Date: 9/14/2020
|
||||||
|
enhancement:
|
||||||
|
1. rx_fixup() check if this is enough skb_headroom() to fill ethernet header
|
||||||
|
fix:
|
||||||
|
1. fix "WARNING: suspicious RCU usage"
|
||||||
|
|
||||||
|
[V1.2.0.15]
|
||||||
|
Date: 9/10/2020
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. fix compile errors on kernel 3.10~3.13
|
||||||
|
|
||||||
|
[V1.2.0.14]
|
||||||
|
Date: 7/24/2020
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. fix QMAP V5 bug on Big Endian CPU
|
||||||
|
|
||||||
|
[V1.2.0.13]
|
||||||
|
Date: 6/22/2020
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. fix no data traffic when do Upload TPUT test
|
||||||
|
|
||||||
|
[V1.2.0.12]
|
||||||
|
Date: 5/29/2020
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. IPQ8074: when enable hyfi, quectel-CM will crash system crash
|
||||||
|
|
||||||
|
[V1.2.0.9]
|
||||||
|
Date: 5/13/2020
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. IPQ8074: enable CONFIG_QCA_NSS_DRV by CONFIG_PINCTRL_IPQ807x (from CONFIG_ARCH_IPQ807x)
|
||||||
|
|
||||||
|
[V1.2.0.8]
|
||||||
|
Date: 5/9/2020
|
||||||
|
enhancement:
|
||||||
|
fix:
|
||||||
|
1. fix compile errors on kernel V3.10
|
||||||
|
|
||||||
|
[V1.2.0.7]
|
||||||
|
Date: 4/25/2020
|
||||||
|
enhancement:
|
||||||
|
1. X55 support bridge mode
|
||||||
|
fix:
|
||||||
|
|
||||||
|
[V1.2.0.6]
|
||||||
|
Date: 4/20/2020
|
||||||
|
enhancement:
|
||||||
|
1. add stat64, or the rx/tx statics will become to 0 when data > 4G
|
||||||
|
2. do not use skb_clone, will make QCOM's NSS and SFE 's cpu loading very high
|
||||||
|
fix:
|
||||||
|
|
||||||
|
[V1.2.0.5]
|
||||||
|
Date: 4/8/2020
|
||||||
|
enhancement:
|
||||||
|
1. add attrite link_state, change carrier state accoring link_state
|
||||||
|
quectel-CM will set link_state to 1 when QMI setup call success.
|
||||||
|
fix:
|
||||||
|
|
||||||
|
[V1.2.0.4]
|
||||||
|
Date: 4/8/2020
|
||||||
|
enhancement:
|
||||||
|
1. support X55's QMAP V5
|
||||||
|
fix:
|
2626
driver/quectel_QMI_WWAN/src/qmi_wwan_q.c
Normal file
2626
driver/quectel_QMI_WWAN/src/qmi_wwan_q.c
Normal file
File diff suppressed because it is too large
Load Diff
424
driver/quectel_QMI_WWAN/src/rmnet_nss.c
Normal file
424
driver/quectel_QMI_WWAN/src/rmnet_nss.c
Normal file
@ -0,0 +1,424 @@
|
|||||||
|
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
* only version 2 as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
#include <linux/netdevice.h>
|
||||||
|
#include <linux/skbuff.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/moduleparam.h>
|
||||||
|
#include <linux/hashtable.h>
|
||||||
|
#include <linux/if_ether.h>
|
||||||
|
#include <linux/ip.h>
|
||||||
|
#include <qca-nss-drv/nss_api_if.h>
|
||||||
|
|
||||||
|
#include <linux/rmnet_nss.h>
|
||||||
|
|
||||||
|
#define RMNET_NSS_HASH_BITS 8
|
||||||
|
#define hash_add_ptr(table, node, key) \
|
||||||
|
hlist_add_head(node, &table[hash_ptr(key, HASH_BITS(table))])
|
||||||
|
|
||||||
|
static DEFINE_HASHTABLE(rmnet_nss_ctx_hashtable, RMNET_NSS_HASH_BITS);
|
||||||
|
|
||||||
|
struct rmnet_nss_ctx {
|
||||||
|
struct hlist_node hnode;
|
||||||
|
struct net_device *rmnet_dev;
|
||||||
|
struct nss_rmnet_rx_handle *nss_ctx;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum __rmnet_nss_stat {
|
||||||
|
RMNET_NSS_RX_ETH,
|
||||||
|
RMNET_NSS_RX_FAIL,
|
||||||
|
RMNET_NSS_RX_NON_ETH,
|
||||||
|
RMNET_NSS_RX_BUSY,
|
||||||
|
RMNET_NSS_TX_NO_CTX,
|
||||||
|
RMNET_NSS_TX_SUCCESS,
|
||||||
|
RMNET_NSS_TX_FAIL,
|
||||||
|
RMNET_NSS_TX_NONLINEAR,
|
||||||
|
RMNET_NSS_TX_BAD_IP,
|
||||||
|
RMNET_NSS_EXCEPTIONS,
|
||||||
|
RMNET_NSS_EX_BAD_HDR,
|
||||||
|
RMNET_NSS_EX_BAD_IP,
|
||||||
|
RMNET_NSS_EX_SUCCESS,
|
||||||
|
RMNET_NSS_TX_BAD_FRAGS,
|
||||||
|
RMNET_NSS_TX_LINEARIZE_FAILS,
|
||||||
|
RMNET_NSS_TX_NON_ZERO_HEADLEN_FRAGS,
|
||||||
|
RMNET_NSS_TX_BUSY_LOOP,
|
||||||
|
RMNET_NSS_NUM_STATS,
|
||||||
|
};
|
||||||
|
|
||||||
|
static unsigned long rmnet_nss_stats[RMNET_NSS_NUM_STATS];
|
||||||
|
|
||||||
|
#define RMNET_NSS_STAT(name, counter, desc) \
|
||||||
|
module_param_named(name, rmnet_nss_stats[counter], ulong, 0444); \
|
||||||
|
MODULE_PARM_DESC(name, desc)
|
||||||
|
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_rx_ethernet, RMNET_NSS_RX_ETH,
|
||||||
|
"Number of Ethernet headers successfully removed");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_rx_fail, RMNET_NSS_RX_FAIL,
|
||||||
|
"Number of Ethernet headers that could not be removed");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_rx_non_ethernet, RMNET_NSS_RX_NON_ETH,
|
||||||
|
"Number of non-Ethernet packets received");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_rx_busy, RMNET_NSS_RX_BUSY,
|
||||||
|
"Number of packets dropped decause rmnet_data device was busy");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_slow, RMNET_NSS_TX_NO_CTX,
|
||||||
|
"Number of packets sent over non-NSS-accelerated rmnet device");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_fast, RMNET_NSS_TX_SUCCESS,
|
||||||
|
"Number of packets sent over NSS-accelerated rmnet device");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_fail, RMNET_NSS_TX_FAIL,
|
||||||
|
"Number of packets that NSS could not transmit");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_nonlinear, RMNET_NSS_TX_NONLINEAR,
|
||||||
|
"Number of non linear sent over NSS-accelerated rmnet device");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_invalid_ip, RMNET_NSS_TX_BAD_IP,
|
||||||
|
"Number of ingress packets with invalid IP headers");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_invalid_frags, RMNET_NSS_TX_BAD_FRAGS,
|
||||||
|
"Number of ingress packets with invalid frag format");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_linearize_fail, RMNET_NSS_TX_LINEARIZE_FAILS,
|
||||||
|
"Number of ingress packets where linearize in tx fails");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_exceptions, RMNET_NSS_EXCEPTIONS,
|
||||||
|
"Number of times our DL exception handler was invoked");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_exception_non_ethernet, RMNET_NSS_EX_BAD_HDR,
|
||||||
|
"Number of non-Ethernet exception packets");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_exception_invalid_ip, RMNET_NSS_EX_BAD_IP,
|
||||||
|
"Number of exception packets with invalid IP headers");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_exception_success, RMNET_NSS_EX_SUCCESS,
|
||||||
|
"Number of exception packets handled successfully");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_non_zero_headlen_frags, RMNET_NSS_TX_NON_ZERO_HEADLEN_FRAGS,
|
||||||
|
"Number of packets with non zero headlen");
|
||||||
|
RMNET_NSS_STAT(rmnet_nss_tx_busy_loop, RMNET_NSS_TX_BUSY_LOOP,
|
||||||
|
"Number of times tx packets busy looped");
|
||||||
|
|
||||||
|
static void rmnet_nss_inc_stat(enum __rmnet_nss_stat stat)
|
||||||
|
{
|
||||||
|
if (stat >= 0 && stat < RMNET_NSS_NUM_STATS)
|
||||||
|
rmnet_nss_stats[stat]++;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct rmnet_nss_ctx *rmnet_nss_find_ctx(struct net_device *dev)
|
||||||
|
{
|
||||||
|
struct rmnet_nss_ctx *ctx;
|
||||||
|
struct hlist_head *bucket;
|
||||||
|
u32 hash;
|
||||||
|
|
||||||
|
hash = hash_ptr(dev, HASH_BITS(rmnet_nss_ctx_hashtable));
|
||||||
|
bucket = &rmnet_nss_ctx_hashtable[hash];
|
||||||
|
hlist_for_each_entry(ctx, bucket, hnode) {
|
||||||
|
if (ctx->rmnet_dev == dev)
|
||||||
|
return ctx;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void rmnet_nss_free_ctx(struct rmnet_nss_ctx *ctx)
|
||||||
|
{
|
||||||
|
if (ctx) {
|
||||||
|
hash_del(&ctx->hnode);
|
||||||
|
nss_rmnet_rx_xmit_callback_unregister(ctx->nss_ctx);
|
||||||
|
nss_rmnet_rx_destroy_sync(ctx->nss_ctx);
|
||||||
|
kfree(ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pull off an ethernet header, if possible */
|
||||||
|
static int rmnet_nss_ethhdr_pull(struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
if (!skb->protocol || skb->protocol == htons(ETH_P_802_3)) {
|
||||||
|
void *ret = skb_pull(skb, sizeof(struct ethhdr));
|
||||||
|
|
||||||
|
rmnet_nss_inc_stat((ret) ? RMNET_NSS_RX_ETH :
|
||||||
|
RMNET_NSS_RX_FAIL);
|
||||||
|
return !ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_RX_NON_ETH);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Copy headers to linear section for non linear packets */
|
||||||
|
static int rmnet_nss_adjust_header(struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
struct iphdr *iph;
|
||||||
|
skb_frag_t *frag;
|
||||||
|
int bytes = 0;
|
||||||
|
u8 transport;
|
||||||
|
|
||||||
|
if (skb_shinfo(skb)->nr_frags != 1) {
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_BAD_FRAGS);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (skb_headlen(skb)) {
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_NON_ZERO_HEADLEN_FRAGS);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
frag = &skb_shinfo(skb)->frags[0];
|
||||||
|
|
||||||
|
iph = (struct iphdr *)(skb_frag_address(frag));
|
||||||
|
|
||||||
|
if (iph->version == 4) {
|
||||||
|
bytes = iph->ihl*4;
|
||||||
|
transport = iph->protocol;
|
||||||
|
} else if (iph->version == 6) {
|
||||||
|
struct ipv6hdr *ip6h = (struct ipv6hdr *)iph;
|
||||||
|
|
||||||
|
bytes = sizeof(struct ipv6hdr);
|
||||||
|
/* Dont have to account for extension headers yet */
|
||||||
|
transport = ip6h->nexthdr;
|
||||||
|
} else {
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_BAD_IP);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (transport == IPPROTO_TCP) {
|
||||||
|
struct tcphdr *th;
|
||||||
|
|
||||||
|
th = (struct tcphdr *)((u8 *)iph + bytes);
|
||||||
|
bytes += th->doff * 4;
|
||||||
|
} else if (transport == IPPROTO_UDP) {
|
||||||
|
bytes += sizeof(struct udphdr);
|
||||||
|
} else {
|
||||||
|
/* cant do anything else here unfortunately so linearize */
|
||||||
|
if (skb_linearize(skb)) {
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_LINEARIZE_FAILS);
|
||||||
|
return -EINVAL;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bytes > skb_frag_size(frag)) {
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_BAD_FRAGS);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
skb_push(skb, bytes);
|
||||||
|
memcpy(skb->data, iph, bytes);
|
||||||
|
|
||||||
|
/* subtract to account for skb_push */
|
||||||
|
skb->len -= bytes;
|
||||||
|
|
||||||
|
frag->page_offset += bytes;
|
||||||
|
skb_frag_size_sub(frag, bytes);
|
||||||
|
|
||||||
|
/* subtract to account for skb_frag_size_sub */
|
||||||
|
skb->data_len -= bytes;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Main downlink handler
|
||||||
|
* Looks up NSS contex associated with the device. If the context is found,
|
||||||
|
* we add a dummy ethernet header with the approriate protocol field set,
|
||||||
|
* the pass the packet off to NSS for hardware acceleration.
|
||||||
|
*/
|
||||||
|
int rmnet_nss_tx(struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
struct ethhdr *eth;
|
||||||
|
struct rmnet_nss_ctx *ctx;
|
||||||
|
struct net_device *dev = skb->dev;
|
||||||
|
nss_tx_status_t rc;
|
||||||
|
unsigned int len;
|
||||||
|
u8 version;
|
||||||
|
|
||||||
|
if (skb_is_nonlinear(skb)) {
|
||||||
|
if (rmnet_nss_adjust_header(skb))
|
||||||
|
goto fail;
|
||||||
|
else
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_NONLINEAR);
|
||||||
|
}
|
||||||
|
|
||||||
|
version = ((struct iphdr *)skb->data)->version;
|
||||||
|
|
||||||
|
ctx = rmnet_nss_find_ctx(dev);
|
||||||
|
if (!ctx) {
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_NO_CTX);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
eth = (struct ethhdr *)skb_push(skb, sizeof(*eth));
|
||||||
|
memset(ð->h_dest, 0, ETH_ALEN * 2);
|
||||||
|
if (version == 4) {
|
||||||
|
eth->h_proto = htons(ETH_P_IP);
|
||||||
|
} else if (version == 6) {
|
||||||
|
eth->h_proto = htons(ETH_P_IPV6);
|
||||||
|
} else {
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_BAD_IP);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
skb->protocol = htons(ETH_P_802_3);
|
||||||
|
/* Get length including ethhdr */
|
||||||
|
len = skb->len;
|
||||||
|
|
||||||
|
transmit:
|
||||||
|
rc = nss_rmnet_rx_tx_buf(ctx->nss_ctx, skb);
|
||||||
|
if (rc == NSS_TX_SUCCESS) {
|
||||||
|
/* Increment rmnet_data device stats.
|
||||||
|
* Don't call rmnet_data_vnd_rx_fixup() to do this, as
|
||||||
|
* there's no guarantee the skb pointer is still valid.
|
||||||
|
*/
|
||||||
|
dev->stats.rx_packets++;
|
||||||
|
dev->stats.rx_bytes += len;
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_SUCCESS);
|
||||||
|
return 0;
|
||||||
|
} else if (rc == NSS_TX_FAILURE_QUEUE) {
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_BUSY_LOOP);
|
||||||
|
goto transmit;
|
||||||
|
}
|
||||||
|
|
||||||
|
fail:
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_TX_FAIL);
|
||||||
|
kfree_skb(skb);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Called by NSS in the DL exception case.
|
||||||
|
* Since the packet cannot be sent over the accelerated path, we need to
|
||||||
|
* handle it. Remove the ethernet header and pass it onward to the stack
|
||||||
|
* if possible.
|
||||||
|
*/
|
||||||
|
void rmnet_nss_receive(struct net_device *dev, struct sk_buff *skb,
|
||||||
|
struct napi_struct *napi)
|
||||||
|
{
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_EXCEPTIONS);
|
||||||
|
|
||||||
|
if (!skb)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (rmnet_nss_ethhdr_pull(skb)) {
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_EX_BAD_HDR);
|
||||||
|
goto drop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* reset header pointers */
|
||||||
|
skb_reset_transport_header(skb);
|
||||||
|
skb_reset_network_header(skb);
|
||||||
|
skb_reset_mac_header(skb);
|
||||||
|
|
||||||
|
/* reset packet type */
|
||||||
|
skb->pkt_type = PACKET_HOST;
|
||||||
|
|
||||||
|
skb->dev = dev;
|
||||||
|
|
||||||
|
/* reset protocol type */
|
||||||
|
switch (skb->data[0] & 0xF0) {
|
||||||
|
case 0x40:
|
||||||
|
skb->protocol = htons(ETH_P_IP);
|
||||||
|
break;
|
||||||
|
case 0x60:
|
||||||
|
skb->protocol = htons(ETH_P_IPV6);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_EX_BAD_IP);
|
||||||
|
goto drop;
|
||||||
|
}
|
||||||
|
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_EX_SUCCESS);
|
||||||
|
|
||||||
|
/* Set this so that we dont loop around netif_receive_skb */
|
||||||
|
|
||||||
|
skb->cb[0] = 1;
|
||||||
|
|
||||||
|
netif_receive_skb(skb);
|
||||||
|
return;
|
||||||
|
|
||||||
|
drop:
|
||||||
|
kfree_skb(skb);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Called by NSS in the UL acceleration case.
|
||||||
|
* We are guaranteed to have an ethernet packet here from the NSS hardware,
|
||||||
|
* We need to pull the header off and invoke our ndo_start_xmit function
|
||||||
|
* to handle transmitting the packet to the network stack.
|
||||||
|
*/
|
||||||
|
void rmnet_nss_xmit(struct net_device *dev, struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
netdev_tx_t ret;
|
||||||
|
|
||||||
|
skb_pull(skb, sizeof(struct ethhdr));
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_RX_ETH);
|
||||||
|
|
||||||
|
/* NSS takes care of shaping, so bypassing Qdiscs like this is OK */
|
||||||
|
ret = dev->netdev_ops->ndo_start_xmit(skb, dev);
|
||||||
|
if (unlikely(ret == NETDEV_TX_BUSY)) {
|
||||||
|
dev_kfree_skb_any(skb);
|
||||||
|
rmnet_nss_inc_stat(RMNET_NSS_RX_BUSY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create and register an NSS context for an rmnet_data device */
|
||||||
|
int rmnet_nss_create_vnd(struct net_device *dev)
|
||||||
|
{
|
||||||
|
struct rmnet_nss_ctx *ctx;
|
||||||
|
|
||||||
|
ctx = kzalloc(sizeof(*ctx), GFP_ATOMIC);
|
||||||
|
if (!ctx)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
ctx->rmnet_dev = dev;
|
||||||
|
ctx->nss_ctx = nss_rmnet_rx_create_sync_nexthop(dev, NSS_N2H_INTERFACE,
|
||||||
|
NSS_C2C_TX_INTERFACE);
|
||||||
|
if (!ctx->nss_ctx) {
|
||||||
|
kfree(ctx);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
nss_rmnet_rx_register(ctx->nss_ctx, rmnet_nss_receive, dev);
|
||||||
|
nss_rmnet_rx_xmit_callback_register(ctx->nss_ctx, rmnet_nss_xmit);
|
||||||
|
hash_add_ptr(rmnet_nss_ctx_hashtable, &ctx->hnode, dev);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Unregister and destroy the NSS context for an rmnet_data device */
|
||||||
|
int rmnet_nss_free_vnd(struct net_device *dev)
|
||||||
|
{
|
||||||
|
struct rmnet_nss_ctx *ctx;
|
||||||
|
|
||||||
|
ctx = rmnet_nss_find_ctx(dev);
|
||||||
|
rmnet_nss_free_ctx(ctx);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct rmnet_nss_cb rmnet_nss = {
|
||||||
|
.nss_create = rmnet_nss_create_vnd,
|
||||||
|
.nss_free = rmnet_nss_free_vnd,
|
||||||
|
.nss_tx = rmnet_nss_tx,
|
||||||
|
};
|
||||||
|
|
||||||
|
int __init rmnet_nss_init(void)
|
||||||
|
{
|
||||||
|
pr_err("%s(): initializing rmnet_nss\n", __func__);
|
||||||
|
RCU_INIT_POINTER(rmnet_nss_callbacks, &rmnet_nss);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void __exit rmnet_nss_exit(void)
|
||||||
|
{
|
||||||
|
struct hlist_node *tmp;
|
||||||
|
struct rmnet_nss_ctx *ctx;
|
||||||
|
int bkt;
|
||||||
|
|
||||||
|
pr_err("%s(): exiting rmnet_nss\n", __func__);
|
||||||
|
RCU_INIT_POINTER(rmnet_nss_callbacks, NULL);
|
||||||
|
|
||||||
|
/* Tear down all NSS contexts */
|
||||||
|
hash_for_each_safe(rmnet_nss_ctx_hashtable, bkt, tmp, ctx, hnode)
|
||||||
|
rmnet_nss_free_ctx(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
MODULE_LICENSE("GPL v2");
|
||||||
|
module_init(rmnet_nss_init);
|
||||||
|
module_exit(rmnet_nss_exit);
|
||||||
|
#endif
|
@ -14,17 +14,21 @@ LUCI_DEPENDS:=+luci-compat \
|
|||||||
+kmod-usb2 +kmod-usb3 \
|
+kmod-usb2 +kmod-usb3 \
|
||||||
+kmod-usb-serial +kmod-usb-serial-option +kmod-usb-serial-qualcomm \
|
+kmod-usb-serial +kmod-usb-serial-option +kmod-usb-serial-qualcomm \
|
||||||
+kmod-usb-net +kmod-usb-acm \
|
+kmod-usb-net +kmod-usb-acm \
|
||||||
+kmod-usb-wdm +kmod-usb-net-qmi-wwan \
|
+kmod-usb-wdm \
|
||||||
+kmod-usb-net-cdc-ether \
|
+kmod-usb-net-cdc-ether \
|
||||||
+kmod-usb-net-cdc-mbim \
|
+kmod-usb-net-cdc-mbim \
|
||||||
+kmod-usb-net-rndis \
|
+kmod-usb-net-rndis \
|
||||||
+kmod-usb-net-cdc-ncm +kmod-usb-net-huawei-cdc-ncm \
|
+kmod-usb-net-cdc-ncm +kmod-usb-net-huawei-cdc-ncm \
|
||||||
|
+PACKAGE_luci-app-qmodem_INCLUDE_generic-qmi-wwan:kmod-usb-net-qmi-wwan \
|
||||||
|
+PACKAGE_luci-app-qmodem_INCLUDE_vendor-qmi-wwan:kmod-qmi_wwan_q \
|
||||||
|
+PACKAGE_luci-app-qmodem_INCLUDE_vendor-qmi-wwan:kmod-qmi_wwan_f \
|
||||||
|
+PACKAGE_luci-app-qmodem_INCLUDE_vendor-qmi-wwan:kmod-qmi_wwan_m \
|
||||||
+usbutils \
|
+usbutils \
|
||||||
+PACKAGE_luci-app-qmodem_INCLUDE_ADD_PCI_SUPPORT:kmod-pcie_mhi \
|
+PACKAGE_luci-app-qmodem_INCLUDE_ADD_PCI_SUPPORT:kmod-pcie_mhi \
|
||||||
+PACKAGE_luci-app-qmodem_INCLUDE_ADD_PCI_SUPPORT:pciutils \
|
+PACKAGE_luci-app-qmodem_INCLUDE_ADD_PCI_SUPPORT:pciutils \
|
||||||
+PACKAGE_luci-app-qmodem_USE_TOM_CUSTOMIZED_QUECTEL_CM:quectel-CM-5G-M \
|
+PACKAGE_luci-app-qmodem_USE_TOM_CUSTOMIZED_QUECTEL_CM:quectel-CM-5G-M \
|
||||||
+PACKAGE_luci-app-qmodem_USING_QWRT_QUECTEL_CM_5G:quectel-CM-5G \
|
+PACKAGE_luci-app-qmodem_USING_QWRT_QUECTEL_CM_5G:quectel-CM-5G \
|
||||||
+PACKAGE_luci-app-qmodem_ADD_LUA_LUCI_HOMEPAGE:luci-app-qmodem_with_lua_index_page \
|
+luci-app-qmodem_with_lua_index_page \
|
||||||
+tom_modem \
|
+tom_modem \
|
||||||
+jq +bc\
|
+jq +bc\
|
||||||
+coreutils +coreutils-stat
|
+coreutils +coreutils-stat
|
||||||
@ -35,9 +39,16 @@ define Package/luci-app-qmodem/conffiles
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/luci-app-qmodem/config
|
define Package/luci-app-qmodem/config
|
||||||
config PACKAGE_luci-app-qmodem_ADD_LUA_LUCI_HOMEPAGE
|
choice
|
||||||
bool "Add Lua Luci Homepage"
|
prompt "Qualcomm QMI WWAN Driver Selection"
|
||||||
default y
|
default PACKAGE_luci-app-qmodem_INCLUDE_vendor-qmi-wwan
|
||||||
|
|
||||||
|
config PACKAGE_luci-app-qmodem_INCLUDE_vendor-qmi-wwan
|
||||||
|
bool "Vendor QMI driver "
|
||||||
|
|
||||||
|
config PACKAGE_luci-app-qmodem_INCLUDE_generic-qmi-wwan
|
||||||
|
bool "Generic QMI driver"
|
||||||
|
endchoice
|
||||||
|
|
||||||
config PACKAGE_luci-app-qmodem_INCLUDE_ADD_PCI_SUPPORT
|
config PACKAGE_luci-app-qmodem_INCLUDE_ADD_PCI_SUPPORT
|
||||||
bool "Add PCIe Modem SUPPORT"
|
bool "Add PCIe Modem SUPPORT"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user