2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/mgmt/scan_fsm.c#2 $
6 \brief This file defines the state transition function for SCAN FSM.
8 The SCAN FSM is part of SCAN MODULE and responsible for performing basic SCAN
9 behavior as metioned in IEEE 802.11 2007 11.1.3.1 & 11.1.3.2 .
18 ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
19 ** enlarge match_ssid_num to 16 for PNO support
22 ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
23 ** 1. integrate scheduled scan functionality
24 ** 2. condition compilation for linux-3.4 & linux-3.8 compatibility
25 ** 3. correct CMD queue access to reduce lock scope
28 ** [BORA00002227] [MT6630 Wi-Fi][Driver] Update for Makefile and HIFSYS modifications
29 ** take use of GET_BSS_INFO_BY_INDEX() and MAX_BSS_INDEX macros
30 ** for correctly indexing of BSS-INFO pointers
33 ** [BORA00002227] [MT6630 Wi-Fi][Driver] Update for Makefile and HIFSYS modifications
34 ** 1. change to use long format (FT=1) for initial command
38 ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
39 ** .add driver side NLO state machine
42 ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
43 ** modification for ucBssIndex migration
46 ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
47 ** carry timeout value and channel dwell time value to scan module
49 ** 09 17 2012 cm.chang
50 ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
51 ** Duplicate source from MT6620 v2.3 driver branch
52 ** (Davinci label: MT6620_WIFI_Driver_V2_3_120913_1942_As_MT6630_Base)
55 ** [WCXRP00001269] [MT6620 Wi-Fi][Driver] cfg80211 porting merge back to DaVinci
56 ** do not use fgIsP2PRegistered for checking but use network index
58 * 06 13 2012 yuche.tsai
60 * Update maintrunk driver.
61 * Add support for driver compose assoc request frame.
64 * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
65 * Adjust code for DBG and CONFIG_XLOG.
67 * 11 14 2011 yuche.tsai
68 * [WCXRP00001095] [Volunteer Patch][Driver] Always Scan before enable Hot-Spot.
69 * Fix bug when unregister P2P network..
72 * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
73 * modify the xlog related code.
76 * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
77 * adding the code for XLOG.
80 * [WCXRP00000830] [MT6620 Wi-Fi][Firmware] Use MDRDY counter to detect empty channel for shortening scan time
81 * sparse channel detection:
82 * driver: collect sparse channel information with scan-done event
86 * [WCXRP00000858] [MT5931][Driver][Firmware] Add support for scan to search for more than one SSID in a single scanning request
87 * free mailbox message afte parsing is completed.
90 * [WCXRP00000858] [MT5931][Driver][Firmware] Add support for scan to search for more than one SSID in a single scanning request
91 * add framework in driver domain for supporting new SCAN_REQ_V2 for more than 1 SSID support as well as uProbeDelay in NDIS 6.x driver model
94 * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED
95 * Remove flag CFG_WIFI_DIRECT_MOVED.
98 * [WCXRP00000604] [MT6620 Wi-Fi][Driver] Surpress Klockwork Warning
99 * surpress klock warning with code path rewritten
101 * 03 18 2011 cm.chang
102 * [WCXRP00000576] [MT6620 Wi-Fi][Driver][FW] Remove P2P compile option in scan req/cancel command
105 * 02 18 2011 yuche.tsai
106 * [WCXRP00000478] [Volunteer Patch][MT6620][Driver] Probe request frame during search phase do not contain P2P wildcard SSID.
107 * Take P2P wildcard SSID into consideration.
109 * 01 27 2011 yuche.tsai
110 * [WCXRP00000399] [Volunteer Patch][MT6620/MT5931][Driver] Fix scan side effect after P2P module separate.
111 * Fix scan channel extension issue when p2p module is not registered.
113 * 01 26 2011 yuche.tsai
114 * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record.
117 * 01 25 2011 yuche.tsai
118 * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record.
119 * Fix Compile Error when DBG is disabled.
121 * 12 07 2010 cm.chang
122 * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant
123 * 1. Country code is from NVRAM or supplicant
124 * 2. Change band definition in CMD/EVENT.
126 * 09 03 2010 kevin.huang
128 * Refine #include sequence and solve recursive/nested #include issue
132 * eliminate klockwork errors
136 * add interface for RLM to trigger OBSS-SCAN.
138 * 08 16 2010 yuche.tsai
140 * Fix bug for processing queued scan request.
142 * 08 11 2010 yuche.tsai
144 * Add a function for returning channel.
146 * 08 05 2010 yuche.tsai
148 * Update SCAN FSM for support P2P Device discovery scan.
152 * surpress compilation warning.
154 * 07 26 2010 yuche.tsai
156 * Add option of channel extension while cancelling scan request.
158 * 07 21 2010 yuche.tsai
160 * Add P2P Scan & Scan Result Parsing & Saving.
164 * pass band information for scan in an efficient way by mapping ENUM_BAND_T into UINT_8..
168 * due to FW/DRV won't be sync. precisely, some strict assertions should be eased.
172 * [WPD00003833] [MT6620 and MT5931] Driver migration.
173 * SCN module is now able to handle multiple concurrent scanning requests
177 * [WPD00003833] [MT6620 and MT5931] Driver migration.
178 * bugfix for SCN migration
179 * 1) modify QUEUE_CONCATENATE_QUEUES() so it could be used to concatence with an empty queue
180 * 2) before AIS issues scan request, network(BSS) needs to be activated first
181 * 3) only invoke COPY_SSID when using specified SSID for scan
185 * [WPD00003833] [MT6620 and MT5931] Driver migration.
186 * driver no longer generates probe request frames
190 * [WPD00003833] [MT6620 and MT5931] Driver migration.
191 * pass band with channel number information as scan parameter
195 * [WPD00003833] [MT6620 and MT5931] Driver migration.
196 * remove timer in DRV-SCN.
200 * 1) separate AIS_FSM state for two kinds of scanning. (OID triggered scan, and scan-for-connection)
201 * 2) eliminate PRE_BSS_DESC_T, Beacon/PrebResp is now parsed in single pass
202 * 3) implment DRV-SCN module, currently only accepts single scan request, other request will be directly dropped by returning BUSY
206 * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
209 * [WPD00003833][MT6620 and MT5931] Driver migration
210 * take use of RLM module for parsing/generating HT IEs for 11n capability
213 * [WPD00003833][MT6620 and MT5931] Driver migration
214 * when returning to SCAN_IDLE state, send a correct message to source FSM.
217 * [WPD00003833][MT6620 and MT5931] Driver migration
218 * implementation of DRV-SCN and related mailbox message handling.
221 * [WPD00003833][MT6620 and MT5931] Driver migration
222 * comment out RLM APIs by CFG_RLM_MIGRATION.
225 * [WPD00003833][MT6620 and MT5931] Driver migration
226 * add scan_fsm into building.
228 * 05 14 2010 kevin.huang
229 * [BORA00000794][WIFISYS][New Feature]Power Management Support
230 * Refine the order of Stop TX Queue and Switch Channel
232 * 05 12 2010 kevin.huang
233 * [BORA00000794][WIFISYS][New Feature]Power Management Support
234 * Update pause/resume/flush API to new Bitmap API
236 * 05 12 2010 kevin.huang
237 * [BORA00000794][WIFISYS][New Feature]Power Management Support
238 * Add Power Management - Legacy PS-POLL support.
240 * 03 18 2010 kevin.huang
241 * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support
242 * Ignore the PROBE_DELAY state if the value of Probe Delay == 0
244 * 03 10 2010 kevin.huang
245 * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support
246 * Add Channel Manager for arbitration of JOIN and SCAN Req
248 * 02 23 2010 kevin.huang
249 * [BORA00000603][WIFISYS] [New Feature] AAA Module Support
250 * Add support scan channel 1~14 and update scan result's frequency infou1rwduu`wvpghlqg|n`slk+mpdkb
252 * 01 08 2010 kevin.huang
253 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
254 * Add set RX Filter to receive BCN from different BSSID during SCAN
256 * 12 18 2009 cm.chang
257 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
260 * Nov 25 2009 mtk01461
261 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
262 * Remove flag of CFG_TEST_MGMT_FSM
264 * Nov 20 2009 mtk01461
265 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
266 * Change parameter of scanSendProbeReqFrames()
268 * Nov 16 2009 mtk01461
269 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
270 * Update scnFsmSteps()
272 * Nov 5 2009 mtk01461
273 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
276 * Nov 5 2009 mtk01461
277 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
281 /*******************************************************************************
282 * C O M P I L E R F L A G S
283 ********************************************************************************
286 /*******************************************************************************
287 * E X T E R N A L R E F E R E N C E S
288 ********************************************************************************
292 /*******************************************************************************
294 ********************************************************************************
297 /*******************************************************************************
299 ********************************************************************************
302 /*******************************************************************************
303 * P U B L I C D A T A
304 ********************************************************************************
307 /*******************************************************************************
308 * P R I V A T E D A T A
309 ********************************************************************************
312 /*lint -save -e64 Type mismatch */
313 static PUINT_8 apucDebugScanState
[SCAN_STATE_NUM
] = {
314 (PUINT_8
) DISP_STRING("SCAN_STATE_IDLE"),
315 (PUINT_8
) DISP_STRING("SCAN_STATE_SCANNING"),
321 /*******************************************************************************
323 ********************************************************************************
326 /*******************************************************************************
327 * F U N C T I O N D E C L A R A T I O N S
328 ********************************************************************************
331 /*******************************************************************************
333 ********************************************************************************
335 /*----------------------------------------------------------------------------*/
343 /*----------------------------------------------------------------------------*/
344 VOID
scnFsmSteps(IN P_ADAPTER_T prAdapter
, IN ENUM_SCAN_STATE_T eNextState
)
346 P_SCAN_INFO_T prScanInfo
;
347 P_SCAN_PARAM_T prScanParam
;
348 P_MSG_HDR_T prMsgHdr
;
350 BOOLEAN fgIsTransition
= (BOOLEAN
) FALSE
;
352 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
353 prScanParam
= &prScanInfo
->rScanParam
;
358 DBGLOG(SCN
, STATE
, ("TRANSITION: [%s] -> [%s]\n",
359 apucDebugScanState
[prScanInfo
->eCurrentState
],
360 apucDebugScanState
[eNextState
]));
362 DBGLOG(SCN
, STATE
, ("[%d] TRANSITION: [%d] -> [%d]\n",
363 DBG_SCN_IDX
, prScanInfo
->eCurrentState
, eNextState
));
366 /* NOTE(Kevin): This is the only place to change the eCurrentState(except initial) */
367 prScanInfo
->eCurrentState
= eNextState
;
369 fgIsTransition
= (BOOLEAN
) FALSE
;
371 switch (prScanInfo
->eCurrentState
) {
372 case SCAN_STATE_IDLE
:
373 /* check for pending scanning requests */
374 if (!LINK_IS_EMPTY(&(prScanInfo
->rPendingMsgList
))) {
375 /* load next message from pending list as scan parameters */
376 LINK_REMOVE_HEAD(&(prScanInfo
->rPendingMsgList
), prMsgHdr
,
379 if (prMsgHdr
->eMsgId
== MID_AIS_SCN_SCAN_REQ
380 || prMsgHdr
->eMsgId
== MID_BOW_SCN_SCAN_REQ
381 || prMsgHdr
->eMsgId
== MID_P2P_SCN_SCAN_REQ
382 || prMsgHdr
->eMsgId
== MID_RLM_SCN_SCAN_REQ
) {
383 scnFsmHandleScanMsg(prAdapter
,
384 (P_MSG_SCN_SCAN_REQ
) prMsgHdr
);
386 eNextState
= SCAN_STATE_SCANNING
;
387 fgIsTransition
= TRUE
;
388 } else if (prMsgHdr
->eMsgId
== MID_AIS_SCN_SCAN_REQ_V2
389 || prMsgHdr
->eMsgId
== MID_BOW_SCN_SCAN_REQ_V2
390 || prMsgHdr
->eMsgId
== MID_P2P_SCN_SCAN_REQ_V2
391 || prMsgHdr
->eMsgId
== MID_RLM_SCN_SCAN_REQ_V2
) {
392 scnFsmHandleScanMsgV2(prAdapter
,
393 (P_MSG_SCN_SCAN_REQ_V2
) prMsgHdr
);
395 eNextState
= SCAN_STATE_SCANNING
;
396 fgIsTransition
= TRUE
;
398 /* should not happen */
402 /* switch to next state */
403 cnmMemFree(prAdapter
, prMsgHdr
);
407 case SCAN_STATE_SCANNING
:
408 if (prScanParam
->fgIsScanV2
== FALSE
) {
409 scnSendScanReq(prAdapter
);
411 scnSendScanReqV2(prAdapter
);
420 } while (fgIsTransition
);
426 /*----------------------------------------------------------------------------*/
428 * \brief Generate CMD_ID_SCAN_REQ command
434 /*----------------------------------------------------------------------------*/
435 VOID
scnSendScanReq(IN P_ADAPTER_T prAdapter
)
437 P_SCAN_INFO_T prScanInfo
;
438 P_SCAN_PARAM_T prScanParam
;
439 CMD_SCAN_REQ rCmdScanReq
;
444 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
445 prScanParam
= &prScanInfo
->rScanParam
;
447 /* send command packet for scan */
448 kalMemZero(&rCmdScanReq
, sizeof(CMD_SCAN_REQ
));
450 rCmdScanReq
.ucSeqNum
= prScanParam
->ucSeqNum
;
451 rCmdScanReq
.ucBssIndex
= prScanParam
->ucBssIndex
;
452 rCmdScanReq
.ucScanType
= (UINT_8
) prScanParam
->eScanType
;
453 rCmdScanReq
.ucSSIDType
= prScanParam
->ucSSIDType
;
455 if (prScanParam
->ucSSIDNum
== 1) {
456 COPY_SSID(rCmdScanReq
.aucSSID
,
457 rCmdScanReq
.ucSSIDLength
,
458 prScanParam
->aucSpecifiedSSID
[0], prScanParam
->ucSpecifiedSSIDLen
[0]);
461 rCmdScanReq
.ucChannelType
= (UINT_8
) prScanParam
->eScanChannel
;
463 if (prScanParam
->eScanChannel
== SCAN_CHANNEL_SPECIFIED
) {
465 * 1. Specified Listen Channel of passive scan for LISTEN state.
466 * 2. Specified Listen Channel of Target Device of active scan for SEARCH state. (Target != NULL)
468 rCmdScanReq
.ucChannelListNum
= prScanParam
->ucChannelListNum
;
470 for (i
= 0; i
< rCmdScanReq
.ucChannelListNum
; i
++) {
471 rCmdScanReq
.arChannelList
[i
].ucBand
=
472 (UINT_8
) prScanParam
->arChnlInfoList
[i
].eBand
;
474 rCmdScanReq
.arChannelList
[i
].ucChannelNum
=
475 (UINT_8
) prScanParam
->arChnlInfoList
[i
].ucChannelNum
;
479 rCmdScanReq
.u2ChannelDwellTime
= prScanParam
->u2ChannelDwellTime
;
480 rCmdScanReq
.u2TimeoutValue
= prScanParam
->u2TimeoutValue
;
482 if (prScanParam
->u2IELen
<= MAX_IE_LENGTH
) {
483 rCmdScanReq
.u2IELen
= prScanParam
->u2IELen
;
485 rCmdScanReq
.u2IELen
= MAX_IE_LENGTH
;
488 if (prScanParam
->u2IELen
) {
489 kalMemCopy(rCmdScanReq
.aucIE
,
490 prScanParam
->aucIE
, sizeof(UINT_8
) * rCmdScanReq
.u2IELen
);
493 wlanSendSetQueryCmd(prAdapter
,
500 OFFSET_OF(CMD_SCAN_REQ
, aucIE
) + rCmdScanReq
.u2IELen
,
501 (PUINT_8
) &rCmdScanReq
, NULL
, 0);
505 /*----------------------------------------------------------------------------*/
507 * \brief Generate CMD_ID_SCAN_REQ_V2 command
513 /*----------------------------------------------------------------------------*/
514 VOID
scnSendScanReqV2(IN P_ADAPTER_T prAdapter
)
516 P_SCAN_INFO_T prScanInfo
;
517 P_SCAN_PARAM_T prScanParam
;
518 CMD_SCAN_REQ_V2 rCmdScanReq
;
523 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
524 prScanParam
= &prScanInfo
->rScanParam
;
526 /* send command packet for scan */
527 kalMemZero(&rCmdScanReq
, sizeof(CMD_SCAN_REQ_V2
));
529 rCmdScanReq
.ucSeqNum
= prScanParam
->ucSeqNum
;
530 rCmdScanReq
.ucBssIndex
= prScanParam
->ucBssIndex
;
531 rCmdScanReq
.ucScanType
= (UINT_8
) prScanParam
->eScanType
;
532 rCmdScanReq
.ucSSIDType
= prScanParam
->ucSSIDType
;
534 for (i
= 0; i
< prScanParam
->ucSSIDNum
; i
++) {
535 COPY_SSID(rCmdScanReq
.arSSID
[i
].aucSsid
,
536 rCmdScanReq
.arSSID
[i
].u4SsidLen
,
537 prScanParam
->aucSpecifiedSSID
[i
], prScanParam
->ucSpecifiedSSIDLen
[i
]);
540 rCmdScanReq
.u2ProbeDelayTime
= (UINT_8
) prScanParam
->u2ProbeDelayTime
;
541 rCmdScanReq
.ucChannelType
= (UINT_8
) prScanParam
->eScanChannel
;
543 if (prScanParam
->eScanChannel
== SCAN_CHANNEL_SPECIFIED
) {
545 * 1. Specified Listen Channel of passive scan for LISTEN state.
546 * 2. Specified Listen Channel of Target Device of active scan for SEARCH state. (Target != NULL)
548 rCmdScanReq
.ucChannelListNum
= prScanParam
->ucChannelListNum
;
550 for (i
= 0; i
< rCmdScanReq
.ucChannelListNum
; i
++) {
551 rCmdScanReq
.arChannelList
[i
].ucBand
=
552 (UINT_8
) prScanParam
->arChnlInfoList
[i
].eBand
;
554 rCmdScanReq
.arChannelList
[i
].ucChannelNum
=
555 (UINT_8
) prScanParam
->arChnlInfoList
[i
].ucChannelNum
;
559 rCmdScanReq
.u2ChannelDwellTime
= prScanParam
->u2ChannelDwellTime
;
560 rCmdScanReq
.u2TimeoutValue
= prScanParam
->u2TimeoutValue
;
562 if (prScanParam
->u2IELen
<= MAX_IE_LENGTH
) {
563 rCmdScanReq
.u2IELen
= prScanParam
->u2IELen
;
565 rCmdScanReq
.u2IELen
= MAX_IE_LENGTH
;
568 if (prScanParam
->u2IELen
) {
569 kalMemCopy(rCmdScanReq
.aucIE
,
570 prScanParam
->aucIE
, sizeof(UINT_8
) * rCmdScanReq
.u2IELen
);
573 wlanSendSetQueryCmd(prAdapter
,
580 OFFSET_OF(CMD_SCAN_REQ_V2
, aucIE
) + rCmdScanReq
.u2IELen
,
581 (PUINT_8
) &rCmdScanReq
, NULL
, 0);
586 /*----------------------------------------------------------------------------*/
594 /*----------------------------------------------------------------------------*/
595 VOID
scnFsmMsgStart(IN P_ADAPTER_T prAdapter
, IN P_MSG_HDR_T prMsgHdr
)
597 P_SCAN_INFO_T prScanInfo
;
598 P_SCAN_PARAM_T prScanParam
;
602 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
603 prScanParam
= &prScanInfo
->rScanParam
;
606 if (prScanInfo
->eCurrentState
== SCAN_STATE_IDLE
) {
607 if (prMsgHdr
->eMsgId
== MID_AIS_SCN_SCAN_REQ
608 || prMsgHdr
->eMsgId
== MID_BOW_SCN_SCAN_REQ
609 || prMsgHdr
->eMsgId
== MID_P2P_SCN_SCAN_REQ
610 || prMsgHdr
->eMsgId
== MID_RLM_SCN_SCAN_REQ
) {
611 scnFsmHandleScanMsg(prAdapter
, (P_MSG_SCN_SCAN_REQ
) prMsgHdr
);
612 } else if (prMsgHdr
->eMsgId
== MID_AIS_SCN_SCAN_REQ_V2
613 || prMsgHdr
->eMsgId
== MID_BOW_SCN_SCAN_REQ_V2
614 || prMsgHdr
->eMsgId
== MID_P2P_SCN_SCAN_REQ_V2
615 || prMsgHdr
->eMsgId
== MID_RLM_SCN_SCAN_REQ_V2
) {
616 scnFsmHandleScanMsgV2(prAdapter
, (P_MSG_SCN_SCAN_REQ_V2
) prMsgHdr
);
618 /* should not deliver to this function */
622 cnmMemFree(prAdapter
, prMsgHdr
);
623 scnFsmSteps(prAdapter
, SCAN_STATE_SCANNING
);
625 LINK_INSERT_TAIL(&prScanInfo
->rPendingMsgList
, &prMsgHdr
->rLinkEntry
);
633 /*----------------------------------------------------------------------------*/
641 /*----------------------------------------------------------------------------*/
642 VOID
scnFsmMsgAbort(IN P_ADAPTER_T prAdapter
, IN P_MSG_HDR_T prMsgHdr
)
644 P_MSG_SCN_SCAN_CANCEL prScanCancel
;
645 P_SCAN_INFO_T prScanInfo
;
646 P_SCAN_PARAM_T prScanParam
;
647 CMD_SCAN_CANCEL rCmdScanCancel
;
651 prScanCancel
= (P_MSG_SCN_SCAN_CANCEL
) prMsgHdr
;
652 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
653 prScanParam
= &prScanInfo
->rScanParam
;
655 if (prScanInfo
->eCurrentState
!= SCAN_STATE_IDLE
) {
656 if (prScanCancel
->ucSeqNum
== prScanParam
->ucSeqNum
&&
657 prScanCancel
->ucBssIndex
== prScanParam
->ucBssIndex
) {
658 /* send cancel message to firmware domain */
659 rCmdScanCancel
.ucSeqNum
= prScanParam
->ucSeqNum
;
660 rCmdScanCancel
.ucIsExtChannel
= (UINT_8
) prScanCancel
->fgIsChannelExt
;
662 wlanSendSetQueryCmd(prAdapter
,
669 sizeof(CMD_SCAN_CANCEL
),
670 (PUINT_8
) &rCmdScanCancel
, NULL
, 0);
672 /* generate scan-done event for caller */
673 scnFsmGenerateScanDoneMsg(prAdapter
,
674 prScanParam
->ucSeqNum
,
675 prScanParam
->ucBssIndex
, SCAN_STATUS_CANCELLED
);
677 /* switch to next pending scan */
678 scnFsmSteps(prAdapter
, SCAN_STATE_IDLE
);
680 scnFsmRemovePendingMsg(prAdapter
, prScanCancel
->ucSeqNum
,
681 prScanCancel
->ucBssIndex
);
685 cnmMemFree(prAdapter
, prMsgHdr
);
691 /*----------------------------------------------------------------------------*/
693 * \brief Scan Message Parsing (Legacy)
699 /*----------------------------------------------------------------------------*/
700 VOID
scnFsmHandleScanMsg(IN P_ADAPTER_T prAdapter
, IN P_MSG_SCN_SCAN_REQ prScanReqMsg
)
702 P_SCAN_INFO_T prScanInfo
;
703 P_SCAN_PARAM_T prScanParam
;
707 ASSERT(prScanReqMsg
);
709 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
710 prScanParam
= &prScanInfo
->rScanParam
;
712 prScanParam
->eScanType
= prScanReqMsg
->eScanType
;
713 prScanParam
->ucBssIndex
= prScanReqMsg
->ucBssIndex
;
714 prScanParam
->ucSSIDType
= prScanReqMsg
->ucSSIDType
;
715 if (prScanParam
->ucSSIDType
& (SCAN_REQ_SSID_SPECIFIED
| SCAN_REQ_SSID_P2P_WILDCARD
)) {
716 prScanParam
->ucSSIDNum
= 1;
718 COPY_SSID(prScanParam
->aucSpecifiedSSID
[0],
719 prScanParam
->ucSpecifiedSSIDLen
[0],
720 prScanReqMsg
->aucSSID
, prScanReqMsg
->ucSSIDLength
);
722 /* reset SSID length to zero for rest array entries */
723 for (i
= 1; i
< SCN_SSID_MAX_NUM
; i
++) {
724 prScanParam
->ucSpecifiedSSIDLen
[i
] = 0;
727 prScanParam
->ucSSIDNum
= 0;
729 for (i
= 0; i
< SCN_SSID_MAX_NUM
; i
++) {
730 prScanParam
->ucSpecifiedSSIDLen
[i
] = 0;
734 prScanParam
->u2ProbeDelayTime
= 0;
735 prScanParam
->eScanChannel
= prScanReqMsg
->eScanChannel
;
736 if (prScanParam
->eScanChannel
== SCAN_CHANNEL_SPECIFIED
) {
737 if (prScanReqMsg
->ucChannelListNum
<= MAXIMUM_OPERATION_CHANNEL_LIST
) {
738 prScanParam
->ucChannelListNum
= prScanReqMsg
->ucChannelListNum
;
740 prScanParam
->ucChannelListNum
= MAXIMUM_OPERATION_CHANNEL_LIST
;
743 kalMemCopy(prScanParam
->arChnlInfoList
,
744 prScanReqMsg
->arChnlInfoList
,
745 sizeof(RF_CHANNEL_INFO_T
) * prScanParam
->ucChannelListNum
);
748 if (prScanReqMsg
->u2IELen
<= MAX_IE_LENGTH
) {
749 prScanParam
->u2IELen
= prScanReqMsg
->u2IELen
;
751 prScanParam
->u2IELen
= MAX_IE_LENGTH
;
754 if (prScanParam
->u2IELen
) {
755 kalMemCopy(prScanParam
->aucIE
, prScanReqMsg
->aucIE
, prScanParam
->u2IELen
);
758 prScanParam
->u2ChannelDwellTime
= prScanReqMsg
->u2ChannelDwellTime
;
759 prScanParam
->u2TimeoutValue
= prScanReqMsg
->u2TimeoutValue
;
760 prScanParam
->ucSeqNum
= prScanReqMsg
->ucSeqNum
;
762 if (prScanReqMsg
->rMsgHdr
.eMsgId
== MID_RLM_SCN_SCAN_REQ
) {
763 prScanParam
->fgIsObssScan
= TRUE
;
765 prScanParam
->fgIsObssScan
= FALSE
;
768 prScanParam
->fgIsScanV2
= FALSE
;
774 /*----------------------------------------------------------------------------*/
776 * \brief Scan Message Parsing - V2 with multiple SSID support
782 /*----------------------------------------------------------------------------*/
783 VOID
scnFsmHandleScanMsgV2(IN P_ADAPTER_T prAdapter
, IN P_MSG_SCN_SCAN_REQ_V2 prScanReqMsg
)
785 P_SCAN_INFO_T prScanInfo
;
786 P_SCAN_PARAM_T prScanParam
;
790 ASSERT(prScanReqMsg
);
791 ASSERT(prScanReqMsg
->ucSSIDNum
<= SCN_SSID_MAX_NUM
);
793 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
794 prScanParam
= &prScanInfo
->rScanParam
;
796 prScanParam
->eScanType
= prScanReqMsg
->eScanType
;
797 prScanParam
->ucBssIndex
= prScanReqMsg
->ucBssIndex
;
798 prScanParam
->ucSSIDType
= prScanReqMsg
->ucSSIDType
;
799 prScanParam
->ucSSIDNum
= prScanReqMsg
->ucSSIDNum
;
801 for (i
= 0; i
< prScanReqMsg
->ucSSIDNum
; i
++) {
802 COPY_SSID(prScanParam
->aucSpecifiedSSID
[i
],
803 prScanParam
->ucSpecifiedSSIDLen
[i
],
804 prScanReqMsg
->prSsid
[i
].aucSsid
,
805 (UINT_8
) prScanReqMsg
->prSsid
[i
].u4SsidLen
);
808 prScanParam
->u2ProbeDelayTime
= prScanReqMsg
->u2ProbeDelay
;
809 prScanParam
->eScanChannel
= prScanReqMsg
->eScanChannel
;
810 if (prScanParam
->eScanChannel
== SCAN_CHANNEL_SPECIFIED
) {
811 if (prScanReqMsg
->ucChannelListNum
<= MAXIMUM_OPERATION_CHANNEL_LIST
) {
812 prScanParam
->ucChannelListNum
= prScanReqMsg
->ucChannelListNum
;
814 prScanParam
->ucChannelListNum
= MAXIMUM_OPERATION_CHANNEL_LIST
;
817 kalMemCopy(prScanParam
->arChnlInfoList
,
818 prScanReqMsg
->arChnlInfoList
,
819 sizeof(RF_CHANNEL_INFO_T
) * prScanParam
->ucChannelListNum
);
822 if (prScanReqMsg
->u2IELen
<= MAX_IE_LENGTH
) {
823 prScanParam
->u2IELen
= prScanReqMsg
->u2IELen
;
825 prScanParam
->u2IELen
= MAX_IE_LENGTH
;
828 if (prScanParam
->u2IELen
) {
829 kalMemCopy(prScanParam
->aucIE
, prScanReqMsg
->aucIE
, prScanParam
->u2IELen
);
832 prScanParam
->u2ChannelDwellTime
= prScanReqMsg
->u2ChannelDwellTime
;
833 prScanParam
->u2TimeoutValue
= prScanReqMsg
->u2TimeoutValue
;
834 prScanParam
->ucSeqNum
= prScanReqMsg
->ucSeqNum
;
836 if (prScanReqMsg
->rMsgHdr
.eMsgId
== MID_RLM_SCN_SCAN_REQ
) {
837 prScanParam
->fgIsObssScan
= TRUE
;
839 prScanParam
->fgIsObssScan
= FALSE
;
842 prScanParam
->fgIsScanV2
= TRUE
;
848 /*----------------------------------------------------------------------------*/
850 * \brief Remove pending scan request
856 /*----------------------------------------------------------------------------*/
857 VOID
scnFsmRemovePendingMsg(IN P_ADAPTER_T prAdapter
, IN UINT_8 ucSeqNum
, IN UINT_8 ucBssIndex
)
859 P_SCAN_INFO_T prScanInfo
;
860 P_SCAN_PARAM_T prScanParam
;
861 P_MSG_HDR_T prPendingMsgHdr
, prPendingMsgHdrNext
, prRemoveMsgHdr
= NULL
;
862 P_LINK_ENTRY_T prRemoveLinkEntry
= NULL
;
863 BOOLEAN fgIsRemovingScan
= FALSE
;
867 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
868 prScanParam
= &prScanInfo
->rScanParam
;
870 /* traverse through rPendingMsgList for removal */
871 LINK_FOR_EACH_ENTRY_SAFE(prPendingMsgHdr
,
873 &(prScanInfo
->rPendingMsgList
), rLinkEntry
, MSG_HDR_T
) {
874 if (prPendingMsgHdr
->eMsgId
== MID_AIS_SCN_SCAN_REQ
875 || prPendingMsgHdr
->eMsgId
== MID_BOW_SCN_SCAN_REQ
876 || prPendingMsgHdr
->eMsgId
== MID_P2P_SCN_SCAN_REQ
877 || prPendingMsgHdr
->eMsgId
== MID_RLM_SCN_SCAN_REQ
) {
878 P_MSG_SCN_SCAN_REQ prScanReqMsg
= (P_MSG_SCN_SCAN_REQ
) prPendingMsgHdr
;
880 if (ucSeqNum
== prScanReqMsg
->ucSeqNum
&&
881 ucBssIndex
== prScanReqMsg
->ucBssIndex
) {
882 prRemoveLinkEntry
= &(prScanReqMsg
->rMsgHdr
.rLinkEntry
);
883 prRemoveMsgHdr
= prPendingMsgHdr
;
884 fgIsRemovingScan
= TRUE
;
886 } else if (prPendingMsgHdr
->eMsgId
== MID_AIS_SCN_SCAN_REQ_V2
887 || prPendingMsgHdr
->eMsgId
== MID_BOW_SCN_SCAN_REQ_V2
888 || prPendingMsgHdr
->eMsgId
== MID_P2P_SCN_SCAN_REQ_V2
889 || prPendingMsgHdr
->eMsgId
== MID_RLM_SCN_SCAN_REQ_V2
) {
890 P_MSG_SCN_SCAN_REQ_V2 prScanReqMsgV2
=
891 (P_MSG_SCN_SCAN_REQ_V2
) prPendingMsgHdr
;
893 if (ucSeqNum
== prScanReqMsgV2
->ucSeqNum
&&
894 ucBssIndex
== prScanReqMsgV2
->ucBssIndex
) {
895 prRemoveLinkEntry
= &(prScanReqMsgV2
->rMsgHdr
.rLinkEntry
);
896 prRemoveMsgHdr
= prPendingMsgHdr
;
897 fgIsRemovingScan
= TRUE
;
901 if (prRemoveLinkEntry
) {
902 if (fgIsRemovingScan
== TRUE
) {
903 /* generate scan-done event for caller */
904 scnFsmGenerateScanDoneMsg(prAdapter
,
906 ucBssIndex
, SCAN_STATUS_CANCELLED
);
909 /* remove from pending list */
910 LINK_REMOVE_KNOWN_ENTRY(&(prScanInfo
->rPendingMsgList
), prRemoveLinkEntry
);
911 cnmMemFree(prAdapter
, prRemoveMsgHdr
);
921 /*----------------------------------------------------------------------------*/
929 /*----------------------------------------------------------------------------*/
930 VOID
scnEventScanDone(IN P_ADAPTER_T prAdapter
, IN P_EVENT_SCAN_DONE prScanDone
)
932 P_SCAN_INFO_T prScanInfo
;
933 P_SCAN_PARAM_T prScanParam
;
935 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
936 prScanParam
= &prScanInfo
->rScanParam
;
938 /* buffer empty channel information */
939 if (prScanParam
->eScanChannel
== SCAN_CHANNEL_FULL
940 || prScanParam
->eScanChannel
== SCAN_CHANNEL_2G4
) {
941 if (prScanDone
->ucSparseChannelValid
) {
942 prScanInfo
->fgIsSparseChannelValid
= TRUE
;
943 prScanInfo
->rSparseChannel
.eBand
=
944 (ENUM_BAND_T
) prScanDone
->rSparseChannel
.ucBand
;
945 prScanInfo
->rSparseChannel
.ucChannelNum
=
946 prScanDone
->rSparseChannel
.ucChannelNum
;
948 prScanInfo
->fgIsSparseChannelValid
= FALSE
;
952 if (prScanInfo
->eCurrentState
== SCAN_STATE_SCANNING
&&
953 prScanDone
->ucSeqNum
== prScanParam
->ucSeqNum
) {
954 /* generate scan-done event for caller */
955 scnFsmGenerateScanDoneMsg(prAdapter
,
956 prScanParam
->ucSeqNum
,
957 prScanParam
->ucBssIndex
, SCAN_STATUS_DONE
);
959 /* switch to next pending scan */
960 scnFsmSteps(prAdapter
, SCAN_STATE_IDLE
);
962 DBGLOG(SCN
, LOUD
, ("Unexpected SCAN-DONE event: SeqNum = %d, Current State = %d\n",
963 prScanDone
->ucSeqNum
, prScanInfo
->eCurrentState
));
967 } /* end of scnEventScanDone */
970 /*----------------------------------------------------------------------------*/
978 /*----------------------------------------------------------------------------*/
980 scnFsmGenerateScanDoneMsg(IN P_ADAPTER_T prAdapter
,
981 IN UINT_8 ucSeqNum
, IN UINT_8 ucBssIndex
, IN ENUM_SCAN_STATUS eScanStatus
)
983 P_SCAN_INFO_T prScanInfo
;
984 P_SCAN_PARAM_T prScanParam
;
985 P_MSG_SCN_SCAN_DONE prScanDoneMsg
;
989 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
990 prScanParam
= &prScanInfo
->rScanParam
;
993 (P_MSG_SCN_SCAN_DONE
) cnmMemAlloc(prAdapter
, RAM_TYPE_MSG
, sizeof(MSG_SCN_SCAN_DONE
));
994 if (!prScanDoneMsg
) {
995 ASSERT(0); /* Can't indicate SCAN FSM Complete */
999 if (prScanParam
->fgIsObssScan
== TRUE
) {
1000 prScanDoneMsg
->rMsgHdr
.eMsgId
= MID_SCN_RLM_SCAN_DONE
;
1002 switch (GET_BSS_INFO_BY_INDEX(prAdapter
, ucBssIndex
)->eNetworkType
) {
1003 case NETWORK_TYPE_AIS
:
1004 prScanDoneMsg
->rMsgHdr
.eMsgId
= MID_SCN_AIS_SCAN_DONE
;
1007 case NETWORK_TYPE_P2P
:
1008 prScanDoneMsg
->rMsgHdr
.eMsgId
= MID_SCN_P2P_SCAN_DONE
;
1011 case NETWORK_TYPE_BOW
:
1012 prScanDoneMsg
->rMsgHdr
.eMsgId
= MID_SCN_BOW_SCAN_DONE
;
1017 ("Unexpected Network Type: %d\n",
1018 GET_BSS_INFO_BY_INDEX(prAdapter
, ucBssIndex
)->eNetworkType
));
1024 prScanDoneMsg
->ucSeqNum
= ucSeqNum
;
1025 prScanDoneMsg
->ucBssIndex
= ucBssIndex
;
1026 prScanDoneMsg
->eScanStatus
= eScanStatus
;
1028 mboxSendMsg(prAdapter
, MBOX_ID_0
, (P_MSG_HDR_T
) prScanDoneMsg
, MSG_SEND_METHOD_BUF
);
1030 } /* end of scnFsmGenerateScanDoneMsg() */
1033 /*----------------------------------------------------------------------------*/
1035 * \brief Query for most sparse channel
1041 /*----------------------------------------------------------------------------*/
1043 scnQuerySparseChannel(IN P_ADAPTER_T prAdapter
,
1044 P_ENUM_BAND_T prSparseBand
, PUINT_8 pucSparseChannel
)
1046 P_SCAN_INFO_T prScanInfo
;
1050 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
1052 if (prScanInfo
->fgIsSparseChannelValid
== TRUE
) {
1054 *prSparseBand
= prScanInfo
->rSparseChannel
.eBand
;
1057 if (pucSparseChannel
) {
1058 *pucSparseChannel
= prScanInfo
->rSparseChannel
.ucChannelNum
;
1068 /*----------------------------------------------------------------------------*/
1070 * \brief Event handler for NLO done event
1076 /*----------------------------------------------------------------------------*/
1077 VOID
scnEventNloDone(IN P_ADAPTER_T prAdapter
, IN P_EVENT_NLO_DONE_T prNloDone
)
1079 P_SCAN_INFO_T prScanInfo
;
1080 P_NLO_PARAM_T prNloParam
;
1081 P_SCAN_PARAM_T prScanParam
;
1083 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
1084 prNloParam
= &prScanInfo
->rNloParam
;
1085 prScanParam
= &prNloParam
->rScanParam
;
1087 if (prScanInfo
->fgNloScanning
== TRUE
&& prNloDone
->ucSeqNum
== prScanParam
->ucSeqNum
) {
1088 kalSchedScanResults(prAdapter
->prGlueInfo
);
1090 if (prNloParam
->fgStopAfterIndication
== TRUE
) {
1091 prScanInfo
->fgNloScanning
= FALSE
;
1094 DBGLOG(SCN
, LOUD
, ("Unexpected NLO-DONE event: SeqNum = %d, Current State = %d\n",
1095 prNloDone
->ucSeqNum
, prScanInfo
->eCurrentState
));
1102 /*----------------------------------------------------------------------------*/
1104 * \brief OID handler for starting scheduled scan
1110 /*----------------------------------------------------------------------------*/
1112 scnFsmSchedScanRequest(IN P_ADAPTER_T prAdapter
,
1113 IN UINT_8 ucSsidNum
,
1114 IN P_PARAM_SSID_T prSsid
,
1115 IN UINT_32 u4IeLength
, IN PUINT_8 pucIe
, IN UINT_16 u2Interval
)
1117 P_SCAN_INFO_T prScanInfo
;
1118 P_NLO_PARAM_T prNloParam
;
1119 P_SCAN_PARAM_T prScanParam
;
1120 P_CMD_NLO_REQ prCmdNloReq
;
1125 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
1126 prNloParam
= &prScanInfo
->rNloParam
;
1127 prScanParam
= &prNloParam
->rScanParam
;
1129 ASSERT(prScanInfo
->fgNloScanning
== FALSE
);
1131 /* 1. load parameters */
1132 prScanParam
->ucSeqNum
++;
1133 prScanParam
->ucBssIndex
= prAdapter
->prAisBssInfo
->ucBssIndex
;
1134 prNloParam
->fgStopAfterIndication
= TRUE
;
1135 prNloParam
->ucFastScanIteration
= 0;
1136 prNloParam
->u2FastScanPeriod
= u2Interval
;
1137 prNloParam
->u2SlowScanPeriod
= u2Interval
;
1139 if (prScanParam
->ucSSIDNum
> CFG_SCAN_SSID_MAX_NUM
) {
1140 prScanParam
->ucSSIDNum
= CFG_SCAN_SSID_MAX_NUM
;
1142 prScanParam
->ucSSIDNum
= ucSsidNum
;
1145 if (prNloParam
->ucMatchSSIDNum
> CFG_SCAN_SSID_MATCH_MAX_NUM
) {
1146 prNloParam
->ucMatchSSIDNum
= CFG_SCAN_SSID_MATCH_MAX_NUM
;
1148 prNloParam
->ucMatchSSIDNum
= ucSsidNum
;
1151 for (i
= 0; i
< prNloParam
->ucMatchSSIDNum
; i
++) {
1152 if (i
< CFG_SCAN_SSID_MAX_NUM
) {
1153 COPY_SSID(prScanParam
->aucSpecifiedSSID
[i
],
1154 prScanParam
->ucSpecifiedSSIDLen
[i
],
1155 prSsid
[i
].aucSsid
, (UINT_8
) prSsid
[i
].u4SsidLen
);
1158 COPY_SSID(prNloParam
->aucMatchSSID
[i
],
1159 prNloParam
->ucMatchSSIDLen
[i
],
1160 prSsid
[i
].aucSsid
, (UINT_8
) prSsid
[i
].u4SsidLen
);
1162 prNloParam
->aucCipherAlgo
[i
] = 0;
1163 prNloParam
->au2AuthAlgo
[i
] = 0;
1165 for (j
= 0; j
< SCN_NLO_NETWORK_CHANNEL_NUM
; j
++) {
1166 prNloParam
->aucChannelHint
[i
][j
] = 0;
1170 /* 2. prepare command for sending */
1171 prCmdNloReq
= (P_CMD_NLO_REQ
) cnmMemAlloc(prAdapter
,
1173 sizeof(CMD_NLO_REQ
) + prScanParam
->u2IELen
);
1176 ASSERT(0); /* Can't initiate NLO operation */
1180 /* 3. send command packet for NLO operation */
1181 kalMemZero(prCmdNloReq
, sizeof(CMD_NLO_REQ
));
1183 prCmdNloReq
->ucSeqNum
= prScanParam
->ucSeqNum
;
1184 prCmdNloReq
->ucBssIndex
= prScanParam
->ucBssIndex
;
1185 prCmdNloReq
->fgStopAfterIndication
= prNloParam
->fgStopAfterIndication
;
1186 prCmdNloReq
->ucFastScanIteration
= prNloParam
->ucFastScanIteration
;
1187 prCmdNloReq
->u2FastScanPeriod
= prNloParam
->u2FastScanPeriod
;
1188 prCmdNloReq
->u2SlowScanPeriod
= prNloParam
->u2SlowScanPeriod
;
1189 prCmdNloReq
->ucEntryNum
= prNloParam
->ucMatchSSIDNum
;
1190 for (i
= 0; i
< prNloParam
->ucMatchSSIDNum
; i
++) {
1191 COPY_SSID(prCmdNloReq
->arNetworkList
[i
].aucSSID
,
1192 prCmdNloReq
->arNetworkList
[i
].ucSSIDLength
,
1193 prNloParam
->aucMatchSSID
[i
], prNloParam
->ucMatchSSIDLen
[i
]);
1195 prCmdNloReq
->arNetworkList
[i
].ucCipherAlgo
= prNloParam
->aucCipherAlgo
[i
];
1196 prCmdNloReq
->arNetworkList
[i
].u2AuthAlgo
= prNloParam
->au2AuthAlgo
[i
];
1198 for (j
= 0; j
< SCN_NLO_NETWORK_CHANNEL_NUM
; j
++) {
1199 prCmdNloReq
->arNetworkList
[i
].ucNumChannelHint
[j
] =
1200 prNloParam
->aucChannelHint
[i
][j
];
1204 if (prScanParam
->u2IELen
<= MAX_IE_LENGTH
) {
1205 prCmdNloReq
->u2IELen
= prScanParam
->u2IELen
;
1207 prCmdNloReq
->u2IELen
= MAX_IE_LENGTH
;
1210 if (prScanParam
->u2IELen
) {
1211 kalMemCopy(prCmdNloReq
->aucIE
,
1212 prScanParam
->aucIE
, sizeof(UINT_8
) * prCmdNloReq
->u2IELen
);
1215 wlanSendSetQueryCmd(prAdapter
,
1220 nicCmdEventSetCommon
,
1221 nicOidCmdTimeoutCommon
,
1222 sizeof(CMD_NLO_REQ
) + prCmdNloReq
->u2IELen
,
1223 (PUINT_8
) prCmdNloReq
, NULL
, 0);
1225 cnmMemFree(prAdapter
, (PVOID
) prCmdNloReq
);
1231 /*----------------------------------------------------------------------------*/
1233 * \brief OID handler for stopping scheduled scan
1239 /*----------------------------------------------------------------------------*/
1240 BOOLEAN
scnFsmSchedScanStopRequest(IN P_ADAPTER_T prAdapter
)
1242 P_SCAN_INFO_T prScanInfo
;
1243 P_NLO_PARAM_T prNloParam
;
1244 P_SCAN_PARAM_T prScanParam
;
1245 CMD_NLO_CANCEL rCmdNloCancel
;
1249 prScanInfo
= &(prAdapter
->rWifiVar
.rScanInfo
);
1250 prNloParam
= &prScanInfo
->rNloParam
;
1251 prScanParam
= &prNloParam
->rScanParam
;
1253 if (prScanInfo
->fgNloScanning
== TRUE
) {
1254 /* send cancel message to firmware domain */
1255 rCmdNloCancel
.ucSeqNum
= prScanParam
->ucSeqNum
;
1257 wlanSendSetQueryCmd(prAdapter
,
1258 CMD_ID_SET_NLO_CANCEL
,
1262 nicCmdEventSetStopSchedScan
,
1263 nicOidCmdTimeoutCommon
,
1264 sizeof(CMD_NLO_CANCEL
), (PUINT_8
) &rCmdNloCancel
, NULL
, 0);
1266 prScanInfo
->fgNloScanning
= FALSE
;