From: Eliad Peller Date: Thu, 26 Jan 2012 11:36:05 +0000 (+0200) Subject: mac80211: send null packet on active (psm) reconfiguration X-Git-Tag: v3.4-rc1~177^2~112^2~378 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e1b1b246096fe04467f928973487fa47afaf2cc;p=platform%2Fkernel%2Flinux-exynos.git mac80211: send null packet on active (psm) reconfiguration The sta might be in psm against the ap (e.g. because this was the before a hw restart), so we explicitly send a null packet in order to make sure it'll sync against the ap (and get out of psm). Signed-off-by: Eliad Peller Signed-off-by: John W. Linville --- diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 30d72e2..d82d886 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1272,6 +1272,21 @@ int ieee80211_reconfig(struct ieee80211_local *local) ieee80211_recalc_ps(local, -1); /* + * The sta might be in psm against the ap (e.g. because + * this was the state before a hw restart), so we + * explicitly send a null packet in order to make sure + * it'll sync against the ap (and get out of psm). + */ + if (!(local->hw.conf.flags & IEEE80211_CONF_PS)) { + list_for_each_entry(sdata, &local->interfaces, list) { + if (sdata->vif.type != NL80211_IFTYPE_STATION) + continue; + + ieee80211_send_nullfunc(local, sdata, 0); + } + } + + /* * Clear the WLAN_STA_BLOCK_BA flag so new aggregation * sessions can be established after a resume. *