//4 <2.1> Validate Assoc Req Frame and get Status Code
/* Check if for this BSSID */
if (WLAN_STATUS_SUCCESS ==
assocProcessRxAssocReqFrame(prAdapter,
prSwRfb,
&u2StatusCode)) {
if (STATUS_CODE_SUCCESSFUL == u2StatusCode) {
//4 <2.2> Validate Assoc Req Frame for Network Specific Conditions
fgReplyAssocResp = p2pFuncValidateAssocReq(
prAdapter,
prSwRfb,
(PUINT_16)&u2StatusCode);
}
else {
fgReplyAssocResp = TRUE;
}
break;
}
}
}
#endif /* CFG_ENABLE_WIFI_DIRECT */
作者: zangcf 时间: 2016-5-13 06:26
/*----------------------------------------------------------------------------*/
/*!
* @brief This function will validate the Rx Auth Frame and then return
* the status code to AAA to indicate if need to perform following actions
* when the specified conditions were matched.
*
* @param[in] prAdapter Pointer to the Adapter structure.
* @param[in] prSwRfb Pointer to SW RFB data structure.
* @param[in] pprStaRec Pointer to pointer of STA_RECORD_T structure.
* @param[out] pu2StatusCode The Status Code of Validation Result
*
* @retval TRUE Reply the Auth
* @retval FALSE Don't reply the Auth
*/
/*----------------------------------------------------------------------------*/
BOOLEAN
p2pFuncValidateAuth (
IN P_ADAPTER_T prAdapter,
IN P_SW_RFB_T prSwRfb,
IN PP_STA_RECORD_T pprStaRec,
OUT PUINT_16 pu2StatusCode
)
{
BOOLEAN fgReplyAuth = TRUE;
P_BSS_INFO_T prP2pBssInfo = (P_BSS_INFO_T)NULL;
P_STA_RECORD_T prStaRec = (P_STA_RECORD_T)NULL;
P_WLAN_AUTH_FRAME_T prAuthFrame = (P_WLAN_AUTH_FRAME_T)NULL;
if ((prP2pBssInfo->eCurrentOPMode != OP_MODE_ACCESS_POINT) || (prP2pBssInfo->eIntendOPMode != OP_MODE_NUM)) {
/* We are not under AP Mode yet. */
fgReplyAuth = FALSE;
DBGLOG(P2P, WARN, ("Current OP mode is not under AP mode. (%d)\n", prP2pBssInfo->eCurrentOPMode));
break;
}
if (!prStaRec) {
prStaRec = cnmStaRecAlloc(prAdapter,
(UINT_8) NETWORK_TYPE_P2P_INDEX);
/* TODO(Kevin): Error handling of allocation of STA_RECORD_T for
* exhausted case and do removal of unused STA_RECORD_T.
*/
/* Sent a message event to clean un-used STA_RECORD_T. */
ASSERT(prStaRec);
if (!prStaRec) {
DBGLOG(AAA, INFO, ("Station Limit Full. Decline a new Authentication.\n"));
break;
}
for (i = 0; i < 80; i++) {//zcfdebug
if (UNEQUAL_MAC_ADDR(rbssid, aucNullAddr)) {
if (EQUAL_MAC_ADDR(&(prGlueInfo->prP2PInfo->aucblackMACList), rbssid)) {
fgIsExsit = TRUE;
return fgIsExsit;
}
}
}
return fgIsExsit;
}
作者: zangcf 时间: 2016-5-13 06:28
#if CFG_SUPPORT_HOTSPOT_WPS_MANAGER
/* Hotspot Client Management */
PARAM_MAC_ADDRESS aucblackMACList[80]; // dependent with #define P2P_MAXIMUM_CLIENT_COUNT 10, fix me to PARAM_MAC_ADDRESS aucblackMACList[P2P_MAXIMUM_CLIENT_COUNT];
UINT_8 ucMaxClients;
#endif