linux/drivers/net/ieee802154/atusb.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * atusb.c - Driver for the ATUSB IEEE 802.15.4 dongle
 *
 * Written 2013 by Werner Almesberger <[email protected]>
 *
 * Copyright (c) 2015 - 2016 Stefan Schmidt <[email protected]>
 *
 * Based on at86rf230.c and spi_atusb.c.
 * at86rf230.c is
 * Copyright (C) 2009 Siemens AG
 * Written by: Dmitry Eremin-Solenikov <[email protected]>
 *
 * spi_atusb.c is
 * Copyright (c) 2011 Richard Sharpe <[email protected]>
 * Copyright (c) 2011 Stefan Schmidt <[email protected]>
 * Copyright (c) 2011 Werner Almesberger <[email protected]>
 *
 * USB initialization is
 * Copyright (c) 2013 Alexander Aring <[email protected]>
 *
 * Busware HUL support is
 * Copyright (c) 2017 Josef Filzmaier <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/usb.h>
#include <linux/skbuff.h>

#include <net/cfg802154.h>
#include <net/mac802154.h>

#include "at86rf230.h"
#include "atusb.h"

#define ATUSB_JEDEC_ATMEL

#define ATUSB_NUM_RX_URBS
#define ATUSB_ALLOC_DELAY_MS
#define ATUSB_TX_TIMEOUT_MS

struct atusb {};

struct atusb_chip_data {};

static int atusb_write_subreg(struct atusb *atusb, u8 reg, u8 mask,
			      u8 shift, u8 value)
{}

static int atusb_read_subreg(struct atusb *lp,
			     unsigned int addr, unsigned int mask,
			     unsigned int shift)
{}

static int atusb_get_and_clear_error(struct atusb *atusb)
{}

/* ----- skb allocation ---------------------------------------------------- */

#define MAX_PSDU
#define MAX_RX_XFER

#define SKB_ATUSB(skb)

static void atusb_in(struct urb *urb);

static int atusb_submit_rx_urb(struct atusb *atusb, struct urb *urb)
{}

static void atusb_work_urbs(struct work_struct *work)
{}

/* ----- Asynchronous USB -------------------------------------------------- */

static void atusb_tx_done(struct atusb *atusb, u8 seq, int reason)
{}

static void atusb_in_good(struct urb *urb)
{}

static void atusb_in(struct urb *urb)
{}

/* ----- URB allocation/deallocation --------------------------------------- */

static void atusb_free_urbs(struct atusb *atusb)
{}

static int atusb_alloc_urbs(struct atusb *atusb, int n)
{}

/* ----- IEEE 802.15.4 interface operations -------------------------------- */

static void atusb_xmit_complete(struct urb *urb)
{}

static int atusb_xmit(struct ieee802154_hw *hw, struct sk_buff *skb)
{}

static int atusb_ed(struct ieee802154_hw *hw, u8 *level)
{}

static int atusb_set_hw_addr_filt(struct ieee802154_hw *hw,
				  struct ieee802154_hw_addr_filt *filt,
				  unsigned long changed)
{}

static int atusb_start(struct ieee802154_hw *hw)
{}

static void atusb_stop(struct ieee802154_hw *hw)
{}

#define ATUSB_MAX_TX_POWERS
static const s32 atusb_powers[ATUSB_MAX_TX_POWERS + 1] =;

static int
atusb_txpower(struct ieee802154_hw *hw, s32 mbm)
{}

static int
atusb_set_txpower(struct ieee802154_hw *hw, s32 mbm)
{}

static int
hulusb_set_txpower(struct ieee802154_hw *hw, s32 mbm)
{}

#define ATUSB_MAX_ED_LEVELS
static const s32 atusb_ed_levels[ATUSB_MAX_ED_LEVELS + 1] =;

#define AT86RF212_MAX_TX_POWERS
static const s32 at86rf212_powers[AT86RF212_MAX_TX_POWERS + 1] =;

#define AT86RF2XX_MAX_ED_LEVELS
static const s32 at86rf212_ed_levels_100[AT86RF2XX_MAX_ED_LEVELS + 1] =;

static const s32 at86rf212_ed_levels_98[AT86RF2XX_MAX_ED_LEVELS + 1] =;

static int
atusb_set_cca_mode(struct ieee802154_hw *hw, const struct wpan_phy_cca *cca)
{}

static int hulusb_set_cca_ed_level(struct atusb *lp, int rssi_base_val)
{}

static int
atusb_set_cca_ed_level(struct ieee802154_hw *hw, s32 mbm)
{}

static int atusb_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
{}

static int atusb_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
{}

static int hulusb_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
{}

static int
atusb_set_csma_params(struct ieee802154_hw *hw, u8 min_be, u8 max_be, u8 retries)
{}

static int
hulusb_set_lbt(struct ieee802154_hw *hw, bool on)
{}

static int
atusb_set_frame_retries(struct ieee802154_hw *hw, s8 retries)
{}

static int
atusb_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
{}

static struct atusb_chip_data atusb_chip_data =;

static struct atusb_chip_data hulusb_chip_data =;

static const struct ieee802154_ops atusb_ops =;

/* ----- Firmware and chip version information ----------------------------- */

static int atusb_get_and_show_revision(struct atusb *atusb)
{}

static int atusb_get_and_show_build(struct atusb *atusb)
{}

static int atusb_get_and_conf_chip(struct atusb *atusb)
{}

static int atusb_set_extended_addr(struct atusb *atusb)
{}

/* ----- Setup ------------------------------------------------------------- */

static int atusb_probe(struct usb_interface *interface,
		       const struct usb_device_id *id)
{}

static void atusb_disconnect(struct usb_interface *interface)
{}

/* The devices we work with */
static const struct usb_device_id atusb_device_table[] =;
MODULE_DEVICE_TABLE(usb, atusb_device_table);

static struct usb_driver atusb_driver =;
module_usb_driver();

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