#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <asm/byteorder.h>
#include <linux/uaccess.h>
#include <linux/atmdev.h>
#define DRV_VERSION "1.0"
#define DEV_LABEL "adummy"
#define ADUMMY_DEV(dev) ((struct adummy_dev *) (dev)->dev_data)
static LIST_HEAD(adummy_devs);
static ssize_t __set_signal(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
struct atm_dev *atm_dev = container_of(dev, struct atm_dev, class_dev);
if (sscanf(buf, "%d", &signal) == 1) {
if (signal < ATM_PHY_SIG_LOST || signal > ATM_PHY_SIG_FOUND)
signal = ATM_PHY_SIG_UNKNOWN;
atm_dev_signal_change(atm_dev, signal);
static ssize_t __show_signal(struct device *dev,
struct device_attribute *attr, char *buf)
struct atm_dev *atm_dev = container_of(dev, struct atm_dev, class_dev);
return sprintf(buf, "%d\n", atm_dev->signal);
static DEVICE_ATTR(signal, 0644, __show_signal, __set_signal);
static struct attribute *adummy_attrs[] = {
static const struct attribute_group adummy_group_attrs = {
adummy_start(struct atm_dev *dev)
dev->ci_range.vpi_bits = 4;
dev->ci_range.vci_bits = 12;
adummy_open(struct atm_vcc *vcc)