1 /*****************************************************************************
3 (c) Cambridge Silicon Radio Limited 2011
4 All rights reserved and confidential information of CSR
6 Refer to LICENSE.txt included with this source for details
9 *****************************************************************************/
11 /* Note: this is an auto-generated file. */
13 #ifndef CSR_WIFI_ROUTER_PRIM_H__
14 #define CSR_WIFI_ROUTER_PRIM_H__
16 #include <linux/types.h>
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"
23 #define CSR_WIFI_ROUTER_PRIM (0x0400)
25 typedef CsrPrim CsrWifiRouterPrim;
27 typedef void (*CsrWifiRouterFrameFreeFunction)(void *frame);
29 /*******************************************************************************
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 -
42 *******************************************************************************/
43 typedef u8 CsrWifiRouterAppType;
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)
49 /*******************************************************************************
52 CsrWifiRouterEncapsulation
55 Indicates the type of encapsulation used for the subscription
58 CSR_WIFI_ROUTER_ENCAPSULATION_ETHERNET
59 - Ethernet encapsulation
60 CSR_WIFI_ROUTER_ENCAPSULATION_LLC_SNAP
61 - LLC/SNAP encapsulation
63 *******************************************************************************/
64 typedef u8 CsrWifiRouterEncapsulation;
65 #define CSR_WIFI_ROUTER_ENCAPSULATION_ETHERNET ((CsrWifiRouterEncapsulation) 0x00)
66 #define CSR_WIFI_ROUTER_ENCAPSULATION_LLC_SNAP ((CsrWifiRouterEncapsulation) 0x01)
68 /*******************************************************************************
76 CSR_WIFI_ROUTER_OUI_RFC_1042 -
77 CSR_WIFI_ROUTER_OUI_BT -
79 *******************************************************************************/
80 typedef u32 CsrWifiRouterOui;
81 #define CSR_WIFI_ROUTER_OUI_RFC_1042 ((CsrWifiRouterOui) 0x000000)
82 #define CSR_WIFI_ROUTER_OUI_BT ((CsrWifiRouterOui) 0x001958)
84 /*******************************************************************************
90 As defined in the IEEE 802.11 standards
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
114 *******************************************************************************/
115 typedef u16 CsrWifiRouterPriority;
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)
129 #define CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST (0x0000)
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))
138 #define CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_HIGHEST (0x0004 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST)
141 #define CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST (0x0000 + CSR_PRIM_UPSTREAM)
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))
148 #define CSR_WIFI_ROUTER_PRIM_UPSTREAM_HIGHEST (0x0003 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST)
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)
153 /*******************************************************************************
156 CsrWifiRouterMaPacketSubscribeReq
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
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
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
175 *******************************************************************************/
178 CsrWifiFsmEvent common;
180 CsrWifiRouterEncapsulation encapsulation;
183 } CsrWifiRouterMaPacketSubscribeReq;
185 /*******************************************************************************
188 CsrWifiRouterMaPacketUnsubscribeReq
191 A task sends this primitive to unsubscribe a subscription
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
198 *******************************************************************************/
201 CsrWifiFsmEvent common;
203 u8 subscriptionHandle;
204 } CsrWifiRouterMaPacketUnsubscribeReq;
206 /*******************************************************************************
209 CsrWifiRouterMaPacketReq
212 A task sends this primitive to transmit a frame.
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
237 *******************************************************************************/
240 CsrWifiFsmEvent common;
242 u8 subscriptionHandle;
245 CsrWifiRouterFrameFreeFunction freeFunction;
246 CsrWifiRouterPriority priority;
249 } CsrWifiRouterMaPacketReq;
251 /*******************************************************************************
254 CsrWifiRouterMaPacketRes
257 A task send this primitive to confirm the reception of the received
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
266 *******************************************************************************/
269 CsrWifiFsmEvent common;
271 u8 subscriptionHandle;
273 } CsrWifiRouterMaPacketRes;
275 /*******************************************************************************
278 CsrWifiRouterMaPacketCancelReq
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.
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
299 *******************************************************************************/
302 CsrWifiFsmEvent common;
305 CsrWifiRouterPriority priority;
306 CsrWifiMacAddress peerMacAddress;
307 } CsrWifiRouterMaPacketCancelReq;
309 /*******************************************************************************
312 CsrWifiRouterMaPacketSubscribeCfm
315 The router sends this primitive to confirm the result of the
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
326 *******************************************************************************/
329 CsrWifiFsmEvent common;
331 u8 subscriptionHandle;
334 } CsrWifiRouterMaPacketSubscribeCfm;
336 /*******************************************************************************
339 CsrWifiRouterMaPacketUnsubscribeCfm
342 The router sends this primitive to confirm the result of the
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
350 *******************************************************************************/
353 CsrWifiFsmEvent common;
356 } CsrWifiRouterMaPacketUnsubscribeCfm;
358 /*******************************************************************************
361 CsrWifiRouterMaPacketCfm
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.
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
374 *******************************************************************************/
377 CsrWifiFsmEvent common;
382 } CsrWifiRouterMaPacketCfm;
384 /*******************************************************************************
387 CsrWifiRouterMaPacketInd
390 The router sends the primitive to a subscribed task when it receives a
391 frame matching the subscription.
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
405 *******************************************************************************/
408 CsrWifiFsmEvent common;
410 u8 subscriptionHandle;
414 CsrWifiRouterFrameFreeFunction freeFunction;
418 } CsrWifiRouterMaPacketInd;
420 #endif /* CSR_WIFI_ROUTER_PRIM_H__ */