aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-07-29 17:07:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-29 12:47:29 -0400
commite0f23666f0d04cf80c18fdc7ad762d1a55187d9c (patch)
treec8c538e7a4987fbbe0530b6b61aebb34fe25f707 /net
parent6904756d54d4f98a9f835ed9cbc3f149ef7ac678 (diff)
mac80211: don't wait for TX status forever
commit cb236d2d713cff83d024a82b836757d9e2b50715 upstream. TX status notification can get lost, or the frames could get stuck on the queue, so don't wait for the callback from the driver forever and instead time out after half a second. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 55a42f9c4f39..5b4328dcbe4e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -31,10 +31,12 @@
31#include "led.h" 31#include "led.h"
32 32
33#define IEEE80211_AUTH_TIMEOUT (HZ / 5) 33#define IEEE80211_AUTH_TIMEOUT (HZ / 5)
34#define IEEE80211_AUTH_TIMEOUT_LONG (HZ / 2)
34#define IEEE80211_AUTH_TIMEOUT_SHORT (HZ / 10) 35#define IEEE80211_AUTH_TIMEOUT_SHORT (HZ / 10)
35#define IEEE80211_AUTH_MAX_TRIES 3 36#define IEEE80211_AUTH_MAX_TRIES 3
36#define IEEE80211_AUTH_WAIT_ASSOC (HZ * 5) 37#define IEEE80211_AUTH_WAIT_ASSOC (HZ * 5)
37#define IEEE80211_ASSOC_TIMEOUT (HZ / 5) 38#define IEEE80211_ASSOC_TIMEOUT (HZ / 5)
39#define IEEE80211_ASSOC_TIMEOUT_LONG (HZ / 2)
38#define IEEE80211_ASSOC_TIMEOUT_SHORT (HZ / 10) 40#define IEEE80211_ASSOC_TIMEOUT_SHORT (HZ / 10)
39#define IEEE80211_ASSOC_MAX_TRIES 3 41#define IEEE80211_ASSOC_MAX_TRIES 3
40 42
@@ -3470,10 +3472,13 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata)
3470 3472
3471 if (tx_flags == 0) { 3473 if (tx_flags == 0) {
3472 auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; 3474 auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
3473 ifmgd->auth_data->timeout_started = true; 3475 auth_data->timeout_started = true;
3474 run_again(ifmgd, auth_data->timeout); 3476 run_again(ifmgd, auth_data->timeout);
3475 } else { 3477 } else {
3476 auth_data->timeout_started = false; 3478 auth_data->timeout =
3479 round_jiffies_up(jiffies + IEEE80211_AUTH_TIMEOUT_LONG);
3480 auth_data->timeout_started = true;
3481 run_again(ifmgd, auth_data->timeout);
3477 } 3482 }
3478 3483
3479 return 0; 3484 return 0;
@@ -3510,7 +3515,11 @@ static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata)
3510 assoc_data->timeout_started = true; 3515 assoc_data->timeout_started = true;
3511 run_again(&sdata->u.mgd, assoc_data->timeout); 3516 run_again(&sdata->u.mgd, assoc_data->timeout);
3512 } else { 3517 } else {
3513 assoc_data->timeout_started = false; 3518 assoc_data->timeout =
3519 round_jiffies_up(jiffies +
3520 IEEE80211_ASSOC_TIMEOUT_LONG);
3521 assoc_data->timeout_started = true;
3522 run_again(&sdata->u.mgd, assoc_data->timeout);
3514 } 3523 }
3515 3524
3516 return 0; 3525 return 0;