diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-01-29 09:02:27 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-31 08:28:43 -0500 |
commit | 1672c0e31917f49d31d30d79067103432bc20cc7 (patch) | |
tree | cc5b6b0017129b5748cfa2bace537d43c991d66c /net/mac80211/status.c | |
parent | 3ff9a827c683353b9826ef57366b0f313acc21b0 (diff) |
mac80211: start auth/assoc timeout on frame status
When sending authentication/association frames they
might take a bit of time to go out because we may
have to synchronise with the AP, in particular in
the case where it's really a P2P GO. In this case
the 200ms fixed timeout could potentially be too
short if the beacon interval is relatively large.
For drivers that report TX status we can do better.
Instead of starting the timeout directly, start it
only when the frame status arrives. Since then the
frame was out on the air, we can wait shorter (the
typical response time is supposed to be 30ms, wait
100ms.) Also, if the frame failed to be transmitted
try again right away instead of waiting.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index ab50285fcbab..d041de056b7f 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -335,7 +335,8 @@ static void ieee80211_report_used_skb(struct ieee80211_local *local, | |||
335 | if (dropped) | 335 | if (dropped) |
336 | acked = false; | 336 | acked = false; |
337 | 337 | ||
338 | if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) { | 338 | if (info->flags & (IEEE80211_TX_INTFL_NL80211_FRAME_TX | |
339 | IEEE80211_TX_INTFL_MLME_CONN_TX)) { | ||
339 | struct ieee80211_sub_if_data *sdata = NULL; | 340 | struct ieee80211_sub_if_data *sdata = NULL; |
340 | struct ieee80211_sub_if_data *iter_sdata; | 341 | struct ieee80211_sub_if_data *iter_sdata; |
341 | u64 cookie = (unsigned long)skb; | 342 | u64 cookie = (unsigned long)skb; |
@@ -357,10 +358,13 @@ static void ieee80211_report_used_skb(struct ieee80211_local *local, | |||
357 | sdata = rcu_dereference(local->p2p_sdata); | 358 | sdata = rcu_dereference(local->p2p_sdata); |
358 | } | 359 | } |
359 | 360 | ||
360 | if (!sdata) | 361 | if (!sdata) { |
361 | skb->dev = NULL; | 362 | skb->dev = NULL; |
362 | else if (ieee80211_is_nullfunc(hdr->frame_control) || | 363 | } else if (info->flags & IEEE80211_TX_INTFL_MLME_CONN_TX) { |
363 | ieee80211_is_qos_nullfunc(hdr->frame_control)) { | 364 | ieee80211_mgd_conn_tx_status(sdata, hdr->frame_control, |
365 | acked); | ||
366 | } else if (ieee80211_is_nullfunc(hdr->frame_control) || | ||
367 | ieee80211_is_qos_nullfunc(hdr->frame_control)) { | ||
364 | cfg80211_probe_status(sdata->dev, hdr->addr1, | 368 | cfg80211_probe_status(sdata->dev, hdr->addr1, |
365 | cookie, acked, GFP_ATOMIC); | 369 | cookie, acked, GFP_ATOMIC); |
366 | } else { | 370 | } else { |