UINT_32 wfdFuncCalculateWfdIELenForAssocRsp ( IN P_ADAPTER_T prAdapter, IN ENUM_NETWORK_TYPE_INDEX_T eNetTypeIndex, IN P_STA_RECORD_T prStaRec ) { #if CFG_SUPPORT_WFD_COMPOSE_IE P_WFD_CFG_SETTINGS_T prWfdCfgSettings = (P_WFD_CFG_SETTINGS_T)NULL; prWfdCfgSettings = &(prAdapter->rWifiVar.prP2pFsmInfo->rWfdConfigureSettings); if ( !IS_STA_P2P_TYPE(prStaRec) || (prWfdCfgSettings->ucWfdEnable == 0)) { return 0; } return p2pFuncCalculateP2P_IELen(prAdapter, eNetTypeIndex, prStaRec, txAssocRspWFDAttributesTable, sizeof(txAssocRspWFDAttributesTable)/sizeof(APPEND_VAR_ATTRI_ENTRY_T)); #else return 0; #endif } /* wfdFuncCalculateWfdIELenForAssocRsp */
VOID wfdFuncGenerateWfdIEForAssocRsp(IN P_ADAPTER_T prAdapter, IN P_MSDU_INFO_T prMsduInfo) { #if CFG_SUPPORT_WFD_COMPOSE_IE P_WFD_CFG_SETTINGS_T prWfdCfgSettings = (P_WFD_CFG_SETTINGS_T) NULL; P_STA_RECORD_T prStaRec; do { ASSERT_BREAK((prMsduInfo != NULL) && (prAdapter != NULL)); prWfdCfgSettings = &(prAdapter->rWifiVar.prP2pFsmInfo->rWfdConfigureSettings); prStaRec = cnmGetStaRecByIndex(prAdapter, prMsduInfo->ucStaRecIndex); if (IS_STA_P2P_TYPE(prStaRec)) { if (prWfdCfgSettings->ucWfdEnable == 0) { break; } if ((prWfdCfgSettings->u4WfdFlag & WFD_FLAGS_DEV_INFO_VALID) == 0) { break; } wfdFuncGenerateWfd_IE(prAdapter, FALSE, &prMsduInfo->u2FrameLength, prMsduInfo->prPacket, 1500, txAssocRspWFDAttributesTable, sizeof (txAssocRspWFDAttributesTable) / sizeof(APPEND_VAR_ATTRI_ENTRY_T)); } } while (FALSE); return; #else return; #endif } /* wfdFuncGenerateWfdIEForAssocRsp */