Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276255
b: refs/heads/master
c: e55b32c
h: refs/heads/master
i:
  276253: a9e861e
  276251: 391b9e5
  276247: 8ab198b
  276239: 613eca0
  276223: aae0794
v: v3
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Nov 28, 2011
1 parent f9106fd commit 06e3f0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: 24f50a9d165745fd0701c6e089d35f58a229ea69
refs/heads/master: e55b32c110b025ce07b40227f620e99700bf8741
17 changes: 9 additions & 8 deletions trunk/drivers/net/wireless/rtlwifi/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ void rtl_lps_enter(struct ieee80211_hw *hw)
if (mac->link_state != MAC80211_LINKED)
return;

spin_lock(&rtlpriv->locks.lps_lock);
spin_lock_irq(&rtlpriv->locks.lps_lock);

/* Idle for a while if we connect to AP a while ago. */
if (mac->cnt_after_linked >= 2) {
Expand All @@ -406,7 +406,7 @@ void rtl_lps_enter(struct ieee80211_hw *hw)
}
}

spin_unlock(&rtlpriv->locks.lps_lock);
spin_unlock_irq(&rtlpriv->locks.lps_lock);
}

/*Leave the leisure power save mode.*/
Expand All @@ -415,8 +415,9 @@ void rtl_lps_leave(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
unsigned long flags;

spin_lock(&rtlpriv->locks.lps_lock);
spin_lock_irqsave(&rtlpriv->locks.lps_lock, flags);

if (ppsc->fwctrl_lps) {
if (ppsc->dot11_psmode != EACTIVE) {
Expand All @@ -437,7 +438,7 @@ void rtl_lps_leave(struct ieee80211_hw *hw)
rtl_lps_set_psmode(hw, EACTIVE);
}
}
spin_unlock(&rtlpriv->locks.lps_lock);
spin_unlock_irqrestore(&rtlpriv->locks.lps_lock, flags);
}

/* For sw LPS*/
Expand Down Expand Up @@ -538,9 +539,9 @@ void rtl_swlps_rf_awake(struct ieee80211_hw *hw)
RT_CLEAR_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM);
}

spin_lock(&rtlpriv->locks.lps_lock);
spin_lock_irq(&rtlpriv->locks.lps_lock);
rtl_ps_set_rf_state(hw, ERFON, RF_CHANGE_BY_PS);
spin_unlock(&rtlpriv->locks.lps_lock);
spin_unlock_irq(&rtlpriv->locks.lps_lock);
}

void rtl_swlps_rfon_wq_callback(void *data)
Expand Down Expand Up @@ -573,9 +574,9 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw)
if (rtlpriv->link_info.busytraffic)
return;

spin_lock(&rtlpriv->locks.lps_lock);
spin_lock_irq(&rtlpriv->locks.lps_lock);
rtl_ps_set_rf_state(hw, ERFSLEEP, RF_CHANGE_BY_PS);
spin_unlock(&rtlpriv->locks.lps_lock);
spin_unlock_irq(&rtlpriv->locks.lps_lock);

if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM &&
!RT_IN_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM)) {
Expand Down

0 comments on commit 06e3f0b

Please sign in to comment.