/* ======================================================================== Routine Description: Bbp Radar detection routine Arguments: pAd Pointer to our adapter Return Value: ======================================================================== */ VOID BbpRadarDetectionStart( IN PRTMP_ADAPTER pAd) { UINT8 RadarPeriod; RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 114, 0x02); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 121, 0x20); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 122, 0x00); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 123, 0x08/*0x80*/); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 124, 0x28); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 125, 0xff); #ifdef MERGE_ARCH_TEAM if ((pAd->CommonCfg.RadarDetect.RDDurRegion == JAP) || (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W53) || (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W56)) { pAd->CommonCfg.RadarDetect.RDDurRegion = JAP; pAd->CommonCfg.RadarDetect.RDDurRegion = JapRadarType(pAd); if (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W56) { pAd->CommonCfg.RadarDetect.DfsSessionTime = 13; } else if (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W53) { pAd->CommonCfg.RadarDetect.DfsSessionTime = 15; } #ifdef CARRIER_DETECTION_SUPPORT pAd->CommonCfg.CarrierDetect.Enable = 1; #endif // CARRIER_DETECTION_SUPPORT // } #endif // MERGE_ARCH_TEAM // RadarPeriod = ((UINT)RdIdleTimeTable[pAd->CommonCfg.RadarDetect.RDDurRegion][0] + (UINT)pAd->CommonCfg.RadarDetect.DfsSessionTime) < 250 ? (RdIdleTimeTable[pAd->CommonCfg.RadarDetect.RDDurRegion][0] + pAd->CommonCfg.RadarDetect.DfsSessionTime) : 250; #ifdef MERGE_ARCH_TEAM #ifdef CONFIG_AP_SUPPORT #ifdef CARRIER_DETECTION_SUPPORT if (pAd->CommonCfg.CarrierDetect.Enable == TRUE) { // make sure CarrierDetect wont send CTS CARRIER_DETECT_STOP(pAd); } #endif // CARRIER_DETECTION_SUPPORT // #endif // CONFIG_AP_SUPPORT // #else // Original RT28xx source code. RTMP_IO_WRITE8(pAd, 0x7020, 0x1d); RTMP_IO_WRITE8(pAd, 0x7021, 0x40); #endif // MERGE_ARCH_TEAM // RadarDetectionStart(pAd, 0, RadarPeriod); return; }
/* ======================================================================== Routine Description: Bbp Radar detection routine Arguments: pAd Pointer to our adapter Return Value: ======================================================================== */ VOID BbpRadarDetectionStart( IN PRTMP_ADAPTER pAd) { UINT8 RadarPeriod; if (pAd->CommonCfg.dfs_func >= HARDWARE_DFS_V1) { return; } RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 114, 0x02); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 121, 0x20); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 122, 0x00); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 123, 0x08/*0x80*/); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 124, 0x28); RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 125, 0xff); #ifdef RTMP_RBUS_SUPPORT if ((pAd->CommonCfg.RadarDetect.RDDurRegion == JAP) || (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W53) || (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W56)) { pAd->CommonCfg.RadarDetect.RDDurRegion = JAP; pAd->CommonCfg.RadarDetect.RDDurRegion = JapRadarType(pAd); if (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W56) { pAd->CommonCfg.RadarDetect.DfsSessionTime = 13; } else if (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W53) { pAd->CommonCfg.RadarDetect.DfsSessionTime = 15; } } #endif /* RTMP_RBUS_SUPPORT */ RadarPeriod = ((UINT)RdIdleTimeTable[pAd->CommonCfg.RadarDetect.RDDurRegion][0] + (UINT)pAd->CommonCfg.RadarDetect.DfsSessionTime) < 250 ? (RdIdleTimeTable[pAd->CommonCfg.RadarDetect.RDDurRegion][0] + pAd->CommonCfg.RadarDetect.DfsSessionTime) : 250; #ifdef RTMP_RBUS_SUPPORT #ifdef RT2880 pAd->CommonCfg.R65 = 0x1d; pAd->CommonCfg.R66 = 0x60; #endif /* RT2880 */ #ifdef CONFIG_AP_SUPPORT #ifdef CARRIER_DETECTION_SUPPORT if (pAd->CommonCfg.CarrierDetect.Enable == TRUE) { /* make sure CarrierDetect wont send CTS*/ CARRIER_DETECT_STOP(pAd); } #endif /* CARRIER_DETECTION_SUPPORT */ #endif /* CONFIG_AP_SUPPORT */ #else /* Original RT28xx source code.*/ RTMP_IO_WRITE8(pAd, 0x7020, 0x1d); RTMP_IO_WRITE8(pAd, 0x7021, 0x40); #endif /* RTMP_RBUS_SUPPORT */ RadarDetectionStart(pAd, 0, RadarPeriod); return; }