Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255806
b: refs/heads/master
c: 77572fd
h: refs/heads/master
v: v3
  • Loading branch information
Eliad Peller authored and John W. Linville committed Jun 20, 2011
1 parent 7a6858d commit 843915c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 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: 6392cb387cb629a5aa488e6a2eab9383b574a7ef
refs/heads/master: 77572fd13d7f468216b85e68a006000726a59e89
43 changes: 27 additions & 16 deletions trunk/net/mac80211/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@
#include "driver-ops.h"
#include "led.h"

/* return value indicates whether the driver should be further notified */
static bool ieee80211_quiesce(struct ieee80211_sub_if_data *sdata)
{
switch (sdata->vif.type) {
case NL80211_IFTYPE_STATION:
ieee80211_sta_quiesce(sdata);
return true;
case NL80211_IFTYPE_ADHOC:
ieee80211_ibss_quiesce(sdata);
return true;
case NL80211_IFTYPE_MESH_POINT:
ieee80211_mesh_quiesce(sdata);
return true;
case NL80211_IFTYPE_AP_VLAN:
case NL80211_IFTYPE_MONITOR:
/* don't tell driver about this */
return false;
default:
return true;
}
}

int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
{
struct ieee80211_local *local = hw_to_local(hw);
Expand Down Expand Up @@ -54,6 +76,10 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
local->quiescing = false;
return err;
}
list_for_each_entry(sdata, &local->interfaces, list) {
cancel_work_sync(&sdata->work);
ieee80211_quiesce(sdata);
}
goto suspend;
}

Expand Down Expand Up @@ -82,23 +108,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
list_for_each_entry(sdata, &local->interfaces, list) {
cancel_work_sync(&sdata->work);

switch(sdata->vif.type) {
case NL80211_IFTYPE_STATION:
ieee80211_sta_quiesce(sdata);
break;
case NL80211_IFTYPE_ADHOC:
ieee80211_ibss_quiesce(sdata);
break;
case NL80211_IFTYPE_MESH_POINT:
ieee80211_mesh_quiesce(sdata);
break;
case NL80211_IFTYPE_AP_VLAN:
case NL80211_IFTYPE_MONITOR:
/* don't tell driver about this */
if (!ieee80211_quiesce(sdata))
continue;
default:
break;
}

if (!ieee80211_sdata_running(sdata))
continue;
Expand Down

0 comments on commit 843915c

Please sign in to comment.