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 "csr_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"
27 #define CSR_WIFI_ROUTER_PRIM (0x0400)
29 typedef CsrPrim CsrWifiRouterPrim;
31 typedef void (*CsrWifiRouterFrameFreeFunction)(void *frame);
33 /*******************************************************************************
41 CSR_WIFI_ROUTER_APP_TYPE_SME -
42 CSR_WIFI_ROUTER_APP_TYPE_PAL -
43 CSR_WIFI_ROUTER_APP_TYPE_NME -
44 CSR_WIFI_ROUTER_APP_TYPE_OTHER -
46 *******************************************************************************/
47 typedef u8 CsrWifiRouterAppType;
48 #define CSR_WIFI_ROUTER_APP_TYPE_SME ((CsrWifiRouterAppType) 0x0)
49 #define CSR_WIFI_ROUTER_APP_TYPE_PAL ((CsrWifiRouterAppType) 0x1)
50 #define CSR_WIFI_ROUTER_APP_TYPE_NME ((CsrWifiRouterAppType) 0x2)
51 #define CSR_WIFI_ROUTER_APP_TYPE_OTHER ((CsrWifiRouterAppType) 0x3)
53 /*******************************************************************************
56 CsrWifiRouterEncapsulation
59 Indicates the type of encapsulation used for the subscription
62 CSR_WIFI_ROUTER_ENCAPSULATION_ETHERNET
63 - Ethernet encapsulation
64 CSR_WIFI_ROUTER_ENCAPSULATION_LLC_SNAP
65 - LLC/SNAP encapsulation
67 *******************************************************************************/
68 typedef u8 CsrWifiRouterEncapsulation;
69 #define CSR_WIFI_ROUTER_ENCAPSULATION_ETHERNET ((CsrWifiRouterEncapsulation) 0x00)
70 #define CSR_WIFI_ROUTER_ENCAPSULATION_LLC_SNAP ((CsrWifiRouterEncapsulation) 0x01)
72 /*******************************************************************************
80 CSR_WIFI_ROUTER_OUI_RFC_1042 -
81 CSR_WIFI_ROUTER_OUI_BT -
83 *******************************************************************************/
84 typedef CsrUint32 CsrWifiRouterOui;
85 #define CSR_WIFI_ROUTER_OUI_RFC_1042 ((CsrWifiRouterOui) 0x000000)
86 #define CSR_WIFI_ROUTER_OUI_BT ((CsrWifiRouterOui) 0x001958)
88 /*******************************************************************************
94 As defined in the IEEE 802.11 standards
97 CSR_WIFI_ROUTER_PRIORITY_QOS_UP0
98 - See IEEE 802.11 Standard
99 CSR_WIFI_ROUTER_PRIORITY_QOS_UP1
100 - See IEEE 802.11 Standard
101 CSR_WIFI_ROUTER_PRIORITY_QOS_UP2
102 - See IEEE 802.11 Standard
103 CSR_WIFI_ROUTER_PRIORITY_QOS_UP3
104 - See IEEE 802.11 Standard
105 CSR_WIFI_ROUTER_PRIORITY_QOS_UP4
106 - See IEEE 802.11 Standard
107 CSR_WIFI_ROUTER_PRIORITY_QOS_UP5
108 - See IEEE 802.11 Standard
109 CSR_WIFI_ROUTER_PRIORITY_QOS_UP6
110 - See IEEE 802.11 Standard
111 CSR_WIFI_ROUTER_PRIORITY_QOS_UP7
112 - See IEEE 802.11 Standard
113 CSR_WIFI_ROUTER_PRIORITY_CONTENTION
114 - See IEEE 802.11 Standard
115 CSR_WIFI_ROUTER_PRIORITY_MANAGEMENT
116 - See IEEE 802.11 Standard
118 *******************************************************************************/
119 typedef u16 CsrWifiRouterPriority;
120 #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP0 ((CsrWifiRouterPriority) 0x0000)
121 #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP1 ((CsrWifiRouterPriority) 0x0001)
122 #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP2 ((CsrWifiRouterPriority) 0x0002)
123 #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP3 ((CsrWifiRouterPriority) 0x0003)
124 #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP4 ((CsrWifiRouterPriority) 0x0004)
125 #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP5 ((CsrWifiRouterPriority) 0x0005)
126 #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP6 ((CsrWifiRouterPriority) 0x0006)
127 #define CSR_WIFI_ROUTER_PRIORITY_QOS_UP7 ((CsrWifiRouterPriority) 0x0007)
128 #define CSR_WIFI_ROUTER_PRIORITY_CONTENTION ((CsrWifiRouterPriority) 0x8000)
129 #define CSR_WIFI_ROUTER_PRIORITY_MANAGEMENT ((CsrWifiRouterPriority) 0x8010)
133 #define CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST (0x0000)
135 #define CSR_WIFI_ROUTER_MA_PACKET_SUBSCRIBE_REQ ((CsrWifiRouterPrim) (0x0000 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST))
136 #define CSR_WIFI_ROUTER_MA_PACKET_UNSUBSCRIBE_REQ ((CsrWifiRouterPrim) (0x0001 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST))
137 #define CSR_WIFI_ROUTER_MA_PACKET_REQ ((CsrWifiRouterPrim) (0x0002 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST))
138 #define CSR_WIFI_ROUTER_MA_PACKET_RES ((CsrWifiRouterPrim) (0x0003 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST))
139 #define CSR_WIFI_ROUTER_MA_PACKET_CANCEL_REQ ((CsrWifiRouterPrim) (0x0004 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST))
142 #define CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_HIGHEST (0x0004 + CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST)
145 #define CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST (0x0000 + CSR_PRIM_UPSTREAM)
147 #define CSR_WIFI_ROUTER_MA_PACKET_SUBSCRIBE_CFM ((CsrWifiRouterPrim)(0x0000 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST))
148 #define CSR_WIFI_ROUTER_MA_PACKET_UNSUBSCRIBE_CFM ((CsrWifiRouterPrim)(0x0001 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST))
149 #define CSR_WIFI_ROUTER_MA_PACKET_CFM ((CsrWifiRouterPrim)(0x0002 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST))
150 #define CSR_WIFI_ROUTER_MA_PACKET_IND ((CsrWifiRouterPrim)(0x0003 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST))
152 #define CSR_WIFI_ROUTER_PRIM_UPSTREAM_HIGHEST (0x0003 + CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST)
154 #define CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_COUNT (CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_HIGHEST + 1 - CSR_WIFI_ROUTER_PRIM_DOWNSTREAM_LOWEST)
155 #define CSR_WIFI_ROUTER_PRIM_UPSTREAM_COUNT (CSR_WIFI_ROUTER_PRIM_UPSTREAM_HIGHEST + 1 - CSR_WIFI_ROUTER_PRIM_UPSTREAM_LOWEST)
157 /*******************************************************************************
160 CsrWifiRouterMaPacketSubscribeReq
163 A task can use this primitive to subscribe for a particular OUI/protocol
164 and transmit and receive frames matching the subscription.
165 NOTE: Multiple subscriptions for a given protocol and OUI will result in
166 the first subscription receiving the data and not the subsequent
170 common - Common header for use with the CsrWifiFsm Module
171 interfaceTag - Interface Identifier; unique identifier of an interface
172 encapsulation - Specifies the encapsulation type, which will be used for the
174 protocol - Together with the OUI, specifies the protocol, which a task
175 wants to subscribe to
176 oui - Specifies the OUI for the protocol, which a task wants to
179 *******************************************************************************/
182 CsrWifiFsmEvent common;
184 CsrWifiRouterEncapsulation encapsulation;
187 } CsrWifiRouterMaPacketSubscribeReq;
189 /*******************************************************************************
192 CsrWifiRouterMaPacketUnsubscribeReq
195 A task sends this primitive to unsubscribe a subscription
198 common - Common header for use with the CsrWifiFsm Module
199 interfaceTag - Interface Identifier; unique identifier of an interface
200 subscriptionHandle - The handle of the subscription
202 *******************************************************************************/
205 CsrWifiFsmEvent common;
207 u8 subscriptionHandle;
208 } CsrWifiRouterMaPacketUnsubscribeReq;
210 /*******************************************************************************
213 CsrWifiRouterMaPacketReq
216 A task sends this primitive to transmit a frame.
219 common - Common header for use with the CsrWifiFsm Module
220 interfaceTag - Interface Identifier; unique identifier of an interface
221 subscriptionHandle - The handle of the subscription
222 frameLength - Length of the frame to be sent in bytes
223 frame - Pointer to the frame to be sent
224 freeFunction - Pointer to function to be used to free the frame
225 priority - Priority of the frame, which should be sent
226 hostTag - An application shall set the bits b31..b28 using one of
227 the CSR_WIFI_ROUTER_APP_TYPE_* masks. Bits b0..b27 can
228 be used by the requestor without any restrictions, but
229 the hostTag shall be unique so the hostTag for
230 CSR_WIFI_ROUTER_APP _TYPE_OTHER should be constructured
231 in the following way [ CSR_WIFI_ROUTER_APP_TYPE_OTHER
232 (4 bits) | SubscriptionHandle (8 bits) | Sequence no.
233 (20 bits) ]. If the hostTag is not unique, the
234 behaviour of the system is unpredicatable with respect
235 to data/management frame transfer.
236 cfmRequested - Indicates if the requestor needs a confirm for packet
237 requests sent under this subscription. If set to TRUE,
238 the router will send a confirm, else it will not send
241 *******************************************************************************/
244 CsrWifiFsmEvent common;
246 u8 subscriptionHandle;
249 CsrWifiRouterFrameFreeFunction freeFunction;
250 CsrWifiRouterPriority priority;
252 CsrBool cfmRequested;
253 } CsrWifiRouterMaPacketReq;
255 /*******************************************************************************
258 CsrWifiRouterMaPacketRes
261 A task send this primitive to confirm the reception of the received
265 common - Common header for use with the CsrWifiFsm Module
266 interfaceTag - Interface Identifier; unique identifier of an interface
267 subscriptionHandle - The handle of the subscription
268 result - Status of the operation
270 *******************************************************************************/
273 CsrWifiFsmEvent common;
275 u8 subscriptionHandle;
277 } CsrWifiRouterMaPacketRes;
279 /*******************************************************************************
282 CsrWifiRouterMaPacketCancelReq
285 This primitive is used to request cancellation of a previously send
286 CsrWifiRouterMaPacketReq.
287 The frame may already have been transmitted so there is no guarantees
288 that the CsrWifiRouterMaPacketCancelReq actually cancels the transmission
289 of the frame in question.
290 If the cancellation fails, the Router will send, if required,
291 CsrWifiRouterMaPacketCfm.
292 If the cancellation succeeds, the Router will not send
293 CsrWifiRouterMaPacketCfm.
296 common - Common header for use with the CsrWifiFsm Module
297 interfaceTag - Interface Identifier; unique identifier of an interface
298 hostTag - The hostTag for the frame, which should be cancelled.
299 priority - Priority of the frame, which should be cancelled
300 peerMacAddress - Destination MAC address of the frame, which should be
303 *******************************************************************************/
306 CsrWifiFsmEvent common;
309 CsrWifiRouterPriority priority;
310 CsrWifiMacAddress peerMacAddress;
311 } CsrWifiRouterMaPacketCancelReq;
313 /*******************************************************************************
316 CsrWifiRouterMaPacketSubscribeCfm
319 The router sends this primitive to confirm the result of the
323 common - Common header for use with the CsrWifiFsm Module
324 interfaceTag - Interface Identifier; unique identifier of an interface
325 subscriptionHandle - Handle to the subscription
326 This handle must be used in all subsequent requests
327 status - Status of the operation
328 allocOffset - Size of the offset for the frames of the subscription
330 *******************************************************************************/
333 CsrWifiFsmEvent common;
335 u8 subscriptionHandle;
338 } CsrWifiRouterMaPacketSubscribeCfm;
340 /*******************************************************************************
343 CsrWifiRouterMaPacketUnsubscribeCfm
346 The router sends this primitive to confirm the result of the
350 common - Common header for use with the CsrWifiFsm Module
351 interfaceTag - Interface Identifier; unique identifier of an interface
352 status - Status of the operation
354 *******************************************************************************/
357 CsrWifiFsmEvent common;
360 } CsrWifiRouterMaPacketUnsubscribeCfm;
362 /*******************************************************************************
365 CsrWifiRouterMaPacketCfm
368 The router sends the primitive to confirm the result of the transmission
369 of the packet of the corresponding CSR_WIFI_ROUTER MA_PACKET_REQ request.
372 common - Common header for use with the CsrWifiFsm Module
373 interfaceTag - Interface Identifier; unique identifier of an interface
374 result - Status of the operation
375 hostTag - The hostTrag will match the hostTag sent in the request.
376 rate - Transmission/Reception rate
378 *******************************************************************************/
381 CsrWifiFsmEvent common;
386 } CsrWifiRouterMaPacketCfm;
388 /*******************************************************************************
391 CsrWifiRouterMaPacketInd
394 The router sends the primitive to a subscribed task when it receives a
395 frame matching the subscription.
398 common - Common header for use with the CsrWifiFsm Module
399 interfaceTag - Interface Identifier; unique identifier of an interface
400 subscriptionHandle - The handle of the subscription
401 result - Status of the operation
402 frameLength - Length of the received frame in bytes
403 frame - Pointer to the received frame
404 freeFunction - Pointer to function to be used to free the frame
405 rssi - Received signal strength indication in dBm
406 snr - Signal to Noise Ratio
407 rate - Transmission/Reception rate
409 *******************************************************************************/
412 CsrWifiFsmEvent common;
414 u8 subscriptionHandle;
418 CsrWifiRouterFrameFreeFunction freeFunction;
422 } CsrWifiRouterMaPacketInd;
429 #endif /* CSR_WIFI_ROUTER_PRIM_H__ */