Commit 2b1a26f8 authored by Mike McCormack's avatar Mike McCormack Committed by Greg Kroah-Hartman

staging: rtl8192e: Enable the NIC only once

Signed-off-by: default avatarMike McCormack <mikem@ring3k.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1b8b4969
...@@ -339,19 +339,15 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState) ...@@ -339,19 +339,15 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
case eRfOn: case eRfOn:
// turn on RF // turn on RF
if((priv->ieee80211->eRFPowerState == eRfOff) && RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC)) if ((priv->ieee80211->eRFPowerState == eRfOff) &&
{ // The current RF state is OFF and the RF OFF level is halting the NIC, re-initialize the NIC. RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC))
bool rtstatus = true; {
u32 InitializeCount = 3; /*
do * The current RF state is OFF and the RF OFF level
{ * is halting the NIC, re-initialize the NIC.
InitializeCount--; */
rtstatus = NicIFEnableNIC(dev); if (!NicIFEnableNIC(dev)) {
}while( (rtstatus != true) &&(InitializeCount >0) ); RT_TRACE(COMP_ERR, "%s(): NicIFEnableNIC failed\n",__FUNCTION__);
if(rtstatus != true)
{
RT_TRACE(COMP_ERR,"%s():Initialize Adapter fail,return\n",__FUNCTION__);
priv->SetRFPowerStateInProgress = false; priv->SetRFPowerStateInProgress = false;
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment