summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-01-07 08:42:39 -0500
committerJohannes Berg <johannes.berg@intel.com>2015-01-14 03:31:18 -0500
commit3b24f4c65386dc0f2efb41027bc6e410ea2c0049 (patch)
treeb1015543f700d19b63f3674f214e20e14e67459d /net/mac80211/mlme.c
parent0efbb786f1a3e13d28861ff41aae8dc4be314608 (diff)
mac80211: let flush() drop packets when possible
When roaming / suspending, it makes no sense to wait until the transmit queues of the device are empty. In extreme condition they can be starved (VO saturating the air), but even in regular cases, it is pointless to delay the roaming because the low level driver is trying to send packets to an AP which is far away. We'd rather drop these packets and let TCP retransmit if needed. This will allow to speed up the roaming. For suspend, the explanation is even more trivial. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 8354bedc858a..c0711082a2b8 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1604,7 +1604,7 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
1604 } else { 1604 } else {
1605 ieee80211_send_nullfunc(local, sdata, 1); 1605 ieee80211_send_nullfunc(local, sdata, 1);
1606 /* Flush to get the tx status of nullfunc frame */ 1606 /* Flush to get the tx status of nullfunc frame */
1607 ieee80211_flush_queues(local, sdata); 1607 ieee80211_flush_queues(local, sdata, false);
1608 } 1608 }
1609 } 1609 }
1610 1610
@@ -2011,18 +2011,23 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
2011 /* disable per-vif ps */ 2011 /* disable per-vif ps */
2012 ieee80211_recalc_ps_vif(sdata); 2012 ieee80211_recalc_ps_vif(sdata);
2013 2013
2014 /* flush out any pending frame (e.g. DELBA) before deauth/disassoc */ 2014 /*
2015 * drop any frame before deauth/disassoc, this can be data or
2016 * management frame. Since we are disconnecting, we should not
2017 * insist sending these frames which can take time and delay
2018 * the disconnection and possible the roaming.
2019 */
2015 if (tx) 2020 if (tx)
2016 ieee80211_flush_queues(local, sdata); 2021 ieee80211_flush_queues(local, sdata, true);
2017 2022
2018 /* deauthenticate/disassociate now */ 2023 /* deauthenticate/disassociate now */
2019 if (tx || frame_buf) 2024 if (tx || frame_buf)
2020 ieee80211_send_deauth_disassoc(sdata, ifmgd->bssid, stype, 2025 ieee80211_send_deauth_disassoc(sdata, ifmgd->bssid, stype,
2021 reason, tx, frame_buf); 2026 reason, tx, frame_buf);
2022 2027
2023 /* flush out frame */ 2028 /* flush out frame - make sure the deauth was actually sent */
2024 if (tx) 2029 if (tx)
2025 ieee80211_flush_queues(local, sdata); 2030 ieee80211_flush_queues(local, sdata, false);
2026 2031
2027 /* clear bssid only after building the needed mgmt frames */ 2032 /* clear bssid only after building the needed mgmt frames */
2028 memset(ifmgd->bssid, 0, ETH_ALEN); 2033 memset(ifmgd->bssid, 0, ETH_ALEN);