Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258454
b: refs/heads/master
c: 94f9b97
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 15, 2011
1 parent cf06956 commit 906f177
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 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: 3f29c522184ffb44fd475fdbe6083023ab1506f8
refs/heads/master: 94f9b97be5b3bf67392e43fb7f567721b09142c2
3 changes: 3 additions & 0 deletions trunk/net/mac80211/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
struct ieee80211_sub_if_data *sdata;
struct sta_info *sta;

if (!local->open_count)
goto suspend;

ieee80211_scan_cancel(local);

if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
Expand Down
54 changes: 28 additions & 26 deletions trunk/net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,27 +1157,37 @@ int ieee80211_reconfig(struct ieee80211_local *local)
}
#endif

/* restart hardware */
if (local->open_count) {
/*
* Upon resume hardware can sometimes be goofy due to
* various platform / driver / bus issues, so restarting
* the device may at times not work immediately. Propagate
* the error.
*/
res = drv_start(local);
if (res) {
WARN(local->suspended, "Hardware became unavailable "
"upon resume. This could be a software issue "
"prior to suspend or a hardware issue.\n");
return res;
}
/* setup fragmentation threshold */
drv_set_frag_threshold(local, hw->wiphy->frag_threshold);

/* setup RTS threshold */
drv_set_rts_threshold(local, hw->wiphy->rts_threshold);

/* reset coverage class */
drv_set_coverage_class(local, hw->wiphy->coverage_class);

/* everything else happens only if HW was up & running */
if (!local->open_count)
goto wake_up;

ieee80211_led_radio(local, true);
ieee80211_mod_tpt_led_trig(local,
IEEE80211_TPT_LEDTRIG_FL_RADIO, 0);
/*
* Upon resume hardware can sometimes be goofy due to
* various platform / driver / bus issues, so restarting
* the device may at times not work immediately. Propagate
* the error.
*/
res = drv_start(local);
if (res) {
WARN(local->suspended, "Hardware became unavailable "
"upon resume. This could be a software issue "
"prior to suspend or a hardware issue.\n");
return res;
}

ieee80211_led_radio(local, true);
ieee80211_mod_tpt_led_trig(local,
IEEE80211_TPT_LEDTRIG_FL_RADIO, 0);

/* add interfaces */
list_for_each_entry(sdata, &local->interfaces, list) {
if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
Expand All @@ -1201,12 +1211,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
}
mutex_unlock(&local->sta_mtx);

/* setup fragmentation threshold */
drv_set_frag_threshold(local, hw->wiphy->frag_threshold);

/* setup RTS threshold */
drv_set_rts_threshold(local, hw->wiphy->rts_threshold);

/* reconfigure hardware */
ieee80211_hw_config(local, ~0);

Expand Down Expand Up @@ -1287,9 +1291,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
if (ieee80211_sdata_running(sdata))
ieee80211_enable_keys(sdata);

#ifdef CONFIG_PM
wake_up:
#endif
ieee80211_wake_queues_by_reason(hw,
IEEE80211_QUEUE_STOP_REASON_SUSPEND);

Expand Down

0 comments on commit 906f177

Please sign in to comment.