aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-01-19 11:48:46 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:00:53 -0500
commitf797eb7e2903571e9c0e7e5d64113f51209f8dc4 (patch)
tree15522a18521aa5acf4fc2bd68d1cc24d67f00a1e
parentbb2becac91f13e862d4601a8c5364bc758c35b8e (diff)
mac80211: Fix MFP Association Comeback to use Timeout Interval IE
The separate Association Comeback Time IE was removed from IEEE 802.11w and the Timeout Interval IE (from IEEE 802.11r) is used instead. The editing on this is still somewhat incomplete in IEEE 802.11w/D7.0, but still, the use of Timeout Interval IE is the expected mechanism. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--include/linux/ieee80211.h8
-rw-r--r--net/mac80211/ieee80211_i.h4
-rw-r--r--net/mac80211/mlme.c5
-rw-r--r--net/mac80211/util.c6
4 files changed, 15 insertions, 8 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 7800e20f197f..b1bb817d1427 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1036,8 +1036,8 @@ enum ieee80211_eid {
1036 WLAN_EID_HT_INFORMATION = 61, 1036 WLAN_EID_HT_INFORMATION = 61,
1037 /* 802.11i */ 1037 /* 802.11i */
1038 WLAN_EID_RSN = 48, 1038 WLAN_EID_RSN = 48,
1039 WLAN_EID_TIMEOUT_INTERVAL = 56,
1039 WLAN_EID_MMIE = 76 /* 802.11w */, 1040 WLAN_EID_MMIE = 76 /* 802.11w */,
1040 WLAN_EID_ASSOC_COMEBACK_TIME = 77,
1041 WLAN_EID_WPA = 221, 1041 WLAN_EID_WPA = 221,
1042 WLAN_EID_GENERIC = 221, 1042 WLAN_EID_GENERIC = 221,
1043 WLAN_EID_VENDOR_SPECIFIC = 221, 1043 WLAN_EID_VENDOR_SPECIFIC = 221,
@@ -1126,6 +1126,12 @@ struct ieee80211_country_ie_triplet {
1126 }; 1126 };
1127} __attribute__ ((packed)); 1127} __attribute__ ((packed));
1128 1128
1129enum ieee80211_timeout_interval_type {
1130 WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */,
1131 WLAN_TIMEOUT_KEY_LIFETIME = 2 /* 802.11r */,
1132 WLAN_TIMEOUT_ASSOC_COMEBACK = 3 /* 802.11w */,
1133};
1134
1129/* BACK action code */ 1135/* BACK action code */
1130enum ieee80211_back_actioncode { 1136enum ieee80211_back_actioncode {
1131 WLAN_ACTION_ADDBA_REQ = 0, 1137 WLAN_ACTION_ADDBA_REQ = 0,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index faa2476a2451..a8c72742a8b1 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -837,7 +837,7 @@ struct ieee802_11_elems {
837 u8 *country_elem; 837 u8 *country_elem;
838 u8 *pwr_constr_elem; 838 u8 *pwr_constr_elem;
839 u8 *quiet_elem; /* first quite element */ 839 u8 *quiet_elem; /* first quite element */
840 u8 *assoc_comeback; 840 u8 *timeout_int;
841 841
842 /* length of them, respectively */ 842 /* length of them, respectively */
843 u8 ssid_len; 843 u8 ssid_len;
@@ -865,7 +865,7 @@ struct ieee802_11_elems {
865 u8 pwr_constr_elem_len; 865 u8 pwr_constr_elem_len;
866 u8 quiet_elem_len; 866 u8 quiet_elem_len;
867 u8 num_of_quiet_elem; /* can be more the one */ 867 u8 num_of_quiet_elem; /* can be more the one */
868 u8 assoc_comeback_len; 868 u8 timeout_int_len;
869}; 869};
870 870
871static inline struct ieee80211_local *hw_to_local( 871static inline struct ieee80211_local *hw_to_local(
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 43da6227b37c..b9e4b93089c4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1317,9 +1317,10 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1317 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); 1317 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems);
1318 1318
1319 if (status_code == WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY && 1319 if (status_code == WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY &&
1320 elems.assoc_comeback && elems.assoc_comeback_len == 4) { 1320 elems.timeout_int && elems.timeout_int_len == 5 &&
1321 elems.timeout_int[0] == WLAN_TIMEOUT_ASSOC_COMEBACK) {
1321 u32 tu, ms; 1322 u32 tu, ms;
1322 tu = get_unaligned_le32(elems.assoc_comeback); 1323 tu = get_unaligned_le32(elems.timeout_int + 1);
1323 ms = tu * 1024 / 1000; 1324 ms = tu * 1024 / 1000;
1324 printk(KERN_DEBUG "%s: AP rejected association temporarily; " 1325 printk(KERN_DEBUG "%s: AP rejected association temporarily; "
1325 "comeback duration %u TU (%u ms)\n", 1326 "comeback duration %u TU (%u ms)\n",
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 963e0473205c..3f559e3d0a7c 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -653,9 +653,9 @@ void ieee802_11_parse_elems(u8 *start, size_t len,
653 elems->pwr_constr_elem = pos; 653 elems->pwr_constr_elem = pos;
654 elems->pwr_constr_elem_len = elen; 654 elems->pwr_constr_elem_len = elen;
655 break; 655 break;
656 case WLAN_EID_ASSOC_COMEBACK_TIME: 656 case WLAN_EID_TIMEOUT_INTERVAL:
657 elems->assoc_comeback = pos; 657 elems->timeout_int = pos;
658 elems->assoc_comeback_len = elen; 658 elems->timeout_int_len = elen;
659 break; 659 break;
660 default: 660 default:
661 break; 661 break;