2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/mgmt/cnm.c#2 $
6 \brief Module of Concurrent Network Management
8 Module of Concurrent Network Management
16 * 07 17 2012 yuche.tsai
18 * Compile no error before trial run.
22 * Fix possible wrong message when P2P is unregistered
24 * 11 14 2011 yuche.tsai
25 * [WCXRP00001107] [Volunteer Patch][Driver] Large Network Type index assert in FW issue.
26 * Fix large network type index assert in FW issue.
30 * Modify debug message for XLOG
34 * Add RLM and CNM debug message for XLOG
37 * [WCXRP00001077] [All Wi-Fi][Driver] Fix wrong preferred channel for AP and BOW
38 * Only check AIS channel for P2P and BOW
41 * [WCXRP00001058] [All Wi-Fi][Driver] Fix sta_rec's phyTypeSet and OBSS scan in AP mode
42 * Extension channel of some 5G AP will not follow regulation requirement
45 * [WCXRP00001020] [MT6620 Wi-Fi][Driver] Handle secondary channel offset of AP in 5GHz band
49 * [WCXRP00000937] [MT6620 Wi-Fi][Driver][FW] cnm.c line #848 assert when doing monkey test
50 * Print message only in Linux platform for monkey testing
53 * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module
54 * change parameter name from PeerAddr to BSSID
57 * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module
58 * 1. specify target's BSSID when requesting channel privilege.
59 * 2. pass BSSID information to firmware domain
62 * [WCXRP00000756] [MT6620 Wi-Fi][Driver] 1. AIS follow channel of BOW 2. Provide legal channel function
63 * Limit AIS to fixed channel same with BOW
66 * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency
70 * [WCXRP00000358] [MT6620 Wi-Fi][Driver] Provide concurrent information for each module
71 * Check if P2P network index is Tethering AP
74 * [WCXRP00000358] [MT6620 Wi-Fi][Driver] Provide concurrent information for each module
75 * Add some functions to let AIS/Tethering or AIS/BOW be the same channel
78 * [WCXRP00000358] [MT6620 Wi-Fi][Driver] Provide concurrent information for each module
79 * When P2P registried, invoke BOW deactivate function
82 * [WCXRP00000358] [MT6620 Wi-Fi][Driver] Provide concurrent information for each module
83 * Provide function to decide if BSS can be activated or not
86 * [WCXRP00000239] MT6620 Wi-Fi][Driver][FW] Merge concurrent branch back to maintrunk
87 * 1. BSSINFO include RLM parameter
88 * 2. free all sta records when network is disconnected
91 * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant
92 * 1. Country code is from NVRAM or supplicant
93 * 2. Change band definition in CMD/EVENT.
96 * [WCXRP00000169] [MT6620 Wi-Fi][Driver][FW] Remove unused CNM recover message ID
97 * Remove CNM channel reover message ID
100 * [WCXRP00000094] [MT6620 Wi-Fi][Driver] Connect to 2.4GHz AP, Driver crash.
101 * Add exception handle when cmd buffer is not available
103 * 08 24 2010 cm.chang
105 * Support RLM initail channel of Ad-hoc, P2P and BOW
109 * update for security supporting.
111 * 07 19 2010 cm.chang
113 * Set RLM parameters and enable CNM channel manager
117 * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
119 * 07 08 2010 cm.chang
120 * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
121 * Rename MID_MNY_CNM_CH_RELEASE to MID_MNY_CNM_CH_ABORT
123 * 07 01 2010 cm.chang
124 * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
125 * Fix wrong message ID for channel grant to requester
127 * 07 01 2010 cm.chang
128 * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
129 * Modify CNM message handler for new flow
131 * 06 07 2010 cm.chang
132 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
133 * Set 20/40M bandwidth of AP HT OP before association process
135 * 05 31 2010 yarco.yang
136 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
137 * Add RX TSF Log Feature and ADDBA Rsp with DECLINE handling
139 * 05 21 2010 yarco.yang
140 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
141 * Support TCP/UDP/IP Checksum offload feature
143 * 05 12 2010 kevin.huang
144 * [BORA00000794][WIFISYS][New Feature]Power Management Support
145 * Add Power Management - Legacy PS-POLL support.
147 * 05 05 2010 cm.chang
148 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
149 * Add a new function to send abort message
151 * 04 27 2010 cm.chang
152 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
153 * BMC mac address shall be ignored in basic config command
155 * 04 24 2010 cm.chang
156 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
157 * g_aprBssInfo[] depends on CFG_SUPPORT_P2P and CFG_SUPPORT_BOW
159 * 04 22 2010 cm.chang
160 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
161 * Support change of MAC address by host command
164 * [BORA00000680][MT6620] Support the statistic for Micxxsoft os query
165 * adding the wpa-none for ibss beacon.
167 * 04 07 2010 cm.chang
168 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
169 * Fix bug for OBSS scan
171 * 03 30 2010 cm.chang
172 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
173 * Support 2.4G OBSS scan
175 * 03 16 2010 kevin.huang
176 * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support
179 * 03 10 2010 kevin.huang
180 * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support
182 * * * * * * * * * * Add Channel Manager for arbitration of JOIN and SCAN Req
185 * [BORA00000605][WIFISYS] Phase3 Integration
186 * use the Rx0 dor event indicate.
188 * 02 08 2010 cm.chang
189 * [BORA00000018]Integrate WIFI part into BORA for the 1st time
190 * Support partial part about cmd basic configuration
192 * Dec 10 2009 mtk01104
193 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
194 * Remove conditional compiling FPGA_V5
196 * Nov 18 2009 mtk01104
197 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
198 * Add function cnmFsmEventInit()
200 * Nov 2 2009 mtk01104
201 * [BORA00000018] Integrate WIFI part into BORA for the 1st time
206 /*******************************************************************************
207 * C O M P I L E R F L A G S
208 ********************************************************************************
211 /*******************************************************************************
212 * E X T E R N A L R E F E R E N C E S
213 ********************************************************************************
217 /*******************************************************************************
219 ********************************************************************************
222 /*******************************************************************************
224 ********************************************************************************
227 /*******************************************************************************
228 * P U B L I C D A T A
229 ********************************************************************************
232 /*******************************************************************************
233 * P R I V A T E D A T A
234 ********************************************************************************
237 /*******************************************************************************
239 ********************************************************************************
242 /*******************************************************************************
243 * F U N C T I O N D E C L A R A T I O N S
244 ********************************************************************************
247 /*******************************************************************************
249 ********************************************************************************
252 /*----------------------------------------------------------------------------*/
254 * @brief This function is used to initialize variables in CNM_INFO_T.
260 /*----------------------------------------------------------------------------*/
263 P_ADAPTER_T prAdapter
267 } /* end of cnmInit() */
269 /*----------------------------------------------------------------------------*/
271 * @brief This function is used to initialize variables in CNM_INFO_T.
277 /*----------------------------------------------------------------------------*/
280 P_ADAPTER_T prAdapter
284 } /* end of cnmUninit() */
286 /*----------------------------------------------------------------------------*/
288 * @brief Before handle the message from other module, it need to obtain
289 * the Channel privilege from Channel Manager
291 * @param[in] prMsgHdr The message need to be handled.
295 /*----------------------------------------------------------------------------*/
297 cnmChMngrRequestPrivilege (
298 P_ADAPTER_T prAdapter
,
302 P_MSG_CH_REQ_T prMsgChReq
;
303 P_CMD_CH_PRIVILEGE_T prCmdBody
;
309 prMsgChReq
= (P_MSG_CH_REQ_T
) prMsgHdr
;
311 prCmdBody
= (P_CMD_CH_PRIVILEGE_T
)
312 cnmMemAlloc(prAdapter
, RAM_TYPE_BUF
, sizeof(CMD_CH_PRIVILEGE_T
));
315 /* To do: exception handle */
317 DBGLOG(CNM
, ERROR
, ("ChReq: fail to get buf (net=%d, token=%d)\n",
318 prMsgChReq
->ucNetTypeIndex
, prMsgChReq
->ucTokenID
));
320 cnmMemFree(prAdapter
, prMsgHdr
);
324 DBGLOG(CNM
, INFO
, ("ChReq net=%d token=%d b=%d c=%d s=%d\n",
325 prMsgChReq
->ucNetTypeIndex
, prMsgChReq
->ucTokenID
,
326 prMsgChReq
->eRfBand
, prMsgChReq
->ucPrimaryChannel
,
327 prMsgChReq
->eRfSco
));
329 prCmdBody
->ucNetTypeIndex
= prMsgChReq
->ucNetTypeIndex
;
330 prCmdBody
->ucTokenID
= prMsgChReq
->ucTokenID
;
331 prCmdBody
->ucAction
= CMD_CH_ACTION_REQ
; /* Request */
332 prCmdBody
->ucPrimaryChannel
= prMsgChReq
->ucPrimaryChannel
;
333 prCmdBody
->ucRfSco
= (UINT_8
) prMsgChReq
->eRfSco
;
334 prCmdBody
->ucRfBand
= (UINT_8
) prMsgChReq
->eRfBand
;
335 prCmdBody
->ucReqType
= (UINT_8
) prMsgChReq
->eReqType
;
336 prCmdBody
->ucReserved
= 0;
337 prCmdBody
->u4MaxInterval
= prMsgChReq
->u4MaxInterval
;
338 COPY_MAC_ADDR(prCmdBody
->aucBSSID
, prMsgChReq
->aucBSSID
);
340 ASSERT(prCmdBody
->ucNetTypeIndex
< NETWORK_TYPE_INDEX_NUM
);
342 /* For monkey testing 20110901 */
343 if (prCmdBody
->ucNetTypeIndex
>= NETWORK_TYPE_INDEX_NUM
) {
344 DBGLOG(CNM
, ERROR
, ("CNM: ChReq with wrong netIdx=%d\n\n",
345 prCmdBody
->ucNetTypeIndex
));
348 rStatus
= wlanSendSetQueryCmd (
349 prAdapter
, /* prAdapter */
350 CMD_ID_CH_PRIVILEGE
, /* ucCID */
351 TRUE
, /* fgSetQuery */
352 FALSE
, /* fgNeedResp */
354 NULL
, /* pfCmdDoneHandler */
355 NULL
, /* pfCmdTimeoutHandler */
356 sizeof(CMD_CH_PRIVILEGE_T
), /* u4SetQueryInfoLen */
357 (PUINT_8
) prCmdBody
, /* pucInfoBuffer */
358 NULL
, /* pvSetQueryBuffer */
359 0 /* u4SetQueryBufferLen */
362 ASSERT(rStatus
== WLAN_STATUS_PENDING
);
364 cnmMemFree(prAdapter
, prCmdBody
);
365 cnmMemFree(prAdapter
, prMsgHdr
);
368 } /* end of cnmChMngrRequestPrivilege() */
370 /*----------------------------------------------------------------------------*/
372 * @brief Before deliver the message to other module, it need to release
373 * the Channel privilege to Channel Manager.
375 * @param[in] prMsgHdr The message need to be delivered
379 /*----------------------------------------------------------------------------*/
381 cnmChMngrAbortPrivilege (
382 P_ADAPTER_T prAdapter
,
386 P_MSG_CH_ABORT_T prMsgChAbort
;
387 P_CMD_CH_PRIVILEGE_T prCmdBody
;
393 prMsgChAbort
= (P_MSG_CH_ABORT_T
) prMsgHdr
;
395 prCmdBody
= (P_CMD_CH_PRIVILEGE_T
)
396 cnmMemAlloc(prAdapter
, RAM_TYPE_BUF
, sizeof(CMD_CH_PRIVILEGE_T
));
399 /* To do: exception handle */
401 DBGLOG(CNM
, ERROR
, ("ChAbort: fail to get buf (net=%d, token=%d)\n",
402 prMsgChAbort
->ucNetTypeIndex
, prMsgChAbort
->ucTokenID
));
404 cnmMemFree(prAdapter
, prMsgHdr
);
408 DBGLOG(CNM
, INFO
, ("ChAbort net=%d token=%d\n",
409 prMsgChAbort
->ucNetTypeIndex
, prMsgChAbort
->ucTokenID
));
411 prCmdBody
->ucNetTypeIndex
= prMsgChAbort
->ucNetTypeIndex
;
412 prCmdBody
->ucTokenID
= prMsgChAbort
->ucTokenID
;
413 prCmdBody
->ucAction
= CMD_CH_ACTION_ABORT
; /* Abort */
415 ASSERT(prCmdBody
->ucNetTypeIndex
< NETWORK_TYPE_INDEX_NUM
);
417 /* For monkey testing 20110901 */
418 if (prCmdBody
->ucNetTypeIndex
>= NETWORK_TYPE_INDEX_NUM
) {
419 DBGLOG(CNM
, ERROR
, ("CNM: ChAbort with wrong netIdx=%d\n\n",
420 prCmdBody
->ucNetTypeIndex
));
423 rStatus
= wlanSendSetQueryCmd (
424 prAdapter
, /* prAdapter */
425 CMD_ID_CH_PRIVILEGE
, /* ucCID */
426 TRUE
, /* fgSetQuery */
427 FALSE
, /* fgNeedResp */
429 NULL
, /* pfCmdDoneHandler */
430 NULL
, /* pfCmdTimeoutHandler */
431 sizeof(CMD_CH_PRIVILEGE_T
), /* u4SetQueryInfoLen */
432 (PUINT_8
) prCmdBody
, /* pucInfoBuffer */
433 NULL
, /* pvSetQueryBuffer */
434 0 /* u4SetQueryBufferLen */
437 ASSERT(rStatus
== WLAN_STATUS_PENDING
);
439 cnmMemFree(prAdapter
, prCmdBody
);
440 cnmMemFree(prAdapter
, prMsgHdr
);
443 } /* end of cnmChMngrAbortPrivilege() */
445 /*----------------------------------------------------------------------------*/
453 /*----------------------------------------------------------------------------*/
455 cnmChMngrHandleChEvent (
456 P_ADAPTER_T prAdapter
,
457 P_WIFI_EVENT_T prEvent
460 P_EVENT_CH_PRIVILEGE_T prEventBody
;
461 P_MSG_CH_GRANT_T prChResp
;
466 prEventBody
= (P_EVENT_CH_PRIVILEGE_T
) (prEvent
->aucBuffer
);
467 prChResp
= (P_MSG_CH_GRANT_T
)
468 cnmMemAlloc(prAdapter
, RAM_TYPE_MSG
, sizeof(MSG_CH_GRANT_T
));
471 /* To do: exception handle */
473 DBGLOG(CNM
, ERROR
, ("ChGrant: fail to get buf (net=%d, token=%d)\n",
474 prEventBody
->ucNetTypeIndex
, prEventBody
->ucTokenID
));
479 DBGLOG(CNM
, INFO
, ("ChGrant net=%d token=%d ch=%d sco=%d\n",
480 prEventBody
->ucNetTypeIndex
, prEventBody
->ucTokenID
,
481 prEventBody
->ucPrimaryChannel
, prEventBody
->ucRfSco
));
483 ASSERT(prEventBody
->ucNetTypeIndex
< NETWORK_TYPE_INDEX_NUM
);
484 ASSERT(prEventBody
->ucStatus
== EVENT_CH_STATUS_GRANT
);
486 /* Decide message ID based on network and response status */
487 if (prEventBody
->ucNetTypeIndex
== NETWORK_TYPE_AIS_INDEX
) {
488 prChResp
->rMsgHdr
.eMsgId
= MID_CNM_AIS_CH_GRANT
;
490 #if CFG_ENABLE_WIFI_DIRECT
491 else if ((prAdapter
->fgIsP2PRegistered
) &&
492 (prEventBody
->ucNetTypeIndex
== NETWORK_TYPE_P2P_INDEX
)) {
493 prChResp
->rMsgHdr
.eMsgId
= MID_CNM_P2P_CH_GRANT
;
496 #if CFG_ENABLE_BT_OVER_WIFI
497 else if (prEventBody
->ucNetTypeIndex
== NETWORK_TYPE_BOW_INDEX
) {
498 prChResp
->rMsgHdr
.eMsgId
= MID_CNM_BOW_CH_GRANT
;
502 cnmMemFree(prAdapter
, prChResp
);
506 prChResp
->ucNetTypeIndex
= prEventBody
->ucNetTypeIndex
;
507 prChResp
->ucTokenID
= prEventBody
->ucTokenID
;
508 prChResp
->ucPrimaryChannel
= prEventBody
->ucPrimaryChannel
;
509 prChResp
->eRfSco
= (ENUM_CHNL_EXT_T
) prEventBody
->ucRfSco
;
510 prChResp
->eRfBand
= (ENUM_BAND_T
) prEventBody
->ucRfBand
;
511 prChResp
->eReqType
= (ENUM_CH_REQ_TYPE_T
) prEventBody
->ucReqType
;
512 prChResp
->u4GrantInterval
= prEventBody
->u4GrantInterval
;
514 mboxSendMsg(prAdapter
,
516 (P_MSG_HDR_T
) prChResp
,
517 MSG_SEND_METHOD_BUF
);
520 /*----------------------------------------------------------------------------*/
522 * @brief This function is invoked for P2P or BOW networks
526 * @return TRUE: suggest to adopt the returned preferred channel
527 * FALSE: No suggestion. Caller should adopt its preference
529 /*----------------------------------------------------------------------------*/
531 cnmPreferredChannel (
532 P_ADAPTER_T prAdapter
,
533 P_ENUM_BAND_T prBand
,
534 PUINT_8 pucPrimaryChannel
,
535 P_ENUM_CHNL_EXT_T prBssSCO
538 P_BSS_INFO_T prBssInfo
;
542 ASSERT(pucPrimaryChannel
);
545 prBssInfo
= &prAdapter
->rWifiVar
.arBssInfo
[NETWORK_TYPE_AIS_INDEX
];
547 if (RLM_NET_PARAM_VALID(prBssInfo
)) {
548 *prBand
= prBssInfo
->eBand
;
549 *pucPrimaryChannel
= prBssInfo
->ucPrimaryChannel
;
550 *prBssSCO
= prBssInfo
->eBssSCO
;
558 /*----------------------------------------------------------------------------*/
564 * @return TRUE: available channel is limited to return value
567 /*----------------------------------------------------------------------------*/
569 cnmAisInfraChannelFixed (
570 P_ADAPTER_T prAdapter
,
571 P_ENUM_BAND_T prBand
,
572 PUINT_8 pucPrimaryChannel
575 #if CFG_ENABLE_WIFI_DIRECT ||(CFG_ENABLE_BT_OVER_WIFI && CFG_BOW_LIMIT_AIS_CHNL)
576 P_BSS_INFO_T prBssInfo
;
579 #if CFG_ENABLE_WIFI_DIRECT
580 if (IS_NET_ACTIVE(prAdapter
, NETWORK_TYPE_P2P_INDEX
) &&
581 p2pFuncIsAPMode(prAdapter
->rWifiVar
.prP2pFsmInfo
)) {
583 ASSERT(prAdapter
->fgIsP2PRegistered
);
585 prBssInfo
= &prAdapter
->rWifiVar
.arBssInfo
[NETWORK_TYPE_P2P_INDEX
];
587 *prBand
= prBssInfo
->eBand
;
588 *pucPrimaryChannel
= prBssInfo
->ucPrimaryChannel
;
594 #if CFG_ENABLE_BT_OVER_WIFI && CFG_BOW_LIMIT_AIS_CHNL
595 if (IS_NET_ACTIVE(prAdapter
, NETWORK_TYPE_BOW_INDEX
)) {
597 prBssInfo
= &prAdapter
->rWifiVar
.arBssInfo
[NETWORK_TYPE_BOW_INDEX
];
599 *prBand
= prBssInfo
->eBand
;
600 *pucPrimaryChannel
= prBssInfo
->ucPrimaryChannel
;
608 #if CFG_SUPPORT_CHNL_CONFLICT_REVISE && CFG_ENABLE_WIFI_DIRECT
610 cnmAisDetectP2PChannel (
611 P_ADAPTER_T prAdapter
,
612 P_ENUM_BAND_T prBand
,
613 PUINT_8 pucPrimaryChannel
616 P_WIFI_VAR_T prWifiVar
= &prAdapter
->rWifiVar
;
617 P_BSS_INFO_T prP2PBssInfo
= &prWifiVar
->arBssInfo
[NETWORK_TYPE_P2P_INDEX
];
618 if (prP2PBssInfo
->eConnectionState
== PARAM_MEDIA_STATE_CONNECTED
||
619 (prP2PBssInfo
->eCurrentOPMode
== OP_MODE_ACCESS_POINT
&&
620 prP2PBssInfo
->eIntendOPMode
== OP_MODE_NUM
)) {
621 *prBand
= prP2PBssInfo
->eBand
;
622 *pucPrimaryChannel
= prP2PBssInfo
->ucPrimaryChannel
;
628 /*----------------------------------------------------------------------------*/
636 /*----------------------------------------------------------------------------*/
638 cnmAisInfraConnectNotify (
639 P_ADAPTER_T prAdapter
642 #if CFG_ENABLE_BT_OVER_WIFI
643 P_BSS_INFO_T prAisBssInfo
, prBowBssInfo
;
645 prAisBssInfo
= &prAdapter
->rWifiVar
.arBssInfo
[NETWORK_TYPE_AIS_INDEX
];
646 prBowBssInfo
= &prAdapter
->rWifiVar
.arBssInfo
[NETWORK_TYPE_BOW_INDEX
];
648 if (RLM_NET_PARAM_VALID(prAisBssInfo
) && RLM_NET_PARAM_VALID(prBowBssInfo
)){
649 if (prAisBssInfo
->eBand
!= prBowBssInfo
->eBand
||
650 prAisBssInfo
->ucPrimaryChannel
!= prBowBssInfo
->ucPrimaryChannel
) {
652 /* Notify BOW to do deactivation */
653 bowNotifyAllLinkDisconnected(prAdapter
);
659 /*----------------------------------------------------------------------------*/
665 * @return TRUE: permitted
666 * FALSE: Not permitted
668 /*----------------------------------------------------------------------------*/
670 cnmAisIbssIsPermitted (
671 P_ADAPTER_T prAdapter
674 #if CFG_ENABLE_WIFI_DIRECT
675 if (IS_NET_ACTIVE(prAdapter
, NETWORK_TYPE_P2P_INDEX
)) {
680 #if CFG_ENABLE_BT_OVER_WIFI
681 if (IS_NET_ACTIVE(prAdapter
, NETWORK_TYPE_BOW_INDEX
)) {
689 /*----------------------------------------------------------------------------*/
695 * @return TRUE: permitted
696 * FALSE: Not permitted
698 /*----------------------------------------------------------------------------*/
701 P_ADAPTER_T prAdapter
704 P_BSS_INFO_T prBssInfo
;
706 prBssInfo
= &prAdapter
->rWifiVar
.arBssInfo
[NETWORK_TYPE_AIS_INDEX
];
708 if (IS_BSS_ACTIVE(prBssInfo
) &&
709 prBssInfo
->eCurrentOPMode
== OP_MODE_IBSS
) {
713 #if CFG_ENABLE_BT_OVER_WIFI
714 if (IS_NET_ACTIVE(prAdapter
, NETWORK_TYPE_BOW_INDEX
)) {
715 /* Notify BOW to do deactivation */
716 bowNotifyAllLinkDisconnected(prAdapter
);
723 /*----------------------------------------------------------------------------*/
729 * @return TRUE: permitted
730 * FALSE: Not permitted
732 /*----------------------------------------------------------------------------*/
735 P_ADAPTER_T prAdapter
738 P_BSS_INFO_T prBssInfo
;
740 prBssInfo
= &prAdapter
->rWifiVar
.arBssInfo
[NETWORK_TYPE_AIS_INDEX
];
742 if (IS_BSS_ACTIVE(prBssInfo
) &&
743 prBssInfo
->eCurrentOPMode
== OP_MODE_IBSS
) {
747 #if CFG_ENABLE_WIFI_DIRECT
748 if (IS_NET_ACTIVE(prAdapter
, NETWORK_TYPE_P2P_INDEX
)) {
756 /*----------------------------------------------------------------------------*/
762 * @return TRUE: permitted
763 * FALSE: Not permitted
765 /*----------------------------------------------------------------------------*/
767 cnmBss40mBwPermitted (
768 P_ADAPTER_T prAdapter
,
769 ENUM_NETWORK_TYPE_INDEX_T eNetTypeIdx
772 P_BSS_INFO_T prBssInfo
;
775 /* Note: To support real-time decision instead of current activated-time,
776 * the STA roaming case shall be considered about synchronization
777 * problem. Another variable fgAssoc40mBwAllowed is added to
778 * represent HT capability when association
780 for (i
= 0; i
< NETWORK_TYPE_INDEX_NUM
; i
++) {
781 if (i
!= (UINT_8
) eNetTypeIdx
) {
782 prBssInfo
= &prAdapter
->rWifiVar
.arBssInfo
[i
];
784 if (IS_BSS_ACTIVE(prBssInfo
) && (prBssInfo
->fg40mBwAllowed
||
785 prBssInfo
->fgAssoc40mBwAllowed
)) {