On Sun, 2008-12-14 at 22:50 -0500, Bob Copeland wrote: > This patch introduces suspend and resume callbacks to mac80211, > allowing mac80211 to quiesce its state (bringing down interfaces, > removing keys, etc) in preparation for suspend. cfg80211 will call > the suspend hook before the device suspend, and resume hook after > the device resume. Looks good to me. > Signed-off-by: Bob Copeland Acked-by: Johannes Berg > +int __ieee80211_suspend(struct ieee80211_hw *hw) > +{ > + struct ieee80211_local *local = hw_to_local(hw); > + struct ieee80211_sub_if_data *sdata; > + struct ieee80211_if_init_conf conf; > + struct sta_info *sta; > + > + flush_workqueue(local->hw.workqueue); > + > + /* disable keys */ > + list_for_each_entry(sdata, &local->interfaces, list) > + ieee80211_disable_keys(sdata); > + > + /* remove STAs */ > + list_for_each_entry(sta, &local->sta_list, list) { > + > + if (local->ops->sta_notify) { One could reorder this to: if (local->ops->sta_notify) { list_for_each_entry(sta, &local->sta_list, list) { and the remaining code stays, but it really doesn't matter in this code path. Does it work now? Did you ever figure out why it failed occasionally before? johannes