diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 33ffce3ec60..79480791494 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "rate.h" | 28 | #include "rate.h" |
29 | #include "led.h" | 29 | #include "led.h" |
30 | 30 | ||
31 | #define IEEE80211_MAX_NULLFUNC_TRIES 2 | ||
31 | #define IEEE80211_MAX_PROBE_TRIES 5 | 32 | #define IEEE80211_MAX_PROBE_TRIES 5 |
32 | 33 | ||
33 | /* | 34 | /* |
@@ -1924,9 +1925,15 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata) | |||
1924 | IEEE80211_STA_CONNECTION_POLL) && | 1925 | IEEE80211_STA_CONNECTION_POLL) && |
1925 | ifmgd->associated) { | 1926 | ifmgd->associated) { |
1926 | u8 bssid[ETH_ALEN]; | 1927 | u8 bssid[ETH_ALEN]; |
1928 | int max_tries; | ||
1927 | 1929 | ||
1928 | memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); | 1930 | memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); |
1929 | 1931 | ||
1932 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) | ||
1933 | max_tries = IEEE80211_MAX_NULLFUNC_TRIES; | ||
1934 | else | ||
1935 | max_tries = IEEE80211_MAX_PROBE_TRIES; | ||
1936 | |||
1930 | /* ACK received for nullfunc probing frame */ | 1937 | /* ACK received for nullfunc probing frame */ |
1931 | if (!ifmgd->probe_send_count) | 1938 | if (!ifmgd->probe_send_count) |
1932 | ieee80211_reset_ap_probe(sdata); | 1939 | ieee80211_reset_ap_probe(sdata); |
@@ -1934,7 +1941,7 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata) | |||
1934 | else if (time_is_after_jiffies(ifmgd->probe_timeout)) | 1941 | else if (time_is_after_jiffies(ifmgd->probe_timeout)) |
1935 | run_again(ifmgd, ifmgd->probe_timeout); | 1942 | run_again(ifmgd, ifmgd->probe_timeout); |
1936 | 1943 | ||
1937 | else if (ifmgd->probe_send_count < IEEE80211_MAX_PROBE_TRIES) { | 1944 | else if (ifmgd->probe_send_count < max_tries) { |
1938 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1945 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
1939 | wiphy_debug(local->hw.wiphy, | 1946 | wiphy_debug(local->hw.wiphy, |
1940 | "%s: No probe response from AP %pM" | 1947 | "%s: No probe response from AP %pM" |