This source file includes following definitions.
- pgt_queue_is_rx
- pgt_queue_is_tx
- pgt_queue_is_data
- pgt_queue_is_mgmt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 #ifndef __PGTVAR_H__
48 #define __PGTVAR_H__
49
50 #define PGT_RX_RADIOTAP_PRESENT \
51 ((1 << IEEE80211_RADIOTAP_FLAGS) | \
52 (1 << IEEE80211_RADIOTAP_CHANNEL) | \
53 (1 << IEEE80211_RADIOTAP_RSSI))
54
55 struct pgt_rx_radiotap_hdr {
56 struct ieee80211_radiotap_header wr_ihdr;
57 uint8_t wr_flags;
58 uint16_t wr_chan_freq;
59 uint16_t wr_chan_flags;
60 uint8_t wr_rssi;
61 uint8_t wr_max_rssi;
62 } __packed;
63
64 #define PGT_TX_RADIOTAP_PRESENT \
65 ((1 << IEEE80211_RADIOTAP_FLAGS) | \
66 (1 << IEEE80211_RADIOTAP_RATE) | \
67 (1 << IEEE80211_RADIOTAP_CHANNEL))
68
69 struct pgt_tx_radiotap_hdr {
70 struct ieee80211_radiotap_header wt_ihdr;
71 uint8_t wt_flags;
72 uint8_t wt_rate;
73 uint16_t wt_chan_freq;
74 uint16_t wt_chan_flags;
75 } __packed;
76
77
78
79
80
81 struct pgt_desc {
82 TAILQ_ENTRY(pgt_desc) pd_link;
83 void *pd_mem;
84 bus_addr_t pd_dmaaddr;
85 bus_dmamap_t pd_dmam;
86 bus_dma_segment_t pd_dmas;
87 struct pgt_frag *pd_fragp;
88 unsigned int pd_fragnum;
89 };
90 TAILQ_HEAD(pgt_descq, pgt_desc);
91
92
93
94
95
96 struct pgt_mgmt_desc {
97 TAILQ_ENTRY(pgt_mgmt_desc) pmd_link;
98 const void *pmd_sendbuf;
99 void *pmd_recvbuf;
100 size_t pmd_len;
101 uint32_t pmd_oid;
102 int pmd_error;
103 };
104 TAILQ_HEAD(pgt_mgmt_descq, pgt_mgmt_desc);
105
106
107
108
109
110
111
112 struct pgt_async_trap {
113 TAILQ_ENTRY(pgt_async_trap) pa_link;
114 struct mbuf *pa_mbuf;
115
116 };
117
118 struct pgt_ieee80211_node {
119 struct ieee80211_node pin_node;
120 enum pin_dot1x_authorization {
121 PIN_DOT1X_UNAUTHORIZED,
122 PIN_DOT1X_AUTHORIZED
123 } pin_dot1x_auth_desired, pin_dot1x_auth;
124 uint16_t pin_mlme_state;
125 };
126
127 struct pgt_softc {
128 struct device sc_dev;
129 struct ieee80211com sc_ic;
130 unsigned int sc_flags;
131 #define SC_NEEDS_FIRMWARE 0x00000001
132 #define SC_UNINITIALIZED 0x00000002
133 #define SC_DYING 0x00000004
134 #define SC_NEEDS_RESET 0x00000008
135 #define SC_INTR_RESET 0x00000020
136 #define SC_POWERSAVE 0x00000040
137 #define SC_NOFREE_ALLNODES 0x00000100
138 #define SC_START_DESIRED 0x00000200
139 #define SC_KTHREAD 0x00000400
140 #define SC_ISL3877 0x00000800
141 struct timeout sc_chanscan_timer;
142
143 int sc_dot1x;
144 int sc_wds;
145
146 int sc_if_flags;
147 int16_t sc_80211_ioc_wep;
148 int16_t sc_80211_ioc_auth;
149 uint32_t sc_noise;
150 unsigned int sc_debug;
151 #define SC_DEBUG_QUEUES 0x00000001
152 #define SC_DEBUG_MGMT 0x00000002
153 #define SC_DEBUG_UNEXPECTED 0x00000004
154 #define SC_DEBUG_TRIGGER 0x00000008
155 #define SC_DEBUG_EVENTS 0x00000010
156 #define SC_DEBUG_POWER 0x00000020
157 #define SC_DEBUG_TRAP 0x00000040
158 #define SC_DEBUG_LINK 0x00000080
159 #define SC_DEBUG_RXANNEX 0x00000100
160 #define SC_DEBUG_RXFRAG 0x00000200
161 #define SC_DEBUG_RXETHER 0x00000400
162 bus_space_tag_t sc_iotag;
163 bus_space_handle_t sc_iohandle;
164 bus_dma_tag_t sc_dmat;
165
166 bus_dmamap_t sc_cbdmam;
167 bus_dma_segment_t sc_cbdmas;
168 struct pgt_control_block *sc_cb;
169
170 bus_dmamap_t sc_psmdmam;
171 bus_dma_segment_t sc_psmdmas;
172 void *sc_psmbuf;
173
174 int (*sc_newstate)
175 (struct ieee80211com *,
176 enum ieee80211_state, int);
177
178 int (*sc_enable)(struct pgt_softc *);
179 void (*sc_disable)(struct pgt_softc *);
180 void (*sc_power)(struct pgt_softc *, int);
181 void *sc_shutdown_hook;
182 void *sc_power_hook;
183
184 struct pgt_mgmt_descq sc_mgmtinprog;
185 struct pgt_descq sc_freeq[PGT_QUEUE_COUNT];
186 size_t sc_freeq_count[PGT_QUEUE_COUNT];
187 struct pgt_descq sc_dirtyq[PGT_QUEUE_COUNT];
188 size_t sc_dirtyq_count[PGT_QUEUE_COUNT];
189 int sc_txtimer;
190 struct pgt_softc_kthread {
191 struct proc *sck_proc;
192 int sck_exit, sck_reset, sck_update;
193 TAILQ_HEAD(, pgt_async_trap) sck_traps;
194 } sc_kthread;
195
196 #if NBPFILTER > 0
197 caddr_t sc_drvbpf;
198
199 union {
200 struct pgt_rx_radiotap_hdr th;
201 uint8_t pad[64];
202 } sc_rxtapu;
203 #define sc_rxtap sc_rxtapu.th
204 int sc_rxtap_len;
205
206 union {
207 struct pgt_tx_radiotap_hdr th;
208 uint8_t pad[64];
209 } sc_txtapu;
210 #define sc_txtap sc_txtapu.th
211 int sc_txtap_len;
212 #endif
213 };
214
215 int pgt_intr(void *);
216 void pgt_attach(void *);
217 int pgt_detach(struct pgt_softc *);
218
219 static __inline int
220 pgt_queue_is_rx(enum pgt_queue pq)
221 {
222 return (pq == PGT_QUEUE_DATA_LOW_RX ||
223 pq == PGT_QUEUE_DATA_HIGH_RX ||
224 pq == PGT_QUEUE_MGMT_RX);
225 }
226
227 static __inline int
228 pgt_queue_is_tx(enum pgt_queue pq)
229 {
230 return (pq == PGT_QUEUE_DATA_LOW_TX ||
231 pq == PGT_QUEUE_DATA_HIGH_TX ||
232 pq == PGT_QUEUE_MGMT_TX);
233 }
234
235 static __inline int
236 pgt_queue_is_data(enum pgt_queue pq)
237 {
238 return (pq == PGT_QUEUE_DATA_LOW_RX ||
239 pq == PGT_QUEUE_DATA_HIGH_RX ||
240 pq == PGT_QUEUE_DATA_LOW_TX ||
241 pq == PGT_QUEUE_DATA_HIGH_TX);
242 }
243
244 static __inline int
245 pgt_queue_is_mgmt(enum pgt_queue pq)
246 {
247 return (pq == PGT_QUEUE_MGMT_RX ||
248 pq == PGT_QUEUE_MGMT_TX);
249 }
250
251 #endif