summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/r8190_rtl8256.c
diff options
context:
space:
mode:
authorMike McCormack <mikem@ring3k.org>2011-02-11 08:44:09 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 12:35:32 -0800
commit2b1a26f8d34d67104d634acc0799960ddad803ca (patch)
tree0ad8ae711df19cbaa8206b468ca51b55f0d51289 /drivers/staging/rtl8192e/r8190_rtl8256.c
parent1b8b4969f59b4c6c426951d3a6ed3881625996f9 (diff)
downloadop-kernel-dev-2b1a26f8d34d67104d634acc0799960ddad803ca.zip
op-kernel-dev-2b1a26f8d34d67104d634acc0799960ddad803ca.tar.gz
staging: rtl8192e: Enable the NIC only once
Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192e/r8190_rtl8256.c')
-rw-r--r--drivers/staging/rtl8192e/r8190_rtl8256.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/staging/rtl8192e/r8190_rtl8256.c b/drivers/staging/rtl8192e/r8190_rtl8256.c
index 4af8f12..db70505 100644
--- a/drivers/staging/rtl8192e/r8190_rtl8256.c
+++ b/drivers/staging/rtl8192e/r8190_rtl8256.c
@@ -339,19 +339,15 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
case eRfOn:
// turn on RF
- if((priv->ieee80211->eRFPowerState == eRfOff) && RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC))
- { // The current RF state is OFF and the RF OFF level is halting the NIC, re-initialize the NIC.
- bool rtstatus = true;
- u32 InitializeCount = 3;
- do
- {
- InitializeCount--;
- rtstatus = NicIFEnableNIC(dev);
- }while( (rtstatus != true) &&(InitializeCount >0) );
-
- if(rtstatus != true)
- {
- RT_TRACE(COMP_ERR,"%s():Initialize Adapter fail,return\n",__FUNCTION__);
+ if ((priv->ieee80211->eRFPowerState == eRfOff) &&
+ RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC))
+ {
+ /*
+ * The current RF state is OFF and the RF OFF level
+ * is halting the NIC, re-initialize the NIC.
+ */
+ if (!NicIFEnableNIC(dev)) {
+ RT_TRACE(COMP_ERR, "%s(): NicIFEnableNIC failed\n",__FUNCTION__);
priv->SetRFPowerStateInProgress = false;
return false;
}
OpenPOWER on IntegriCloud