On Fri, Dec 14, 2012 at 1:59 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > From: Johannes Berg <johannes.berg@xxxxxxxxx> > > When suspending, bss_info_changed() is called to > disable beacons, but managed mode interfaces are > simply removed (bss_info_changed() is called with > "no change" only). This can lead to problems. > > To fix this and copy the BSS configuration, clear > it during suspend and restore it on resume. > > Change-Id: Ie1b7f6343fe59dfbff886b9720e4c15686d7fda7 > Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> > --- > @@ -121,6 +121,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) > @@ -129,14 +131,19 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) > case NL80211_IFTYPE_MONITOR: > /* skip these */ > continue; > + case NL80211_IFTYPE_STATION: > + changed = BSS_CHANGED_ASSOC; maybe set it only if associated? also, is there really a point in notifying BSS_CHANGED_ASSOC without notifying CHANGED_BSSID (and maybe CHANGED_IDLE)? > - /* disable beaconing */ > - ieee80211_bss_info_change_notify(sdata, > - BSS_CHANGED_BEACON_ENABLED); > + sdata->suspend_bss_conf = sdata->vif.bss_conf; > + memset(&sdata->vif.bss_conf, 0, sizeof(sdata->vif.bss_conf)); it probably doesn't matter much (as you don't notify CHANGED_IDLE), but setting vif.idle=0 is probably not your intention here. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html