summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-27 09:38:07 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-08 03:16:58 -0400
commit79ba1d8910f517c3bd39d794ddb1a5b4c03795c4 (patch)
treefaff88285c710cacce1c04beda8074b57b17801a /net/mac80211/mlme.c
parent1946bed95707ef75d85e94ebe106ce7a119ca831 (diff)
mac80211: parse Timeout Interval Element using a struct
Instead of open-coding the accesses and length check do the length check in the IE parser and assign a struct pointer for use in the remaining code. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 157d951df7a4..304d6cfc6250 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2629,10 +2629,10 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
2629 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); 2629 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems);
2630 2630
2631 if (status_code == WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY && 2631 if (status_code == WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY &&
2632 elems.timeout_int && elems.timeout_int_len == 5 && 2632 elems.timeout_int &&
2633 elems.timeout_int[0] == WLAN_TIMEOUT_ASSOC_COMEBACK) { 2633 elems.timeout_int->type == WLAN_TIMEOUT_ASSOC_COMEBACK) {
2634 u32 tu, ms; 2634 u32 tu, ms;
2635 tu = get_unaligned_le32(elems.timeout_int + 1); 2635 tu = le32_to_cpu(elems.timeout_int->value);
2636 ms = tu * 1024 / 1000; 2636 ms = tu * 1024 / 1000;
2637 sdata_info(sdata, 2637 sdata_info(sdata,
2638 "%pM rejected association temporarily; comeback duration %u TU (%u ms)\n", 2638 "%pM rejected association temporarily; comeback duration %u TU (%u ms)\n",