1
2
3
4
5
6
7
8
9#ifndef CW1200_TXRX_H
10#define CW1200_TXRX_H
11
12#include <linux/list.h>
13
14 struct ieee80211_hw;
15 struct sk_buff;
16 struct wsm_tx;
17 struct wsm_rx;
18 struct wsm_tx_confirm;
19 struct cw1200_txpriv;
20
21struct tx_policy {
22 union {
23 __le32 tbl[3];
24 u8 raw[12];
25 };
26 u8 defined;
27 u8 usage_count;
28 u8 retry_count;
29 u8 uploaded;
30};
31
32struct tx_policy_cache_entry {
33 struct tx_policy policy;
34 struct list_head link;
35};
36
37#define TX_POLICY_CACHE_SIZE (8)
38struct tx_policy_cache {
39 struct tx_policy_cache_entry cache[TX_POLICY_CACHE_SIZE];
40 struct list_head used;
41 struct list_head free;
42 spinlock_t lock;
43};
44
45
46
47
48
49
50
51
52void tx_policy_init(struct cw1200_common *priv);
53void tx_policy_upload_work(struct work_struct *work);
54void tx_policy_clean(struct cw1200_common *priv);
55
56
57
58
59u32 cw1200_rate_mask_to_wsm(struct cw1200_common *priv,
60 u32 rates);
61void cw1200_tx(struct ieee80211_hw *dev,
62 struct ieee80211_tx_control *control,
63 struct sk_buff *skb);
64void cw1200_skb_dtor(struct cw1200_common *priv,
65 struct sk_buff *skb,
66 const struct cw1200_txpriv *txpriv);
67
68
69
70
71void cw1200_tx_confirm_cb(struct cw1200_common *priv,
72 int link_id,
73 struct wsm_tx_confirm *arg);
74void cw1200_rx_cb(struct cw1200_common *priv,
75 struct wsm_rx *arg,
76 int link_id,
77 struct sk_buff **skb_p);
78
79
80
81
82void cw1200_tx_timeout(struct work_struct *work);
83
84
85
86int cw1200_alloc_key(struct cw1200_common *priv);
87void cw1200_free_key(struct cw1200_common *priv, int idx);
88void cw1200_free_keys(struct cw1200_common *priv);
89int cw1200_upload_keys(struct cw1200_common *priv);
90
91
92
93void cw1200_link_id_reset(struct work_struct *work);
94
95#define CW1200_LINK_ID_GC_TIMEOUT ((unsigned long)(10 * HZ))
96
97int cw1200_find_link_id(struct cw1200_common *priv, const u8 *mac);
98int cw1200_alloc_link_id(struct cw1200_common *priv, const u8 *mac);
99void cw1200_link_id_work(struct work_struct *work);
100void cw1200_link_id_gc_work(struct work_struct *work);
101
102
103#endif
104