/* * Copyright (c) 2014, Lorenzo Bianconi <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef DYNACK_H #define DYNACK_H #define ATH_DYN_BUF … struct ath_hw; struct ath_node; /** * struct ath_dyn_rxbuf - ACK frame ring buffer * @h_rb: ring buffer head * @t_rb: ring buffer tail * @tstamp: ACK RX timestamp buffer */ struct ath_dyn_rxbuf { … }; struct ts_info { … }; struct haddr_pair { … }; /** * struct ath_dyn_txbuf - tx frame ring buffer * @h_rb: ring buffer head * @t_rb: ring buffer tail * @addr: dest/src address pair for a given TX frame * @ts: TX frame timestamp buffer */ struct ath_dyn_txbuf { … }; /** * struct ath_dynack - dynack processing info * @enabled: enable dyn ack processing * @ackto: current ACK timeout * @lto: last ACK timeout computation * @nodes: ath_node linked list * @qlock: ts queue spinlock * @ack_rbf: ACK ts ring buffer * @st_rbf: status ts ring buffer */ struct ath_dynack { … }; #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 */