Пример #1
0
UCHAR SelectBestChannel(
	IN PRTMP_ADAPTER pAd,	
	IN ChannelSel_Alg Alg)
{
	UCHAR ch = 0;

	/* init pAd->pChannelInfo->IsABand */
	CheckPhyModeIsABand(pAd);
    
#ifdef MICROWAVE_OVEN_SUPPORT
	if (Alg == ChannelAlgCCA)
		pAd->CommonCfg.MO_Cfg.bEnable = TRUE;
#endif
	switch ( Alg )
	{
		case ChannelAlgRandom:
		case ChannelAlgApCnt:
			ch = SelectClearChannelApCnt(pAd);
			break;
		case ChannelAlgCCA:
			ch = SelectClearChannelCCA(pAd);
			break;
		default:
			ch = SelectClearChannelCCA(pAd);
			break;
	}

	RTMPSendWirelessEvent(pAd, IW_CHANNEL_CHANGE_EVENT_FLAG, 0, 0, ch);

	return ch;

}
Пример #2
0
UCHAR SelectBestChannel(
	IN PRTMP_ADAPTER pAd,	
	IN ChannelSel_Alg Alg)
{
	UCHAR ch = 0;

	/* init pAd->pChannelInfo->IsABand */
	CheckPhyModeIsABand(pAd);
    
	switch ( Alg )
	{
		case ChannelAlgRandom:
		case ChannelAlgApCnt:
			ch = SelectClearChannelApCnt(pAd);
			break;
		case ChannelAlgCCA:
			ch = SelectClearChannelCCA(pAd);
			break;
		default:
			ch = SelectClearChannelCCA(pAd);
			break;
	}

	RTMPSendWirelessEvent(pAd, IW_CHANNEL_CHANGE_EVENT_FLAG, 0, 0, ch);

	return ch;

}
Пример #3
0
VOID APAutoChannelInit(IN PRTMP_ADAPTER pAd)
{
	UINT32 BusyTime;

	/* reset bss table */
	AutoChBssTableReset(pAd);

	/* clear Channel Info */
	ChannelInfoReset(pAd);

	/* init pAd->pChannelInfo->IsABand */
	CheckPhyModeIsABand(pAd);

	pAd->ApCfg.current_channel_index = 0;

	/* read clear for primary channel */
	RTMP_IO_READ32(pAd, CH_BUSY_STA, &BusyTime);
}
Пример #4
0
VOID APAutoChannelInit(RTMP_ADAPTER *pAd)
{
	UINT32 BusyTime;

	/* reset bss table */
	AutoChBssTableReset(pAd);

	/* clear Channel Info */
	ChannelInfoReset(pAd);

	/* init pAd->pChannelInfo->IsABand */
	CheckPhyModeIsABand(pAd);

	pAd->ApCfg.current_channel_index = 0;

	/* read clear for primary channel */
	BusyTime = AsicGetChBusyCnt(pAd, 0);
}
Пример #5
0
/* 
	==========================================================================
	Description:
        Perform ACS algorithm to come out all channel rankings
	Return:
		INT -  Total channel number of the ranking list (0 means fail)
	==========================================================================
*/
INT32 ACS_PerformAlgorithm(RTMP_ADAPTER *pAd, ChannelSel_Alg Alg)
{
    INT32 TotalNum = 0;
    
	/* init pAd->pChannelInfo->IsABand */
	CheckPhyModeIsABand(pAd);
    
    if (Alg != ChannelAlgCombined)
    {
        /* Currently we only support AlgCombined */
        DBGPRINT(RT_DEBUG_ERROR, ("ACS Algorithm %d is not supported!\n", Alg));
        return TotalNum;
    }
    if (ACS_UpdateDirtinessAll(pAd))
    {
        DBGPRINT(RT_DEBUG_ERROR, ("ACS Update Dirtiness failed!\n"));
        return TotalNum;
    }
    //ACS_DumpChannelInfo(pAd);
    TotalNum = ACS_DoChannelRanking(pAd);
    
    return TotalNum;
}