#include <linux/skbuff.h>
#include <linux/wait.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/random.h>
#include "cw1200.h"
#include "wsm.h"
#include "bh.h"
#include "sta.h"
#include "debug.h"
#define WSM_CMD_TIMEOUT …
#define WSM_CMD_START_TIMEOUT …
#define WSM_CMD_RESET_TIMEOUT …
#define WSM_CMD_MAX_TIMEOUT …
#define WSM_SKIP(buf, size) …
#define WSM_GET(buf, ptr, size) …
#define __WSM_GET(buf, type, type2, cvt) …
#define WSM_GET8(buf) …
#define WSM_GET16(buf) …
#define WSM_GET32(buf) …
#define WSM_PUT(buf, ptr, size) …
#define __WSM_PUT(buf, val, type, type2, cvt) …
#define WSM_PUT8(buf, val) …
#define WSM_PUT16(buf, val) …
#define WSM_PUT32(buf, val) …
static void wsm_buf_reset(struct wsm_buf *buf);
static int wsm_buf_reserve(struct wsm_buf *buf, size_t extra_size);
static int wsm_cmd_send(struct cw1200_common *priv,
struct wsm_buf *buf,
void *arg, u16 cmd, long tmo);
#define wsm_cmd_lock(__priv) …
#define wsm_cmd_unlock(__priv) …
static int wsm_generic_confirm(struct cw1200_common *priv,
void *arg,
struct wsm_buf *buf)
{ … }
int wsm_configuration(struct cw1200_common *priv, struct wsm_configuration *arg)
{ … }
static int wsm_configuration_confirm(struct cw1200_common *priv,
struct wsm_configuration *arg,
struct wsm_buf *buf)
{ … }
int wsm_reset(struct cw1200_common *priv, const struct wsm_reset *arg)
{ … }
struct wsm_mib { … };
int wsm_read_mib(struct cw1200_common *priv, u16 mib_id, void *_buf,
size_t buf_size)
{ … }
static int wsm_read_mib_confirm(struct cw1200_common *priv,
struct wsm_mib *arg,
struct wsm_buf *buf)
{ … }
int wsm_write_mib(struct cw1200_common *priv, u16 mib_id, void *_buf,
size_t buf_size)
{ … }
static int wsm_write_mib_confirm(struct cw1200_common *priv,
struct wsm_mib *arg,
struct wsm_buf *buf)
{ … }
int wsm_scan(struct cw1200_common *priv, const struct wsm_scan *arg)
{ … }
int wsm_stop_scan(struct cw1200_common *priv)
{ … }
static int wsm_tx_confirm(struct cw1200_common *priv,
struct wsm_buf *buf,
int link_id)
{ … }
static int wsm_multi_tx_confirm(struct cw1200_common *priv,
struct wsm_buf *buf, int link_id)
{ … }
static int wsm_join_confirm(struct cw1200_common *priv,
struct wsm_join_cnf *arg,
struct wsm_buf *buf)
{ … }
int wsm_join(struct cw1200_common *priv, struct wsm_join *arg)
{ … }
int wsm_set_bss_params(struct cw1200_common *priv,
const struct wsm_set_bss_params *arg)
{ … }
int wsm_add_key(struct cw1200_common *priv, const struct wsm_add_key *arg)
{ … }
int wsm_remove_key(struct cw1200_common *priv, const struct wsm_remove_key *arg)
{ … }
int wsm_set_tx_queue_params(struct cw1200_common *priv,
const struct wsm_set_tx_queue_params *arg, u8 id)
{ … }
int wsm_set_edca_params(struct cw1200_common *priv,
const struct wsm_edca_params *arg)
{ … }
int wsm_switch_channel(struct cw1200_common *priv,
const struct wsm_switch_channel *arg)
{ … }
int wsm_set_pm(struct cw1200_common *priv, const struct wsm_set_pm *arg)
{ … }
int wsm_start(struct cw1200_common *priv, const struct wsm_start *arg)
{ … }
int wsm_beacon_transmit(struct cw1200_common *priv,
const struct wsm_beacon_transmit *arg)
{ … }
int wsm_start_find(struct cw1200_common *priv)
{ … }
int wsm_stop_find(struct cw1200_common *priv)
{ … }
int wsm_map_link(struct cw1200_common *priv, const struct wsm_map_link *arg)
{ … }
int wsm_update_ie(struct cw1200_common *priv,
const struct wsm_update_ie *arg)
{ … }
int wsm_set_probe_responder(struct cw1200_common *priv, bool enable)
{ … }
const char * const cw1200_fw_types[] = …;
static int wsm_startup_indication(struct cw1200_common *priv,
struct wsm_buf *buf)
{ … }
static int wsm_receive_indication(struct cw1200_common *priv,
int link_id,
struct wsm_buf *buf,
struct sk_buff **skb_p)
{ … }
static int wsm_event_indication(struct cw1200_common *priv, struct wsm_buf *buf)
{ … }
static int wsm_channel_switch_indication(struct cw1200_common *priv,
struct wsm_buf *buf)
{ … }
static int wsm_set_pm_indication(struct cw1200_common *priv,
struct wsm_buf *buf)
{ … }
static int wsm_scan_started(struct cw1200_common *priv, void *arg,
struct wsm_buf *buf)
{ … }
static int wsm_scan_complete_indication(struct cw1200_common *priv,
struct wsm_buf *buf)
{ … }
static int wsm_join_complete_indication(struct cw1200_common *priv,
struct wsm_buf *buf)
{ … }
static int wsm_find_complete_indication(struct cw1200_common *priv,
struct wsm_buf *buf)
{ … }
static int wsm_ba_timeout_indication(struct cw1200_common *priv,
struct wsm_buf *buf)
{ … }
static int wsm_suspend_resume_indication(struct cw1200_common *priv,
int link_id, struct wsm_buf *buf)
{ … }
static int wsm_cmd_send(struct cw1200_common *priv,
struct wsm_buf *buf,
void *arg, u16 cmd, long tmo)
{ … }
void wsm_lock_tx(struct cw1200_common *priv)
{ … }
void wsm_lock_tx_async(struct cw1200_common *priv)
{ … }
bool wsm_flush_tx(struct cw1200_common *priv)
{ … }
void wsm_unlock_tx(struct cw1200_common *priv)
{ … }
int wsm_handle_exception(struct cw1200_common *priv, u8 *data, size_t len)
{ … }
int wsm_handle_rx(struct cw1200_common *priv, u16 id,
struct wsm_hdr *wsm, struct sk_buff **skb_p)
{ … }
static bool wsm_handle_tx_data(struct cw1200_common *priv,
struct wsm_tx *wsm,
const struct ieee80211_tx_info *tx_info,
const struct cw1200_txpriv *txpriv,
struct cw1200_queue *queue)
{ … }
static int cw1200_get_prio_queue(struct cw1200_common *priv,
u32 link_id_map, int *total)
{ … }
static int wsm_get_tx_queue_and_mask(struct cw1200_common *priv,
struct cw1200_queue **queue_p,
u32 *tx_allowed_mask_p,
bool *more)
{ … }
int wsm_get_tx(struct cw1200_common *priv, u8 **data,
size_t *tx_len, int *burst)
{ … }
void wsm_txed(struct cw1200_common *priv, u8 *data)
{ … }
void wsm_buf_init(struct wsm_buf *buf)
{ … }
void wsm_buf_deinit(struct wsm_buf *buf)
{ … }
static void wsm_buf_reset(struct wsm_buf *buf)
{ … }
static int wsm_buf_reserve(struct wsm_buf *buf, size_t extra_size)
{ … }