1 /******************************************************************************
\r
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
\r
5 * This program is free software; you can redistribute it and/or modify it
\r
6 * under the terms of version 2 of the GNU General Public License as
\r
7 * published by the Free Software Foundation.
\r
9 * This program is distributed in the hope that it will be useful, but WITHOUT
\r
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
\r
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
\r
14 * You should have received a copy of the GNU General Public License along with
\r
15 * this program; if not, write to the Free Software Foundation, Inc.,
\r
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
\r
19 ******************************************************************************/
\r
21 //============================================================
\r
23 //============================================================
\r
24 #include "Mp_Precomp.h"
25 #include "phydm_precomp.h"
\r
28 odm_DynamicTxPowerInit(
32 PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
\r
33 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
\r
34 PADAPTER Adapter = pDM_Odm->Adapter;
35 PMGNT_INFO pMgntInfo = &Adapter->MgntInfo;
36 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
38 #if DEV_BUS_TYPE==RT_USB_INTERFACE
39 if(RT_GetInterfaceSelection(Adapter) == INTF_SEL1_USB_High_Power)
41 odm_DynamicTxPowerSavePowerIndex(pDM_Odm);
42 pMgntInfo->bDynamicTxPowerEnable = TRUE;
46 //so 92c pci do not need dynamic tx power? vivi check it later
47 if(IS_HARDWARE_TYPE_8192D(Adapter))
48 pMgntInfo->bDynamicTxPowerEnable = TRUE;
50 pMgntInfo->bDynamicTxPowerEnable = FALSE;
54 pHalData->LastDTPLvl = TxHighPwrLevel_Normal;
55 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
63 odm_DynamicTxPowerSavePowerIndex(
67 PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
68 #if (DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_WIN))
70 u4Byte Power_Index_REG[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a};
\r
72 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
73 PADAPTER Adapter = pDM_Odm->Adapter;
74 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
75 for(index = 0; index< 6; index++)
76 pHalData->PowerIndex_backup[index] = PlatformEFIORead1Byte(Adapter, Power_Index_REG[index]);
84 odm_DynamicTxPowerRestorePowerIndex(
88 PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
\r
89 #if (DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_WIN))
91 PADAPTER Adapter = pDM_Odm->Adapter;
\r
92 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
93 u4Byte Power_Index_REG[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a};
94 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
95 for(index = 0; index< 6; index++)
96 PlatformEFIOWrite1Byte(Adapter, Power_Index_REG[index], pHalData->PowerIndex_backup[index]);
104 odm_DynamicTxPowerWritePowerIndex(
105 IN PVOID pDM_VOID,
\r
108 PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
\r
110 u4Byte Power_Index_REG[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a};
112 for(index = 0; index< 6; index++)
113 //PlatformEFIOWrite1Byte(Adapter, Power_Index_REG[index], Value);
114 ODM_Write1Byte(pDM_Odm, Power_Index_REG[index], Value);
125 // For AP/ADSL use prtl8192cd_priv
126 // For CE/NIC use PADAPTER
128 //PADAPTER pAdapter = pDM_Odm->Adapter;
129 // prtl8192cd_priv priv = pDM_Odm->priv;
130 PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
\r
131 if (!(pDM_Odm->SupportAbility & ODM_BB_DYNAMIC_TXPWR))
134 // 2011/09/29 MH In HW integration first stage, we provide 4 different handle to operate
135 // at the same time. In the stage2/3, we need to prive universal interface and merge all
136 // HW dynamic mechanism.
138 switch (pDM_Odm->SupportPlatform)
142 odm_DynamicTxPowerNIC(pDM_Odm);
145 odm_DynamicTxPowerAP(pDM_Odm);
149 //odm_DIGAP(pDM_Odm);
158 odm_DynamicTxPowerNIC(
162 PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
\r
164 if (!(pDM_Odm->SupportAbility & ODM_BB_DYNAMIC_TXPWR))
\r
167 #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
169 if(pDM_Odm->SupportICType == ODM_RTL8192C)
171 odm_DynamicTxPower_92C(pDM_Odm);
173 else if(pDM_Odm->SupportICType == ODM_RTL8192D)
175 odm_DynamicTxPower_92D(pDM_Odm);
177 else if (pDM_Odm->SupportICType == ODM_RTL8821)
179 #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN))
180 PADAPTER Adapter = pDM_Odm->Adapter;
181 PMGNT_INFO pMgntInfo = GetDefaultMgntInfo(Adapter);
183 if (pMgntInfo->RegRspPwr == 1)
185 if(pDM_Odm->RSSI_Min > 60)
187 ODM_SetMACReg(pDM_Odm, ODM_REG_RESP_TX_11AC, BIT20|BIT19|BIT18, 1); // Resp TXAGC offset = -3dB
190 else if(pDM_Odm->RSSI_Min < 55)
192 ODM_SetMACReg(pDM_Odm, ODM_REG_RESP_TX_11AC, BIT20|BIT19|BIT18, 0); // Resp TXAGC offset = 0dB
201 odm_DynamicTxPowerAP(
206 PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
\r
207 #if (DM_ODM_SUPPORT_TYPE == ODM_AP)
209 //#if ((RTL8192C_SUPPORT==1) || (RTL8192D_SUPPORT==1) || (RTL8188E_SUPPORT==1) || (RTL8812E_SUPPORT==1))
212 prtl8192cd_priv priv = pDM_Odm->priv;
214 s2Byte pwr_thd = TX_POWER_NEAR_FIELD_THRESH_AP;
216 if(!priv->pshare->rf_ft_var.tx_pwr_ctrl)
219 #if ((RTL8812E_SUPPORT==1) || (RTL8881A_SUPPORT==1) || (RTL8814A_SUPPORT==1))
220 if (pDM_Odm->SupportICType & (ODM_RTL8812 | ODM_RTL8881A | ODM_RTL8814A))
221 pwr_thd = TX_POWER_NEAR_FIELD_THRESH_8812;
224 #if defined(CONFIG_RTL_92D_SUPPORT) || defined(CONFIG_RTL_92C_SUPPORT)
225 if(CHIP_VER_92X_SERIES(priv))
227 #ifdef HIGH_POWER_EXT_PA
229 tx_power_control(priv);
234 * Check if station is near by to use lower tx power
237 if ((priv->up_time % 3) == 0 ) {
238 int disable_pwr_ctrl = ((pDM_Odm->FalseAlmCnt.Cnt_all > 1000 ) || ((pDM_Odm->FalseAlmCnt.Cnt_all > 300 ) && ((RTL_R8(0xc50) & 0x7f) >= 0x32))) ? 1 : 0;
240 for(i=0; i<ODM_ASSOCIATE_ENTRY_NUM; i++){
241 PSTA_INFO_T pstat = pDM_Odm->pODM_StaInfo[i];
242 if(IS_STA_VALID(pstat) ) {
245 else if ((pstat->hp_level == 0) && (pstat->rssi > pwr_thd))
247 else if ((pstat->hp_level == 1) && (pstat->rssi < (pwr_thd-8)))
252 #if defined(CONFIG_WLAN_HAL_8192EE)
253 if (GET_CHIP_VER(priv) == VERSION_8192E) {
254 if( !disable_pwr_ctrl && (pDM_Odm->RSSI_Min != 0xff) ) {
255 if(pDM_Odm->RSSI_Min > pwr_thd)
256 RRSR_power_control_11n(priv, 1 );
257 else if(pDM_Odm->RSSI_Min < (pwr_thd-8))
258 RRSR_power_control_11n(priv, 0 );
260 RRSR_power_control_11n(priv, 0 );
265 #ifdef CONFIG_WLAN_HAL_8814AE
266 if (GET_CHIP_VER(priv) == VERSION_8814A) {
267 if (!disable_pwr_ctrl && (pDM_Odm->RSSI_Min != 0xff)) {
\r
268 if (pDM_Odm->RSSI_Min > pwr_thd)
\r
269 RRSR_power_control_14(priv, 1);
\r
270 else if (pDM_Odm->RSSI_Min < (pwr_thd-8))
\r
271 RRSR_power_control_14(priv, 0);
\r
273 RRSR_power_control_14(priv, 0);
\r
286 odm_DynamicTxPower_92C(
290 PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
\r
291 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
292 PADAPTER Adapter = pDM_Odm->Adapter;
293 PMGNT_INFO pMgntInfo = &Adapter->MgntInfo;
294 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
295 s4Byte UndecoratedSmoothedPWDB;
297 // 2012/01/12 MH According to Luke's suggestion, only high power will support the feature.
298 if (pDM_Odm->ExtPA == FALSE)
301 // STA not connected and AP not connected
302 if((!pMgntInfo->bMediaConnect) &&
303 (pHalData->EntryMinUndecoratedSmoothedPWDB == 0))
305 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("Not connected to any \n"));
306 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
308 //the LastDTPlvl should reset when disconnect,
309 //otherwise the tx power level wouldn't change when disconnect and connect again.
311 pHalData->LastDTPLvl=TxHighPwrLevel_Normal;
315 #if (INTEL_PROXIMITY_SUPPORT == 1)
316 // Intel set fixed tx power
317 if(pMgntInfo->IntelProximityModeInfo.PowerOutput > 0)
319 switch(pMgntInfo->IntelProximityModeInfo.PowerOutput){
321 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_100;
322 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_100\n"));
325 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_70;
326 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_70\n"));
329 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_50;
330 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_50\n"));
333 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_35;
334 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_35\n"));
337 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_15;
338 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_15\n"));
341 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_100;
342 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_100\n"));
349 if( (pMgntInfo->bDynamicTxPowerEnable != TRUE) ||
350 pMgntInfo->IOTAction & HT_IOT_ACT_DISABLE_HIGH_POWER)
352 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
356 if(pMgntInfo->bMediaConnect) // Default port
358 if(ACTING_AS_AP(Adapter) || ACTING_AS_IBSS(Adapter))
360 UndecoratedSmoothedPWDB = pHalData->EntryMinUndecoratedSmoothedPWDB;
361 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("AP Client PWDB = 0x%x \n", UndecoratedSmoothedPWDB));
365 UndecoratedSmoothedPWDB = pHalData->UndecoratedSmoothedPWDB;
366 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("STA Default Port PWDB = 0x%x \n", UndecoratedSmoothedPWDB));
369 else // associated entry pwdb
371 UndecoratedSmoothedPWDB = pHalData->EntryMinUndecoratedSmoothedPWDB;
372 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("AP Ext Port PWDB = 0x%x \n", UndecoratedSmoothedPWDB));
375 if(UndecoratedSmoothedPWDB >= TX_POWER_NEAR_FIELD_THRESH_LVL2)
377 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Level2;
378 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_Level1 (TxPwr=0x0)\n"));
380 else if((UndecoratedSmoothedPWDB < (TX_POWER_NEAR_FIELD_THRESH_LVL2-3)) &&
381 (UndecoratedSmoothedPWDB >= TX_POWER_NEAR_FIELD_THRESH_LVL1) )
383 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Level1;
384 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_Level1 (TxPwr=0x10)\n"));
386 else if(UndecoratedSmoothedPWDB < (TX_POWER_NEAR_FIELD_THRESH_LVL1-5))
388 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
389 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_Normal\n"));
393 if( pHalData->DynamicTxHighPowerLvl != pHalData->LastDTPLvl )
395 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("PHY_SetTxPowerLevel8192C() Channel = %d \n" , pHalData->CurrentChannel));
396 PHY_SetTxPowerLevel8192C(Adapter, pHalData->CurrentChannel);
397 if( (pHalData->DynamicTxHighPowerLvl == TxHighPwrLevel_Normal) &&
398 (pHalData->LastDTPLvl == TxHighPwrLevel_Level1 || pHalData->LastDTPLvl == TxHighPwrLevel_Level2)) //TxHighPwrLevel_Normal
399 odm_DynamicTxPowerRestorePowerIndex(pDM_Odm);
400 else if(pHalData->DynamicTxHighPowerLvl == TxHighPwrLevel_Level1)
401 odm_DynamicTxPowerWritePowerIndex(pDM_Odm, 0x14);
402 else if(pHalData->DynamicTxHighPowerLvl == TxHighPwrLevel_Level2)
403 odm_DynamicTxPowerWritePowerIndex(pDM_Odm, 0x10);
405 pHalData->LastDTPLvl = pHalData->DynamicTxHighPowerLvl;
410 #endif // #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
\r
416 odm_DynamicTxPower_92D(
420 #if (RTL8192D_SUPPORT==1)
421 PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
\r
422 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
\r
423 PADAPTER Adapter = pDM_Odm->Adapter;
424 PMGNT_INFO pMgntInfo = &Adapter->MgntInfo;
425 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
426 s4Byte UndecoratedSmoothedPWDB;
428 PADAPTER BuddyAdapter = Adapter->BuddyAdapter;
429 BOOLEAN bGetValueFromBuddyAdapter = dm_DualMacGetParameterFromBuddyAdapter(Adapter);
430 u1Byte HighPowerLvlBackForMac0 = TxHighPwrLevel_Level1;
432 // 2012/01/12 MH According to Luke's suggestion, only high power will support the feature.
433 if (pDM_Odm->ExtPA == FALSE)
436 // If dynamic high power is disabled.
437 if( (pMgntInfo->bDynamicTxPowerEnable != TRUE) ||
438 pMgntInfo->IOTAction & HT_IOT_ACT_DISABLE_HIGH_POWER)
440 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
444 // STA not connected and AP not connected
445 if((!pMgntInfo->bMediaConnect) &&
446 (pHalData->EntryMinUndecoratedSmoothedPWDB == 0))
448 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("Not connected to any \n"));
449 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
451 //the LastDTPlvl should reset when disconnect,
452 //otherwise the tx power level wouldn't change when disconnect and connect again.
454 pHalData->LastDTPLvl=TxHighPwrLevel_Normal;
458 if(pMgntInfo->bMediaConnect) // Default port
460 if(ACTING_AS_AP(Adapter) || pMgntInfo->mIbss)
462 UndecoratedSmoothedPWDB = pHalData->EntryMinUndecoratedSmoothedPWDB;
463 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("AP Client PWDB = 0x%x \n", UndecoratedSmoothedPWDB));
467 UndecoratedSmoothedPWDB = pHalData->UndecoratedSmoothedPWDB;
468 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("STA Default Port PWDB = 0x%x \n", UndecoratedSmoothedPWDB));
471 else // associated entry pwdb
473 UndecoratedSmoothedPWDB = pHalData->EntryMinUndecoratedSmoothedPWDB;
474 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("AP Ext Port PWDB = 0x%x \n", UndecoratedSmoothedPWDB));
477 if(IS_HARDWARE_TYPE_8192D(Adapter) && GET_HAL_DATA(Adapter)->CurrentBandType == 1){
478 if(UndecoratedSmoothedPWDB >= 0x33)
480 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Level2;
481 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("5G:TxHighPwrLevel_Level2 (TxPwr=0x0)\n"));
483 else if((UndecoratedSmoothedPWDB <0x33) &&
484 (UndecoratedSmoothedPWDB >= 0x2b) )
486 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Level1;
487 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("5G:TxHighPwrLevel_Level1 (TxPwr=0x10)\n"));
489 else if(UndecoratedSmoothedPWDB < 0x2b)
491 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
492 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("5G:TxHighPwrLevel_Normal\n"));
499 if(UndecoratedSmoothedPWDB >= TX_POWER_NEAR_FIELD_THRESH_LVL2)
501 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Level1;
502 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_Level1 (TxPwr=0x0)\n"));
504 else if((UndecoratedSmoothedPWDB < (TX_POWER_NEAR_FIELD_THRESH_LVL2-3)) &&
505 (UndecoratedSmoothedPWDB >= TX_POWER_NEAR_FIELD_THRESH_LVL1) )
507 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Level1;
508 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_Level1 (TxPwr=0x10)\n"));
510 else if(UndecoratedSmoothedPWDB < (TX_POWER_NEAR_FIELD_THRESH_LVL1-5))
512 pHalData->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
513 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("TxHighPwrLevel_Normal\n"));
518 //sherry delete flag 20110517
519 if(bGetValueFromBuddyAdapter)
521 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR,DBG_LOUD,("dm_DynamicTxPower() mac 0 for mac 1 \n"));
522 if(Adapter->DualMacDMSPControl.bChangeTxHighPowerLvlForAnotherMacOfDMSP)
524 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR,DBG_LOUD,("dm_DynamicTxPower() change value \n"));
525 HighPowerLvlBackForMac0 = pHalData->DynamicTxHighPowerLvl;
526 pHalData->DynamicTxHighPowerLvl = Adapter->DualMacDMSPControl.CurTxHighLvlForAnotherMacOfDMSP;
527 PHY_SetTxPowerLevel8192C(Adapter, pHalData->CurrentChannel);
528 pHalData->DynamicTxHighPowerLvl = HighPowerLvlBackForMac0;
529 Adapter->DualMacDMSPControl.bChangeTxHighPowerLvlForAnotherMacOfDMSP = FALSE;
533 if( (pHalData->DynamicTxHighPowerLvl != pHalData->LastDTPLvl) )
535 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR, DBG_LOUD, ("PHY_SetTxPowerLevel8192S() Channel = %d \n" , pHalData->CurrentChannel));
536 if(Adapter->DualMacSmartConcurrent == TRUE)
538 if(BuddyAdapter == NULL)
540 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR,DBG_LOUD,("dm_DynamicTxPower() BuddyAdapter == NULL case \n"));
541 if(!Adapter->bSlaveOfDMSP)
543 PHY_SetTxPowerLevel8192C(Adapter, pHalData->CurrentChannel);
548 if(pHalData->MacPhyMode92D == DUALMAC_SINGLEPHY)
550 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR,DBG_LOUD,("dm_DynamicTxPower() BuddyAdapter DMSP \n"));
551 if(Adapter->bSlaveOfDMSP)
553 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR,DBG_LOUD,("dm_DynamicTxPower() bslave case \n"));
554 BuddyAdapter->DualMacDMSPControl.bChangeTxHighPowerLvlForAnotherMacOfDMSP = TRUE;
555 BuddyAdapter->DualMacDMSPControl.CurTxHighLvlForAnotherMacOfDMSP = pHalData->DynamicTxHighPowerLvl;
559 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR,DBG_LOUD,("dm_DynamicTxPower() master case \n"));
560 if(!bGetValueFromBuddyAdapter)
562 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR,DBG_LOUD,("dm_DynamicTxPower() mac 0 for mac 0 \n"));
563 PHY_SetTxPowerLevel8192C(Adapter, pHalData->CurrentChannel);
569 ODM_RT_TRACE(pDM_Odm,ODM_COMP_DYNAMIC_TXPWR,DBG_LOUD,("dm_DynamicTxPower() BuddyAdapter DMDP\n"));
570 PHY_SetTxPowerLevel8192C(Adapter, pHalData->CurrentChannel);
576 PHY_SetTxPowerLevel8192C(Adapter, pHalData->CurrentChannel);
580 pHalData->LastDTPLvl = pHalData->DynamicTxHighPowerLvl;
583 #endif // #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
\r