summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 69449db7e283..233068756502 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -36,6 +36,7 @@
36#define IEEE80211_AUTH_TIMEOUT (HZ / 5) 36#define IEEE80211_AUTH_TIMEOUT (HZ / 5)
37#define IEEE80211_AUTH_TIMEOUT_LONG (HZ / 2) 37#define IEEE80211_AUTH_TIMEOUT_LONG (HZ / 2)
38#define IEEE80211_AUTH_TIMEOUT_SHORT (HZ / 10) 38#define IEEE80211_AUTH_TIMEOUT_SHORT (HZ / 10)
39#define IEEE80211_AUTH_TIMEOUT_SAE (HZ * 2)
39#define IEEE80211_AUTH_MAX_TRIES 3 40#define IEEE80211_AUTH_MAX_TRIES 3
40#define IEEE80211_AUTH_WAIT_ASSOC (HZ * 5) 41#define IEEE80211_AUTH_WAIT_ASSOC (HZ * 5)
41#define IEEE80211_ASSOC_TIMEOUT (HZ / 5) 42#define IEEE80211_ASSOC_TIMEOUT (HZ / 5)
@@ -1787,7 +1788,7 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local,
1787 params[ac].acm = acm; 1788 params[ac].acm = acm;
1788 params[ac].uapsd = uapsd; 1789 params[ac].uapsd = uapsd;
1789 1790
1790 if (params->cw_min == 0 || 1791 if (params[ac].cw_min == 0 ||
1791 params[ac].cw_min > params[ac].cw_max) { 1792 params[ac].cw_min > params[ac].cw_max) {
1792 sdata_info(sdata, 1793 sdata_info(sdata,
1793 "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n", 1794 "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n",
@@ -3814,16 +3815,19 @@ static int ieee80211_auth(struct ieee80211_sub_if_data *sdata)
3814 tx_flags); 3815 tx_flags);
3815 3816
3816 if (tx_flags == 0) { 3817 if (tx_flags == 0) {
3817 auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; 3818 if (auth_data->algorithm == WLAN_AUTH_SAE)
3818 auth_data->timeout_started = true; 3819 auth_data->timeout = jiffies +
3819 run_again(sdata, auth_data->timeout); 3820 IEEE80211_AUTH_TIMEOUT_SAE;
3821 else
3822 auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
3820 } else { 3823 } else {
3821 auth_data->timeout = 3824 auth_data->timeout =
3822 round_jiffies_up(jiffies + IEEE80211_AUTH_TIMEOUT_LONG); 3825 round_jiffies_up(jiffies + IEEE80211_AUTH_TIMEOUT_LONG);
3823 auth_data->timeout_started = true;
3824 run_again(sdata, auth_data->timeout);
3825 } 3826 }
3826 3827
3828 auth_data->timeout_started = true;
3829 run_again(sdata, auth_data->timeout);
3830
3827 return 0; 3831 return 0;
3828} 3832}
3829 3833
@@ -3894,8 +3898,15 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)
3894 ifmgd->status_received = false; 3898 ifmgd->status_received = false;
3895 if (ifmgd->auth_data && ieee80211_is_auth(fc)) { 3899 if (ifmgd->auth_data && ieee80211_is_auth(fc)) {
3896 if (status_acked) { 3900 if (status_acked) {
3897 ifmgd->auth_data->timeout = 3901 if (ifmgd->auth_data->algorithm ==
3898 jiffies + IEEE80211_AUTH_TIMEOUT_SHORT; 3902 WLAN_AUTH_SAE)
3903 ifmgd->auth_data->timeout =
3904 jiffies +
3905 IEEE80211_AUTH_TIMEOUT_SAE;
3906 else
3907 ifmgd->auth_data->timeout =
3908 jiffies +
3909 IEEE80211_AUTH_TIMEOUT_SHORT;
3899 run_again(sdata, ifmgd->auth_data->timeout); 3910 run_again(sdata, ifmgd->auth_data->timeout);
3900 } else { 3911 } else {
3901 ifmgd->auth_data->timeout = jiffies - 1; 3912 ifmgd->auth_data->timeout = jiffies - 1;