Staging: rtl8187se: r8180_dm.c: Fix spacing issues
Fix spacing around keywords, '*', binary and ternary operators, and fix the format of statments and function declaration. Signed-off-by: Andrew Miller <amiller@amilx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1748d2de4e
commit
536d190d77
1 changed files with 197 additions and 245 deletions
|
@ -36,10 +36,7 @@ bool CheckHighPower(struct net_device *dev)
|
||||||
// and they are related to OFDM and MAC registers.
|
// and they are related to OFDM and MAC registers.
|
||||||
// So, we don't want to update it so frequently in per-Rx packet base.
|
// So, we don't want to update it so frequently in per-Rx packet base.
|
||||||
//
|
//
|
||||||
void
|
void DoTxHighPower(struct net_device *dev)
|
||||||
DoTxHighPower(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = ieee80211_priv(dev);
|
struct r8180_priv *priv = ieee80211_priv(dev);
|
||||||
u16 HiPwrUpperTh = 0;
|
u16 HiPwrUpperTh = 0;
|
||||||
|
@ -136,10 +133,7 @@ void rtl8180_tx_pw_wq (struct work_struct *work)
|
||||||
// Description:
|
// Description:
|
||||||
// Return TRUE if we shall perform DIG Mecahnism, FALSE otherwise.
|
// Return TRUE if we shall perform DIG Mecahnism, FALSE otherwise.
|
||||||
//
|
//
|
||||||
bool
|
bool CheckDig(struct net_device *dev)
|
||||||
CheckDig(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = ieee80211_priv(dev);
|
struct r8180_priv *priv = ieee80211_priv(dev);
|
||||||
struct ieee80211_device *ieee = priv->ieee80211;
|
struct ieee80211_device *ieee = priv->ieee80211;
|
||||||
|
@ -159,10 +153,7 @@ CheckDig(
|
||||||
// Description:
|
// Description:
|
||||||
// Implementation of DIG for Zebra and Zebra2.
|
// Implementation of DIG for Zebra and Zebra2.
|
||||||
//
|
//
|
||||||
void
|
void DIG_Zebra(struct net_device *dev)
|
||||||
DIG_Zebra(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = ieee80211_priv(dev);
|
struct r8180_priv *priv = ieee80211_priv(dev);
|
||||||
u16 CCKFalseAlarm, OFDMFalseAlarm;
|
u16 CCKFalseAlarm, OFDMFalseAlarm;
|
||||||
|
@ -256,8 +247,7 @@ DIG_Zebra(
|
||||||
// Description:
|
// Description:
|
||||||
// Dispatch DIG implementation according to RF.
|
// Dispatch DIG implementation according to RF.
|
||||||
//
|
//
|
||||||
void
|
void DynamicInitGain(struct net_device *dev)
|
||||||
DynamicInitGain(struct net_device *dev)
|
|
||||||
{
|
{
|
||||||
DIG_Zebra(dev);
|
DIG_Zebra(dev);
|
||||||
}
|
}
|
||||||
|
@ -278,10 +268,7 @@ void rtl8180_hw_dig_wq (struct work_struct *work)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int IncludedInSupportedRates(struct r8180_priv *priv, u8 TxRate)
|
||||||
IncludedInSupportedRates(
|
|
||||||
struct r8180_priv *priv,
|
|
||||||
u8 TxRate )
|
|
||||||
{
|
{
|
||||||
u8 rate_len;
|
u8 rate_len;
|
||||||
u8 rate_ex_len;
|
u8 rate_ex_len;
|
||||||
|
@ -315,11 +302,7 @@ IncludedInSupportedRates(
|
||||||
// Return the upgrade rate if it is successed, otherwise return the input rate.
|
// Return the upgrade rate if it is successed, otherwise return the input rate.
|
||||||
// By Bruce, 2007-06-05.
|
// By Bruce, 2007-06-05.
|
||||||
//
|
//
|
||||||
u8
|
u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
|
||||||
GetUpgradeTxRate(
|
|
||||||
struct net_device *dev,
|
|
||||||
u8 rate
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = ieee80211_priv(dev);
|
struct r8180_priv *priv = ieee80211_priv(dev);
|
||||||
u8 UpRate;
|
u8 UpRate;
|
||||||
|
@ -382,11 +365,7 @@ GetUpgradeTxRate(
|
||||||
// Return the degrade rate if it is successed, otherwise return the input rate.
|
// Return the degrade rate if it is successed, otherwise return the input rate.
|
||||||
// By Bruce, 2007-06-05.
|
// By Bruce, 2007-06-05.
|
||||||
//
|
//
|
||||||
u8
|
u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
|
||||||
GetDegradeTxRate(
|
|
||||||
struct net_device *dev,
|
|
||||||
u8 rate
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = ieee80211_priv(dev);
|
struct r8180_priv *priv = ieee80211_priv(dev);
|
||||||
u8 DownRate;
|
u8 DownRate;
|
||||||
|
@ -448,10 +427,7 @@ GetDegradeTxRate(
|
||||||
// CCK rate.
|
// CCK rate.
|
||||||
// 2005.01.25, by rcnjko.
|
// 2005.01.25, by rcnjko.
|
||||||
//
|
//
|
||||||
bool
|
bool MgntIsCckRate(u16 rate)
|
||||||
MgntIsCckRate(
|
|
||||||
u16 rate
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
bool bReturn = false;
|
bool bReturn = false;
|
||||||
|
|
||||||
|
@ -466,10 +442,7 @@ MgntIsCckRate(
|
||||||
// Tx Power tracking mechanism routine on 87SE.
|
// Tx Power tracking mechanism routine on 87SE.
|
||||||
// Created by Roger, 2007.12.11.
|
// Created by Roger, 2007.12.11.
|
||||||
//
|
//
|
||||||
void
|
void TxPwrTracking87SE(struct net_device *dev)
|
||||||
TxPwrTracking87SE(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
u8 tmpu1Byte, CurrentThermal, Idx;
|
u8 tmpu1Byte, CurrentThermal, Idx;
|
||||||
|
@ -520,10 +493,7 @@ TxPwrTracking87SE(
|
||||||
}
|
}
|
||||||
priv->ThermalMeter = CurrentThermal;
|
priv->ThermalMeter = CurrentThermal;
|
||||||
}
|
}
|
||||||
void
|
void StaRateAdaptive87SE(struct net_device *dev)
|
||||||
StaRateAdaptive87SE(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
unsigned long CurrTxokCnt;
|
unsigned long CurrTxokCnt;
|
||||||
|
@ -1077,11 +1047,7 @@ void timer_rate_adaptive(unsigned long data)
|
||||||
//DMESG("<----timer_rate_adaptive()\n");
|
//DMESG("<----timer_rate_adaptive()\n");
|
||||||
}
|
}
|
||||||
//by amy 080312}
|
//by amy 080312}
|
||||||
void
|
void SwAntennaDiversityRxOk8185(struct net_device *dev, u8 SignalStrength)
|
||||||
SwAntennaDiversityRxOk8185(
|
|
||||||
struct net_device *dev,
|
|
||||||
u8 SignalStrength
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
|
|
||||||
|
@ -1106,11 +1072,7 @@ SwAntennaDiversityRxOk8185(
|
||||||
// Description:
|
// Description:
|
||||||
// Change Antenna Switch.
|
// Change Antenna Switch.
|
||||||
//
|
//
|
||||||
bool
|
bool SetAntenna8185(struct net_device *dev, u8 u1bAntennaIndex)
|
||||||
SetAntenna8185(
|
|
||||||
struct net_device *dev,
|
|
||||||
u8 u1bAntennaIndex
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
bool bAntennaSwitched = false;
|
bool bAntennaSwitched = false;
|
||||||
|
@ -1155,10 +1117,7 @@ SetAntenna8185(
|
||||||
// Description:
|
// Description:
|
||||||
// Toggle Antenna switch.
|
// Toggle Antenna switch.
|
||||||
//
|
//
|
||||||
bool
|
bool SwitchAntenna(struct net_device *dev)
|
||||||
SwitchAntenna(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
|
|
||||||
|
@ -1186,10 +1145,7 @@ SwitchAntenna(
|
||||||
//
|
//
|
||||||
// 2006.04.17, by rcnjko.
|
// 2006.04.17, by rcnjko.
|
||||||
//
|
//
|
||||||
void
|
void SwAntennaDiversity(struct net_device *dev)
|
||||||
SwAntennaDiversity(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
bool bSwCheckSS = false;
|
bool bSwCheckSS = false;
|
||||||
|
@ -1366,8 +1322,7 @@ SwAntennaDiversity(
|
||||||
// Description:
|
// Description:
|
||||||
// Return TRUE if we shall perform Tx Power Tracking Mecahnism, FALSE otherwise.
|
// Return TRUE if we shall perform Tx Power Tracking Mecahnism, FALSE otherwise.
|
||||||
//
|
//
|
||||||
bool
|
bool CheckTxPwrTracking(struct net_device *dev)
|
||||||
CheckTxPwrTracking( struct net_device *dev)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
|
|
||||||
|
@ -1392,10 +1347,7 @@ CheckTxPwrTracking( struct net_device *dev)
|
||||||
// Description:
|
// Description:
|
||||||
// Timer callback function of SW Antenna Diversity.
|
// Timer callback function of SW Antenna Diversity.
|
||||||
//
|
//
|
||||||
void
|
void SwAntennaDiversityTimerCallback(struct net_device *dev)
|
||||||
SwAntennaDiversityTimerCallback(
|
|
||||||
struct net_device *dev
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
|
||||||
RT_RF_POWER_STATE rtState;
|
RT_RF_POWER_STATE rtState;
|
||||||
|
|
Loading…
Add table
Reference in a new issue