0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef DYNACK_H
0018 #define DYNACK_H
0019
0020 #define ATH_DYN_BUF 64
0021
0022 struct ath_hw;
0023 struct ath_node;
0024
0025
0026
0027
0028
0029
0030
0031 struct ath_dyn_rxbuf {
0032 u16 h_rb, t_rb;
0033 u32 tstamp[ATH_DYN_BUF];
0034 };
0035
0036 struct ts_info {
0037 u32 tstamp;
0038 u32 dur;
0039 };
0040
0041 struct haddr_pair {
0042 u8 h_dest[ETH_ALEN];
0043 u8 h_src[ETH_ALEN];
0044 };
0045
0046
0047
0048
0049
0050
0051
0052
0053 struct ath_dyn_txbuf {
0054 u16 h_rb, t_rb;
0055 struct haddr_pair addr[ATH_DYN_BUF];
0056 struct ts_info ts[ATH_DYN_BUF];
0057 };
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069 struct ath_dynack {
0070 bool enabled;
0071 int ackto;
0072 unsigned long lto;
0073
0074 struct list_head nodes;
0075
0076
0077 spinlock_t qlock;
0078 struct ath_dyn_rxbuf ack_rbf;
0079 struct ath_dyn_txbuf st_rbf;
0080 };
0081
0082 #if defined(CONFIG_ATH9K_DYNACK)
0083 void ath_dynack_reset(struct ath_hw *ah);
0084 void ath_dynack_node_init(struct ath_hw *ah, struct ath_node *an);
0085 void ath_dynack_node_deinit(struct ath_hw *ah, struct ath_node *an);
0086 void ath_dynack_init(struct ath_hw *ah);
0087 void ath_dynack_sample_ack_ts(struct ath_hw *ah, struct sk_buff *skb, u32 ts);
0088 void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb,
0089 struct ath_tx_status *ts,
0090 struct ieee80211_sta *sta);
0091 #else
0092 static inline void ath_dynack_init(struct ath_hw *ah) {}
0093 static inline void ath_dynack_node_init(struct ath_hw *ah,
0094 struct ath_node *an) {}
0095 static inline void ath_dynack_node_deinit(struct ath_hw *ah,
0096 struct ath_node *an) {}
0097 static inline void ath_dynack_sample_ack_ts(struct ath_hw *ah,
0098 struct sk_buff *skb, u32 ts) {}
0099 static inline void ath_dynack_sample_tx_ts(struct ath_hw *ah,
0100 struct sk_buff *skb,
0101 struct ath_tx_status *ts,
0102 struct ieee80211_sta *sta) {}
0103 #endif
0104
0105 #endif