Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236274
b: refs/heads/master
c: 2cb61ea
h: refs/heads/master
v: v3
  • Loading branch information
Mike McCormack authored and Greg Kroah-Hartman committed Mar 7, 2011
1 parent 2e57f75 commit 5d364c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: bc54f3393c0563a00c13d2b58aca23ae153bdd3b
refs/heads/master: 2cb61ea25b49049f9281007f8b534e5d384ebba5
13 changes: 9 additions & 4 deletions trunk/drivers/staging/rtl8192e/r8190_rtl8256.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,11 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl));
bool bResult = true;

if(priv->SetRFPowerStateInProgress == true)
return false;
spin_lock(&priv->ps_lock);
if (priv->SetRFPowerStateInProgress) {
bResult = false;
goto out;
}
priv->SetRFPowerStateInProgress = true;

switch( eRFPowerState )
Expand All @@ -345,8 +348,8 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
*/
if (!NicIFEnableNIC(dev)) {
RT_TRACE(COMP_ERR, "%s(): NicIFEnableNIC failed\n",__FUNCTION__);
priv->SetRFPowerStateInProgress = false;
return false;
bResult = false;
goto out;
}

RT_CLEAR_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC);
Expand Down Expand Up @@ -424,7 +427,9 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
priv->ieee80211->eRFPowerState = eRFPowerState;
}

out:
priv->SetRFPowerStateInProgress = false;
spin_unlock(&priv->ps_lock);
return bResult;
}

Expand Down

0 comments on commit 5d364c5

Please sign in to comment.