linux/drivers/usb/serial/usb_wwan.c

// SPDX-License-Identifier: GPL-2.0
/*
  USB Driver layer for GSM modems

  Copyright (C) 2005  Matthias Urlichs <[email protected]>

  Portions copied from the Keyspan driver by Hugh Blemings <[email protected]>

  History: see the git log.

  Work sponsored by: Sigos GmbH, Germany <[email protected]>

  This driver exists because the "normal" serial driver doesn't work too well
  with GSM modems. Issues:
  - data loss -- one single Receive URB is not nearly enough
  - controlling the baud rate doesn't make sense
*/

#define DRIVER_AUTHOR
#define DRIVER_DESC

#include <linux/kernel.h>
#include <linux/jiffies.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/usb/cdc.h>
#include <linux/usb/serial.h>
#include <linux/serial.h>
#include "usb-wwan.h"

/*
 * Generate DTR/RTS signals on the port using the SET_CONTROL_LINE_STATE request
 * in CDC ACM.
 */
static int usb_wwan_send_setup(struct usb_serial_port *port)
{}

void usb_wwan_dtr_rts(struct usb_serial_port *port, int on)
{}
EXPORT_SYMBOL();

int usb_wwan_tiocmget(struct tty_struct *tty)
{}
EXPORT_SYMBOL();

int usb_wwan_tiocmset(struct tty_struct *tty,
		      unsigned int set, unsigned int clear)
{}
EXPORT_SYMBOL();

int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port,
		   const unsigned char *buf, int count)
{}
EXPORT_SYMBOL();

static void usb_wwan_indat_callback(struct urb *urb)
{}

static void usb_wwan_outdat_callback(struct urb *urb)
{}

unsigned int usb_wwan_write_room(struct tty_struct *tty)
{}
EXPORT_SYMBOL();

unsigned int usb_wwan_chars_in_buffer(struct tty_struct *tty)
{}
EXPORT_SYMBOL();

int usb_wwan_open(struct tty_struct *tty, struct usb_serial_port *port)
{}
EXPORT_SYMBOL();

static void unbusy_queued_urb(struct urb *urb,
					struct usb_wwan_port_private *portdata)
{}

void usb_wwan_close(struct usb_serial_port *port)
{}
EXPORT_SYMBOL();

static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
				      int endpoint,
				      int dir, void *ctx, char *buf, int len,
				      void (*callback) (struct urb *))
{}

int usb_wwan_port_probe(struct usb_serial_port *port)
{}
EXPORT_SYMBOL_GPL();

void usb_wwan_port_remove(struct usb_serial_port *port)
{}
EXPORT_SYMBOL();

#ifdef CONFIG_PM
static void stop_urbs(struct usb_serial *serial)
{}

int usb_wwan_suspend(struct usb_serial *serial, pm_message_t message)
{}
EXPORT_SYMBOL();

/* Caller must hold susp_lock. */
static int usb_wwan_submit_delayed_urbs(struct usb_serial_port *port)
{}

int usb_wwan_resume(struct usb_serial *serial)
{}
EXPORT_SYMBOL();
#endif

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