Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sme_mgt.c
Go to the documentation of this file.
1 /*
2  * ---------------------------------------------------------------------------
3  * FILE: sme_mgt.c
4  *
5  * PURPOSE:
6  * This file contains the driver specific implementation of
7  * the SME MGT SAP.
8  * It is part of the porting exercise.
9  *
10  * Copyright (C) 2008-2009 by Cambridge Silicon Radio Ltd.
11  *
12  * Refer to LICENSE.txt included with this source code for details on
13  * the license terms.
14  *
15  * ---------------------------------------------------------------------------
16  */
17 
19 #include "unifi_priv.h"
21 /*
22  * This file implements the SME MGT API. It contains the following functions:
23  * CsrWifiSmeWifiFlightmodeCfmSend()
24  * CsrWifiSmeWifiOnCfmSend()
25  * CsrWifiSmeWifiOffCfmSend()
26  * CsrWifiSmeWifiOffIndSend()
27  * CsrWifiSmeScanFullCfmSend()
28  * CsrWifiSmeScanResultsGetCfmSend()
29  * CsrWifiSmeScanResultIndSend()
30  * CsrWifiSmeScanResultsFlushCfmSend()
31  * CsrWifiSmeConnectCfmSend()
32  * CsrWifiSmeMediaStatusIndSend()
33  * CsrWifiSmeDisconnectCfmSend()
34  * CsrWifiSmeKeyCfmSend()
35  * CsrWifiSmeMulticastAddressCfmSend()
36  * CsrWifiSmeSetValueCfmSend()
37  * CsrWifiSmeGetValueCfmSend()
38  * CsrWifiSmeMicFailureIndSend()
39  * CsrWifiSmePmkidCfmSend()
40  * CsrWifiSmePmkidCandidateListIndSend()
41  * CsrWifiSmeMibSetCfmSend()
42  * CsrWifiSmeMibGetCfmSend()
43  * CsrWifiSmeMibGetNextCfmSend()
44  * CsrWifiSmeConnectionQualityIndSend()
45  * CsrWifiSmePacketFilterSetCfmSend()
46  * CsrWifiSmeTspecCfmSend()
47  * CsrWifiSmeTspecIndSend()
48  * CsrWifiSmeBlacklistCfmSend()
49  * CsrWifiSmeEventMaskSetCfmSend()
50  * CsrWifiSmeRoamStartIndSend()
51  * CsrWifiSmeRoamCompleteIndSend()
52  * CsrWifiSmeAssociationStartIndSend()
53  * CsrWifiSmeAssociationCompleteIndSend()
54  * CsrWifiSmeIbssStationIndSend()
55  */
56 
57 
59 {
60 #ifdef CSR_SUPPORT_WEXT
61  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
63 
64  if (priv == NULL) {
65  unifi_error(NULL, "CsrWifiSmeMicFailureIndSend: invalid priv\n");
66  return;
67  }
68 
69  unifi_trace(priv, UDBG1,
70  "CsrWifiSmeMicFailureIndSend: count=%d, KeyType=%d\n",
71  ind->count, ind->keyType);
72 
74 #endif
75 }
76 
77 
79 {
80 #ifdef CSR_SUPPORT_WEXT
81  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
83 
84  if (priv == NULL) {
85  unifi_error(NULL, "CsrWifiSmePmkidCfmSend: Invalid ospriv.\n");
86  return;
87  }
88 
89  /*
90  * WEXT never does a GET operation the PMKIDs, so we don't need
91  * handle data returned in pmkids.
92  */
93 
94  sme_complete_request(priv, cfm->status);
95 #endif
96 }
97 
98 
100 {
101 #ifdef CSR_SUPPORT_WEXT
102  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
104  int i;
105 
106  if (priv->smepriv == NULL) {
107  unifi_error(priv, "CsrWifiSmePmkidCandidateListIndSend: invalid smepriv\n");
108  return;
109  }
110 
111  for (i = 0; i < ind->pmkidCandidatesCount; i++)
112  {
114  }
115 #endif
116 }
117 
119 {
120 }
121 
123 {
124 #ifdef CSR_SUPPORT_WEXT
125  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
127  int bytesRequired = cfm->scanResultsCount * sizeof(CsrWifiSmeScanResult);
128  int i;
129  u8* current_buff;
130  CsrWifiSmeScanResult* scanCopy;
131 
132  if (priv == NULL) {
133  unifi_error(NULL, "CsrWifiSmeScanResultsGetCfmSend: Invalid ospriv.\n");
134  return;
135  }
136 
137  /* Calc the size of the buffer reuired */
138  for (i = 0; i < cfm->scanResultsCount; ++i) {
139  const CsrWifiSmeScanResult *scan_result = &cfm->scanResults[i];
140  bytesRequired += scan_result->informationElementsLength;
141  }
142 
143  /* Take a Copy of the scan Results :-) */
144  scanCopy = kmalloc(bytesRequired, GFP_KERNEL);
145  memcpy(scanCopy, cfm->scanResults, sizeof(CsrWifiSmeScanResult) * cfm->scanResultsCount);
146 
147  /* Take a Copy of the Info Elements AND update the scan result pointers */
148  current_buff = (u8*)&scanCopy[cfm->scanResultsCount];
149  for (i = 0; i < cfm->scanResultsCount; ++i)
150  {
151  CsrWifiSmeScanResult *scan_result = &scanCopy[i];
152  memcpy(current_buff, scan_result->informationElements, scan_result->informationElementsLength);
153  scan_result->informationElements = current_buff;
154  current_buff += scan_result->informationElementsLength;
155  }
156 
157  priv->sme_reply.reply_scan_results_count = cfm->scanResultsCount;
158  priv->sme_reply.reply_scan_results = scanCopy;
159 
160  sme_complete_request(priv, cfm->status);
161 #endif
162 }
163 
164 
166 {
167 #ifdef CSR_SUPPORT_WEXT
168  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
170 
171  if (priv == NULL) {
172  unifi_error(NULL, "CsrWifiSmeScanFullCfmSend: Invalid ospriv.\n");
173  return;
174  }
175 
176  sme_complete_request(priv, cfm->status);
177 #endif
178 }
179 
180 
182 {
183 
184 }
185 
186 
188 {
189 #ifdef CSR_SUPPORT_WEXT
190  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
192 
193  if (priv == NULL) {
194  unifi_error(NULL, "CsrWifiSmeConnectCfmSend: Invalid ospriv.\n");
195  return;
196  }
197 
198  sme_complete_request(priv, cfm->status);
199 #endif
200 }
201 
202 
204 {
205 #ifdef CSR_SUPPORT_WEXT
206  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
208 
209  if (priv == NULL) {
210  unifi_error(NULL, "CsrWifiSmeDisconnectCfmSend: Invalid ospriv.\n");
211  return;
212  }
213 
214  sme_complete_request(priv, cfm->status);
215 #endif
216 }
217 
218 
220 {
221 #ifdef CSR_SUPPORT_WEXT
222  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
224 
225  if (priv == NULL) {
226  unifi_error(NULL, "CsrWifiSmeKeyCfmSend: Invalid ospriv.\n");
227  return;
228  }
229 
230  sme_complete_request(priv, cfm->status);
231 #endif
232 }
233 
234 
236 {
237 #ifdef CSR_SUPPORT_WEXT
238  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
240 
241  if (priv == NULL) {
242  unifi_error(NULL, "CsrWifiSmeMulticastAddressCfmSend: Invalid ospriv.\n");
243  return;
244  }
245 
246  sme_complete_request(priv, cfm->status);
247 #endif
248 }
249 
251 {
252 #ifdef CSR_SUPPORT_WEXT
253  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
255 
256  if (priv == NULL) {
257  unifi_error(NULL, "CsrWifiSmeWifiFlightmodeCfmSend: Invalid ospriv.\n");
258  return;
259  }
260 
261  sme_complete_request(priv, cfm->status);
262 #endif
263 }
264 
266 {
267 #ifdef CSR_SUPPORT_WEXT
268  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
270 
271  if (priv == NULL) {
272  unifi_error(NULL, "CsrWifiSmeWifiOnCfmSend: Invalid ospriv.\n");
273  return;
274  }
275 
276  unifi_trace(priv, UDBG4,
277  "CsrWifiSmeWifiOnCfmSend: wake up status %d\n", cfm->status);
278 #ifdef CSR_SUPPORT_WEXT_AP
279  sme_complete_request(priv, cfm->status);
280 #endif
281 
282 #endif
283 }
284 
286 {
287 #ifdef CSR_SUPPORT_WEXT
288  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
290 
291  if (priv == NULL) {
292  unifi_error(NULL, "CsrWifiSmeWifiOffCfmSend: Invalid ospriv.\n");
293  return;
294  }
295 
296  sme_complete_request(priv, cfm->status);
297 #endif
298 }
299 
300 
302 {
303 #ifdef CSR_SUPPORT_WEXT
304  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
306 
307  if (priv == NULL) {
308  unifi_error(NULL, "CsrWifiRouterCtrlStoppedReqSend: Invalid ospriv.\n");
309  return;
310  }
311 
312  if (priv->smepriv == NULL) {
313  unifi_error(priv, "CsrWifiRouterCtrlStoppedReqSend: invalid smepriv\n");
314  return;
315  }
316 
317  /*
318  * If the status indicates an error, the SME is in a stopped state.
319  * We need to start it again in order to reinitialise UniFi.
320  */
321  switch (ind->reason) {
323  unifi_trace(priv, UDBG1,
324  "CsrWifiRouterCtrlStoppedReqSend: Restarting SME (ind:%d)\n",
325  ind->reason);
326 
327  /* On error, restart the SME */
328  sme_mgt_wifi_on(priv);
329  break;
331 #ifdef CSR_SUPPORT_WEXT_AP
332  sme_complete_request(priv, 0);
333 #endif
334  break;
335  default:
336  break;
337  }
338 
339 #endif
340 }
341 
343 {
344 #ifdef CSR_SUPPORT_WEXT
345  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
347 
348  if (priv == NULL) {
349  unifi_error(NULL, "CsrWifiSmeVersionsGetCfmSend: Invalid ospriv.\n");
350  return;
351  }
352 
353  priv->sme_reply.versions = cfm->versions;
354  sme_complete_request(priv, cfm->status);
355 #endif
356 }
357 
359 {
360  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
362 
363  if (priv == NULL) {
364  unifi_error(NULL, "CsrWifiSmePowerConfigGetCfmSend: Invalid ospriv.\n");
365  return;
366  }
367 
368  priv->sme_reply.powerConfig = cfm->powerConfig;
369  sme_complete_request(priv, cfm->status);
370 }
371 
373 {
374  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
376 
377  if (priv == NULL) {
378  unifi_error(NULL, "CsrWifiSmeHostConfigGetCfmSend: Invalid ospriv.\n");
379  return;
380  }
381 
382  priv->sme_reply.hostConfig = cfm->hostConfig;
383  sme_complete_request(priv, cfm->status);
384 }
385 
387 {
388  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
390 
391  if (priv == NULL) {
392  unifi_error(NULL, "CsrWifiSmeCoexInfoGetCfmSend: Invalid ospriv.\n");
393  return;
394  }
395 
396  priv->sme_reply.coexInfo = cfm->coexInfo;
397  sme_complete_request(priv, cfm->status);
398 }
399 
401 {
402 #ifdef CSR_SUPPORT_WEXT
403  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
405 
406  if (priv == NULL) {
407  unifi_error(NULL, "CsrWifiSmeCoexConfigGetCfmSend: Invalid ospriv.\n");
408  return;
409  }
410 
411  priv->sme_reply.coexConfig = cfm->coexConfig;
412  sme_complete_request(priv, cfm->status);
413 #endif
414 }
415 
417 {
418 #ifdef CSR_SUPPORT_WEXT
419  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
421 
422  if (priv == NULL) {
423  unifi_error(NULL, "CsrWifiSmeMibConfigGetCfmSend: Invalid ospriv.\n");
424  return;
425  }
426 
427  priv->sme_reply.mibConfig = cfm->mibConfig;
428  sme_complete_request(priv, cfm->status);
429 #endif
430 }
431 
433 {
434 #ifdef CSR_SUPPORT_WEXT
435  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
437 
438  if (priv == NULL) {
439  unifi_error(NULL, "CsrWifiSmeConnectionInfoGetCfmSend: Invalid ospriv.\n");
440  return;
441  }
442 
443  priv->sme_reply.connectionInfo = cfm->connectionInfo;
444  sme_complete_request(priv, cfm->status);
445 #endif
446 }
447 
449 {
450 #ifdef CSR_SUPPORT_WEXT
451  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
453 
454  if (priv == NULL) {
455  unifi_error(NULL, "CsrWifiSmeConnectionConfigGetCfmSend: Invalid ospriv.\n");
456  return;
457  }
458 
459  priv->sme_reply.connectionConfig = cfm->connectionConfig;
460  sme_complete_request(priv, cfm->status);
461 #endif
462 }
463 
465 {
466 #ifdef CSR_SUPPORT_WEXT
467  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
469 
470  if (priv == NULL) {
471  unifi_error(NULL, "CsrWifiSmeConnectionStatsGetCfmSend: Invalid ospriv.\n");
472  return;
473  }
474 
475  priv->sme_reply.connectionStats = cfm->connectionStats;
476  sme_complete_request(priv, cfm->status);
477 #endif
478 }
479 
481 {
482 #ifdef CSR_SUPPORT_WEXT
483  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
485 
486  if (priv == NULL) {
487  unifi_error(NULL, "CsrWifiSmeMibSetCfmSend: Invalid ospriv.\n");
488  return;
489  }
490 
491  sme_complete_request(priv, cfm->status);
492 #endif
493 }
494 
496 {
497 #ifdef CSR_SUPPORT_WEXT
498  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
500 
501  if (priv == NULL) {
502  unifi_error(NULL, "CsrWifiSmeMibGetCfmSend: Invalid ospriv.\n");
503  return;
504  }
505 
506  if (cfm->mibAttribute == NULL) {
507  unifi_error(priv, "CsrWifiSmeMibGetCfmSend: Empty reply.\n");
508  sme_complete_request(priv, cfm->status);
509  return;
510  }
511 
512  if ((priv->mib_cfm_buffer != NULL) &&
513  (priv->mib_cfm_buffer_length >= cfm->mibAttributeLength)) {
516  } else {
517  unifi_error(priv,
518  "CsrWifiSmeMibGetCfmSend: No room to store MIB data (have=%d need=%d).\n",
520  }
521 
522  sme_complete_request(priv, cfm->status);
523 #endif
524 }
525 
527 {
528 #ifdef CSR_SUPPORT_WEXT
529  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
531 
532  if (priv == NULL) {
533  unifi_error(NULL, "CsrWifiSmeMibGetNextCfmSend: Invalid ospriv.\n");
534  return;
535  }
536 
537  /* Need to copy MIB data */
538  sme_complete_request(priv, cfm->status);
539 #endif
540 }
541 
543 {
544 #ifdef CSR_SUPPORT_WEXT
545  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
547  int signal, noise, snr;
548 
549  if (priv == NULL) {
550  unifi_error(NULL, "CsrWifiSmeConnectionQualityIndSend: Invalid ospriv.\n");
551  return;
552  }
553 
554  /*
555  * level and noise below are mapped into an unsigned 8 bit number,
556  * ranging from [-192; 63]. The way this is achieved is simply to
557  * add 0x100 onto the number if it is negative,
558  * once clipped to the correct range.
559  */
560  signal = ind->linkQuality.unifiRssi;
561  /* Clip range of snr */
562  snr = (ind->linkQuality.unifiSnr > 0) ? ind->linkQuality.unifiSnr : 0; /* In dB relative, from 0 - 255 */
563  snr = (snr < 255) ? snr : 255;
564  noise = signal - snr;
565 
566  /* Clip range of signal */
567  signal = (signal < 63) ? signal : 63;
568  signal = (signal > -192) ? signal : -192;
569 
570  /* Clip range of noise */
571  noise = (noise < 63) ? noise : 63;
572  noise = (noise > -192) ? noise : -192;
573 
574  /* Make u8 */
575  signal = ( signal < 0 ) ? signal + 0x100 : signal;
576  noise = ( noise < 0 ) ? noise + 0x100 : noise;
577 
578  priv->wext_wireless_stats.qual.level = (u8)signal; /* -192 : 63 */
579  priv->wext_wireless_stats.qual.noise = (u8)noise; /* -192 : 63 */
580  priv->wext_wireless_stats.qual.qual = snr; /* 0 : 255 */
581  priv->wext_wireless_stats.qual.updated = 0;
582 
583 #if WIRELESS_EXT > 16
584  priv->wext_wireless_stats.qual.updated |= IW_QUAL_LEVEL_UPDATED |
587 #if WIRELESS_EXT > 18
588  priv->wext_wireless_stats.qual.updated |= IW_QUAL_DBM;
589 #endif
590 #endif
591 #endif
592 }
593 
595 {
596  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
597 
598  if (priv == NULL) {
599  unifi_error(NULL, "CsrWifiSmePacketFilterSetCfmSend: Invalid ospriv.\n");
600  return;
601  }
602 
603  /* The packet filter set request does not block for a reply */
604 }
605 
607 {
608  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
610 
611  if (priv == NULL) {
612  unifi_error(NULL, "CsrWifiSmeTspecCfmSend: Invalid ospriv.\n");
613  return;
614  }
615 
616  sme_complete_request(priv, cfm->status);
617 }
618 
620 {
621 }
622 
624 {
625 }
626 
628 {
629 }
630 
631 
633 {
634 }
635 
637 {
638  /* This is called when the association completes, before any 802.1x authentication */
639 }
640 
642 {
643 }
644 
646 {
647 }
648 
650 {
651 }
652 
654 {
655 }
656 
658 {
659 }
660 
662 {
663 }
664 
665 
667 {
668 }
669 
671 {
672 #ifdef CSR_SUPPORT_WEXT
673  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
675 
676  if (priv == NULL) {
677  unifi_error(NULL, "CsrWifiSmeSmeConfigSetCfmSend: Invalid ospriv.\n");
678  return;
679  }
680 
681  sme_complete_request(priv, cfm->status);
682 #endif
683 }
684 
686 {
687 }
688 
690 {
691 #ifdef CSR_SUPPORT_WEXT
692  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
694 
695  if (priv == NULL) {
696  unifi_error(NULL, "CsrWifiSmeSmeConfigSetCfmSend: Invalid ospriv.\n");
697  return;
698  }
699 
700  sme_complete_request(priv, cfm->status);
701 #endif
702 }
703 
705 {
706 }
707 
709 {
710 #ifdef CSR_SUPPORT_WEXT
711  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
713 
714  if (priv == NULL) {
715  unifi_error(NULL, "CsrWifiSmeSmeConfigSetCfmSend: Invalid ospriv.\n");
716  return;
717  }
718 
719  sme_complete_request(priv, cfm->status);
720 #endif
721 }
722 
724 {
725 }
726 
728 {
729 #ifdef CSR_SUPPORT_WEXT
730  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
732 
733  if (priv == NULL) {
734  unifi_error(NULL, "CsrWifiSmeSmeConfigSetCfmSend: Invalid ospriv.\n");
735  return;
736  }
737 
738  sme_complete_request(priv, cfm->status);
739 #endif
740 }
741 
742 
744 {
745 #ifdef CSR_SUPPORT_WEXT
746  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
748 
749  if (priv == NULL) {
750  unifi_error(NULL, "CsrWifiSmeSmeConfigSetCfmSend: Invalid ospriv.\n");
751  return;
752  }
753 
754  sme_complete_request(priv, cfm->status);
755 #endif
756 }
757 
759 {
760  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
762 
763  if (priv == NULL) {
764  unifi_error(NULL, "CsrWifiSmeSmeConfigSetCfmSend: Invalid ospriv.\n");
765  return;
766  }
767 
768  sme_complete_request(priv, cfm->status);
769 }
770 
772 {
773 }
774 
775 
777 {
778 #ifdef CSR_SUPPORT_WEXT
779  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
781 
782  if (priv == NULL) {
783  unifi_error(NULL, "CsrWifiSmeSmeConfigSetCfmSend: Invalid ospriv.\n");
784  return;
785  }
786 
787  sme_complete_request(priv, cfm->status);
788 #endif
789 }
790 
792 {
793 }
794 
796 {
797  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
799 
800  if (priv == NULL) {
801  unifi_error(NULL, "CsrWifiSmeSmeConfigSetCfmSend: Invalid ospriv.\n");
802  return;
803  }
804 
805  sme_complete_request(priv, cfm->status);
806 }
807 
809 {
810 }
811 
813 {
814 }
815 
817 {
818 #ifdef CSR_SUPPORT_WEXT
819  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
821 
822  if (priv->smepriv == NULL) {
823  unifi_error(priv, "CsrWifiSmeMediaStatusIndSend: invalid smepriv\n");
824  return;
825  }
826 
828  /*
829  * Send wireless-extension event up to userland to announce
830  * connection.
831  */
833  (unsigned char *)ind->connectionInfo.bssid.a,
834  (unsigned char *)ind->connectionInfo.assocReqInfoElements,
836  (unsigned char *)ind->connectionInfo.assocRspInfoElements,
838  (unsigned char *)ind->connectionInfo.assocScanInfoElements,
840 
841  unifi_trace(priv, UDBG2, "CsrWifiSmeMediaStatusIndSend: IBSS=%pM\n",
842  ind->connectionInfo.bssid.a);
843 
845 
846  } else {
847  /*
848  * Send wireless-extension event up to userland to announce
849  * connection lost to a BSS.
850  */
852  }
853 #endif
854 }
855 
857 {
858  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
860 
861  if (priv == NULL) {
862  unifi_error(NULL, "CsrWifiSmeRoamingConfigSetCfmSend: Invalid ospriv.\n");
863  return;
864  }
865 
866  sme_complete_request(priv, cfm->status);
867 }
868 
870 {
871 }
872 
874 {
875 #ifdef CSR_SUPPORT_WEXT
876  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
878 
879  if (priv == NULL) {
880  unifi_error(NULL, "CsrWifiSmeSmeConfigSetCfmSend: Invalid ospriv.\n");
881  return;
882  }
883 
884  sme_complete_request(priv, cfm->status);
885 #endif
886 }
887 
889 {
890 }
891 
893 {
894  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
896 
897  if (priv == NULL) {
898  unifi_error(NULL, "CsrWifiSmeSmeCommonConfigGetCfmSend: Invalid ospriv.\n");
899  return;
900  }
901 
902  priv->sme_reply.deviceConfig = cfm->deviceConfig;
903  sme_complete_request(priv, cfm->status);
904 }
905 
907 {
908  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
910 
911  if (priv == NULL) {
912  unifi_error(NULL, "CsrWifiSmeSmeStaConfigGetCfmSend: Invalid ospriv.\n");
913  return;
914  }
915 
916  priv->sme_reply.staConfig = cfm->smeConfig;
917  sme_complete_request(priv, cfm->status);
918 }
919 
921 {
922  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
924 
925  if (priv == NULL) {
926  unifi_error(NULL, "CsrWifiSmeSmeCommonConfigGetCfmSend: Invalid ospriv.\n");
927  return;
928  }
929 
930  sme_complete_request(priv, cfm->status);
931 }
932 
934 {
935  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
937 
938  if (priv == NULL) {
939  unifi_error(NULL, "CsrWifiSmeSmeStaConfigGetCfmSend: Invalid ospriv.\n");
940  return;
941  }
942 
943  sme_complete_request(priv, cfm->status);
944 }
945 
947 {
948 }
949 
951 {
952 }
953 
955 {
956 }
957 
959 {
960 }
962 {
963 }
964 
966 {
967 }
969 {
970 }
971 
972 #ifdef CSR_SUPPORT_WEXT
973 #ifdef CSR_SUPPORT_WEXT_AP
974 void CsrWifiNmeApStartCfmHandler(void* drvpriv, CsrWifiFsmEvent* msg)
975 {
976  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
978 
979  if (priv == NULL) {
980  unifi_error(NULL, "CsrWifiNmeApStartCfmSend: Invalid ospriv.\n");
981  return;
982  }
983 
984  sme_complete_request(priv, cfm->status);
985 }
986 
987 void CsrWifiNmeApStopCfmHandler(void* drvpriv, CsrWifiFsmEvent* msg)
988 {
989  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
991 
992  if (priv == NULL) {
993  unifi_error(NULL, "CsrWifiNmeApStopCfmSend: Invalid ospriv.\n");
994  return;
995  }
996 
997  sme_complete_request(priv, cfm->status);
998 }
999 
1000 void CsrWifiNmeApConfigSetCfmHandler(void* drvpriv, CsrWifiFsmEvent* msg)
1001 {
1002  unifi_priv_t *priv = (unifi_priv_t*)drvpriv;
1004 
1005  if (priv == NULL) {
1006  unifi_error(NULL, "CsrWifiNmeApConfigSetCfmSend: Invalid ospriv.\n");
1007  return;
1008  }
1009  sme_complete_request(priv, cfm->status);
1010 }
1011 #endif
1012 #endif