bool bConnectBySSID = false;
RT_RF_POWER_STATE rtState;
u16 RFWaitCounter = 0;
- unsigned long flag;
RT_TRACE(COMP_POWER, "===>MgntActSet_RF_State(): StateToSet(%d)\n",StateToSet);
//1//
while(true)
{
- spin_lock_irqsave(&priv->rf_ps_lock,flag);
+ spin_lock(&priv->rf_ps_lock);
if(priv->RFChangeInProgress)
{
- spin_unlock_irqrestore(&priv->rf_ps_lock,flag);
+ spin_unlock(&priv->rf_ps_lock);
RT_TRACE(COMP_POWER, "MgntActSet_RF_State(): RF Change in progress! Wait to set..StateToSet(%d).\n", StateToSet);
// Set RF after the previous action is done.
else
{
priv->RFChangeInProgress = true;
- spin_unlock_irqrestore(&priv->rf_ps_lock,flag);
+ spin_unlock(&priv->rf_ps_lock);
break;
}
}
}
// Release RF spinlock
- spin_lock_irqsave(&priv->rf_ps_lock,flag);
+ spin_lock(&priv->rf_ps_lock);
priv->RFChangeInProgress = false;
- spin_unlock_irqrestore(&priv->rf_ps_lock,flag);
+ spin_unlock(&priv->rf_ps_lock);
RT_TRACE(COMP_POWER, "<===MgntActSet_RF_State()\n");
return bActionAllowed;
static void rtl8192_hw_sleep_down(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
- unsigned long flags = 0;
- spin_lock_irqsave(&priv->rf_ps_lock,flags);
+ spin_lock(&priv->rf_ps_lock);
if (priv->RFChangeInProgress) {
- spin_unlock_irqrestore(&priv->rf_ps_lock,flags);
+ spin_unlock(&priv->rf_ps_lock);
RT_TRACE(COMP_RF, "rtl8192_hw_sleep_down(): RF Change in progress! \n");
printk("rtl8192_hw_sleep_down(): RF Change in progress!\n");
return;
}
- spin_unlock_irqrestore(&priv->rf_ps_lock,flags);
+ spin_unlock(&priv->rf_ps_lock);
MgntActSet_RF_State(dev, eRfSleep, RF_CHANGE_BY_PS);
}
static void rtl8192_hw_wakeup(struct net_device* dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
- unsigned long flags = 0;
- spin_lock_irqsave(&priv->rf_ps_lock,flags);
+ spin_lock(&priv->rf_ps_lock);
if (priv->RFChangeInProgress) {
- spin_unlock_irqrestore(&priv->rf_ps_lock,flags);
+ spin_unlock(&priv->rf_ps_lock);
RT_TRACE(COMP_RF, "rtl8192_hw_wakeup(): RF Change in progress! \n");
printk("rtl8192_hw_wakeup(): RF Change in progress! schedule wake up task again\n");
queue_delayed_work(priv->ieee80211->wq,&priv->ieee80211->hw_wakeup_wq,MSECS(10));//PowerSave is not supported if kernel version is below 2.6.20
return;
}
- spin_unlock_irqrestore(&priv->rf_ps_lock,flags);
+ spin_unlock(&priv->rf_ps_lock);
MgntActSet_RF_State(dev, eRfOn, RF_CHANGE_BY_PS);
}