Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351751
b: refs/heads/master
c: 61e8a48
h: refs/heads/master
i:
  351749: c2b27e0
  351747: 9bbd6e1
  351743: b06b4f0
v: v3
  • Loading branch information
Johannes Berg committed Jan 3, 2013
1 parent 2e775a5 commit 06837fd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 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: d45c41722a3eca639ced2c4c93665ced229b1da9
refs/heads/master: 61e8a48cc1283c8e4358b3ce06305d886c55f7ce
36 changes: 19 additions & 17 deletions trunk/net/mac80211/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,23 @@
#include "led.h"

/* return value indicates whether the driver should be further notified */
static bool ieee80211_quiesce(struct ieee80211_sub_if_data *sdata)
static void ieee80211_quiesce(struct ieee80211_sub_if_data *sdata)
{
switch (sdata->vif.type) {
case NL80211_IFTYPE_STATION:
ieee80211_sta_quiesce(sdata);
return true;
break;
case NL80211_IFTYPE_ADHOC:
ieee80211_ibss_quiesce(sdata);
return true;
break;
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;
break;
default:
return true;
break;
}

cancel_work_sync(&sdata->work);
}

int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
Expand Down Expand Up @@ -94,10 +92,9 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
WARN_ON(err != 1);
local->wowlan = false;
} else {
list_for_each_entry(sdata, &local->interfaces, list) {
cancel_work_sync(&sdata->work);
ieee80211_quiesce(sdata);
}
list_for_each_entry(sdata, &local->interfaces, list)
if (ieee80211_sdata_running(sdata))
ieee80211_quiesce(sdata);
goto suspend;
}
}
Expand All @@ -124,13 +121,18 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)

/* remove all interfaces */
list_for_each_entry(sdata, &local->interfaces, list) {
cancel_work_sync(&sdata->work);

if (!ieee80211_quiesce(sdata))
if (!ieee80211_sdata_running(sdata))
continue;

if (!ieee80211_sdata_running(sdata))
switch (sdata->vif.type) {
case NL80211_IFTYPE_AP_VLAN:
case NL80211_IFTYPE_MONITOR:
/* skip these */
continue;
default:
ieee80211_quiesce(sdata);
break;
}

/* disable beaconing */
ieee80211_bss_info_change_notify(sdata,
Expand Down

0 comments on commit 06837fd

Please sign in to comment.