Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
csr_wifi_router_ctrl_serialize.c
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  (c) Cambridge Silicon Radio Limited 2012
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 #include <linux/string.h>
13 #include <linux/slab.h>
14 #include "csr_msgconv.h"
17 
19 {
20  kfree(ptr);
21 }
22 
23 
25 {
26  size_t bufferSize = 2;
27 
28  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 8) */
29  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
30  bufferSize += 2; /* CsrWifiRouterCtrlLowPowerMode primitive->mode */
31  bufferSize += 1; /* u8 primitive->wakeHost */
32  return bufferSize;
33 }
34 
35 
37 {
39  *len = 0;
40  CsrUint16Ser(ptr, len, primitive->common.type);
41  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
42  CsrUint16Ser(ptr, len, (u16) primitive->mode);
43  CsrUint8Ser(ptr, len, (u8) primitive->wakeHost);
44  return(ptr);
45 }
46 
47 
49 {
51  size_t offset;
52  offset = 0;
53 
54  CsrUint16Des(&primitive->common.type, buffer, &offset);
55  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
56  CsrUint16Des((u16 *) &primitive->mode, buffer, &offset);
57  CsrUint8Des((u8 *) &primitive->wakeHost, buffer, &offset);
58 
59  return primitive;
60 }
61 
62 
64 {
66  size_t bufferSize = 2;
67 
68  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 12) */
69  bufferSize += 2; /* u16 primitive->mlmeCommandLength */
70  bufferSize += primitive->mlmeCommandLength; /* u8 primitive->mlmeCommand */
71  bufferSize += 2; /* u16 primitive->dataRef1Length */
72  bufferSize += primitive->dataRef1Length; /* u8 primitive->dataRef1 */
73  bufferSize += 2; /* u16 primitive->dataRef2Length */
74  bufferSize += primitive->dataRef2Length; /* u8 primitive->dataRef2 */
75  return bufferSize;
76 }
77 
78 
79 u8* CsrWifiRouterCtrlHipReqSer(u8 *ptr, size_t *len, void *msg)
80 {
82  *len = 0;
83  CsrUint16Ser(ptr, len, primitive->common.type);
84  CsrUint16Ser(ptr, len, (u16) primitive->mlmeCommandLength);
85  if (primitive->mlmeCommandLength)
86  {
87  CsrMemCpySer(ptr, len, (const void *) primitive->mlmeCommand, ((u16) (primitive->mlmeCommandLength)));
88  }
89  CsrUint16Ser(ptr, len, (u16) primitive->dataRef1Length);
90  if (primitive->dataRef1Length)
91  {
92  CsrMemCpySer(ptr, len, (const void *) primitive->dataRef1, ((u16) (primitive->dataRef1Length)));
93  }
94  CsrUint16Ser(ptr, len, (u16) primitive->dataRef2Length);
95  if (primitive->dataRef2Length)
96  {
97  CsrMemCpySer(ptr, len, (const void *) primitive->dataRef2, ((u16) (primitive->dataRef2Length)));
98  }
99  return(ptr);
100 }
101 
102 
104 {
106  size_t offset;
107  offset = 0;
108 
109  CsrUint16Des(&primitive->common.type, buffer, &offset);
110  CsrUint16Des((u16 *) &primitive->mlmeCommandLength, buffer, &offset);
111  if (primitive->mlmeCommandLength)
112  {
113  primitive->mlmeCommand = kmalloc(primitive->mlmeCommandLength, GFP_KERNEL);
114  CsrMemCpyDes(primitive->mlmeCommand, buffer, &offset, ((u16) (primitive->mlmeCommandLength)));
115  }
116  else
117  {
118  primitive->mlmeCommand = NULL;
119  }
120  CsrUint16Des((u16 *) &primitive->dataRef1Length, buffer, &offset);
121  if (primitive->dataRef1Length)
122  {
123  primitive->dataRef1 = kmalloc(primitive->dataRef1Length, GFP_KERNEL);
124  CsrMemCpyDes(primitive->dataRef1, buffer, &offset, ((u16) (primitive->dataRef1Length)));
125  }
126  else
127  {
128  primitive->dataRef1 = NULL;
129  }
130  CsrUint16Des((u16 *) &primitive->dataRef2Length, buffer, &offset);
131  if (primitive->dataRef2Length)
132  {
133  primitive->dataRef2 = kmalloc(primitive->dataRef2Length, GFP_KERNEL);
134  CsrMemCpyDes(primitive->dataRef2, buffer, &offset, ((u16) (primitive->dataRef2Length)));
135  }
136  else
137  {
138  primitive->dataRef2 = NULL;
139  }
140 
141  return primitive;
142 }
143 
144 
145 void CsrWifiRouterCtrlHipReqSerFree(void *voidPrimitivePointer)
146 {
147  CsrWifiRouterCtrlHipReq *primitive = (CsrWifiRouterCtrlHipReq *) voidPrimitivePointer;
148  kfree(primitive->mlmeCommand);
149  kfree(primitive->dataRef1);
150  kfree(primitive->dataRef2);
151  kfree(primitive);
152 }
153 
154 
156 {
157  size_t bufferSize = 2;
158 
159  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 8) */
160  bufferSize += 2; /* u16 primitive->interfaceTag */
161  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
162  bufferSize += 1; /* CsrWifiRouterCtrlMediaStatus primitive->mediaStatus */
163  return bufferSize;
164 }
165 
166 
168 {
170  *len = 0;
171  CsrUint16Ser(ptr, len, primitive->common.type);
172  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
173  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
174  CsrUint8Ser(ptr, len, (u8) primitive->mediaStatus);
175  return(ptr);
176 }
177 
178 
180 {
182  size_t offset;
183  offset = 0;
184 
185  CsrUint16Des(&primitive->common.type, buffer, &offset);
186  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
187  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
188  CsrUint8Des((u8 *) &primitive->mediaStatus, buffer, &offset);
189 
190  return primitive;
191 }
192 
193 
195 {
197  size_t bufferSize = 2;
198 
199  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 17) */
200  bufferSize += 2; /* u16 primitive->interfaceTag */
201  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
202  bufferSize += 2; /* CsrResult primitive->status */
203  bufferSize += 1; /* CsrWifiRouterCtrlListAction primitive->action */
204  bufferSize += 1; /* u8 primitive->getAddressesCount */
205  {
206  u16 i1;
207  for (i1 = 0; i1 < primitive->getAddressesCount; i1++)
208  {
209  bufferSize += 6; /* u8 primitive->getAddresses[i1].a[6] */
210  }
211  }
212  return bufferSize;
213 }
214 
215 
217 {
219  *len = 0;
220  CsrUint16Ser(ptr, len, primitive->common.type);
221  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
222  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
223  CsrUint16Ser(ptr, len, (u16) primitive->status);
224  CsrUint8Ser(ptr, len, (u8) primitive->action);
225  CsrUint8Ser(ptr, len, (u8) primitive->getAddressesCount);
226  {
227  u16 i1;
228  for (i1 = 0; i1 < primitive->getAddressesCount; i1++)
229  {
230  CsrMemCpySer(ptr, len, (const void *) primitive->getAddresses[i1].a, ((u16) (6)));
231  }
232  }
233  return(ptr);
234 }
235 
236 
238 {
240  size_t offset;
241  offset = 0;
242 
243  CsrUint16Des(&primitive->common.type, buffer, &offset);
244  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
245  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
246  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
247  CsrUint8Des((u8 *) &primitive->action, buffer, &offset);
248  CsrUint8Des((u8 *) &primitive->getAddressesCount, buffer, &offset);
249  primitive->getAddresses = NULL;
250  if (primitive->getAddressesCount)
251  {
252  primitive->getAddresses = kmalloc(sizeof(CsrWifiMacAddress) * primitive->getAddressesCount, GFP_KERNEL);
253  }
254  {
255  u16 i1;
256  for (i1 = 0; i1 < primitive->getAddressesCount; i1++)
257  {
258  CsrMemCpyDes(primitive->getAddresses[i1].a, buffer, &offset, ((u16) (6)));
259  }
260  }
261 
262  return primitive;
263 }
264 
265 
266 void CsrWifiRouterCtrlMulticastAddressResSerFree(void *voidPrimitivePointer)
267 {
269  kfree(primitive->getAddresses);
270  kfree(primitive);
271 }
272 
273 
275 {
276  size_t bufferSize = 2;
277 
278  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 18) */
279  bufferSize += 2; /* u16 primitive->interfaceTag */
280  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
281  bufferSize += 2; /* CsrWifiRouterCtrlPortAction primitive->uncontrolledPortAction */
282  bufferSize += 2; /* CsrWifiRouterCtrlPortAction primitive->controlledPortAction */
283  bufferSize += 6; /* u8 primitive->macAddress.a[6] */
284  bufferSize += 1; /* u8 primitive->setProtection */
285  return bufferSize;
286 }
287 
288 
290 {
292  *len = 0;
293  CsrUint16Ser(ptr, len, primitive->common.type);
294  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
295  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
296  CsrUint16Ser(ptr, len, (u16) primitive->uncontrolledPortAction);
297  CsrUint16Ser(ptr, len, (u16) primitive->controlledPortAction);
298  CsrMemCpySer(ptr, len, (const void *) primitive->macAddress.a, ((u16) (6)));
299  CsrUint8Ser(ptr, len, (u8) primitive->setProtection);
300  return(ptr);
301 }
302 
303 
305 {
307  size_t offset;
308  offset = 0;
309 
310  CsrUint16Des(&primitive->common.type, buffer, &offset);
311  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
312  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
313  CsrUint16Des((u16 *) &primitive->uncontrolledPortAction, buffer, &offset);
314  CsrUint16Des((u16 *) &primitive->controlledPortAction, buffer, &offset);
315  CsrMemCpyDes(primitive->macAddress.a, buffer, &offset, ((u16) (6)));
316  CsrUint8Des((u8 *) &primitive->setProtection, buffer, &offset);
317 
318  return primitive;
319 }
320 
321 
323 {
324  size_t bufferSize = 2;
325 
326  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
327  bufferSize += 2; /* u16 primitive->interfaceTag */
328  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
329  bufferSize += 2; /* CsrWifiRouterCtrlQoSControl primitive->control */
330  bufferSize += 1; /* CsrWifiRouterCtrlQueueConfigMask primitive->queueConfig */
331  return bufferSize;
332 }
333 
334 
336 {
338  *len = 0;
339  CsrUint16Ser(ptr, len, primitive->common.type);
340  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
341  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
342  CsrUint16Ser(ptr, len, (u16) primitive->control);
343  CsrUint8Ser(ptr, len, (u8) primitive->queueConfig);
344  return(ptr);
345 }
346 
347 
349 {
351  size_t offset;
352  offset = 0;
353 
354  CsrUint16Des(&primitive->common.type, buffer, &offset);
355  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
356  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
357  CsrUint16Des((u16 *) &primitive->control, buffer, &offset);
358  CsrUint8Des((u8 *) &primitive->queueConfig, buffer, &offset);
359 
360  return primitive;
361 }
362 
363 
365 {
366  size_t bufferSize = 2;
367 
368  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 7) */
369  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
370  bufferSize += 2; /* CsrResult primitive->status */
371  return bufferSize;
372 }
373 
374 
376 {
378  *len = 0;
379  CsrUint16Ser(ptr, len, primitive->common.type);
380  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
381  CsrUint16Ser(ptr, len, (u16) primitive->status);
382  return(ptr);
383 }
384 
385 
387 {
389  size_t offset;
390  offset = 0;
391 
392  CsrUint16Des(&primitive->common.type, buffer, &offset);
393  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
394  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
395 
396  return primitive;
397 }
398 
399 
401 {
403  size_t bufferSize = 2;
404 
405  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
406  bufferSize += 2; /* u16 primitive->interfaceTag */
407  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
408  bufferSize += 2; /* u16 primitive->tclasLength */
409  bufferSize += primitive->tclasLength; /* u8 primitive->tclas */
410  return bufferSize;
411 }
412 
413 
415 {
417  *len = 0;
418  CsrUint16Ser(ptr, len, primitive->common.type);
419  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
420  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
421  CsrUint16Ser(ptr, len, (u16) primitive->tclasLength);
422  if (primitive->tclasLength)
423  {
424  CsrMemCpySer(ptr, len, (const void *) primitive->tclas, ((u16) (primitive->tclasLength)));
425  }
426  return(ptr);
427 }
428 
429 
431 {
433  size_t offset;
434  offset = 0;
435 
436  CsrUint16Des(&primitive->common.type, buffer, &offset);
437  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
438  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
439  CsrUint16Des((u16 *) &primitive->tclasLength, buffer, &offset);
440  if (primitive->tclasLength)
441  {
442  primitive->tclas = kmalloc(primitive->tclasLength, GFP_KERNEL);
443  CsrMemCpyDes(primitive->tclas, buffer, &offset, ((u16) (primitive->tclasLength)));
444  }
445  else
446  {
447  primitive->tclas = NULL;
448  }
449 
450  return primitive;
451 }
452 
453 
454 void CsrWifiRouterCtrlTclasAddReqSerFree(void *voidPrimitivePointer)
455 {
456  CsrWifiRouterCtrlTclasAddReq *primitive = (CsrWifiRouterCtrlTclasAddReq *) voidPrimitivePointer;
457  kfree(primitive->tclas);
458  kfree(primitive);
459 }
460 
461 
463 {
464  size_t bufferSize = 2;
465 
466  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 7) */
467  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
468  bufferSize += 2; /* CsrResult primitive->status */
469  return bufferSize;
470 }
471 
472 
473 u8* CsrWifiRouterCtrlResumeResSer(u8 *ptr, size_t *len, void *msg)
474 {
476  *len = 0;
477  CsrUint16Ser(ptr, len, primitive->common.type);
478  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
479  CsrUint16Ser(ptr, len, (u16) primitive->status);
480  return(ptr);
481 }
482 
483 
485 {
487  size_t offset;
488  offset = 0;
489 
490  CsrUint16Des(&primitive->common.type, buffer, &offset);
491  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
492  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
493 
494  return primitive;
495 }
496 
497 
499 {
501  size_t bufferSize = 2;
502 
503  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
504  bufferSize += 2; /* u16 primitive->interfaceTag */
505  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
506  bufferSize += 2; /* u16 primitive->tclasLength */
507  bufferSize += primitive->tclasLength; /* u8 primitive->tclas */
508  return bufferSize;
509 }
510 
511 
513 {
515  *len = 0;
516  CsrUint16Ser(ptr, len, primitive->common.type);
517  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
518  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
519  CsrUint16Ser(ptr, len, (u16) primitive->tclasLength);
520  if (primitive->tclasLength)
521  {
522  CsrMemCpySer(ptr, len, (const void *) primitive->tclas, ((u16) (primitive->tclasLength)));
523  }
524  return(ptr);
525 }
526 
527 
529 {
531  size_t offset;
532  offset = 0;
533 
534  CsrUint16Des(&primitive->common.type, buffer, &offset);
535  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
536  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
537  CsrUint16Des((u16 *) &primitive->tclasLength, buffer, &offset);
538  if (primitive->tclasLength)
539  {
540  primitive->tclas = kmalloc(primitive->tclasLength, GFP_KERNEL);
541  CsrMemCpyDes(primitive->tclas, buffer, &offset, ((u16) (primitive->tclasLength)));
542  }
543  else
544  {
545  primitive->tclas = NULL;
546  }
547 
548  return primitive;
549 }
550 
551 
552 void CsrWifiRouterCtrlTclasDelReqSerFree(void *voidPrimitivePointer)
553 {
554  CsrWifiRouterCtrlTclasDelReq *primitive = (CsrWifiRouterCtrlTclasDelReq *) voidPrimitivePointer;
555  kfree(primitive->tclas);
556  kfree(primitive);
557 }
558 
559 
561 {
562  size_t bufferSize = 2;
563 
564  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
565  bufferSize += 2; /* u16 primitive->interfaceTag */
566  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
567  bufferSize += 1; /* CsrWifiRouterCtrlTrafficType primitive->trafficType */
568  bufferSize += 2; /* u16 primitive->period */
569  return bufferSize;
570 }
571 
572 
574 {
576  *len = 0;
577  CsrUint16Ser(ptr, len, primitive->common.type);
578  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
579  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
580  CsrUint8Ser(ptr, len, (u8) primitive->trafficType);
581  CsrUint16Ser(ptr, len, (u16) primitive->period);
582  return(ptr);
583 }
584 
585 
587 {
589  size_t offset;
590  offset = 0;
591 
592  CsrUint16Des(&primitive->common.type, buffer, &offset);
593  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
594  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
595  CsrUint8Des((u8 *) &primitive->trafficType, buffer, &offset);
596  CsrUint16Des((u16 *) &primitive->period, buffer, &offset);
597 
598  return primitive;
599 }
600 
601 
603 {
604  size_t bufferSize = 2;
605 
606  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 24) */
607  bufferSize += 2; /* u16 primitive->interfaceTag */
608  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
609  bufferSize += 2; /* CsrWifiRouterCtrlTrafficConfigType primitive->trafficConfigType */
610  bufferSize += 2; /* u16 primitive->config.packetFilter */
611  bufferSize += 4; /* u32 primitive->config.customFilter.etherType */
612  bufferSize += 1; /* u8 primitive->config.customFilter.ipType */
613  bufferSize += 4; /* u32 primitive->config.customFilter.udpSourcePort */
614  bufferSize += 4; /* u32 primitive->config.customFilter.udpDestPort */
615  return bufferSize;
616 }
617 
618 
620 {
622  *len = 0;
623  CsrUint16Ser(ptr, len, primitive->common.type);
624  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
625  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
626  CsrUint16Ser(ptr, len, (u16) primitive->trafficConfigType);
627  CsrUint16Ser(ptr, len, (u16) primitive->config.packetFilter);
628  CsrUint32Ser(ptr, len, (u32) primitive->config.customFilter.etherType);
629  CsrUint8Ser(ptr, len, (u8) primitive->config.customFilter.ipType);
630  CsrUint32Ser(ptr, len, (u32) primitive->config.customFilter.udpSourcePort);
631  CsrUint32Ser(ptr, len, (u32) primitive->config.customFilter.udpDestPort);
632  return(ptr);
633 }
634 
635 
637 {
639  size_t offset;
640  offset = 0;
641 
642  CsrUint16Des(&primitive->common.type, buffer, &offset);
643  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
644  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
645  CsrUint16Des((u16 *) &primitive->trafficConfigType, buffer, &offset);
646  CsrUint16Des((u16 *) &primitive->config.packetFilter, buffer, &offset);
647  CsrUint32Des((u32 *) &primitive->config.customFilter.etherType, buffer, &offset);
648  CsrUint8Des((u8 *) &primitive->config.customFilter.ipType, buffer, &offset);
649  CsrUint32Des((u32 *) &primitive->config.customFilter.udpSourcePort, buffer, &offset);
650  CsrUint32Des((u32 *) &primitive->config.customFilter.udpDestPort, buffer, &offset);
651 
652  return primitive;
653 }
654 
655 
657 {
659  size_t bufferSize = 2;
660 
661  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
662  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
663  bufferSize += 4; /* u32 primitive->dataLength */
664  bufferSize += primitive->dataLength; /* u8 primitive->data */
665  return bufferSize;
666 }
667 
668 
669 u8* CsrWifiRouterCtrlWifiOnReqSer(u8 *ptr, size_t *len, void *msg)
670 {
672  *len = 0;
673  CsrUint16Ser(ptr, len, primitive->common.type);
674  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
675  CsrUint32Ser(ptr, len, (u32) primitive->dataLength);
676  if (primitive->dataLength)
677  {
678  CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
679  }
680  return(ptr);
681 }
682 
683 
685 {
687  size_t offset;
688  offset = 0;
689 
690  CsrUint16Des(&primitive->common.type, buffer, &offset);
691  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
692  CsrUint32Des((u32 *) &primitive->dataLength, buffer, &offset);
693  if (primitive->dataLength)
694  {
695  primitive->data = kmalloc(primitive->dataLength, GFP_KERNEL);
696  CsrMemCpyDes(primitive->data, buffer, &offset, ((u16) (primitive->dataLength)));
697  }
698  else
699  {
700  primitive->data = NULL;
701  }
702 
703  return primitive;
704 }
705 
706 
707 void CsrWifiRouterCtrlWifiOnReqSerFree(void *voidPrimitivePointer)
708 {
709  CsrWifiRouterCtrlWifiOnReq *primitive = (CsrWifiRouterCtrlWifiOnReq *) voidPrimitivePointer;
710  kfree(primitive->data);
711  kfree(primitive);
712 }
713 
714 
716 {
718  size_t bufferSize = 2;
719 
720  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 30) */
721  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
722  bufferSize += 2; /* CsrResult primitive->status */
723  bufferSize += 2; /* u16 primitive->numInterfaceAddress */
724  {
725  u16 i1;
726  for (i1 = 0; i1 < 2; i1++)
727  {
728  bufferSize += 6; /* u8 primitive->stationMacAddress[i1].a[6] */
729  }
730  }
731  bufferSize += 4; /* u32 primitive->smeVersions.firmwarePatch */
732  bufferSize += (primitive->smeVersions.smeBuild ? strlen(primitive->smeVersions.smeBuild) : 0) + 1; /* char* primitive->smeVersions.smeBuild (0 byte len + 1 for NULL Term) */
733  bufferSize += 4; /* u32 primitive->smeVersions.smeHip */
734  bufferSize += 1; /* u8 primitive->scheduledInterrupt */
735  return bufferSize;
736 }
737 
738 
739 u8* CsrWifiRouterCtrlWifiOnResSer(u8 *ptr, size_t *len, void *msg)
740 {
742  *len = 0;
743  CsrUint16Ser(ptr, len, primitive->common.type);
744  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
745  CsrUint16Ser(ptr, len, (u16) primitive->status);
746  CsrUint16Ser(ptr, len, (u16) primitive->numInterfaceAddress);
747  {
748  u16 i1;
749  for (i1 = 0; i1 < 2; i1++)
750  {
751  CsrMemCpySer(ptr, len, (const void *) primitive->stationMacAddress[i1].a, ((u16) (6)));
752  }
753  }
754  CsrUint32Ser(ptr, len, (u32) primitive->smeVersions.firmwarePatch);
755  CsrCharStringSer(ptr, len, primitive->smeVersions.smeBuild);
756  CsrUint32Ser(ptr, len, (u32) primitive->smeVersions.smeHip);
757  CsrUint8Ser(ptr, len, (u8) primitive->scheduledInterrupt);
758  return(ptr);
759 }
760 
761 
763 {
765  size_t offset;
766  offset = 0;
767 
768  CsrUint16Des(&primitive->common.type, buffer, &offset);
769  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
770  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
771  CsrUint16Des((u16 *) &primitive->numInterfaceAddress, buffer, &offset);
772  {
773  u16 i1;
774  for (i1 = 0; i1 < 2; i1++)
775  {
776  CsrMemCpyDes(primitive->stationMacAddress[i1].a, buffer, &offset, ((u16) (6)));
777  }
778  }
779  CsrUint32Des((u32 *) &primitive->smeVersions.firmwarePatch, buffer, &offset);
780  CsrCharStringDes(&primitive->smeVersions.smeBuild, buffer, &offset);
781  CsrUint32Des((u32 *) &primitive->smeVersions.smeHip, buffer, &offset);
782  CsrUint8Des((u8 *) &primitive->scheduledInterrupt, buffer, &offset);
783 
784  return primitive;
785 }
786 
787 
788 void CsrWifiRouterCtrlWifiOnResSerFree(void *voidPrimitivePointer)
789 {
790  CsrWifiRouterCtrlWifiOnRes *primitive = (CsrWifiRouterCtrlWifiOnRes *) voidPrimitivePointer;
791  kfree(primitive->smeVersions.smeBuild);
792  kfree(primitive);
793 }
794 
795 
797 {
798  size_t bufferSize = 2;
799 
800  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 7) */
801  bufferSize += 2; /* u16 primitive->interfaceTag */
802  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
803  return bufferSize;
804 }
805 
806 
808 {
810  *len = 0;
811  CsrUint16Ser(ptr, len, primitive->common.type);
812  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
813  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
814  return(ptr);
815 }
816 
817 
819 {
821  size_t offset;
822  offset = 0;
823 
824  CsrUint16Des(&primitive->common.type, buffer, &offset);
825  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
826  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
827 
828  return primitive;
829 }
830 
831 
833 {
834  size_t bufferSize = 2;
835 
836  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 16) */
837  bufferSize += 2; /* u16 primitive->interfaceTag */
838  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
839  bufferSize += 1; /* CsrWifiRouterCtrlMode primitive->mode */
840  bufferSize += 6; /* u8 primitive->bssid.a[6] */
841  bufferSize += 1; /* u8 primitive->protection */
842  bufferSize += 1; /* u8 primitive->intraBssDistEnabled */
843  return bufferSize;
844 }
845 
846 
848 {
850  *len = 0;
851  CsrUint16Ser(ptr, len, primitive->common.type);
852  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
853  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
854  CsrUint8Ser(ptr, len, (u8) primitive->mode);
855  CsrMemCpySer(ptr, len, (const void *) primitive->bssid.a, ((u16) (6)));
856  CsrUint8Ser(ptr, len, (u8) primitive->protection);
857  CsrUint8Ser(ptr, len, (u8) primitive->intraBssDistEnabled);
858  return(ptr);
859 }
860 
861 
863 {
865  size_t offset;
866  offset = 0;
867 
868  CsrUint16Des(&primitive->common.type, buffer, &offset);
869  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
870  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
871  CsrUint8Des((u8 *) &primitive->mode, buffer, &offset);
872  CsrMemCpyDes(primitive->bssid.a, buffer, &offset, ((u16) (6)));
873  CsrUint8Des((u8 *) &primitive->protection, buffer, &offset);
874  CsrUint8Des((u8 *) &primitive->intraBssDistEnabled, buffer, &offset);
875 
876  return primitive;
877 }
878 
879 
881 {
882  size_t bufferSize = 2;
883 
884  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 21) */
885  bufferSize += 2; /* u16 primitive->interfaceTag */
886  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
887  bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
888  bufferSize += 2; /* u16 primitive->associationId */
889  bufferSize += 1; /* u8 primitive->staInfo.wmmOrQosEnabled */
890  bufferSize += 2; /* CsrWifiRouterCtrlPowersaveTypeMask primitive->staInfo.powersaveMode */
891  bufferSize += 1; /* u8 primitive->staInfo.maxSpLength */
892  bufferSize += 2; /* u16 primitive->staInfo.listenIntervalInTus */
893  return bufferSize;
894 }
895 
896 
898 {
900  *len = 0;
901  CsrUint16Ser(ptr, len, primitive->common.type);
902  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
903  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
904  CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
905  CsrUint16Ser(ptr, len, (u16) primitive->associationId);
906  CsrUint8Ser(ptr, len, (u8) primitive->staInfo.wmmOrQosEnabled);
907  CsrUint16Ser(ptr, len, (u16) primitive->staInfo.powersaveMode);
908  CsrUint8Ser(ptr, len, (u8) primitive->staInfo.maxSpLength);
909  CsrUint16Ser(ptr, len, (u16) primitive->staInfo.listenIntervalInTus);
910  return(ptr);
911 }
912 
913 
915 {
917  size_t offset;
918  offset = 0;
919 
920  CsrUint16Des(&primitive->common.type, buffer, &offset);
921  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
922  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
923  CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
924  CsrUint16Des((u16 *) &primitive->associationId, buffer, &offset);
925  CsrUint8Des((u8 *) &primitive->staInfo.wmmOrQosEnabled, buffer, &offset);
926  CsrUint16Des((u16 *) &primitive->staInfo.powersaveMode, buffer, &offset);
927  CsrUint8Des((u8 *) &primitive->staInfo.maxSpLength, buffer, &offset);
928  CsrUint16Des((u16 *) &primitive->staInfo.listenIntervalInTus, buffer, &offset);
929 
930  return primitive;
931 }
932 
933 
935 {
936  size_t bufferSize = 2;
937 
938  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 11) */
939  bufferSize += 2; /* u16 primitive->interfaceTag */
940  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
941  bufferSize += 4; /* CsrWifiRouterCtrlPeerRecordHandle primitive->peerRecordHandle */
942  return bufferSize;
943 }
944 
945 
947 {
949  *len = 0;
950  CsrUint16Ser(ptr, len, primitive->common.type);
951  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
952  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
953  CsrUint32Ser(ptr, len, (u32) primitive->peerRecordHandle);
954  return(ptr);
955 }
956 
957 
959 {
961  size_t offset;
962  offset = 0;
963 
964  CsrUint16Des(&primitive->common.type, buffer, &offset);
965  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
966  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
967  CsrUint32Des((u32 *) &primitive->peerRecordHandle, buffer, &offset);
968 
969  return primitive;
970 }
971 
972 
974 {
975  size_t bufferSize = 2;
976 
977  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
978  bufferSize += 2; /* u16 primitive->interfaceTag */
979  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
980  bufferSize += 4; /* CsrWifiRouterCtrlPeerRecordHandle primitive->peerRecordHandle */
981  bufferSize += 2; /* CsrWifiRouterCtrlPowersaveTypeMask primitive->powersaveMode */
982  return bufferSize;
983 }
984 
985 
987 {
989  *len = 0;
990  CsrUint16Ser(ptr, len, primitive->common.type);
991  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
992  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
993  CsrUint32Ser(ptr, len, (u32) primitive->peerRecordHandle);
994  CsrUint16Ser(ptr, len, (u16) primitive->powersaveMode);
995  return(ptr);
996 }
997 
998 
1000 {
1002  size_t offset;
1003  offset = 0;
1004 
1005  CsrUint16Des(&primitive->common.type, buffer, &offset);
1006  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1007  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1008  CsrUint32Des((u32 *) &primitive->peerRecordHandle, buffer, &offset);
1009  CsrUint16Des((u16 *) &primitive->powersaveMode, buffer, &offset);
1010 
1011  return primitive;
1012 }
1013 
1014 
1016 {
1017  size_t bufferSize = 2;
1018 
1019  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 21) */
1020  bufferSize += 2; /* u16 primitive->interfaceTag */
1021  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1022  bufferSize += 6; /* u8 primitive->macAddress.a[6] */
1023  bufferSize += 1; /* CsrWifiRouterCtrlTrafficStreamId primitive->trafficStreamID */
1024  bufferSize += 1; /* CsrWifiRouterCtrlBlockAckRole primitive->role */
1025  bufferSize += 2; /* u16 primitive->bufferSize */
1026  bufferSize += 2; /* u16 primitive->timeout */
1027  bufferSize += 2; /* u16 primitive->ssn */
1028  return bufferSize;
1029 }
1030 
1031 
1033 {
1035  *len = 0;
1036  CsrUint16Ser(ptr, len, primitive->common.type);
1037  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1038  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1039  CsrMemCpySer(ptr, len, (const void *) primitive->macAddress.a, ((u16) (6)));
1040  CsrUint8Ser(ptr, len, (u8) primitive->trafficStreamID);
1041  CsrUint8Ser(ptr, len, (u8) primitive->role);
1042  CsrUint16Ser(ptr, len, (u16) primitive->bufferSize);
1043  CsrUint16Ser(ptr, len, (u16) primitive->timeout);
1044  CsrUint16Ser(ptr, len, (u16) primitive->ssn);
1045  return(ptr);
1046 }
1047 
1048 
1050 {
1052  size_t offset;
1053  offset = 0;
1054 
1055  CsrUint16Des(&primitive->common.type, buffer, &offset);
1056  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1057  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1058  CsrMemCpyDes(primitive->macAddress.a, buffer, &offset, ((u16) (6)));
1059  CsrUint8Des((u8 *) &primitive->trafficStreamID, buffer, &offset);
1060  CsrUint8Des((u8 *) &primitive->role, buffer, &offset);
1061  CsrUint16Des((u16 *) &primitive->bufferSize, buffer, &offset);
1062  CsrUint16Des((u16 *) &primitive->timeout, buffer, &offset);
1063  CsrUint16Des((u16 *) &primitive->ssn, buffer, &offset);
1064 
1065  return primitive;
1066 }
1067 
1068 
1070 {
1071  size_t bufferSize = 2;
1072 
1073  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 15) */
1074  bufferSize += 2; /* u16 primitive->interfaceTag */
1075  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1076  bufferSize += 6; /* u8 primitive->macAddress.a[6] */
1077  bufferSize += 1; /* CsrWifiRouterCtrlTrafficStreamId primitive->trafficStreamID */
1078  bufferSize += 1; /* CsrWifiRouterCtrlBlockAckRole primitive->role */
1079  return bufferSize;
1080 }
1081 
1082 
1084 {
1086  *len = 0;
1087  CsrUint16Ser(ptr, len, primitive->common.type);
1088  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1089  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1090  CsrMemCpySer(ptr, len, (const void *) primitive->macAddress.a, ((u16) (6)));
1091  CsrUint8Ser(ptr, len, (u8) primitive->trafficStreamID);
1092  CsrUint8Ser(ptr, len, (u8) primitive->role);
1093  return(ptr);
1094 }
1095 
1096 
1098 {
1100  size_t offset;
1101  offset = 0;
1102 
1103  CsrUint16Des(&primitive->common.type, buffer, &offset);
1104  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1105  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1106  CsrMemCpyDes(primitive->macAddress.a, buffer, &offset, ((u16) (6)));
1107  CsrUint8Des((u8 *) &primitive->trafficStreamID, buffer, &offset);
1108  CsrUint8Des((u8 *) &primitive->role, buffer, &offset);
1109 
1110  return primitive;
1111 }
1112 
1113 
1115 {
1117  size_t bufferSize = 2;
1118 
1119  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 11) */
1120  bufferSize += 2; /* u16 primitive->interfaceTag */
1121  bufferSize += 2; /* u16 primitive->signalLength */
1122  bufferSize += primitive->signalLength; /* u8 primitive->signal */
1123  bufferSize += 2; /* u16 primitive->dataLength */
1124  bufferSize += primitive->dataLength; /* u8 primitive->data */
1125  return bufferSize;
1126 }
1127 
1128 
1130 {
1132  *len = 0;
1133  CsrUint16Ser(ptr, len, primitive->common.type);
1134  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1135  CsrUint16Ser(ptr, len, (u16) primitive->signalLength);
1136  if (primitive->signalLength)
1137  {
1138  CsrMemCpySer(ptr, len, (const void *) primitive->signal, ((u16) (primitive->signalLength)));
1139  }
1140  CsrUint16Ser(ptr, len, (u16) primitive->dataLength);
1141  if (primitive->dataLength)
1142  {
1143  CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
1144  }
1145  return(ptr);
1146 }
1147 
1148 
1150 {
1152  size_t offset;
1153  offset = 0;
1154 
1155  CsrUint16Des(&primitive->common.type, buffer, &offset);
1156  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1157  CsrUint16Des((u16 *) &primitive->signalLength, buffer, &offset);
1158  if (primitive->signalLength)
1159  {
1160  primitive->signal = kmalloc(primitive->signalLength, GFP_KERNEL);
1161  CsrMemCpyDes(primitive->signal, buffer, &offset, ((u16) (primitive->signalLength)));
1162  }
1163  else
1164  {
1165  primitive->signal = NULL;
1166  }
1167  CsrUint16Des((u16 *) &primitive->dataLength, buffer, &offset);
1168  if (primitive->dataLength)
1169  {
1170  primitive->data = kmalloc(primitive->dataLength, GFP_KERNEL);
1171  CsrMemCpyDes(primitive->data, buffer, &offset, ((u16) (primitive->dataLength)));
1172  }
1173  else
1174  {
1175  primitive->data = NULL;
1176  }
1177 
1178  return primitive;
1179 }
1180 
1181 
1182 void CsrWifiRouterCtrlWapiRxPktReqSerFree(void *voidPrimitivePointer)
1183 {
1184  CsrWifiRouterCtrlWapiRxPktReq *primitive = (CsrWifiRouterCtrlWapiRxPktReq *) voidPrimitivePointer;
1185  kfree(primitive->signal);
1186  kfree(primitive->data);
1187  kfree(primitive);
1188 }
1189 
1190 
1192 {
1194  size_t bufferSize = 2;
1195 
1196  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 8) */
1197  bufferSize += 2; /* u16 primitive->interfaceTag */
1198  bufferSize += 2; /* u16 primitive->dataLength */
1199  bufferSize += primitive->dataLength; /* u8 primitive->data */
1200  return bufferSize;
1201 }
1202 
1203 
1205 {
1207  *len = 0;
1208  CsrUint16Ser(ptr, len, primitive->common.type);
1209  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1210  CsrUint16Ser(ptr, len, (u16) primitive->dataLength);
1211  if (primitive->dataLength)
1212  {
1213  CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
1214  }
1215  return(ptr);
1216 }
1217 
1218 
1220 {
1222  size_t offset;
1223  offset = 0;
1224 
1225  CsrUint16Des(&primitive->common.type, buffer, &offset);
1226  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1227  CsrUint16Des((u16 *) &primitive->dataLength, buffer, &offset);
1228  if (primitive->dataLength)
1229  {
1230  primitive->data = kmalloc(primitive->dataLength, GFP_KERNEL);
1231  CsrMemCpyDes(primitive->data, buffer, &offset, ((u16) (primitive->dataLength)));
1232  }
1233  else
1234  {
1235  primitive->data = NULL;
1236  }
1237 
1238  return primitive;
1239 }
1240 
1241 
1242 void CsrWifiRouterCtrlWapiUnicastTxPktReqSerFree(void *voidPrimitivePointer)
1243 {
1244  CsrWifiRouterCtrlWapiUnicastTxPktReq *primitive = (CsrWifiRouterCtrlWapiUnicastTxPktReq *) voidPrimitivePointer;
1245  kfree(primitive->data);
1246  kfree(primitive);
1247 }
1248 
1249 
1251 {
1252  CsrWifiRouterCtrlHipInd *primitive = (CsrWifiRouterCtrlHipInd *) msg;
1253  size_t bufferSize = 2;
1254 
1255  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 12) */
1256  bufferSize += 2; /* u16 primitive->mlmeCommandLength */
1257  bufferSize += primitive->mlmeCommandLength; /* u8 primitive->mlmeCommand */
1258  bufferSize += 2; /* u16 primitive->dataRef1Length */
1259  bufferSize += primitive->dataRef1Length; /* u8 primitive->dataRef1 */
1260  bufferSize += 2; /* u16 primitive->dataRef2Length */
1261  bufferSize += primitive->dataRef2Length; /* u8 primitive->dataRef2 */
1262  return bufferSize;
1263 }
1264 
1265 
1266 u8* CsrWifiRouterCtrlHipIndSer(u8 *ptr, size_t *len, void *msg)
1267 {
1269  *len = 0;
1270  CsrUint16Ser(ptr, len, primitive->common.type);
1271  CsrUint16Ser(ptr, len, (u16) primitive->mlmeCommandLength);
1272  if (primitive->mlmeCommandLength)
1273  {
1274  CsrMemCpySer(ptr, len, (const void *) primitive->mlmeCommand, ((u16) (primitive->mlmeCommandLength)));
1275  }
1276  CsrUint16Ser(ptr, len, (u16) primitive->dataRef1Length);
1277  if (primitive->dataRef1Length)
1278  {
1279  CsrMemCpySer(ptr, len, (const void *) primitive->dataRef1, ((u16) (primitive->dataRef1Length)));
1280  }
1281  CsrUint16Ser(ptr, len, (u16) primitive->dataRef2Length);
1282  if (primitive->dataRef2Length)
1283  {
1284  CsrMemCpySer(ptr, len, (const void *) primitive->dataRef2, ((u16) (primitive->dataRef2Length)));
1285  }
1286  return(ptr);
1287 }
1288 
1289 
1291 {
1293  size_t offset;
1294  offset = 0;
1295 
1296  CsrUint16Des(&primitive->common.type, buffer, &offset);
1297  CsrUint16Des((u16 *) &primitive->mlmeCommandLength, buffer, &offset);
1298  if (primitive->mlmeCommandLength)
1299  {
1300  primitive->mlmeCommand = kmalloc(primitive->mlmeCommandLength, GFP_KERNEL);
1301  CsrMemCpyDes(primitive->mlmeCommand, buffer, &offset, ((u16) (primitive->mlmeCommandLength)));
1302  }
1303  else
1304  {
1305  primitive->mlmeCommand = NULL;
1306  }
1307  CsrUint16Des((u16 *) &primitive->dataRef1Length, buffer, &offset);
1308  if (primitive->dataRef1Length)
1309  {
1310  primitive->dataRef1 = kmalloc(primitive->dataRef1Length, GFP_KERNEL);
1311  CsrMemCpyDes(primitive->dataRef1, buffer, &offset, ((u16) (primitive->dataRef1Length)));
1312  }
1313  else
1314  {
1315  primitive->dataRef1 = NULL;
1316  }
1317  CsrUint16Des((u16 *) &primitive->dataRef2Length, buffer, &offset);
1318  if (primitive->dataRef2Length)
1319  {
1320  primitive->dataRef2 = kmalloc(primitive->dataRef2Length, GFP_KERNEL);
1321  CsrMemCpyDes(primitive->dataRef2, buffer, &offset, ((u16) (primitive->dataRef2Length)));
1322  }
1323  else
1324  {
1325  primitive->dataRef2 = NULL;
1326  }
1327 
1328  return primitive;
1329 }
1330 
1331 
1332 void CsrWifiRouterCtrlHipIndSerFree(void *voidPrimitivePointer)
1333 {
1334  CsrWifiRouterCtrlHipInd *primitive = (CsrWifiRouterCtrlHipInd *) voidPrimitivePointer;
1335  kfree(primitive->mlmeCommand);
1336  kfree(primitive->dataRef1);
1337  kfree(primitive->dataRef2);
1338  kfree(primitive);
1339 }
1340 
1341 
1343 {
1345  size_t bufferSize = 2;
1346 
1347  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 15) */
1348  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1349  bufferSize += 2; /* u16 primitive->interfaceTag */
1350  bufferSize += 1; /* CsrWifiRouterCtrlListAction primitive->action */
1351  bufferSize += 1; /* u8 primitive->setAddressesCount */
1352  {
1353  u16 i1;
1354  for (i1 = 0; i1 < primitive->setAddressesCount; i1++)
1355  {
1356  bufferSize += 6; /* u8 primitive->setAddresses[i1].a[6] */
1357  }
1358  }
1359  return bufferSize;
1360 }
1361 
1362 
1364 {
1366  *len = 0;
1367  CsrUint16Ser(ptr, len, primitive->common.type);
1368  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1369  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1370  CsrUint8Ser(ptr, len, (u8) primitive->action);
1371  CsrUint8Ser(ptr, len, (u8) primitive->setAddressesCount);
1372  {
1373  u16 i1;
1374  for (i1 = 0; i1 < primitive->setAddressesCount; i1++)
1375  {
1376  CsrMemCpySer(ptr, len, (const void *) primitive->setAddresses[i1].a, ((u16) (6)));
1377  }
1378  }
1379  return(ptr);
1380 }
1381 
1382 
1384 {
1386  size_t offset;
1387  offset = 0;
1388 
1389  CsrUint16Des(&primitive->common.type, buffer, &offset);
1390  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1391  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1392  CsrUint8Des((u8 *) &primitive->action, buffer, &offset);
1393  CsrUint8Des((u8 *) &primitive->setAddressesCount, buffer, &offset);
1394  primitive->setAddresses = NULL;
1395  if (primitive->setAddressesCount)
1396  {
1397  primitive->setAddresses = kmalloc(sizeof(CsrWifiMacAddress) * primitive->setAddressesCount, GFP_KERNEL);
1398  }
1399  {
1400  u16 i1;
1401  for (i1 = 0; i1 < primitive->setAddressesCount; i1++)
1402  {
1403  CsrMemCpyDes(primitive->setAddresses[i1].a, buffer, &offset, ((u16) (6)));
1404  }
1405  }
1406 
1407  return primitive;
1408 }
1409 
1410 
1411 void CsrWifiRouterCtrlMulticastAddressIndSerFree(void *voidPrimitivePointer)
1412 {
1413  CsrWifiRouterCtrlMulticastAddressInd *primitive = (CsrWifiRouterCtrlMulticastAddressInd *) voidPrimitivePointer;
1414  kfree(primitive->setAddresses);
1415  kfree(primitive);
1416 }
1417 
1418 
1420 {
1421  size_t bufferSize = 2;
1422 
1423  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 15) */
1424  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1425  bufferSize += 2; /* u16 primitive->interfaceTag */
1426  bufferSize += 2; /* CsrResult primitive->status */
1427  bufferSize += 6; /* u8 primitive->macAddress.a[6] */
1428  return bufferSize;
1429 }
1430 
1431 
1433 {
1435  *len = 0;
1436  CsrUint16Ser(ptr, len, primitive->common.type);
1437  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1438  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1439  CsrUint16Ser(ptr, len, (u16) primitive->status);
1440  CsrMemCpySer(ptr, len, (const void *) primitive->macAddress.a, ((u16) (6)));
1441  return(ptr);
1442 }
1443 
1444 
1446 {
1448  size_t offset;
1449  offset = 0;
1450 
1451  CsrUint16Des(&primitive->common.type, buffer, &offset);
1452  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1453  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1454  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
1455  CsrMemCpyDes(primitive->macAddress.a, buffer, &offset, ((u16) (6)));
1456 
1457  return primitive;
1458 }
1459 
1460 
1462 {
1463  size_t bufferSize = 2;
1464 
1465  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 7) */
1466  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1467  bufferSize += 1; /* u8 primitive->hardSuspend */
1468  bufferSize += 1; /* u8 primitive->d3Suspend */
1469  return bufferSize;
1470 }
1471 
1472 
1474 {
1476  *len = 0;
1477  CsrUint16Ser(ptr, len, primitive->common.type);
1478  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1479  CsrUint8Ser(ptr, len, (u8) primitive->hardSuspend);
1480  CsrUint8Ser(ptr, len, (u8) primitive->d3Suspend);
1481  return(ptr);
1482 }
1483 
1484 
1486 {
1488  size_t offset;
1489  offset = 0;
1490 
1491  CsrUint16Des(&primitive->common.type, buffer, &offset);
1492  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1493  CsrUint8Des((u8 *) &primitive->hardSuspend, buffer, &offset);
1494  CsrUint8Des((u8 *) &primitive->d3Suspend, buffer, &offset);
1495 
1496  return primitive;
1497 }
1498 
1499 
1501 {
1502  size_t bufferSize = 2;
1503 
1504  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 9) */
1505  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1506  bufferSize += 2; /* u16 primitive->interfaceTag */
1507  bufferSize += 2; /* CsrResult primitive->status */
1508  return bufferSize;
1509 }
1510 
1511 
1513 {
1515  *len = 0;
1516  CsrUint16Ser(ptr, len, primitive->common.type);
1517  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1518  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1519  CsrUint16Ser(ptr, len, (u16) primitive->status);
1520  return(ptr);
1521 }
1522 
1523 
1525 {
1527  size_t offset;
1528  offset = 0;
1529 
1530  CsrUint16Des(&primitive->common.type, buffer, &offset);
1531  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1532  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1533  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
1534 
1535  return primitive;
1536 }
1537 
1538 
1540 {
1541  size_t bufferSize = 2;
1542 
1543  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 7) */
1544  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1545  bufferSize += 2; /* CsrResult primitive->result */
1546  return bufferSize;
1547 }
1548 
1549 
1551 {
1553  *len = 0;
1554  CsrUint16Ser(ptr, len, primitive->common.type);
1555  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1556  CsrUint16Ser(ptr, len, (u16) primitive->result);
1557  return(ptr);
1558 }
1559 
1560 
1562 {
1564  size_t offset;
1565  offset = 0;
1566 
1567  CsrUint16Des(&primitive->common.type, buffer, &offset);
1568  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1569  CsrUint16Des((u16 *) &primitive->result, buffer, &offset);
1570 
1571  return primitive;
1572 }
1573 
1574 
1576 {
1577  size_t bufferSize = 2;
1578 
1579  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 39) */
1580  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1581  bufferSize += 2; /* CsrResult primitive->result */
1582  bufferSize += 4; /* CsrWifiRouterCtrlRawSdioByteRead primitive->byteRead */
1583  bufferSize += 4; /* CsrWifiRouterCtrlRawSdioByteWrite primitive->byteWrite */
1584  bufferSize += 4; /* CsrWifiRouterCtrlRawSdioFirmwareDownload primitive->firmwareDownload */
1585  bufferSize += 4; /* CsrWifiRouterCtrlRawSdioReset primitive->reset */
1586  bufferSize += 4; /* CsrWifiRouterCtrlRawSdioCoreDumpPrepare primitive->coreDumpPrepare */
1587  bufferSize += 4; /* CsrWifiRouterCtrlRawSdioByteBlockRead primitive->byteBlockRead */
1588  bufferSize += 4; /* CsrWifiRouterCtrlRawSdioGpRead16 primitive->gpRead16 */
1589  bufferSize += 4; /* CsrWifiRouterCtrlRawSdioGpWrite16 primitive->gpWrite16 */
1590  return bufferSize;
1591 }
1592 
1593 
1595 {
1597  *len = 0;
1598  CsrUint16Ser(ptr, len, primitive->common.type);
1599  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1600  CsrUint16Ser(ptr, len, (u16) primitive->result);
1601  CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->byteRead */
1602  CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->byteWrite */
1603  CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->firmwareDownload */
1604  CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->reset */
1605  CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->coreDumpPrepare */
1606  CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->byteBlockRead */
1607  CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->gpRead16 */
1608  CsrUint32Ser(ptr, len, 0); /* Special for Function Pointers... primitive->gpWrite16 */
1609  return(ptr);
1610 }
1611 
1612 
1614 {
1616  size_t offset;
1617  offset = 0;
1618 
1619  CsrUint16Des(&primitive->common.type, buffer, &offset);
1620  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1621  CsrUint16Des((u16 *) &primitive->result, buffer, &offset);
1622  primitive->byteRead = NULL; /* Special for Function Pointers... */
1623  offset += 4;
1624  primitive->byteWrite = NULL; /* Special for Function Pointers... */
1625  offset += 4;
1626  primitive->firmwareDownload = NULL; /* Special for Function Pointers... */
1627  offset += 4;
1628  primitive->reset = NULL; /* Special for Function Pointers... */
1629  offset += 4;
1630  primitive->coreDumpPrepare = NULL; /* Special for Function Pointers... */
1631  offset += 4;
1632  primitive->byteBlockRead = NULL; /* Special for Function Pointers... */
1633  offset += 4;
1634  primitive->gpRead16 = NULL; /* Special for Function Pointers... */
1635  offset += 4;
1636  primitive->gpWrite16 = NULL; /* Special for Function Pointers... */
1637  offset += 4;
1638 
1639  return primitive;
1640 }
1641 
1642 
1644 {
1645  size_t bufferSize = 2;
1646 
1647  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 9) */
1648  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1649  bufferSize += 2; /* u16 primitive->interfaceTag */
1650  bufferSize += 2; /* CsrResult primitive->status */
1651  return bufferSize;
1652 }
1653 
1654 
1656 {
1658  *len = 0;
1659  CsrUint16Ser(ptr, len, primitive->common.type);
1660  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1661  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1662  CsrUint16Ser(ptr, len, (u16) primitive->status);
1663  return(ptr);
1664 }
1665 
1666 
1668 {
1670  size_t offset;
1671  offset = 0;
1672 
1673  CsrUint16Des(&primitive->common.type, buffer, &offset);
1674  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1675  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1676  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
1677 
1678  return primitive;
1679 }
1680 
1681 
1683 {
1684  size_t bufferSize = 2;
1685 
1686  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 17) */
1687  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1688  bufferSize += 2; /* u16 primitive->interfaceTag */
1689  bufferSize += 2; /* CsrWifiRouterCtrlTrafficPacketType primitive->packetType */
1690  bufferSize += 2; /* CsrWifiRouterCtrlProtocolDirection primitive->direction */
1691  bufferSize += 6; /* u8 primitive->srcAddress.a[6] */
1692  return bufferSize;
1693 }
1694 
1695 
1697 {
1699  *len = 0;
1700  CsrUint16Ser(ptr, len, primitive->common.type);
1701  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1702  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1703  CsrUint16Ser(ptr, len, (u16) primitive->packetType);
1704  CsrUint16Ser(ptr, len, (u16) primitive->direction);
1705  CsrMemCpySer(ptr, len, (const void *) primitive->srcAddress.a, ((u16) (6)));
1706  return(ptr);
1707 }
1708 
1709 
1711 {
1713  size_t offset;
1714  offset = 0;
1715 
1716  CsrUint16Des(&primitive->common.type, buffer, &offset);
1717  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1718  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1719  CsrUint16Des((u16 *) &primitive->packetType, buffer, &offset);
1720  CsrUint16Des((u16 *) &primitive->direction, buffer, &offset);
1721  CsrMemCpyDes(primitive->srcAddress.a, buffer, &offset, ((u16) (6)));
1722 
1723  return primitive;
1724 }
1725 
1726 
1728 {
1729  size_t bufferSize = 2;
1730 
1731  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 38) */
1732  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1733  bufferSize += 2; /* u16 primitive->interfaceTag */
1734  bufferSize += 4; /* u32 primitive->stats.rxMeanRate */
1735  bufferSize += 4; /* u32 primitive->stats.rxFramesNum */
1736  bufferSize += 4; /* u32 primitive->stats.txFramesNum */
1737  bufferSize += 4; /* u32 primitive->stats.rxBytesCount */
1738  bufferSize += 4; /* u32 primitive->stats.txBytesCount */
1739  bufferSize += 11; /* u8 primitive->stats.intervals[11] */
1740  return bufferSize;
1741 }
1742 
1743 
1745 {
1747  *len = 0;
1748  CsrUint16Ser(ptr, len, primitive->common.type);
1749  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1750  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1751  CsrUint32Ser(ptr, len, (u32) primitive->stats.rxMeanRate);
1752  CsrUint32Ser(ptr, len, (u32) primitive->stats.rxFramesNum);
1753  CsrUint32Ser(ptr, len, (u32) primitive->stats.txFramesNum);
1754  CsrUint32Ser(ptr, len, (u32) primitive->stats.rxBytesCount);
1755  CsrUint32Ser(ptr, len, (u32) primitive->stats.txBytesCount);
1756  CsrMemCpySer(ptr, len, (const void *) primitive->stats.intervals, ((u16) (11)));
1757  return(ptr);
1758 }
1759 
1760 
1762 {
1764  size_t offset;
1765  offset = 0;
1766 
1767  CsrUint16Des(&primitive->common.type, buffer, &offset);
1768  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1769  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1770  CsrUint32Des((u32 *) &primitive->stats.rxMeanRate, buffer, &offset);
1771  CsrUint32Des((u32 *) &primitive->stats.rxFramesNum, buffer, &offset);
1772  CsrUint32Des((u32 *) &primitive->stats.txFramesNum, buffer, &offset);
1773  CsrUint32Des((u32 *) &primitive->stats.rxBytesCount, buffer, &offset);
1774  CsrUint32Des((u32 *) &primitive->stats.txBytesCount, buffer, &offset);
1775  CsrMemCpyDes(primitive->stats.intervals, buffer, &offset, ((u16) (11)));
1776 
1777  return primitive;
1778 }
1779 
1780 
1782 {
1784  size_t bufferSize = 2;
1785 
1786  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 27) */
1787  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1788  bufferSize += 2; /* CsrResult primitive->status */
1789  bufferSize += 4; /* u32 primitive->versions.chipId */
1790  bufferSize += 4; /* u32 primitive->versions.chipVersion */
1791  bufferSize += 4; /* u32 primitive->versions.firmwareBuild */
1792  bufferSize += 4; /* u32 primitive->versions.firmwareHip */
1793  bufferSize += (primitive->versions.routerBuild ? strlen(primitive->versions.routerBuild) : 0) + 1; /* char* primitive->versions.routerBuild (0 byte len + 1 for NULL Term) */
1794  bufferSize += 4; /* u32 primitive->versions.routerHip */
1795  return bufferSize;
1796 }
1797 
1798 
1800 {
1802  *len = 0;
1803  CsrUint16Ser(ptr, len, primitive->common.type);
1804  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1805  CsrUint16Ser(ptr, len, (u16) primitive->status);
1806  CsrUint32Ser(ptr, len, (u32) primitive->versions.chipId);
1807  CsrUint32Ser(ptr, len, (u32) primitive->versions.chipVersion);
1808  CsrUint32Ser(ptr, len, (u32) primitive->versions.firmwareBuild);
1809  CsrUint32Ser(ptr, len, (u32) primitive->versions.firmwareHip);
1810  CsrCharStringSer(ptr, len, primitive->versions.routerBuild);
1811  CsrUint32Ser(ptr, len, (u32) primitive->versions.routerHip);
1812  return(ptr);
1813 }
1814 
1815 
1817 {
1819  size_t offset;
1820  offset = 0;
1821 
1822  CsrUint16Des(&primitive->common.type, buffer, &offset);
1823  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1824  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
1825  CsrUint32Des((u32 *) &primitive->versions.chipId, buffer, &offset);
1826  CsrUint32Des((u32 *) &primitive->versions.chipVersion, buffer, &offset);
1827  CsrUint32Des((u32 *) &primitive->versions.firmwareBuild, buffer, &offset);
1828  CsrUint32Des((u32 *) &primitive->versions.firmwareHip, buffer, &offset);
1829  CsrCharStringDes(&primitive->versions.routerBuild, buffer, &offset);
1830  CsrUint32Des((u32 *) &primitive->versions.routerHip, buffer, &offset);
1831 
1832  return primitive;
1833 }
1834 
1835 
1836 void CsrWifiRouterCtrlWifiOnIndSerFree(void *voidPrimitivePointer)
1837 {
1838  CsrWifiRouterCtrlWifiOnInd *primitive = (CsrWifiRouterCtrlWifiOnInd *) voidPrimitivePointer;
1839  kfree(primitive->versions.routerBuild);
1840  kfree(primitive);
1841 }
1842 
1843 
1845 {
1846  size_t bufferSize = 2;
1847 
1848  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 7) */
1849  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1850  bufferSize += 2; /* CsrResult primitive->status */
1851  return bufferSize;
1852 }
1853 
1854 
1856 {
1858  *len = 0;
1859  CsrUint16Ser(ptr, len, primitive->common.type);
1860  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1861  CsrUint16Ser(ptr, len, (u16) primitive->status);
1862  return(ptr);
1863 }
1864 
1865 
1867 {
1869  size_t offset;
1870  offset = 0;
1871 
1872  CsrUint16Des(&primitive->common.type, buffer, &offset);
1873  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1874  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
1875 
1876  return primitive;
1877 }
1878 
1879 
1881 {
1882  size_t bufferSize = 2;
1883 
1884  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
1885  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1886  bufferSize += 2; /* u16 primitive->interfaceTag */
1887  bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
1888  return bufferSize;
1889 }
1890 
1891 
1893 {
1895  *len = 0;
1896  CsrUint16Ser(ptr, len, primitive->common.type);
1897  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1898  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1899  CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
1900  return(ptr);
1901 }
1902 
1903 
1905 {
1907  size_t offset;
1908  offset = 0;
1909 
1910  CsrUint16Des(&primitive->common.type, buffer, &offset);
1911  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1912  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1913  CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
1914 
1915  return primitive;
1916 }
1917 
1918 
1920 {
1921  size_t bufferSize = 2;
1922 
1923  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 15) */
1924  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1925  bufferSize += 2; /* u16 primitive->interfaceTag */
1926  bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
1927  bufferSize += 2; /* CsrResult primitive->status */
1928  return bufferSize;
1929 }
1930 
1931 
1933 {
1935  *len = 0;
1936  CsrUint16Ser(ptr, len, primitive->common.type);
1937  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1938  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1939  CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
1940  CsrUint16Ser(ptr, len, (u16) primitive->status);
1941  return(ptr);
1942 }
1943 
1944 
1946 {
1948  size_t offset;
1949  offset = 0;
1950 
1951  CsrUint16Des(&primitive->common.type, buffer, &offset);
1952  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1953  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1954  CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
1955  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
1956 
1957  return primitive;
1958 }
1959 
1960 
1962 {
1963  size_t bufferSize = 2;
1964 
1965  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 14) */
1966  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
1967  bufferSize += 2; /* u16 primitive->interfaceTag */
1968  bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
1969  bufferSize += 1; /* u8 primitive->unicastPdu */
1970  return bufferSize;
1971 }
1972 
1973 
1975 {
1977  *len = 0;
1978  CsrUint16Ser(ptr, len, primitive->common.type);
1979  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
1980  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
1981  CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
1982  CsrUint8Ser(ptr, len, (u8) primitive->unicastPdu);
1983  return(ptr);
1984 }
1985 
1986 
1988 {
1990  size_t offset;
1991  offset = 0;
1992 
1993  CsrUint16Des(&primitive->common.type, buffer, &offset);
1994  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
1995  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
1996  CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
1997  CsrUint8Des((u8 *) &primitive->unicastPdu, buffer, &offset);
1998 
1999  return primitive;
2000 }
2001 
2002 
2004 {
2005  size_t bufferSize = 2;
2006 
2007  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 14) */
2008  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2009  bufferSize += 2; /* u16 primitive->interfaceTag */
2010  bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
2011  bufferSize += 1; /* CsrWifiRouterCtrlPeerStatus primitive->peerStatus */
2012  return bufferSize;
2013 }
2014 
2015 
2017 {
2019  *len = 0;
2020  CsrUint16Ser(ptr, len, primitive->common.type);
2021  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2022  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2023  CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
2024  CsrUint8Ser(ptr, len, (u8) primitive->peerStatus);
2025  return(ptr);
2026 }
2027 
2028 
2030 {
2032  size_t offset;
2033  offset = 0;
2034 
2035  CsrUint16Des(&primitive->common.type, buffer, &offset);
2036  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2037  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2038  CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
2039  CsrUint8Des((u8 *) &primitive->peerStatus, buffer, &offset);
2040 
2041  return primitive;
2042 }
2043 
2044 
2046 {
2047  size_t bufferSize = 2;
2048 
2049  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 19) */
2050  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2051  bufferSize += 2; /* u16 primitive->interfaceTag */
2052  bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
2053  bufferSize += 4; /* CsrWifiRouterCtrlPeerRecordHandle primitive->peerRecordHandle */
2054  bufferSize += 2; /* CsrResult primitive->status */
2055  return bufferSize;
2056 }
2057 
2058 
2060 {
2062  *len = 0;
2063  CsrUint16Ser(ptr, len, primitive->common.type);
2064  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2065  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2066  CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
2067  CsrUint32Ser(ptr, len, (u32) primitive->peerRecordHandle);
2068  CsrUint16Ser(ptr, len, (u16) primitive->status);
2069  return(ptr);
2070 }
2071 
2072 
2074 {
2076  size_t offset;
2077  offset = 0;
2078 
2079  CsrUint16Des(&primitive->common.type, buffer, &offset);
2080  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2081  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2082  CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
2083  CsrUint32Des((u32 *) &primitive->peerRecordHandle, buffer, &offset);
2084  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
2085 
2086  return primitive;
2087 }
2088 
2089 
2091 {
2092  size_t bufferSize = 2;
2093 
2094  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 9) */
2095  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2096  bufferSize += 2; /* u16 primitive->interfaceTag */
2097  bufferSize += 2; /* CsrResult primitive->status */
2098  return bufferSize;
2099 }
2100 
2101 
2103 {
2105  *len = 0;
2106  CsrUint16Ser(ptr, len, primitive->common.type);
2107  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2108  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2109  CsrUint16Ser(ptr, len, (u16) primitive->status);
2110  return(ptr);
2111 }
2112 
2113 
2115 {
2117  size_t offset;
2118  offset = 0;
2119 
2120  CsrUint16Des(&primitive->common.type, buffer, &offset);
2121  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2122  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2123  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
2124 
2125  return primitive;
2126 }
2127 
2128 
2130 {
2131  size_t bufferSize = 2;
2132 
2133  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
2134  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2135  bufferSize += 2; /* u16 primitive->interfaceTag */
2136  bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
2137  return bufferSize;
2138 }
2139 
2140 
2142 {
2144  *len = 0;
2145  CsrUint16Ser(ptr, len, primitive->common.type);
2146  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2147  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2148  CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
2149  return(ptr);
2150 }
2151 
2152 
2154 {
2156  size_t offset;
2157  offset = 0;
2158 
2159  CsrUint16Des(&primitive->common.type, buffer, &offset);
2160  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2161  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2162  CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
2163 
2164  return primitive;
2165 }
2166 
2167 
2169 {
2170  size_t bufferSize = 2;
2171 
2172  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 9) */
2173  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2174  bufferSize += 2; /* u16 primitive->interfaceTag */
2175  bufferSize += 2; /* CsrResult primitive->status */
2176  return bufferSize;
2177 }
2178 
2179 
2181 {
2183  *len = 0;
2184  CsrUint16Ser(ptr, len, primitive->common.type);
2185  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2186  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2187  CsrUint16Ser(ptr, len, (u16) primitive->status);
2188  return(ptr);
2189 }
2190 
2191 
2193 {
2195  size_t offset;
2196  offset = 0;
2197 
2198  CsrUint16Des(&primitive->common.type, buffer, &offset);
2199  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2200  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2201  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
2202 
2203  return primitive;
2204 }
2205 
2206 
2208 {
2209  size_t bufferSize = 2;
2210 
2211  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 9) */
2212  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2213  bufferSize += 2; /* u16 primitive->commandQueueSize */
2214  bufferSize += 2; /* u16 primitive->trafficQueueSize */
2215  return bufferSize;
2216 }
2217 
2218 
2220 {
2222  *len = 0;
2223  CsrUint16Ser(ptr, len, primitive->common.type);
2224  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2225  CsrUint16Ser(ptr, len, (u16) primitive->commandQueueSize);
2226  CsrUint16Ser(ptr, len, (u16) primitive->trafficQueueSize);
2227  return(ptr);
2228 }
2229 
2230 
2232 {
2234  size_t offset;
2235  offset = 0;
2236 
2237  CsrUint16Des(&primitive->common.type, buffer, &offset);
2238  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2239  CsrUint16Des((u16 *) &primitive->commandQueueSize, buffer, &offset);
2240  CsrUint16Des((u16 *) &primitive->trafficQueueSize, buffer, &offset);
2241 
2242  return primitive;
2243 }
2244 
2245 
2247 {
2248  size_t bufferSize = 2;
2249 
2250  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 9) */
2251  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2252  bufferSize += 2; /* u16 primitive->interfaceTag */
2253  bufferSize += 2; /* CsrResult primitive->status */
2254  return bufferSize;
2255 }
2256 
2257 
2259 {
2261  *len = 0;
2262  CsrUint16Ser(ptr, len, primitive->common.type);
2263  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2264  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2265  CsrUint16Ser(ptr, len, (u16) primitive->status);
2266  return(ptr);
2267 }
2268 
2269 
2271 {
2273  size_t offset;
2274  offset = 0;
2275 
2276  CsrUint16Des(&primitive->common.type, buffer, &offset);
2277  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2278  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2279  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
2280 
2281  return primitive;
2282 }
2283 
2284 
2286 {
2287  size_t bufferSize = 2;
2288 
2289  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 9) */
2290  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2291  bufferSize += 2; /* u16 primitive->interfaceTag */
2292  bufferSize += 2; /* CsrResult primitive->status */
2293  return bufferSize;
2294 }
2295 
2296 
2298 {
2300  *len = 0;
2301  CsrUint16Ser(ptr, len, primitive->common.type);
2302  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2303  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2304  CsrUint16Ser(ptr, len, (u16) primitive->status);
2305  return(ptr);
2306 }
2307 
2308 
2310 {
2312  size_t offset;
2313  offset = 0;
2314 
2315  CsrUint16Des(&primitive->common.type, buffer, &offset);
2316  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2317  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2318  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
2319 
2320  return primitive;
2321 }
2322 
2323 
2325 {
2326  size_t bufferSize = 2;
2327 
2328  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 16) */
2329  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2330  bufferSize += 2; /* u16 primitive->interfaceTag */
2331  bufferSize += 1; /* CsrWifiRouterCtrlTrafficStreamId primitive->trafficStreamID */
2332  bufferSize += 6; /* u8 primitive->peerMacAddress.a[6] */
2333  bufferSize += 2; /* CsrResult primitive->status */
2334  return bufferSize;
2335 }
2336 
2337 
2339 {
2341  *len = 0;
2342  CsrUint16Ser(ptr, len, primitive->common.type);
2343  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2344  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2345  CsrUint8Ser(ptr, len, (u8) primitive->trafficStreamID);
2346  CsrMemCpySer(ptr, len, (const void *) primitive->peerMacAddress.a, ((u16) (6)));
2347  CsrUint16Ser(ptr, len, (u16) primitive->status);
2348  return(ptr);
2349 }
2350 
2351 
2353 {
2355  size_t offset;
2356  offset = 0;
2357 
2358  CsrUint16Des(&primitive->common.type, buffer, &offset);
2359  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2360  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2361  CsrUint8Des((u8 *) &primitive->trafficStreamID, buffer, &offset);
2362  CsrMemCpyDes(primitive->peerMacAddress.a, buffer, &offset, ((u16) (6)));
2363  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
2364 
2365  return primitive;
2366 }
2367 
2368 
2370 {
2371  size_t bufferSize = 2;
2372 
2373  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
2374  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2375  bufferSize += 2; /* u16 primitive->interfaceTag */
2376  bufferSize += 6; /* u8 primitive->staAddress.a[6] */
2377  return bufferSize;
2378 }
2379 
2380 
2382 {
2384  *len = 0;
2385  CsrUint16Ser(ptr, len, primitive->common.type);
2386  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2387  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2388  CsrMemCpySer(ptr, len, (const void *) primitive->staAddress.a, ((u16) (6)));
2389  return(ptr);
2390 }
2391 
2392 
2394 {
2396  size_t offset;
2397  offset = 0;
2398 
2399  CsrUint16Des(&primitive->common.type, buffer, &offset);
2400  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2401  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2402  CsrMemCpyDes(primitive->staAddress.a, buffer, &offset, ((u16) (6)));
2403 
2404  return primitive;
2405 }
2406 
2407 
2409 {
2411  size_t bufferSize = 2;
2412 
2413  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 13) */
2414  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2415  bufferSize += 2; /* u16 primitive->interfaceTag */
2416  bufferSize += 2; /* u16 primitive->signalLength */
2417  bufferSize += primitive->signalLength; /* u8 primitive->signal */
2418  bufferSize += 2; /* u16 primitive->dataLength */
2419  bufferSize += primitive->dataLength; /* u8 primitive->data */
2420  return bufferSize;
2421 }
2422 
2423 
2425 {
2427  *len = 0;
2428  CsrUint16Ser(ptr, len, primitive->common.type);
2429  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2430  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2431  CsrUint16Ser(ptr, len, (u16) primitive->signalLength);
2432  if (primitive->signalLength)
2433  {
2434  CsrMemCpySer(ptr, len, (const void *) primitive->signal, ((u16) (primitive->signalLength)));
2435  }
2436  CsrUint16Ser(ptr, len, (u16) primitive->dataLength);
2437  if (primitive->dataLength)
2438  {
2439  CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
2440  }
2441  return(ptr);
2442 }
2443 
2444 
2446 {
2448  size_t offset;
2449  offset = 0;
2450 
2451  CsrUint16Des(&primitive->common.type, buffer, &offset);
2452  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2453  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2454  CsrUint16Des((u16 *) &primitive->signalLength, buffer, &offset);
2455  if (primitive->signalLength)
2456  {
2457  primitive->signal = kmalloc(primitive->signalLength, GFP_KERNEL);
2458  CsrMemCpyDes(primitive->signal, buffer, &offset, ((u16) (primitive->signalLength)));
2459  }
2460  else
2461  {
2462  primitive->signal = NULL;
2463  }
2464  CsrUint16Des((u16 *) &primitive->dataLength, buffer, &offset);
2465  if (primitive->dataLength)
2466  {
2467  primitive->data = kmalloc(primitive->dataLength, GFP_KERNEL);
2468  CsrMemCpyDes(primitive->data, buffer, &offset, ((u16) (primitive->dataLength)));
2469  }
2470  else
2471  {
2472  primitive->data = NULL;
2473  }
2474 
2475  return primitive;
2476 }
2477 
2478 
2479 void CsrWifiRouterCtrlWapiRxMicCheckIndSerFree(void *voidPrimitivePointer)
2480 {
2481  CsrWifiRouterCtrlWapiRxMicCheckInd *primitive = (CsrWifiRouterCtrlWapiRxMicCheckInd *) voidPrimitivePointer;
2482  kfree(primitive->signal);
2483  kfree(primitive->data);
2484  kfree(primitive);
2485 }
2486 
2487 
2489 {
2490  size_t bufferSize = 2;
2491 
2492  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
2493  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2494  bufferSize += 2; /* u16 primitive->interfaceTag */
2495  bufferSize += 1; /* CsrWifiRouterCtrlMode primitive->mode */
2496  bufferSize += 2; /* CsrResult primitive->status */
2497  return bufferSize;
2498 }
2499 
2500 
2502 {
2504  *len = 0;
2505  CsrUint16Ser(ptr, len, primitive->common.type);
2506  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2507  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2508  CsrUint8Ser(ptr, len, (u8) primitive->mode);
2509  CsrUint16Ser(ptr, len, (u16) primitive->status);
2510  return(ptr);
2511 }
2512 
2513 
2515 {
2517  size_t offset;
2518  offset = 0;
2519 
2520  CsrUint16Des(&primitive->common.type, buffer, &offset);
2521  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2522  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2523  CsrUint8Des((u8 *) &primitive->mode, buffer, &offset);
2524  CsrUint16Des((u16 *) &primitive->status, buffer, &offset);
2525 
2526  return primitive;
2527 }
2528 
2529 
2531 {
2533  size_t bufferSize = 2;
2534 
2535  /* Calculate the Size of the Serialised Data. Could be more efficient (Try 10) */
2536  bufferSize += 2; /* CsrWifiRouterCtrlRequestorInfo primitive->clientData */
2537  bufferSize += 2; /* u16 primitive->interfaceTag */
2538  bufferSize += 2; /* u16 primitive->dataLength */
2539  bufferSize += primitive->dataLength; /* u8 primitive->data */
2540  return bufferSize;
2541 }
2542 
2543 
2545 {
2547  *len = 0;
2548  CsrUint16Ser(ptr, len, primitive->common.type);
2549  CsrUint16Ser(ptr, len, (u16) primitive->clientData);
2550  CsrUint16Ser(ptr, len, (u16) primitive->interfaceTag);
2551  CsrUint16Ser(ptr, len, (u16) primitive->dataLength);
2552  if (primitive->dataLength)
2553  {
2554  CsrMemCpySer(ptr, len, (const void *) primitive->data, ((u16) (primitive->dataLength)));
2555  }
2556  return(ptr);
2557 }
2558 
2559 
2561 {
2563  size_t offset;
2564  offset = 0;
2565 
2566  CsrUint16Des(&primitive->common.type, buffer, &offset);
2567  CsrUint16Des((u16 *) &primitive->clientData, buffer, &offset);
2568  CsrUint16Des((u16 *) &primitive->interfaceTag, buffer, &offset);
2569  CsrUint16Des((u16 *) &primitive->dataLength, buffer, &offset);
2570  if (primitive->dataLength)
2571  {
2572  primitive->data = kmalloc(primitive->dataLength, GFP_KERNEL);
2573  CsrMemCpyDes(primitive->data, buffer, &offset, ((u16) (primitive->dataLength)));
2574  }
2575  else
2576  {
2577  primitive->data = NULL;
2578  }
2579 
2580  return primitive;
2581 }
2582 
2583 
2584 void CsrWifiRouterCtrlWapiUnicastTxEncryptIndSerFree(void *voidPrimitivePointer)
2585 {
2587  kfree(primitive->data);
2588  kfree(primitive);
2589 }
2590 
2591