/*----------------------------------------------------------------------------*/ VOID kalP2PIndicateSecCheckRsp ( IN P_GLUE_INFO_T prGlueInfo, IN PUINT_8 pucRsp, IN UINT_16 u2RspLen ) { union iwreq_data evt; UINT_8 aucBuffer[IW_CUSTOM_MAX]; ASSERT(prGlueInfo); memset(&evt, 0, sizeof(evt)); snprintf(aucBuffer, IW_CUSTOM_MAX-1, "P2P_SEC_CHECK_RSP="); kalMemCopy(prGlueInfo->prP2PInfo->aucSecCheckRsp, pucRsp, u2RspLen); evt.data.length = strlen(aucBuffer); #if DBG DBGLOG_MEM8(SEC, LOUD, prGlueInfo->prP2PInfo->aucSecCheckRsp, u2RspLen); #endif /* indicate in IWECUSTOM event */ wireless_send_event(prGlueInfo->prP2PInfo->prDevHandler, IWEVCUSTOM, &evt, aucBuffer); return; } /* p2pFsmRunEventRxDisassociation */
/*----------------------------------------------------------------------------*/ WLAN_STATUS wlanoidGetSecCheckResponse(IN P_ADAPTER_T prAdapter, IN PVOID pvQueryBuffer, IN UINT_32 u4QueryBufferLen, OUT PUINT_32 pu4QueryInfoLen) { WLAN_STATUS rWlanStatus = WLAN_STATUS_SUCCESS; /* P_WLAN_MAC_HEADER_T prWlanHdr = (P_WLAN_MAC_HEADER_T)NULL; */ P_GLUE_INFO_T prGlueInfo; prGlueInfo = prAdapter->prGlueInfo; ASSERT(prAdapter); ASSERT(pu4QueryInfoLen); if (u4QueryBufferLen) { ASSERT(pvQueryBuffer); } if (u4QueryBufferLen > 256) { u4QueryBufferLen = 256; } *pu4QueryInfoLen = u4QueryBufferLen; #if DBG DBGLOG_MEM8(SEC, LOUD, prGlueInfo->prP2PInfo->aucSecCheckRsp, u4QueryBufferLen); #endif kalMemCopy((PUINT_8) (pvQueryBuffer + OFFSET_OF(IW_P2P_TRANSPORT_STRUCT, aucBuffer)), prGlueInfo->prP2PInfo->aucSecCheckRsp, u4QueryBufferLen); return rWlanStatus; } /* end of wlanoidGetSecCheckResponse() */
/*----------------------------------------------------------------------------*/ WLAN_STATUS authCheckRxAuthFrameTransSeq(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb) { P_WLAN_AUTH_FRAME_T prAuthFrame; UINT_16 u2RxTransactionSeqNum; UINT_16 u2MinPayloadLen; ASSERT(prSwRfb); /* 4 <1> locate the Authentication Frame. */ prAuthFrame = (P_WLAN_AUTH_FRAME_T) prSwRfb->pvHeader; /* 4 <2> Parse the Header of Authentication Frame. */ u2MinPayloadLen = (AUTH_ALGORITHM_NUM_FIELD_LEN + AUTH_TRANSACTION_SEQENCE_NUM_FIELD_LEN + STATUS_CODE_FIELD_LEN); if ((prSwRfb->u2PacketLen - prSwRfb->u2HeaderLen) < u2MinPayloadLen) { DBGLOG(SAA, WARN, "Rx Auth payload: len[%u] < min expected len[%u]\n", (prSwRfb->u2PacketLen - prSwRfb->u2HeaderLen), u2MinPayloadLen); DBGLOG(SAA, WARN, "=== Dump Rx Auth ===\n"); DBGLOG_MEM8(SAA, WARN, prAuthFrame, prSwRfb->u2PacketLen); return WLAN_STATUS_SUCCESS; } /* 4 <3> Parse the Fixed Fields of Authentication Frame Body. */ /* WLAN_GET_FIELD_16(&prAuthFrame->u2AuthTransSeqNo, &u2RxTransactionSeqNum); */ u2RxTransactionSeqNum = prAuthFrame->u2AuthTransSeqNo; /* NOTE(Kevin): Optimized for ARM */ switch (u2RxTransactionSeqNum) { case AUTH_TRANSACTION_SEQ_2: case AUTH_TRANSACTION_SEQ_4: saaFsmRunEventRxAuth(prAdapter, prSwRfb); break; case AUTH_TRANSACTION_SEQ_1: case AUTH_TRANSACTION_SEQ_3: #if CFG_SUPPORT_AAA aaaFsmRunEventRxAuth(prAdapter, prSwRfb); #endif /* CFG_SUPPORT_AAA */ break; default: DBGLOG(SAA, WARN, "Strange Authentication Packet: Auth Trans Seq No = %d, Error Status Code = %d\n", u2RxTransactionSeqNum, prAuthFrame->u2StatusCode); break; } return WLAN_STATUS_SUCCESS; } /* end of authCheckRxAuthFrameTransSeq() */