#include <linux/module.h>
#include <net/mac80211.h>
#include <linux/kthread.h>
#include <linux/timer.h>
#include "cw1200.h"
#include "bh.h"
#include "hwio.h"
#include "wsm.h"
#include "hwbus.h"
#include "debug.h"
#include "fwio.h"
static int cw1200_bh(void *arg);
#define DOWNLOAD_BLOCK_SIZE_WR …
#define MAX_SZ_RD_WR_BUFFERS …
#define PIGGYBACK_CTRL_REG …
#define EFFECTIVE_BUF_SIZE …
enum cw1200_bh_pm_state { … };
static void cw1200_bh_work(struct work_struct *work)
{ … }
int cw1200_register_bh(struct cw1200_common *priv)
{ … }
void cw1200_unregister_bh(struct cw1200_common *priv)
{ … }
void cw1200_irq_handler(struct cw1200_common *priv)
{ … }
EXPORT_SYMBOL_GPL(…);
void cw1200_bh_wakeup(struct cw1200_common *priv)
{ … }
int cw1200_bh_suspend(struct cw1200_common *priv)
{ … }
int cw1200_bh_resume(struct cw1200_common *priv)
{ … }
static inline void wsm_alloc_tx_buffer(struct cw1200_common *priv)
{ … }
int wsm_release_tx_buffer(struct cw1200_common *priv, int count)
{ … }
static int cw1200_bh_read_ctrl_reg(struct cw1200_common *priv,
u16 *ctrl_reg)
{ … }
static int cw1200_device_wakeup(struct cw1200_common *priv)
{ … }
void cw1200_enable_powersave(struct cw1200_common *priv,
bool enable)
{ … }
static int cw1200_bh_rx_helper(struct cw1200_common *priv,
uint16_t *ctrl_reg,
int *tx)
{ … }
static int cw1200_bh_tx_helper(struct cw1200_common *priv,
int *pending_tx,
int *tx_burst)
{ … }
static int cw1200_bh(void *arg)
{ … }