/* ========================================================================== Description: MLME PROBE req state machine procedure ========================================================================== */ static VOID ApCliMlmeProbeReqAction( IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM *Elem) { BOOLEAN Cancelled; APCLI_MLME_JOIN_REQ_STRUCT *Info = (APCLI_MLME_JOIN_REQ_STRUCT *)(Elem->Msg); USHORT ifIndex = (USHORT)(Elem->Priv); PULONG pCurrState = &pAd->ApCfg.ApCliTab[ifIndex].SyncCurrState; DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - ApCliMlmeProbeReqAction(Ssid %s)\n", Info->Ssid)); /* reset all the timers */ RTMPCancelTimer(&pAd->ApCliMlmeAux.ProbeTimer, &Cancelled); pAd->ApCliMlmeAux.Rssi = -9999; pAd->ApCliMlmeAux.Channel = pAd->CommonCfg.Channel; pAd->ApCliMlmeAux.SupRateLen = pAd->CommonCfg.SupRateLen; NdisMoveMemory(pAd->ApCliMlmeAux.SupRate, pAd->CommonCfg.SupRate, pAd->CommonCfg.SupRateLen); /* Prepare the default value for extended rate */ pAd->ApCliMlmeAux.ExtRateLen = pAd->CommonCfg.ExtRateLen; NdisMoveMemory(pAd->ApCliMlmeAux.ExtRate, pAd->CommonCfg.ExtRate, pAd->CommonCfg.ExtRateLen); RTMPSetTimer(&pAd->ApCliMlmeAux.ProbeTimer, PROBE_TIMEOUT); ApCliEnqueueProbeRequest(pAd, Info->SsidLen, (PCHAR) Info->Ssid, ifIndex); DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - Start Probe the SSID %s on channel =%d\n", pAd->ApCliMlmeAux.Ssid, pAd->ApCliMlmeAux.Channel)); *pCurrState = APCLI_JOIN_WAIT_PROBE_RSP; return; }
/* ========================================================================== Description: MLME PROBE req state machine procedure ========================================================================== */ static VOID ApCliMlmeProbeReqAction( IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM *Elem) { BOOLEAN Cancelled; APCLI_MLME_JOIN_REQ_STRUCT *Info = (APCLI_MLME_JOIN_REQ_STRUCT *)(Elem->Msg); USHORT ifIndex = (USHORT)(Elem->Priv); PULONG pCurrState = &pAd->ApCfg.ApCliTab[ifIndex].SyncCurrState; PAPCLI_STRUCT pApCliEntry = NULL; DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - ApCliMlmeProbeReqAction(Ssid %s), ifIndex = %d\n", Info->Ssid, ifIndex)); if (ifIndex >= MAX_APCLI_NUM) return; pApCliEntry = &pAd->ApCfg.ApCliTab[ifIndex]; /* reset all the timers */ RTMPCancelTimer(&(pApCliEntry->ApCliMlmeAux.ProbeTimer), &Cancelled); pApCliEntry->ApCliMlmeAux.Rssi = -9999; #ifdef APCLI_CONNECTION_TRIAL if (pApCliEntry->TrialCh ==0) #endif pApCliEntry->ApCliMlmeAux.Channel = pAd->CommonCfg.Channel; #ifdef APCLI_CONNECTION_TRIAL else pApCliEntry->ApCliMlmeAux.Channel = pApCliEntry->TrialCh; #endif pApCliEntry->ApCliMlmeAux.SupRateLen = pAd->CommonCfg.SupRateLen; NdisMoveMemory(pApCliEntry->ApCliMlmeAux.SupRate, pAd->CommonCfg.SupRate, pAd->CommonCfg.SupRateLen); /* Prepare the default value for extended rate */ pApCliEntry->ApCliMlmeAux.ExtRateLen = pAd->CommonCfg.ExtRateLen; NdisMoveMemory(pApCliEntry->ApCliMlmeAux.ExtRate, pAd->CommonCfg.ExtRate, pAd->CommonCfg.ExtRateLen); RTMPSetTimer(&(pApCliEntry->ApCliMlmeAux.ProbeTimer), PROBE_TIMEOUT); #ifdef APCLI_CONNECTION_TRIAL NdisZeroMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Bssid, MAC_ADDR_LEN); NdisZeroMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Ssid, MAX_LEN_OF_SSID); NdisCopyMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Bssid, pAd->ApCfg.ApCliTab[ifIndex].CfgApCliBssid, MAC_ADDR_LEN); NdisCopyMemory(pAd->ApCfg.ApCliTab[ifIndex].ApCliMlmeAux.Ssid, pAd->ApCfg.ApCliTab[ifIndex].CfgSsid, pAd->ApCfg.ApCliTab[ifIndex].CfgSsidLen); #endif ApCliEnqueueProbeRequest(pAd, Info->SsidLen, (PCHAR) Info->Ssid, ifIndex); DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - Start Probe the SSID %s on channel =%d\n", pApCliEntry->ApCliMlmeAux.Ssid, pApCliEntry->ApCliMlmeAux.Channel)); *pCurrState = APCLI_JOIN_WAIT_PROBE_RSP; return; }
/* ========================================================================== Description: MLME PROBE req state machine procedure ========================================================================== */ static VOID ApCliMlmeProbeReqAction( IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM *Elem) { BOOLEAN Cancelled; APCLI_MLME_JOIN_REQ_STRUCT *Info = (APCLI_MLME_JOIN_REQ_STRUCT *)(Elem->Msg); USHORT ifIndex = (USHORT)(Elem->Priv); PULONG pCurrState = &pAd->ApCfg.ApCliTab[ifIndex].SyncCurrState; APCLI_STRUCT *pApCliEntry = NULL; DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - ApCliMlmeProbeReqAction(Ssid %s)\n", Info->Ssid)); if (ifIndex >= MAX_APCLI_NUM) return; pApCliEntry = &pAd->ApCfg.ApCliTab[ifIndex]; /* reset all the timers */ RTMPCancelTimer(&(pApCliEntry->MlmeAux.ProbeTimer), &Cancelled); pApCliEntry->MlmeAux.Rssi = -9999; ULONG bss_idx = BSS_NOT_FOUND; bss_idx = BssSsidTableSearchBySSID(&pAd->ScanTab, (PCHAR)Info->Ssid, Info->SsidLen); if (bss_idx == BSS_NOT_FOUND) { #ifdef APCLI_CONNECTION_TRIAL if (pApCliEntry->TrialCh ==0) pApCliEntry->MlmeAux.Channel = pAd->CommonCfg.Channel; else pApCliEntry->MlmeAux.Channel = pApCliEntry->TrialCh; #else pApCliEntry->MlmeAux.Channel = pAd->CommonCfg.Channel; #endif /* APCLI_CONNECTION_TRIAL */ } else { #ifdef APCLI_CONNECTION_TRIAL if (pApCliEntry->TrialCh ==0) pApCliEntry->MlmeAux.Channel = pAd->CommonCfg.Channel; else pApCliEntry->MlmeAux.Channel = pApCliEntry->TrialCh; #else DBGPRINT(RT_DEBUG_TRACE, ("%s, Found %s in scanTable , goto channel %d\n", __FUNCTION__, pAd->ScanTab.BssEntry[bss_idx].Ssid, pAd->ScanTab.BssEntry[bss_idx].Channel)); pApCliEntry->MlmeAux.Channel = pAd->ScanTab.BssEntry[bss_idx].Channel; #endif /* APCLI_CONNECTION_TRIAL */ } #ifdef RT_CFG80211_P2P_CONCURRENT_DEVICE pApCliEntry->MlmeAux.SupRateLen = pAd->cfg80211_ctrl.P2pSupRateLen; NdisMoveMemory(pApCliEntry->MlmeAux.SupRate, pAd->cfg80211_ctrl.P2pSupRate, pAd->cfg80211_ctrl.P2pSupRateLen); pApCliEntry->MlmeAux.ExtRateLen = pAd->cfg80211_ctrl.P2pExtRateLen; NdisMoveMemory(pApCliEntry->MlmeAux.ExtRate, pAd->cfg80211_ctrl.P2pExtRate, pAd->cfg80211_ctrl.P2pExtRateLen); #else pApCliEntry->MlmeAux.SupRateLen = pAd->CommonCfg.SupRateLen; NdisMoveMemory(pApCliEntry->MlmeAux.SupRate, pAd->CommonCfg.SupRate, pAd->CommonCfg.SupRateLen); /* Prepare the default value for extended rate */ pApCliEntry->MlmeAux.ExtRateLen = pAd->CommonCfg.ExtRateLen; NdisMoveMemory(pApCliEntry->MlmeAux.ExtRate, pAd->CommonCfg.ExtRate, pAd->CommonCfg.ExtRateLen); #endif /* RT_CFG80211_P2P_CONCURRENT_DEVICE */ RTMPSetTimer(&(pApCliEntry->MlmeAux.ProbeTimer), PROBE_TIMEOUT); #ifdef APCLI_CONNECTION_TRIAL NdisZeroMemory(pAd->ApCfg.ApCliTab[ifIndex].MlmeAux.Bssid, MAC_ADDR_LEN); NdisZeroMemory(pAd->ApCfg.ApCliTab[ifIndex].MlmeAux.Ssid, MAX_LEN_OF_SSID); NdisCopyMemory(pAd->ApCfg.ApCliTab[ifIndex].MlmeAux.Bssid, pAd->ApCfg.ApCliTab[ifIndex].CfgApCliBssid, MAC_ADDR_LEN); NdisCopyMemory(pAd->ApCfg.ApCliTab[ifIndex].MlmeAux.Ssid, pAd->ApCfg.ApCliTab[ifIndex].CfgSsid, pAd->ApCfg.ApCliTab[ifIndex].CfgSsidLen); #endif /* APCLI_CONNECTION_TRIAL */ ApCliEnqueueProbeRequest(pAd, Info->SsidLen, (PCHAR) Info->Ssid, ifIndex); DBGPRINT(RT_DEBUG_TRACE, ("ApCli SYNC - Start Probe the SSID %s on channel =%d\n", pApCliEntry->MlmeAux.Ssid, pApCliEntry->MlmeAux.Channel)); *pCurrState = APCLI_JOIN_WAIT_PROBE_RSP; return; }