#ifndef DYNACK_H
#define DYNACK_H
#define ATH_DYN_BUF 64
struct ath_hw;
struct ath_node;
struct ath_dyn_rxbuf {
u16 h_rb, t_rb;
u32 tstamp[ATH_DYN_BUF];
};
struct ts_info {
u32 tstamp;
u32 dur;
};
struct haddr_pair {
u8 h_dest[ETH_ALEN];
u8 h_src[ETH_ALEN];
};
struct ath_dyn_txbuf {
u16 h_rb, t_rb;
struct haddr_pair addr[ATH_DYN_BUF];
struct ts_info ts[ATH_DYN_BUF];
};
struct ath_dynack {
bool enabled;
int ackto;
unsigned long lto;
struct list_head nodes;
spinlock_t qlock;
struct ath_dyn_rxbuf ack_rbf;
struct ath_dyn_txbuf st_rbf;
};
#if defined(CONFIG_ATH9K_DYNACK)
void ath_dynack_reset(struct ath_hw *ah);
void ath_dynack_node_init(struct ath_hw *ah, struct ath_node *an);
void ath_dynack_node_deinit(struct ath_hw *ah, struct ath_node *an);
void ath_dynack_init(struct ath_hw *ah);
void ath_dynack_sample_ack_ts(struct ath_hw *ah, struct sk_buff *skb, u32 ts);
void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb,
struct ath_tx_status *ts,
struct ieee80211_sta *sta);
#else
static inline void ath_dynack_init(struct ath_hw *ah) {}
static inline void ath_dynack_node_init(struct ath_hw *ah,
struct ath_node *an) {}
static inline void ath_dynack_node_deinit(struct ath_hw *ah,
struct ath_node *an) {}
static inline void ath_dynack_sample_ack_ts(struct ath_hw *ah,
struct sk_buff *skb, u32 ts) {}
static inline void ath_dynack_sample_tx_ts(struct ath_hw *ah,
struct sk_buff *skb,
struct ath_tx_status *ts,
struct ieee80211_sta *sta) {}
#endif
#endif /* DYNACK_H */