diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 72 |
1 files changed, 64 insertions, 8 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 61604834b914..46b62bb3677c 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -131,13 +131,13 @@ void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata) | |||
131 | if (unlikely(!sdata->u.mgd.associated)) | 131 | if (unlikely(!sdata->u.mgd.associated)) |
132 | return; | 132 | return; |
133 | 133 | ||
134 | ifmgd->probe_send_count = 0; | ||
135 | |||
134 | if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) | 136 | if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) |
135 | return; | 137 | return; |
136 | 138 | ||
137 | mod_timer(&sdata->u.mgd.conn_mon_timer, | 139 | mod_timer(&sdata->u.mgd.conn_mon_timer, |
138 | round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME)); | 140 | round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME)); |
139 | |||
140 | ifmgd->probe_send_count = 0; | ||
141 | } | 141 | } |
142 | 142 | ||
143 | static int ecw2cw(int ecw) | 143 | static int ecw2cw(int ecw) |
@@ -2249,6 +2249,62 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, | |||
2249 | /* ignore frame -- wait for timeout */ | 2249 | /* ignore frame -- wait for timeout */ |
2250 | } | 2250 | } |
2251 | 2251 | ||
2252 | #define case_WLAN(type) \ | ||
2253 | case WLAN_REASON_##type: return #type | ||
2254 | |||
2255 | static const char *ieee80211_get_reason_code_string(u16 reason_code) | ||
2256 | { | ||
2257 | switch (reason_code) { | ||
2258 | case_WLAN(UNSPECIFIED); | ||
2259 | case_WLAN(PREV_AUTH_NOT_VALID); | ||
2260 | case_WLAN(DEAUTH_LEAVING); | ||
2261 | case_WLAN(DISASSOC_DUE_TO_INACTIVITY); | ||
2262 | case_WLAN(DISASSOC_AP_BUSY); | ||
2263 | case_WLAN(CLASS2_FRAME_FROM_NONAUTH_STA); | ||
2264 | case_WLAN(CLASS3_FRAME_FROM_NONASSOC_STA); | ||
2265 | case_WLAN(DISASSOC_STA_HAS_LEFT); | ||
2266 | case_WLAN(STA_REQ_ASSOC_WITHOUT_AUTH); | ||
2267 | case_WLAN(DISASSOC_BAD_POWER); | ||
2268 | case_WLAN(DISASSOC_BAD_SUPP_CHAN); | ||
2269 | case_WLAN(INVALID_IE); | ||
2270 | case_WLAN(MIC_FAILURE); | ||
2271 | case_WLAN(4WAY_HANDSHAKE_TIMEOUT); | ||
2272 | case_WLAN(GROUP_KEY_HANDSHAKE_TIMEOUT); | ||
2273 | case_WLAN(IE_DIFFERENT); | ||
2274 | case_WLAN(INVALID_GROUP_CIPHER); | ||
2275 | case_WLAN(INVALID_PAIRWISE_CIPHER); | ||
2276 | case_WLAN(INVALID_AKMP); | ||
2277 | case_WLAN(UNSUPP_RSN_VERSION); | ||
2278 | case_WLAN(INVALID_RSN_IE_CAP); | ||
2279 | case_WLAN(IEEE8021X_FAILED); | ||
2280 | case_WLAN(CIPHER_SUITE_REJECTED); | ||
2281 | case_WLAN(DISASSOC_UNSPECIFIED_QOS); | ||
2282 | case_WLAN(DISASSOC_QAP_NO_BANDWIDTH); | ||
2283 | case_WLAN(DISASSOC_LOW_ACK); | ||
2284 | case_WLAN(DISASSOC_QAP_EXCEED_TXOP); | ||
2285 | case_WLAN(QSTA_LEAVE_QBSS); | ||
2286 | case_WLAN(QSTA_NOT_USE); | ||
2287 | case_WLAN(QSTA_REQUIRE_SETUP); | ||
2288 | case_WLAN(QSTA_TIMEOUT); | ||
2289 | case_WLAN(QSTA_CIPHER_NOT_SUPP); | ||
2290 | case_WLAN(MESH_PEER_CANCELED); | ||
2291 | case_WLAN(MESH_MAX_PEERS); | ||
2292 | case_WLAN(MESH_CONFIG); | ||
2293 | case_WLAN(MESH_CLOSE); | ||
2294 | case_WLAN(MESH_MAX_RETRIES); | ||
2295 | case_WLAN(MESH_CONFIRM_TIMEOUT); | ||
2296 | case_WLAN(MESH_INVALID_GTK); | ||
2297 | case_WLAN(MESH_INCONSISTENT_PARAM); | ||
2298 | case_WLAN(MESH_INVALID_SECURITY); | ||
2299 | case_WLAN(MESH_PATH_ERROR); | ||
2300 | case_WLAN(MESH_PATH_NOFORWARD); | ||
2301 | case_WLAN(MESH_PATH_DEST_UNREACHABLE); | ||
2302 | case_WLAN(MAC_EXISTS_IN_MBSS); | ||
2303 | case_WLAN(MESH_CHAN_REGULATORY); | ||
2304 | case_WLAN(MESH_CHAN); | ||
2305 | default: return "<unknown>"; | ||
2306 | } | ||
2307 | } | ||
2252 | 2308 | ||
2253 | static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, | 2309 | static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, |
2254 | struct ieee80211_mgmt *mgmt, size_t len) | 2310 | struct ieee80211_mgmt *mgmt, size_t len) |
@@ -2270,8 +2326,8 @@ static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, | |||
2270 | 2326 | ||
2271 | reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); | 2327 | reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); |
2272 | 2328 | ||
2273 | sdata_info(sdata, "deauthenticated from %pM (Reason: %u)\n", | 2329 | sdata_info(sdata, "deauthenticated from %pM (Reason: %u=%s)\n", |
2274 | bssid, reason_code); | 2330 | bssid, reason_code, ieee80211_get_reason_code_string(reason_code)); |
2275 | 2331 | ||
2276 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); | 2332 | ieee80211_set_disassoc(sdata, 0, 0, false, NULL); |
2277 | 2333 | ||
@@ -4340,8 +4396,8 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
4340 | bool report_frame = false; | 4396 | bool report_frame = false; |
4341 | 4397 | ||
4342 | sdata_info(sdata, | 4398 | sdata_info(sdata, |
4343 | "deauthenticating from %pM by local choice (reason=%d)\n", | 4399 | "deauthenticating from %pM by local choice (Reason: %u=%s)\n", |
4344 | req->bssid, req->reason_code); | 4400 | req->bssid, req->reason_code, ieee80211_get_reason_code_string(req->reason_code)); |
4345 | 4401 | ||
4346 | if (ifmgd->auth_data) { | 4402 | if (ifmgd->auth_data) { |
4347 | drv_mgd_prepare_tx(sdata->local, sdata); | 4403 | drv_mgd_prepare_tx(sdata->local, sdata); |
@@ -4387,8 +4443,8 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, | |||
4387 | return -ENOLINK; | 4443 | return -ENOLINK; |
4388 | 4444 | ||
4389 | sdata_info(sdata, | 4445 | sdata_info(sdata, |
4390 | "disassociating from %pM by local choice (reason=%d)\n", | 4446 | "disassociating from %pM by local choice (Reason: %u=%s)\n", |
4391 | req->bss->bssid, req->reason_code); | 4447 | req->bss->bssid, req->reason_code, ieee80211_get_reason_code_string(req->reason_code)); |
4392 | 4448 | ||
4393 | memcpy(bssid, req->bss->bssid, ETH_ALEN); | 4449 | memcpy(bssid, req->bss->bssid, ETH_ALEN); |
4394 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DISASSOC, | 4450 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DISASSOC, |