- // Asked for by SD3 CM Lin, 2006.06.27, by rcnjko.- // power save parameter based on "87SE power save parameters 20071127.doc", as follow.+ /* Asked for by SD3 CM Lin, 2006.06.27, by rcnjko. */+ /* power save parameter based on "87SE power save parameters 20071127.doc", as follow. */

-//-// Commented out by rcnjko, 2005.01.27:-// I move SecClearAllKeys() to MgntActSet_802_11_DISASSOCIATE().-//-// //2004/09/15, kcwu, the key should be cleared, or the new handshaking will not success+ /*+ Commented out by rcnjko, 2005.01.27:+ I move SecClearAllKeys() to MgntActSet_802_11_DISASSOCIATE().++ 2004/09/15, kcwu, the key should be cleared, or the new handshaking will not success

- // In WPA WPA2 need to Clear all key ... because new key will set after new handshaking.- // 2004.10.11, by rcnjko.- MlmeDisassociateRequest( dev, priv->ieee80211->current_network.bssid, asRsn );+ In WPA WPA2 need to Clear all key ... because new key will set after new handshaking.+ 2004.10.11, by rcnjko. */+ MlmeDisassociateRequest(dev, priv->ieee80211->current_network.bssid, asRsn);

- switch(StateToSet)- {+ switch (StateToSet) { case eRfOn:- //- // Turn On RF no matter the IPS setting because we need to update the RF state to Ndis under Vista, or- // the Windows does not allow the driver to perform site survey any more. By Bruce, 2007-10-02.- //+ /*+ Turn On RF no matter the IPS setting because we need to update the RF state to Ndis under Vista, or+ the Windows does not allow the driver to perform site survey any more. By Bruce, 2007-10-02.+ */ priv->RfOffReason &= (~ChangeSource);

- if (priv->RfOffReason > RF_CHANGE_BY_IPS)- {- //- // 060808, Annie:- // Disconnect to current BSS when radio off. Asked by QuanTa.- //-- //- // Calling MgntDisconnect() instead of MgntActSet_802_11_DISASSOCIATE(),- // because we do NOT need to set ssid to dummy ones.- //- MgntDisconnect( dev, disas_lv_ss );-- // Clear content of bssDesc[] and bssDesc4Query[] to avoid reporting old bss to UI.+ if (priv->RfOffReason > RF_CHANGE_BY_IPS) {+ /*+ 060808, Annie:+ Disconnect to current BSS when radio off. Asked by QuanTa.++ Calling MgntDisconnect() instead of MgntActSet_802_11_DISASSOCIATE(),+ because we do NOT need to set ssid to dummy ones.+ */+ MgntDisconnect(dev, disas_lv_ss);++ /* Clear content of bssDesc[] and bssDesc4Query[] to avoid reporting old bss to UI. */ }

- // Release RF spinlock- spin_lock_irqsave(&priv->rf_ps_lock,flag);+ /* Release RF spinlock */+ spin_lock_irqsave(&priv->rf_ps_lock, flag); priv->RFChangeInProgress = false;- spin_unlock_irqrestore(&priv->rf_ps_lock,flag);+ spin_unlock_irqrestore(&priv->rf_ps_lock, flag); return bActionAllowed; } void@@ -1565,28 +1499,28 @@ InactivePowerSave( ) { struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);- //- // This flag "bSwRfProcessing", indicates the status of IPS procedure, should be set if the IPS workitem- // is really scheduled.- // The old code, sets this flag before scheduling the IPS workitem and however, at the same time the- // previous IPS workitem did not end yet, fails to schedule the current workitem. Thus, bSwRfProcessing- // blocks the IPS procedure of switching RF.- //+ /*+ This flag "bSwRfProcessing", indicates the status of IPS procedure, should be set if the IPS workitem+ is really scheduled.+ The old code, sets this flag before scheduling the IPS workitem and however, at the same time the+ previous IPS workitem did not end yet, fails to schedule the current workitem. Thus, bSwRfProcessing+ blocks the IPS procedure of switching RF.+ */ priv->bSwRfProcessing = true;