From: Greg Kroah-Hartman Date: Mon, 11 Feb 2013 20:00:48 +0000 (-0800) Subject: 3.0-stable patches X-Git-Tag: v3.0.64~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c34bab2f836cae5f6a2d1b755b52ecd0055d214e;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: mac80211-synchronize-scan-off-on-channel-and-ps-states.patch --- diff --git a/queue-3.0/mac80211-synchronize-scan-off-on-channel-and-ps-states.patch b/queue-3.0/mac80211-synchronize-scan-off-on-channel-and-ps-states.patch new file mode 100644 index 00000000000..f75c505b52c --- /dev/null +++ b/queue-3.0/mac80211-synchronize-scan-off-on-channel-and-ps-states.patch @@ -0,0 +1,164 @@ +From aacde9ee45225f7e0b90960f479aef83c66bfdc0 Mon Sep 17 00:00:00 2001 +From: Stanislaw Gruszka +Date: Thu, 20 Dec 2012 14:41:18 +0100 +Subject: mac80211: synchronize scan off/on-channel and PS states + +From: Stanislaw Gruszka + +commit aacde9ee45225f7e0b90960f479aef83c66bfdc0 upstream. + +Since: + +commit b23b025fe246f3acc2988eb6d400df34c27cb8ae +Author: Ben Greear +Date: Fri Feb 4 11:54:17 2011 -0800 + + mac80211: Optimize scans on current operating channel. + +we do not disable PS while going back to operational channel (on +ieee80211_scan_state_suspend) and deffer that until scan finish. +But since we are allowed to send frames, we can send a frame to AP +without PM bit set, so disable PS on AP side. Then when we switch +to off-channel (in ieee80211_scan_state_resume) we do not enable PS. +Hence we are off-channel with PS disabled, frames are not buffered +by AP. + +To fix remove offchannel_ps_disable argument and always enable PS when +going off-channel and disable it when going on-channel, like it was +before. + +Signed-off-by: Stanislaw Gruszka +Tested-by: Seth Forshee +Signed-off-by: Johannes Berg +Signed-off-by: CAI Qian +Signed-off-by: Greg Kroah-Hartman + +--- + net/mac80211/ieee80211_i.h | 6 ++---- + net/mac80211/offchannel.c | 17 ++++++----------- + net/mac80211/scan.c | 6 +++--- + net/mac80211/work.c | 8 +++----- + 4 files changed, 14 insertions(+), 23 deletions(-) + +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -1169,11 +1169,9 @@ void ieee80211_sched_scan_stopped_work(s + bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local); + void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local, + bool tell_ap); +-void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, +- bool offchannel_ps_enable); ++void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local); + void ieee80211_offchannel_return(struct ieee80211_local *local, +- bool enable_beaconing, +- bool offchannel_ps_disable); ++ bool enable_beaconing); + void ieee80211_hw_roc_setup(struct ieee80211_local *local); + + /* interface handling */ +--- a/net/mac80211/offchannel.c ++++ b/net/mac80211/offchannel.c +@@ -102,8 +102,7 @@ static void ieee80211_offchannel_ps_disa + ieee80211_sta_reset_conn_monitor(sdata); + } + +-void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, +- bool offchannel_ps_enable) ++void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local) + { + struct ieee80211_sub_if_data *sdata; + +@@ -128,8 +127,7 @@ void ieee80211_offchannel_stop_vifs(stru + + if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { + netif_tx_stop_all_queues(sdata->dev); +- if (offchannel_ps_enable && +- (sdata->vif.type == NL80211_IFTYPE_STATION) && ++ if (sdata->vif.type == NL80211_IFTYPE_STATION && + sdata->u.mgd.associated) + ieee80211_offchannel_ps_enable(sdata, true); + } +@@ -155,8 +153,7 @@ void ieee80211_offchannel_enable_all_ps( + } + + void ieee80211_offchannel_return(struct ieee80211_local *local, +- bool enable_beaconing, +- bool offchannel_ps_disable) ++ bool enable_beaconing) + { + struct ieee80211_sub_if_data *sdata; + +@@ -166,11 +163,9 @@ void ieee80211_offchannel_return(struct + continue; + + /* Tell AP we're back */ +- if (offchannel_ps_disable && +- sdata->vif.type == NL80211_IFTYPE_STATION) { +- if (sdata->u.mgd.associated) +- ieee80211_offchannel_ps_disable(sdata); +- } ++ if (sdata->vif.type == NL80211_IFTYPE_STATION && ++ sdata->u.mgd.associated) ++ ieee80211_offchannel_ps_disable(sdata); + + if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { + clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state); +--- a/net/mac80211/scan.c ++++ b/net/mac80211/scan.c +@@ -314,7 +314,7 @@ static void __ieee80211_scan_completed(s + if (on_oper_chan2 && (on_oper_chan != on_oper_chan2)) + enable_beacons = true; + +- ieee80211_offchannel_return(local, enable_beacons, true); ++ ieee80211_offchannel_return(local, enable_beacons); + } + + ieee80211_recalc_idle(local); +@@ -563,7 +563,7 @@ static void ieee80211_scan_state_leave_o + /* PS will already be in off-channel mode, + * we do that once at the beginning of scanning. + */ +- ieee80211_offchannel_stop_vifs(local, false); ++ ieee80211_offchannel_stop_vifs(local); + + /* + * What if the nullfunc frames didn't arrive? +@@ -594,7 +594,7 @@ static void ieee80211_scan_state_enter_o + * in off-channel state..will put that back + * on-channel at the end of scanning. + */ +- ieee80211_offchannel_return(local, true, false); ++ ieee80211_offchannel_return(local, true); + + *next_delay = HZ / 5; + local->next_scan_state = SCAN_DECISION; +--- a/net/mac80211/work.c ++++ b/net/mac80211/work.c +@@ -973,16 +973,14 @@ static void ieee80211_work_work(struct w + if (on_oper_chan != on_oper_chan2) { + if (on_oper_chan2) { + /* going off oper channel, PS too */ +- ieee80211_offchannel_stop_vifs(local, +- true); ++ ieee80211_offchannel_stop_vifs(local); + ieee80211_hw_config(local, 0); + } else { + /* going on channel, but leave PS + * off-channel. */ + ieee80211_hw_config(local, 0); + ieee80211_offchannel_return(local, +- true, +- false); ++ true); + } + } else if (tmp_chan_changed) + /* Still off-channel, but on some other +@@ -1085,7 +1083,7 @@ static void ieee80211_work_work(struct w + * beaconing if we were already on-oper-channel + * as a future optimization. + */ +- ieee80211_offchannel_return(local, true, true); ++ ieee80211_offchannel_return(local, true); + + /* give connection some time to breathe */ + run_again(local, jiffies + HZ/2); diff --git a/queue-3.0/series b/queue-3.0/series index 6cbdfa9e064..0c27657834d 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -1,3 +1,4 @@ rtlwifi-fix-the-usage-of-the-wrong-variable-in-usb.c.patch virtio_console-don-t-access-uninitialized-data.patch kernel-resource.c-fix-stack-overflow-in-__reserve_region_with_split.patch +mac80211-synchronize-scan-off-on-channel-and-ps-states.patch