#include <linux/module.h>
#include <linux/sched/signal.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
#include <linux/etherdevice.h>
#include <linux/if_arp.h>
#include <linux/kstrtox.h>
#include <linux/mii.h>
#include <linux/rtnetlink.h>
#include <linux/usb.h>
#include <linux/usb/cdc.h>
#include <linux/usb/usbnet.h>
#include <linux/usb/cdc-wdm.h>
#include <linux/u64_stats_sync.h>
struct qmi_wwan_state { … };
enum qmi_wwan_flags { … };
enum qmi_wwan_quirks { … };
struct qmimux_hdr { … };
struct qmimux_priv { … };
static int qmimux_open(struct net_device *dev)
{ … }
static int qmimux_stop(struct net_device *dev)
{ … }
static netdev_tx_t qmimux_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ … }
static const struct net_device_ops qmimux_netdev_ops = …;
static void qmimux_setup(struct net_device *dev)
{ … }
static struct net_device *qmimux_find_dev(struct usbnet *dev, u8 mux_id)
{ … }
static bool qmimux_has_slaves(struct usbnet *dev)
{ … }
static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{ … }
static ssize_t mux_id_show(struct device *d, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(mux_id);
static struct attribute *qmi_wwan_sysfs_qmimux_attrs[] = …;
static struct attribute_group qmi_wwan_sysfs_qmimux_attr_group = …;
static int qmimux_register_device(struct net_device *real_dev, u8 mux_id)
{ … }
static void qmimux_unregister_device(struct net_device *dev,
struct list_head *head)
{ … }
static void qmi_wwan_netdev_setup(struct net_device *net)
{ … }
static ssize_t raw_ip_show(struct device *d, struct device_attribute *attr, char *buf)
{ … }
static ssize_t raw_ip_store(struct device *d, struct device_attribute *attr, const char *buf, size_t len)
{ … }
static ssize_t add_mux_show(struct device *d, struct device_attribute *attr, char *buf)
{ … }
static ssize_t add_mux_store(struct device *d, struct device_attribute *attr, const char *buf, size_t len)
{ … }
static ssize_t del_mux_show(struct device *d, struct device_attribute *attr, char *buf)
{ … }
static ssize_t del_mux_store(struct device *d, struct device_attribute *attr, const char *buf, size_t len)
{ … }
static ssize_t pass_through_show(struct device *d,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t pass_through_store(struct device *d,
struct device_attribute *attr,
const char *buf, size_t len)
{ … }
static DEVICE_ATTR_RW(raw_ip);
static DEVICE_ATTR_RW(add_mux);
static DEVICE_ATTR_RW(del_mux);
static DEVICE_ATTR_RW(pass_through);
static struct attribute *qmi_wwan_sysfs_attrs[] = …;
static struct attribute_group qmi_wwan_sysfs_attr_group = …;
static const u8 default_modem_addr[ETH_ALEN] = …;
static const u8 buggy_fw_addr[ETH_ALEN] = …;
static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{ … }
static bool possibly_iphdr(const char *data)
{ … }
static int qmi_wwan_mac_addr(struct net_device *dev, void *p)
{ … }
static const struct net_device_ops qmi_wwan_netdev_ops = …;
static int qmi_wwan_manage_power(struct usbnet *dev, int on)
{ … }
static int qmi_wwan_cdc_wdm_manage_power(struct usb_interface *intf, int on)
{ … }
static int qmi_wwan_register_subdriver(struct usbnet *dev)
{ … }
static int qmi_wwan_change_dtr(struct usbnet *dev, bool on)
{ … }
static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
{ … }
static void qmi_wwan_unbind(struct usbnet *dev, struct usb_interface *intf)
{ … }
static int qmi_wwan_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int qmi_wwan_resume(struct usb_interface *intf)
{ … }
static const struct driver_info qmi_wwan_info = …;
static const struct driver_info qmi_wwan_info_quirk_dtr = …;
#define HUAWEI_VENDOR_ID …
#define QMI_FIXED_INTF(vend, prod, num) …
#define QMI_QUIRK_SET_DTR(vend, prod, num) …
#define QMI_GOBI1K_DEVICE(vend, prod) …
#define QMI_GOBI_DEVICE(vend, prod) …
#define QMI_MATCH_FF_FF_FF(vend, prod) …
static const struct usb_device_id products[] = …;
MODULE_DEVICE_TABLE(usb, products);
static bool quectel_ec20_detected(struct usb_interface *intf)
{ … }
static int qmi_wwan_probe(struct usb_interface *intf,
const struct usb_device_id *prod)
{ … }
static void qmi_wwan_disconnect(struct usb_interface *intf)
{ … }
static struct usb_driver qmi_wwan_driver = …;
module_usb_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;