linux/drivers/net/usb/ipheth.c

/*
 * ipheth.c - Apple iPhone USB Ethernet driver
 *
 * Copyright (c) 2009 Diego Giagio <[email protected]>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of GIAGIO.COM nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * Alternatively, provided that this notice is retained in full, this
 * software may be distributed under the terms of the GNU General
 * Public License ("GPL") version 2, in which case the provisions of the
 * GPL apply INSTEAD OF those given above.
 *
 * The provided data structures and external interfaces from this code
 * are not restricted to be used by modules with a GPL compatible license.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
 *
 * Attention: iPhone device must be paired, otherwise it won't respond to our
 * driver. For more info: http://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver
 *
 */

#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/usb.h>
#include <linux/workqueue.h>
#include <linux/usb/cdc.h>

#define USB_VENDOR_APPLE

#define IPHETH_USBINTF_CLASS
#define IPHETH_USBINTF_SUBCLASS
#define IPHETH_USBINTF_PROTO

#define IPHETH_IP_ALIGN
#define IPHETH_NCM_HEADER_SIZE
#define IPHETH_TX_BUF_SIZE
#define IPHETH_RX_BUF_SIZE_LEGACY
#define IPHETH_RX_BUF_SIZE_NCM

#define IPHETH_TX_TIMEOUT

#define IPHETH_INTFNUM
#define IPHETH_ALT_INTFNUM

#define IPHETH_CTRL_ENDP
#define IPHETH_CTRL_BUF_SIZE
#define IPHETH_CTRL_TIMEOUT

#define IPHETH_CMD_GET_MACADDR
#define IPHETH_CMD_ENABLE_NCM
#define IPHETH_CMD_CARRIER_CHECK

#define IPHETH_CARRIER_CHECK_TIMEOUT
#define IPHETH_CARRIER_ON

static const struct usb_device_id ipheth_table[] =;
MODULE_DEVICE_TABLE(usb, ipheth_table);

struct ipheth_device {};

static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags);

static int ipheth_alloc_urbs(struct ipheth_device *iphone)
{}

static void ipheth_free_urbs(struct ipheth_device *iphone)
{}

static void ipheth_kill_urbs(struct ipheth_device *dev)
{}

static int ipheth_consume_skb(char *buf, int len, struct ipheth_device *dev)
{}

static int ipheth_rcvbulk_callback_legacy(struct urb *urb)
{}

static int ipheth_rcvbulk_callback_ncm(struct urb *urb)
{}

static void ipheth_rcvbulk_callback(struct urb *urb)
{}

static void ipheth_sndbulk_callback(struct urb *urb)
{}

static int ipheth_carrier_set(struct ipheth_device *dev)
{}

static void ipheth_carrier_check_work(struct work_struct *work)
{}

static int ipheth_get_macaddr(struct ipheth_device *dev)
{}

static int ipheth_enable_ncm(struct ipheth_device *dev)
{}

static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags)
{}

static int ipheth_open(struct net_device *net)
{}

static int ipheth_close(struct net_device *net)
{}

static netdev_tx_t ipheth_tx(struct sk_buff *skb, struct net_device *net)
{}

static void ipheth_tx_timeout(struct net_device *net, unsigned int txqueue)
{}

static u32 ipheth_ethtool_op_get_link(struct net_device *net)
{}

static const struct ethtool_ops ops =;

static const struct net_device_ops ipheth_netdev_ops =;

static int ipheth_probe(struct usb_interface *intf,
			const struct usb_device_id *id)
{}

static void ipheth_disconnect(struct usb_interface *intf)
{}

static struct usb_driver ipheth_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();