#include <linux/dma-mapping.h>
#include "ath9k.h"
#include "ar9003_mac.h"
#define BITS_PER_BYTE …
#define OFDM_PLCP_BITS …
#define HT_RC_2_STREAMS(_rc) …
#define L_STF …
#define L_LTF …
#define L_SIG …
#define HT_SIG …
#define HT_STF …
#define HT_LTF(_ns) …
#define SYMBOL_TIME(_ns) …
#define SYMBOL_TIME_HALFGI(_ns) …
#define TIME_SYMBOLS(t) …
#define TIME_SYMBOLS_HALFGI(t) …
#define NUM_SYMBOLS_PER_USEC(_usec) …
#define NUM_SYMBOLS_PER_USEC_HALFGI(_usec) …
#define ATH9K_PWRTBL_11NA_OFDM_SHIFT …
#define ATH9K_PWRTBL_11NG_OFDM_SHIFT …
#define ATH9K_PWRTBL_11NA_HT_SHIFT …
#define ATH9K_PWRTBL_11NG_HT_SHIFT …
static u16 bits_per_symbol[][2] = …;
static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
struct ath_atx_tid *tid, struct sk_buff *skb);
static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
int tx_flags, struct ath_txq *txq,
struct ieee80211_sta *sta);
static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
struct ath_txq *txq, struct list_head *bf_q,
struct ieee80211_sta *sta,
struct ath_tx_status *ts, int txok);
static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
struct list_head *head, bool internal);
static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
struct ath_tx_status *ts, int nframes, int nbad,
int txok);
static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
struct ath_buf *bf);
static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
struct ath_txq *txq,
struct ath_atx_tid *tid,
struct sk_buff *skb);
static int ath_tx_prepare(struct ieee80211_hw *hw, struct sk_buff *skb,
struct ath_tx_control *txctl);
enum { … };
static void ath_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
{ … }
void ath_txq_unlock_complete(struct ath_softc *sc, struct ath_txq *txq)
__releases(&txq->axq_lock)
{ … }
void ath_tx_queue_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
{ … }
void ath9k_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *queue)
{ … }
static struct ath_frame_info *get_frame_info(struct sk_buff *skb)
{ … }
static void ath_send_bar(struct ath_atx_tid *tid, u16 seqno)
{ … }
static bool ath_merge_ratetbl(struct ieee80211_sta *sta, struct ath_buf *bf,
struct ieee80211_tx_info *tx_info)
{ … }
static void ath_set_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta,
struct ath_buf *bf)
{ … }
static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
struct sk_buff *skb)
{ … }
static struct ath_atx_tid *
ath_get_skb_tid(struct ath_softc *sc, struct ath_node *an, struct sk_buff *skb)
{ … }
static int
ath_tid_pull(struct ath_atx_tid *tid, struct sk_buff **skbuf)
{ … }
static int ath_tid_dequeue(struct ath_atx_tid *tid,
struct sk_buff **skb)
{ … }
static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
{ … }
static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
struct ath_buf *bf)
{ … }
static void ath_tx_addto_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
struct ath_buf *bf)
{ … }
static void ath_tid_drain(struct ath_softc *sc, struct ath_txq *txq,
struct ath_atx_tid *tid)
{ … }
static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq,
struct sk_buff *skb, int count)
{ … }
static struct ath_buf *ath_tx_get_buffer(struct ath_softc *sc)
{ … }
static void ath_tx_return_buffer(struct ath_softc *sc, struct ath_buf *bf)
{ … }
static struct ath_buf* ath_clone_txbuf(struct ath_softc *sc, struct ath_buf *bf)
{ … }
static void ath_tx_count_frames(struct ath_softc *sc, struct ath_buf *bf,
struct ath_tx_status *ts, int txok,
int *nframes, int *nbad)
{ … }
static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
struct ath_buf *bf, struct list_head *bf_q,
struct ieee80211_sta *sta,
struct ath_atx_tid *tid,
struct ath_tx_status *ts, int txok)
{ … }
static bool bf_is_ampdu_not_probing(struct ath_buf *bf)
{ … }
static void ath_tx_count_airtime(struct ath_softc *sc,
struct ieee80211_sta *sta,
struct ath_buf *bf,
struct ath_tx_status *ts,
u8 tid)
{ … }
static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq,
struct ath_tx_status *ts, struct ath_buf *bf,
struct list_head *bf_head)
{ … }
static bool ath_lookup_legacy(struct ath_buf *bf)
{ … }
static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
struct ath_atx_tid *tid)
{ … }
static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
struct ath_buf *bf, u16 frmlen,
bool first_subfrm)
{ … }
static int
ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq,
struct ath_atx_tid *tid, struct ath_buf **buf)
{ … }
static int
ath_tx_form_aggr(struct ath_softc *sc, struct ath_txq *txq,
struct ath_atx_tid *tid, struct list_head *bf_q,
struct ath_buf *bf_first)
{ … }
u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, int pktlen,
int width, int half_gi, bool shortPreamble)
{ … }
static int ath_max_framelen(int usec, int mcs, bool ht40, bool sgi)
{ … }
void ath_update_max_aggr_framelen(struct ath_softc *sc, int queue, int txop)
{ … }
static u8 ath_get_rate_txpower(struct ath_softc *sc, struct ath_buf *bf,
u8 rateidx, bool is_40, bool is_cck, bool is_mcs)
{ … }
static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf,
struct ath_tx_info *info, int len, bool rts)
{ … }
static enum ath9k_pkt_type get_hw_packet_type(struct sk_buff *skb)
{ … }
static void ath_tx_fill_desc(struct ath_softc *sc, struct ath_buf *bf,
struct ath_txq *txq, int len)
{ … }
static void
ath_tx_form_burst(struct ath_softc *sc, struct ath_txq *txq,
struct ath_atx_tid *tid, struct list_head *bf_q,
struct ath_buf *bf_first)
{ … }
static int ath_tx_sched_aggr(struct ath_softc *sc, struct ath_txq *txq,
struct ath_atx_tid *tid)
{ … }
int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
u16 tid, u16 *ssn)
{ … }
void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
{ … }
void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,
struct ath_node *an)
{ … }
void ath_tx_aggr_wakeup(struct ath_softc *sc, struct ath_node *an)
{ … }
static void
ath9k_set_moredata(struct ath_softc *sc, struct ath_buf *bf, bool val)
{ … }
void ath9k_release_buffered_frames(struct ieee80211_hw *hw,
struct ieee80211_sta *sta,
u16 tids, int nframes,
enum ieee80211_frame_release_type reason,
bool more_data)
{ … }
struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype)
{ … }
int ath_txq_update(struct ath_softc *sc, int qnum,
struct ath9k_tx_queue_info *qinfo)
{ … }
int ath_cabq_update(struct ath_softc *sc)
{ … }
static void ath_drain_txq_list(struct ath_softc *sc, struct ath_txq *txq,
struct list_head *list)
{ … }
void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq)
{ … }
bool ath_drain_all_txq(struct ath_softc *sc)
{ … }
void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
{ … }
void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
{ … }
void ath_txq_schedule_all(struct ath_softc *sc)
{ … }
static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
struct list_head *head, bool internal)
{ … }
static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
struct ath_atx_tid *tid, struct sk_buff *skb)
{ … }
static void setup_frame_info(struct ieee80211_hw *hw,
struct ieee80211_sta *sta,
struct sk_buff *skb,
int framelen)
{ … }
u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate)
{ … }
static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
struct ath_txq *txq,
struct ath_atx_tid *tid,
struct sk_buff *skb)
{ … }
void ath_assign_seq(struct ath_common *common, struct sk_buff *skb)
{ … }
static int ath_tx_prepare(struct ieee80211_hw *hw, struct sk_buff *skb,
struct ath_tx_control *txctl)
{ … }
int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
struct ath_tx_control *txctl)
{ … }
void ath_tx_cabq(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct sk_buff *skb)
{ … }
static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
int tx_flags, struct ath_txq *txq,
struct ieee80211_sta *sta)
{ … }
static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
struct ath_txq *txq, struct list_head *bf_q,
struct ieee80211_sta *sta,
struct ath_tx_status *ts, int txok)
{ … }
static void ath_clear_tx_status(struct ieee80211_tx_info *tx_info)
{ … }
static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
struct ath_tx_status *ts, int nframes, int nbad,
int txok)
{ … }
static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
{ … }
void ath_tx_tasklet(struct ath_softc *sc)
{ … }
void ath_tx_edma_tasklet(struct ath_softc *sc)
{ … }
static int ath_txstatus_setup(struct ath_softc *sc, int size)
{ … }
static int ath_tx_edma_init(struct ath_softc *sc)
{ … }
int ath_tx_init(struct ath_softc *sc, int nbufs)
{ … }
void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an)
{ … }
void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an)
{ … }
#ifdef CONFIG_ATH9K_TX99
int ath9k_tx99_send(struct ath_softc *sc, struct sk_buff *skb,
struct ath_tx_control *txctl)
{ … }
#endif