#include "b43legacy.h"
#include "dma.h"
#include "main.h"
#include "debugfs.h"
#include "xmit.h"
#include <linux/dma-mapping.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <net/dst.h>
static
struct b43legacy_dmadesc32 *op32_idx2desc(struct b43legacy_dmaring *ring,
int slot,
struct b43legacy_dmadesc_meta **meta)
{ … }
static void op32_fill_descriptor(struct b43legacy_dmaring *ring,
struct b43legacy_dmadesc32 *desc,
dma_addr_t dmaaddr, u16 bufsize,
int start, int end, int irq)
{ … }
static void op32_poke_tx(struct b43legacy_dmaring *ring, int slot)
{ … }
static void op32_tx_suspend(struct b43legacy_dmaring *ring)
{ … }
static void op32_tx_resume(struct b43legacy_dmaring *ring)
{ … }
static int op32_get_current_rxslot(struct b43legacy_dmaring *ring)
{ … }
static void op32_set_current_rxslot(struct b43legacy_dmaring *ring,
int slot)
{ … }
static inline int free_slots(struct b43legacy_dmaring *ring)
{ … }
static inline int next_slot(struct b43legacy_dmaring *ring, int slot)
{ … }
#ifdef CONFIG_B43LEGACY_DEBUG
static void update_max_used_slots(struct b43legacy_dmaring *ring,
int current_used_slots)
{ … }
#else
static inline
void update_max_used_slots(struct b43legacy_dmaring *ring,
int current_used_slots)
{ }
#endif
static inline
int request_slot(struct b43legacy_dmaring *ring)
{ … }
static struct b43legacy_dmaring *priority_to_txring(
struct b43legacy_wldev *dev,
int queue_priority)
{ … }
static u16 b43legacy_dmacontroller_base(enum b43legacy_dmatype type,
int controller_idx)
{ … }
static inline
dma_addr_t map_descbuffer(struct b43legacy_dmaring *ring,
unsigned char *buf,
size_t len,
int tx)
{ … }
static inline
void unmap_descbuffer(struct b43legacy_dmaring *ring,
dma_addr_t addr,
size_t len,
int tx)
{ … }
static inline
void sync_descbuffer_for_cpu(struct b43legacy_dmaring *ring,
dma_addr_t addr,
size_t len)
{ … }
static inline
void sync_descbuffer_for_device(struct b43legacy_dmaring *ring,
dma_addr_t addr,
size_t len)
{ … }
static inline
void free_descriptor_buffer(struct b43legacy_dmaring *ring,
struct b43legacy_dmadesc_meta *meta,
int irq_context)
{ … }
static int alloc_ringmemory(struct b43legacy_dmaring *ring)
{ … }
static void free_ringmemory(struct b43legacy_dmaring *ring)
{ … }
static int b43legacy_dmacontroller_rx_reset(struct b43legacy_wldev *dev,
u16 mmio_base,
enum b43legacy_dmatype type)
{ … }
static int b43legacy_dmacontroller_tx_reset(struct b43legacy_wldev *dev,
u16 mmio_base,
enum b43legacy_dmatype type)
{ … }
static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring,
dma_addr_t addr,
size_t buffersize,
bool dma_to_device)
{ … }
static int setup_rx_descbuffer(struct b43legacy_dmaring *ring,
struct b43legacy_dmadesc32 *desc,
struct b43legacy_dmadesc_meta *meta,
gfp_t gfp_flags)
{ … }
static int alloc_initial_descbuffers(struct b43legacy_dmaring *ring)
{ … }
static int dmacontroller_setup(struct b43legacy_dmaring *ring)
{ … }
static void dmacontroller_cleanup(struct b43legacy_dmaring *ring)
{ … }
static void free_all_descbuffers(struct b43legacy_dmaring *ring)
{ … }
static enum b43legacy_dmatype b43legacy_engine_type(struct b43legacy_wldev *dev)
{ … }
static
struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
int controller_index,
int for_tx,
enum b43legacy_dmatype type)
{ … }
static void b43legacy_destroy_dmaring(struct b43legacy_dmaring *ring)
{ … }
void b43legacy_dma_free(struct b43legacy_wldev *dev)
{ … }
int b43legacy_dma_init(struct b43legacy_wldev *dev)
{ … }
static u16 generate_cookie(struct b43legacy_dmaring *ring,
int slot)
{ … }
static
struct b43legacy_dmaring *parse_cookie(struct b43legacy_wldev *dev,
u16 cookie, int *slot)
{ … }
static int dma_tx_fragment(struct b43legacy_dmaring *ring,
struct sk_buff **in_skb)
{ … }
static inline
int should_inject_overflow(struct b43legacy_dmaring *ring)
{ … }
int b43legacy_dma_tx(struct b43legacy_wldev *dev,
struct sk_buff *skb)
{ … }
void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev,
const struct b43legacy_txstatus *status)
{ … }
static void dma_rx(struct b43legacy_dmaring *ring,
int *slot)
{ … }
void b43legacy_dma_rx(struct b43legacy_dmaring *ring)
{ … }
static void b43legacy_dma_tx_suspend_ring(struct b43legacy_dmaring *ring)
{ … }
static void b43legacy_dma_tx_resume_ring(struct b43legacy_dmaring *ring)
{ … }
void b43legacy_dma_tx_suspend(struct b43legacy_wldev *dev)
{ … }
void b43legacy_dma_tx_resume(struct b43legacy_wldev *dev)
{ … }