#ifndef __CARL9170_H
#define __CARL9170_H
#include <linux/kernel.h>
#include <linux/firmware.h>
#include <linux/completion.h>
#include <linux/spinlock.h>
#include <linux/hw_random.h>
#include <net/cfg80211.h>
#include <net/mac80211.h>
#include <linux/usb.h>
#ifdef CONFIG_CARL9170_LEDS
#include <linux/leds.h>
#endif
#ifdef CONFIG_CARL9170_WPC
#include <linux/input.h>
#endif
#include "eeprom.h"
#include "wlan.h"
#include "hw.h"
#include "fwdesc.h"
#include "fwcmd.h"
#include "../regd.h"
#ifdef CONFIG_CARL9170_DEBUGFS
#include "debug.h"
#endif
#define CARL9170FW_NAME …
#define PAYLOAD_MAX …
static inline u8 ar9170_qmap(u8 idx)
{ … }
#define CARL9170_MAX_RX_BUFFER_SIZE …
enum carl9170_device_state { … };
#define WME_BA_BMP_SIZE …
#define CARL9170_TX_USER_RATE_TRIES …
#define TID_TO_WME_AC(_tid) …
#define SEQ_DIFF(_start, _seq) …
#define SEQ_PREV(_seq) …
#define SEQ_NEXT(_seq) …
#define BAW_WITHIN(_start, _bawsz, _seqno) …
enum carl9170_tid_state { … };
#define CARL9170_BAW_BITS …
#define CARL9170_BAW_SIZE …
#define CARL9170_BAW_LEN …
struct carl9170_sta_tid { … };
#define CARL9170_QUEUE_TIMEOUT …
#define CARL9170_BUMP_QUEUE …
#define CARL9170_TX_TIMEOUT …
#define CARL9170_JANITOR_DELAY …
#define CARL9170_QUEUE_STUCK_TIMEOUT …
#define CARL9170_STAT_WORK …
#define CARL9170_NUM_TX_AGG_MAX …
#define CARL9170_NUM_TX_LIMIT_HARD …
#define CARL9170_NUM_TX_LIMIT_SOFT …
struct carl9170_tx_queue_stats { … };
struct carl9170_vif { … };
struct carl9170_vif_info { … };
#define AR9170_NUM_RX_URBS …
#define AR9170_NUM_RX_URBS_MUL …
#define AR9170_NUM_TX_URBS …
#define AR9170_NUM_RX_URBS_POOL …
enum carl9170_device_features { … };
#ifdef CONFIG_CARL9170_LEDS
struct ar9170;
struct carl9170_led { … };
#endif
enum carl9170_restart_reasons { … };
enum carl9170_erp_modes { … };
struct ar9170 { … };
enum carl9170_ps_off_override_reasons { … };
struct carl9170_bar_list_entry { … };
struct carl9170_ba_stats { … };
struct carl9170_sta_info { … };
struct carl9170_tx_info { … };
#define CHK_DEV_STATE(a, s) …
#define IS_INITIALIZED(a) …
#define IS_ACCEPTING_CMD(a) …
#define IS_STARTED(a) …
static inline void __carl9170_set_state(struct ar9170 *ar,
enum carl9170_device_state newstate)
{ … }
static inline void carl9170_set_state(struct ar9170 *ar,
enum carl9170_device_state newstate)
{ … }
static inline void carl9170_set_state_when(struct ar9170 *ar,
enum carl9170_device_state min, enum carl9170_device_state newstate)
{ … }
void *carl9170_alloc(size_t priv_size);
int carl9170_register(struct ar9170 *ar);
void carl9170_unregister(struct ar9170 *ar);
void carl9170_free(struct ar9170 *ar);
void carl9170_restart(struct ar9170 *ar, const enum carl9170_restart_reasons r);
void carl9170_ps_check(struct ar9170 *ar);
int carl9170_usb_open(struct ar9170 *ar);
void carl9170_usb_stop(struct ar9170 *ar);
void carl9170_usb_tx(struct ar9170 *ar, struct sk_buff *skb);
void carl9170_usb_handle_tx_err(struct ar9170 *ar);
int carl9170_exec_cmd(struct ar9170 *ar, const enum carl9170_cmd_oids,
u32 plen, void *payload, u32 rlen, void *resp);
int __carl9170_exec_cmd(struct ar9170 *ar, struct carl9170_cmd *cmd,
const bool free_buf);
int carl9170_usb_restart(struct ar9170 *ar);
void carl9170_usb_reset(struct ar9170 *ar);
int carl9170_init_mac(struct ar9170 *ar);
int carl9170_set_qos(struct ar9170 *ar);
int carl9170_update_multicast(struct ar9170 *ar, const u64 mc_hast);
int carl9170_mod_virtual_mac(struct ar9170 *ar, const unsigned int id,
const u8 *mac);
int carl9170_set_operating_mode(struct ar9170 *ar);
int carl9170_set_beacon_timers(struct ar9170 *ar);
int carl9170_set_dyn_sifs_ack(struct ar9170 *ar);
int carl9170_set_rts_cts_rate(struct ar9170 *ar);
int carl9170_set_ampdu_settings(struct ar9170 *ar);
int carl9170_set_slot_time(struct ar9170 *ar);
int carl9170_set_mac_rates(struct ar9170 *ar);
int carl9170_set_hwretry_limit(struct ar9170 *ar, const u32 max_retry);
int carl9170_upload_key(struct ar9170 *ar, const u8 id, const u8 *mac,
const u8 ktype, const u8 keyidx, const u8 *keydata, const int keylen);
int carl9170_disable_key(struct ar9170 *ar, const u8 id);
int carl9170_set_mac_tpc(struct ar9170 *ar, struct ieee80211_channel *channel);
void carl9170_rx(struct ar9170 *ar, void *buf, unsigned int len);
void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len);
void carl9170_op_tx(struct ieee80211_hw *hw,
struct ieee80211_tx_control *control,
struct sk_buff *skb);
void carl9170_tx_janitor(struct work_struct *work);
void carl9170_tx_process_status(struct ar9170 *ar,
const struct carl9170_rsp *cmd);
void carl9170_tx_status(struct ar9170 *ar, struct sk_buff *skb,
const bool success);
void carl9170_tx_callback(struct ar9170 *ar, struct sk_buff *skb);
void carl9170_tx_drop(struct ar9170 *ar, struct sk_buff *skb);
void carl9170_tx_scheduler(struct ar9170 *ar);
void carl9170_tx_get_skb(struct sk_buff *skb);
int carl9170_tx_put_skb(struct sk_buff *skb);
int carl9170_update_beacon(struct ar9170 *ar, const bool submit);
#ifdef CONFIG_CARL9170_LEDS
int carl9170_led_register(struct ar9170 *ar);
void carl9170_led_unregister(struct ar9170 *ar);
#endif
int carl9170_led_init(struct ar9170 *ar);
int carl9170_led_set_state(struct ar9170 *ar, const u32 led_state);
int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
enum nl80211_channel_type bw);
int carl9170_get_noisefloor(struct ar9170 *ar);
int carl9170_parse_firmware(struct ar9170 *ar);
extern struct ieee80211_rate __carl9170_ratetable[];
extern int modparam_noht;
static inline struct ar9170 *carl9170_get_priv(struct carl9170_vif *carl_vif)
{ … }
static inline struct ieee80211_hdr *carl9170_get_hdr(struct sk_buff *skb)
{ … }
static inline u16 get_seq_h(struct ieee80211_hdr *hdr)
{ … }
static inline u16 carl9170_get_seq(struct sk_buff *skb)
{ … }
static inline u16 carl9170_get_tid(struct sk_buff *skb)
{ … }
static inline struct ieee80211_vif *
carl9170_get_vif(struct carl9170_vif_info *priv)
{ … }
static inline struct ieee80211_vif *carl9170_get_main_vif(struct ar9170 *ar)
{ … }
static inline bool is_main_vif(struct ar9170 *ar, struct ieee80211_vif *vif)
{ … }
#endif