/*#include "r8180.h" */#include"r8180_dm.h"#include"r8180_hw.h"#include"r8180_93cx6.h"/*{by amy 080312 *//* * Description: * Return TRUE if we shall perform High Power Mecahnism, FALSE otherwise. * *+by amy 080312 */#define RATE_ADAPTIVE_TIMER_PERIOD 300boolCheckHighPower(structnet_device*dev){structr8180_priv*priv=ieee80211_priv(dev);structieee80211_device*ieee=priv->ieee80211;if(!priv->bRegHighPowerMechanism)returnfalse;if(ieee->state==IEEE80211_LINKED_SCANNING)returnfalse;returntrue;}/* * Description: * Update Tx power level if necessary. * See also DoRxHighPower() and SetTxPowerLevel8185() for reference. * * Note: * The reason why we udpate Tx power level here instead of DoRxHighPower() * is the number of IO to change Tx power is much more than channel TR switch * and they are related to OFDM and MAC registers. * So, we don't want to update it so frequently in per-Rx packet base. */voidDoTxHighPower(structnet_device*dev){structr8180_priv*priv=ieee80211_priv(dev);u16HiPwrUpperTh=0;u16HiPwrLowerTh=0;u8RSSIHiPwrUpperTh;u8RSSIHiPwrLowerTh;u8u1bTmp;charOfdmTxPwrIdx,CckTxPwrIdx;/* printk("----> DoTxHighPower()\n"); */HiPwrUpperTh=priv->RegHiPwrUpperTh;HiPwrLowerTh=priv->RegHiPwrLowerTh;HiPwrUpperTh=HiPwrUpperTh*10;HiPwrLowerTh=HiPwrLowerTh*10;RSSIHiPwrUpperTh=priv->RegRSSIHiPwrUpperTh;RSSIHiPwrLowerTh=priv->RegRSSIHiPwrLowerTh;/* lzm add 080826 */OfdmTxPwrIdx=priv->chtxpwr_ofdm[priv->ieee80211->current_network.channel];CckTxPwrIdx=priv->chtxpwr[priv->