Commit | Line | Data |
---|---|---|
635d2b00 GKH |
1 | /***************************************************************************** |
2 | ||
3 | (c) Cambridge Silicon Radio Limited 2011 | |
4 | All rights reserved and confidential information of CSR | |
5 | ||
6 | Refer to LICENSE.txt included with this source for details | |
7 | on the license terms. | |
8 | ||
9 | *****************************************************************************/ | |
10 | ||
11 | /* Note: this is an auto-generated file. */ | |
12 | ||
13 | #ifndef CSR_WIFI_ROUTER_PRIM_H__ | |
14 | #define CSR_WIFI_ROUTER_PRIM_H__ | |
15 | ||
980b5a2b | 16 | #include <linux/types.h> |
635d2b00 GKH |
17 | #include "csr_prim_defs.h" |
18 | #include "csr_sched.h" | |
19 | #include "csr_wifi_common.h" | |
20 | #include "csr_result.h" | |
21 | #include "csr_wifi_fsm_event.h" | |
22 | ||
635d2b00 GKH |
23 | #define CSR_WIFI_ROUTER_PRIM (0x0400) |
24 | ||
25 | typedef CsrPrim CsrWifiRouterPrim; | |
26 | ||
27 | typedef void (*CsrWifiRouterFrameFreeFunction)(void *frame); | |
28 | ||
29 | /******************************************************************************* | |
30 | ||
31 | NAME | |
32 | CsrWifiRouterAppType | |
33 | ||
34 | DESCRIPTION | |
35 | ||
36 | VALUES | |
37 | CSR_WIFI_ROUTER_APP_TYPE_SME - | |
38 | CSR_WIFI_ROUTER_APP_TYPE_PAL - | |
39 | CSR_WIFI_ROUTER_APP_TYPE_NME - | |
40 | CSR_WIFI_ROUTER_APP_TYPE_OTHER - | |
41 | ||
42 | *******************************************************************************/ | |
7e6f5794 | 43 | typedef u8 CsrWifiRouterAppType; |
635d2b00 GKH |
44 | #define CSR_WIFI_ROUTER_APP_TYPE_SME ((CsrWifiRouterAppType) 0x0) |
45 | #define CSR_WIFI_ROUTER_APP_TYPE_PAL ((CsrWifiRouterAppType) 0x1) | |
46 | #define CSR_WIFI_ROUTER_APP_TYPE_NME ((CsrWifiRouterAppType) 0x2) | |
47 | #define CSR_WIFI_ROUTER_APP_TYPE_OTHER ((CsrWifiRouterAppType) 0x3) | |
48 | ||
49 | /******************************************************************************* | |
50 | ||
51 | NAME | |
52 | CsrWifiRouterEncapsulation | |
53 | ||
54 | DESCRIPTION | |
55 | Indicates the type of encapsulation used for the subscription | |
56 | ||
57 | VALUES | |
58 | CSR_WIFI_ROUTER_ENCAPSULATION_ETHERNET | |
59 | - Ethernet encapsulation | |
60 | CSR_WIFI_ROUTER_ENCAPSULATION_LLC_SNAP | |
61 | - LLC/SNAP encapsulation | |
62 | ||
63 | *******************************************************************************/ | |
7e6f5794 | 64 | typedef u8 CsrWifiRouterEncapsulation; |
635d2b00 GKH |
65 | #define CSR_WIFI_ROUTER_ENCAPSULATION_ETHERNET ((CsrWifiRouterEncapsulation) 0x00) |
66 | #define CSR_WIFI_ROUTER_ENCAPSULATION_LLC_SNAP ((CsrWifiRouterEncapsulation) 0x01) | |
67 | ||
68 | /******************************************************************************* | |
69 | ||
70 | NAME | |
71 | CsrWifiRouterOui | |
72 | ||
73 | DESCRIPTION | |
74 | ||
75 | VALUES | |
76 | CSR_WIFI_ROUTER_OUI_RFC_1042 - | |
77 | CSR_WIFI_ROUTER_OUI_BT - | |
78 | ||
79 | *******************************************************************************/ | |
26a6b2e1 | 80 | typedef u32 CsrWifiRouterOui; |
635d2b00 GKH |
81 | #define CSR_WIFI_ROUTER_OUI_RFC_1042 ((CsrWifiRouterOui) 0x000000) |
82 | #define CSR_WIFI_ROUTER_OUI_BT ((CsrWifiRouterOui) 0x001958) | |
83 | ||
84 | /******************************************************************************* | |
85 | ||
86 | NAME | |
87 | CsrWifiRouterPriority | |
88 | ||
89 | DESCRIPTION | |
90 | As defined in the IEEE 802.11 standards | |
91 | ||
92 | VALUES | |
93 | CSR_WIFI_ROUTER_PRIORITY_QOS_UP0 | |
94 | - See IEEE 802.11 Standard | |
95 | CSR_WIFI_ROUTER_PRIORITY_QOS_UP1 | |
96 | - See IEEE 802.11 Standard | |
97 | CSR_WIFI_ROUTER_PRIORITY_QOS_UP2 | |
98 | - See IEEE 802.11 Standard | |
99 | CSR_WIFI_ROUTER_PRIORITY_QOS_UP3 | |
100 | - See IEEE 802.11 Standard | |
101 | CSR_WIFI_ROUTER_PRIORITY_QOS_UP4 | |
102 | - See IEEE 802.11 Standard | |
103 | CSR_WIFI_ROUTER_PRIORITY_QOS_UP5 | |
104 | - See IEEE 802.11 Standard | |
105 | CSR_WIFI_ROUTER_PRIORITY_QOS_UP6 | |
106 | - See IEEE 802.11 Standard | |
107 | CSR_WIFI_ROUTER_PRIORITY_QOS_UP7 | |
108 | - See IEEE 802.11 Standard | |
109 | CSR_WIFI_ROUTER_PRIORITY_CONTENTION | |
110 | - See IEEE 802.11 Standard | |
111 | CSR_WIFI_ROUTER_PRIORITY_MANAGEMENT | |
112 | - See IEEE 802.11 Standard | |
113 | ||
114 | *******************************************************************************/ | |
8c87f69a | 115 | typedef u16 CsrWifiRouterPriority; |
635d2b00 GKH |
116 | #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP0 ((CsrWifiRouterPriority) 0x0000) |
117 | #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP1 ((CsrWifiRouterPriority) 0x0001) | |
118 | #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP2 ((CsrWifiRouterPriority) 0x0002) | |
119 | #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP3 ((CsrWifiRouterPriority) 0x0003) | |
120 | #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP4 ((CsrWifiRouterPriority) 0x0004) | |
121 | #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP5 ((CsrWifiRouterPriority) 0x0005) | |
122 | #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP6 ((CsrWifiRouterPriority) 0x0006) | |
123 | #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP7 ((CsrWifiRouterPriority) 0x0007) | |
124 | #define CSR_WIFI_ROUTER_PRIORITY_CONTENTION ((CsrWifiRouterPriority) 0x8000) | |
125 | #define CSR_WIFI_ROUTER_PRIORITY_MANAGEMENT ((CsrWifiRouterPriority) 0x8010) | |
126 | ||
127 | ||
128 | /* Downstream */ | |
129 | #define CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST (0x0000) | |
130 | ||
131 | #define CSR_WIFI_ROUTER_MA_PACKET_SUBSCRIBE_REQ ((CsrWifiRouterPrim) (0x0000 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST)) | |
132 | #define CSR_WIFI_ROUTER_MA_PACKET_UNSUBSCRIBE_REQ ((CsrWifiRouterPrim) (0x0001 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST)) | |
133 | #define CSR_WIFI_ROUTER_MA_PACKET_REQ ((CsrWifiRouterPrim) (0x0002 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST)) | |
134 | #define CSR_WIFI_ROUTER_MA_PACKET_RES ((CsrWifiRouterPrim) (0x0003 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST)) | |
135 | #define CSR_WIFI_ROUTER_MA_PACKET_CANCEL_REQ ((CsrWifiRouterPrim) (0x0004 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST)) | |
136 | ||
137 | ||
138 | #define CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_HIGHEST (0x0004 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST) | |
139 | ||
140 | /* Upstream */ | |
141 | #define CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST (0x0000 + CSR_PRIM_UPSTREAM) | |
142 | ||
143 | #define CSR_WIFI_ROUTER_MA_PACKET_SUBSCRIBE_CFM ((CsrWifiRouterPrim)(0x0000 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST)) | |
144 | #define CSR_WIFI_ROUTER_MA_PACKET_UNSUBSCRIBE_CFM ((CsrWifiRouterPrim)(0x0001 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST)) | |
145 | #define CSR_WIFI_ROUTER_MA_PACKET_CFM ((CsrWifiRouterPrim)(0x0002 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST)) | |
146 | #define CSR_WIFI_ROUTER_MA_PACKET_IND ((CsrWifiRouterPrim)(0x0003 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST)) | |
147 | ||
148 | #define CSR_WIFI_ROUTER_PRIM_UPSTREAM_HIGHEST (0x0003 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST) | |
149 | ||
150 | #define CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_COUNT (CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_HIGHEST + 1 - CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST) | |
151 | #define CSR_WIFI_ROUTER_PRIM_UPSTREAM_COUNT (CSR_WIFI_ROUTER_PRIM_UPSTREAM_HIGHEST + 1 - CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST) | |
152 | ||
153 | /******************************************************************************* | |
154 | ||
155 | NAME | |
156 | CsrWifiRouterMaPacketSubscribeReq | |
157 | ||
158 | DESCRIPTION | |
159 | A task can use this primitive to subscribe for a particular OUI/protocol | |
160 | and transmit and receive frames matching the subscription. | |
161 | NOTE: Multiple subscriptions for a given protocol and OUI will result in | |
162 | the first subscription receiving the data and not the subsequent | |
163 | subscriptions. | |
164 | ||
165 | MEMBERS | |
166 | common - Common header for use with the CsrWifiFsm Module | |
167 | interfaceTag - Interface Identifier; unique identifier of an interface | |
168 | encapsulation - Specifies the encapsulation type, which will be used for the | |
169 | subscription | |
170 | protocol - Together with the OUI, specifies the protocol, which a task | |
171 | wants to subscribe to | |
172 | oui - Specifies the OUI for the protocol, which a task wants to | |
173 | subscribe to | |
174 | ||
175 | *******************************************************************************/ | |
176 | typedef struct | |
177 | { | |
178 | CsrWifiFsmEvent common; | |
8c87f69a | 179 | u16 interfaceTag; |
635d2b00 | 180 | CsrWifiRouterEncapsulation encapsulation; |
8c87f69a | 181 | u16 protocol; |
26a6b2e1 | 182 | u32 oui; |
635d2b00 GKH |
183 | } CsrWifiRouterMaPacketSubscribeReq; |
184 | ||
185 | /******************************************************************************* | |
186 | ||
187 | NAME | |
188 | CsrWifiRouterMaPacketUnsubscribeReq | |
189 | ||
190 | DESCRIPTION | |
191 | A task sends this primitive to unsubscribe a subscription | |
192 | ||
193 | MEMBERS | |
194 | common - Common header for use with the CsrWifiFsm Module | |
195 | interfaceTag - Interface Identifier; unique identifier of an interface | |
196 | subscriptionHandle - The handle of the subscription | |
197 | ||
198 | *******************************************************************************/ | |
199 | typedef struct | |
200 | { | |
201 | CsrWifiFsmEvent common; | |
8c87f69a | 202 | u16 interfaceTag; |
7e6f5794 | 203 | u8 subscriptionHandle; |
635d2b00 GKH |
204 | } CsrWifiRouterMaPacketUnsubscribeReq; |
205 | ||
206 | /******************************************************************************* | |
207 | ||
208 | NAME | |
209 | CsrWifiRouterMaPacketReq | |
210 | ||
211 | DESCRIPTION | |
212 | A task sends this primitive to transmit a frame. | |
213 | ||
214 | MEMBERS | |
215 | common - Common header for use with the CsrWifiFsm Module | |
216 | interfaceTag - Interface Identifier; unique identifier of an interface | |
217 | subscriptionHandle - The handle of the subscription | |
218 | frameLength - Length of the frame to be sent in bytes | |
219 | frame - Pointer to the frame to be sent | |
220 | freeFunction - Pointer to function to be used to free the frame | |
221 | priority - Priority of the frame, which should be sent | |
222 | hostTag - An application shall set the bits b31..b28 using one of | |
223 | the CSR_WIFI_ROUTER_APP_TYPE_* masks. Bits b0..b27 can | |
224 | be used by the requestor without any restrictions, but | |
225 | the hostTag shall be unique so the hostTag for | |
226 | CSR_WIFI_ROUTER_APP _TYPE_OTHER should be constructured | |
227 | in the following way [ CSR_WIFI_ROUTER_APP_TYPE_OTHER | |
228 | (4 bits) | SubscriptionHandle (8 bits) | Sequence no. | |
229 | (20 bits) ]. If the hostTag is not unique, the | |
230 | behaviour of the system is unpredicatable with respect | |
231 | to data/management frame transfer. | |
232 | cfmRequested - Indicates if the requestor needs a confirm for packet | |
233 | requests sent under this subscription. If set to TRUE, | |
234 | the router will send a confirm, else it will not send | |
235 | any confirm | |
236 | ||
237 | *******************************************************************************/ | |
238 | typedef struct | |
239 | { | |
240 | CsrWifiFsmEvent common; | |
8c87f69a | 241 | u16 interfaceTag; |
7e6f5794 | 242 | u8 subscriptionHandle; |
8c87f69a | 243 | u16 frameLength; |
7e6f5794 | 244 | u8 *frame; |
635d2b00 GKH |
245 | CsrWifiRouterFrameFreeFunction freeFunction; |
246 | CsrWifiRouterPriority priority; | |
26a6b2e1 | 247 | u32 hostTag; |
5379b13d | 248 | u8 cfmRequested; |
635d2b00 GKH |
249 | } CsrWifiRouterMaPacketReq; |
250 | ||
251 | /******************************************************************************* | |
252 | ||
253 | NAME | |
254 | CsrWifiRouterMaPacketRes | |
255 | ||
256 | DESCRIPTION | |
257 | A task send this primitive to confirm the reception of the received | |
258 | frame. | |
259 | ||
260 | MEMBERS | |
261 | common - Common header for use with the CsrWifiFsm Module | |
262 | interfaceTag - Interface Identifier; unique identifier of an interface | |
263 | subscriptionHandle - The handle of the subscription | |
264 | result - Status of the operation | |
265 | ||
266 | *******************************************************************************/ | |
267 | typedef struct | |
268 | { | |
269 | CsrWifiFsmEvent common; | |
8c87f69a | 270 | u16 interfaceTag; |
7e6f5794 | 271 | u8 subscriptionHandle; |
635d2b00 GKH |
272 | CsrResult result; |
273 | } CsrWifiRouterMaPacketRes; | |
274 | ||
275 | /******************************************************************************* | |
276 | ||
277 | NAME | |
278 | CsrWifiRouterMaPacketCancelReq | |
279 | ||
280 | DESCRIPTION | |
281 | This primitive is used to request cancellation of a previously send | |
282 | CsrWifiRouterMaPacketReq. | |
283 | The frame may already have been transmitted so there is no guarantees | |
284 | that the CsrWifiRouterMaPacketCancelReq actually cancels the transmission | |
285 | of the frame in question. | |
286 | If the cancellation fails, the Router will send, if required, | |
287 | CsrWifiRouterMaPacketCfm. | |
288 | If the cancellation succeeds, the Router will not send | |
289 | CsrWifiRouterMaPacketCfm. | |
290 | ||
291 | MEMBERS | |
292 | common - Common header for use with the CsrWifiFsm Module | |
293 | interfaceTag - Interface Identifier; unique identifier of an interface | |
294 | hostTag - The hostTag for the frame, which should be cancelled. | |
295 | priority - Priority of the frame, which should be cancelled | |
296 | peerMacAddress - Destination MAC address of the frame, which should be | |
297 | cancelled | |
298 | ||
299 | *******************************************************************************/ | |
300 | typedef struct | |
301 | { | |
302 | CsrWifiFsmEvent common; | |
8c87f69a | 303 | u16 interfaceTag; |
26a6b2e1 | 304 | u32 hostTag; |
635d2b00 GKH |
305 | CsrWifiRouterPriority priority; |
306 | CsrWifiMacAddress peerMacAddress; | |
307 | } CsrWifiRouterMaPacketCancelReq; | |
308 | ||
309 | /******************************************************************************* | |
310 | ||
311 | NAME | |
312 | CsrWifiRouterMaPacketSubscribeCfm | |
313 | ||
314 | DESCRIPTION | |
315 | The router sends this primitive to confirm the result of the | |
316 | subscription. | |
317 | ||
318 | MEMBERS | |
319 | common - Common header for use with the CsrWifiFsm Module | |
320 | interfaceTag - Interface Identifier; unique identifier of an interface | |
321 | subscriptionHandle - Handle to the subscription | |
322 | This handle must be used in all subsequent requests | |
323 | status - Status of the operation | |
324 | allocOffset - Size of the offset for the frames of the subscription | |
325 | ||
326 | *******************************************************************************/ | |
327 | typedef struct | |
328 | { | |
329 | CsrWifiFsmEvent common; | |
8c87f69a | 330 | u16 interfaceTag; |
7e6f5794 | 331 | u8 subscriptionHandle; |
635d2b00 | 332 | CsrResult status; |
8c87f69a | 333 | u16 allocOffset; |
635d2b00 GKH |
334 | } CsrWifiRouterMaPacketSubscribeCfm; |
335 | ||
336 | /******************************************************************************* | |
337 | ||
338 | NAME | |
339 | CsrWifiRouterMaPacketUnsubscribeCfm | |
340 | ||
341 | DESCRIPTION | |
342 | The router sends this primitive to confirm the result of the | |
343 | unsubscription. | |
344 | ||
345 | MEMBERS | |
346 | common - Common header for use with the CsrWifiFsm Module | |
347 | interfaceTag - Interface Identifier; unique identifier of an interface | |
348 | status - Status of the operation | |
349 | ||
350 | *******************************************************************************/ | |
351 | typedef struct | |
352 | { | |
353 | CsrWifiFsmEvent common; | |
8c87f69a | 354 | u16 interfaceTag; |
635d2b00 GKH |
355 | CsrResult status; |
356 | } CsrWifiRouterMaPacketUnsubscribeCfm; | |
357 | ||
358 | /******************************************************************************* | |
359 | ||
360 | NAME | |
361 | CsrWifiRouterMaPacketCfm | |
362 | ||
363 | DESCRIPTION | |
364 | The router sends the primitive to confirm the result of the transmission | |
365 | of the packet of the corresponding CSR_WIFI_ROUTER MA_PACKET_REQ request. | |
366 | ||
367 | MEMBERS | |
368 | common - Common header for use with the CsrWifiFsm Module | |
369 | interfaceTag - Interface Identifier; unique identifier of an interface | |
370 | result - Status of the operation | |
371 | hostTag - The hostTrag will match the hostTag sent in the request. | |
372 | rate - Transmission/Reception rate | |
373 | ||
374 | *******************************************************************************/ | |
375 | typedef struct | |
376 | { | |
377 | CsrWifiFsmEvent common; | |
8c87f69a | 378 | u16 interfaceTag; |
635d2b00 | 379 | CsrResult result; |
26a6b2e1 | 380 | u32 hostTag; |
8c87f69a | 381 | u16 rate; |
635d2b00 GKH |
382 | } CsrWifiRouterMaPacketCfm; |
383 | ||
384 | /******************************************************************************* | |
385 | ||
386 | NAME | |
387 | CsrWifiRouterMaPacketInd | |
388 | ||
389 | DESCRIPTION | |
390 | The router sends the primitive to a subscribed task when it receives a | |
391 | frame matching the subscription. | |
392 | ||
393 | MEMBERS | |
394 | common - Common header for use with the CsrWifiFsm Module | |
395 | interfaceTag - Interface Identifier; unique identifier of an interface | |
396 | subscriptionHandle - The handle of the subscription | |
397 | result - Status of the operation | |
398 | frameLength - Length of the received frame in bytes | |
399 | frame - Pointer to the received frame | |
400 | freeFunction - Pointer to function to be used to free the frame | |
401 | rssi - Received signal strength indication in dBm | |
402 | snr - Signal to Noise Ratio | |
403 | rate - Transmission/Reception rate | |
404 | ||
405 | *******************************************************************************/ | |
406 | typedef struct | |
407 | { | |
408 | CsrWifiFsmEvent common; | |
8c87f69a | 409 | u16 interfaceTag; |
7e6f5794 | 410 | u8 subscriptionHandle; |
635d2b00 | 411 | CsrResult result; |
8c87f69a | 412 | u16 frameLength; |
7e6f5794 | 413 | u8 *frame; |
635d2b00 | 414 | CsrWifiRouterFrameFreeFunction freeFunction; |
ab2b8c73 GKH |
415 | s16 rssi; |
416 | s16 snr; | |
8c87f69a | 417 | u16 rate; |
635d2b00 GKH |
418 | } CsrWifiRouterMaPacketInd; |
419 | ||
635d2b00 GKH |
420 | #endif /* CSR_WIFI_ROUTER_PRIM_H__ */ |
421 |