Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236276
b: refs/heads/master
c: 0903602
h: refs/heads/master
v: v3
  • Loading branch information
Mike McCormack authored and Greg Kroah-Hartman committed Mar 7, 2011
1 parent 6f46fad commit 73e2a05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fea84ba0f982a57598a92cd806904395f1b8839f
refs/heads/master: 0903602e2c2f796d63ef7b73e2888c6d13899140
40 changes: 7 additions & 33 deletions trunk/drivers/staging/rtl8192e/r8190_rtl8256.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)

spin_lock(&priv->ps_lock);

if (eRFPowerState == priv->ieee80211->eRFPowerState &&
priv->bHwRfOffAction == 0) {
bResult = false;
goto out;
}

switch( eRFPowerState )
{
case eRfOn:
Expand Down Expand Up @@ -429,39 +435,7 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)



//
// Description:
// Change RF power state.
//
// Assumption:
// This function must be executed in re-schdulable context,
// ie. PASSIVE_LEVEL.
//
// 050823, by rcnjko.
//
static bool
SetRFPowerState(
struct net_device* dev,
RT_RF_POWER_STATE eRFPowerState
)
{
struct r8192_priv *priv = ieee80211_priv(dev);

bool bResult = false;

RT_TRACE(COMP_RF,"---------> SetRFPowerState(): eRFPowerState(%d)\n", eRFPowerState);
if(eRFPowerState == priv->ieee80211->eRFPowerState && priv->bHwRfOffAction == 0)
{
RT_TRACE(COMP_POWER, "<--------- SetRFPowerState(): discard the request for eRFPowerState(%d) is the same.\n", eRFPowerState);
return bResult;
}

bResult = SetRFPowerState8190(dev, eRFPowerState);

RT_TRACE(COMP_POWER, "<--------- SetRFPowerState(): bResult(%d)\n", bResult);

return bResult;
}

static void
MgntDisconnectIBSS(
Expand Down Expand Up @@ -749,7 +723,7 @@ MgntActSet_RF_State(
{
RT_TRACE(COMP_POWER, "MgntActSet_RF_State(): Action is allowed.... StateToSet(%d), RfOffReason(%#X)\n", StateToSet, priv->ieee80211->RfOffReason);
// Config HW to the specified mode.
SetRFPowerState(dev, StateToSet);
SetRFPowerState8190(dev, StateToSet);
}
else
{
Expand Down

0 comments on commit 73e2a05

Please sign in to comment.