1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17#include <net/mac80211.h>
18
19#include "../ath.h"
20
21#include "hw.h"
22#include "hw-ops.h"
23
24
25
26#define WME_BA_BMP_SIZE 64
27#define WME_MAX_BA WME_BA_BMP_SIZE
28#define ATH_TID_MAX_BUFS (2 * WME_MAX_BA)
29
30#define ATH_RSSI_DUMMY_MARKER 127
31#define ATH_RSSI_LPF_LEN 10
32#define RSSI_LPF_THRESHOLD -20
33#define ATH_RSSI_EP_MULTIPLIER (1<<7)
34#define ATH_EP_MUL(x, mul) ((x) * (mul))
35#define ATH_RSSI_IN(x) (ATH_EP_MUL((x), ATH_RSSI_EP_MULTIPLIER))
36#define ATH_LPF_RSSI(x, y, len) \
37 ((x != ATH_RSSI_DUMMY_MARKER) ? (((x) * ((len) - 1) + (y)) / (len)) : (y))
38#define ATH_RSSI_LPF(x, y) do { \
39 if ((y) >= RSSI_LPF_THRESHOLD) \
40 x = ATH_LPF_RSSI((x), ATH_RSSI_IN((y)), ATH_RSSI_LPF_LEN); \
41} while (0)
42#define ATH_EP_RND(x, mul) \
43 (((x) + ((mul)/2)) / (mul))
44
45int ath9k_cmn_get_hw_crypto_keytype(struct sk_buff *skb);
46void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan,
47 struct cfg80211_chan_def *chandef);
48struct ath9k_channel *ath9k_cmn_get_curchannel(struct ieee80211_hw *hw,
49 struct ath_hw *ah);
50int ath9k_cmn_count_streams(unsigned int chainmask, int max);
51void ath9k_cmn_btcoex_bt_stomp(struct ath_common *common,
52 enum ath_stomp_type stomp_type);
53void ath9k_cmn_update_txpow(struct ath_hw *ah, u16 cur_txpow,
54 u16 new_txpow, u16 *txpower);
55void ath9k_cmn_init_crypto(struct ath_hw *ah);
56