提交 f797eb7e 编写于 作者: J Jouni Malinen 提交者: John W. Linville

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: NJouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 bb2becac
...@@ -1036,8 +1036,8 @@ enum ieee80211_eid { ...@@ -1036,8 +1036,8 @@ enum ieee80211_eid {
WLAN_EID_HT_INFORMATION = 61, WLAN_EID_HT_INFORMATION = 61,
/* 802.11i */ /* 802.11i */
WLAN_EID_RSN = 48, WLAN_EID_RSN = 48,
WLAN_EID_TIMEOUT_INTERVAL = 56,
WLAN_EID_MMIE = 76 /* 802.11w */, WLAN_EID_MMIE = 76 /* 802.11w */,
WLAN_EID_ASSOC_COMEBACK_TIME = 77,
WLAN_EID_WPA = 221, WLAN_EID_WPA = 221,
WLAN_EID_GENERIC = 221, WLAN_EID_GENERIC = 221,
WLAN_EID_VENDOR_SPECIFIC = 221, WLAN_EID_VENDOR_SPECIFIC = 221,
...@@ -1126,6 +1126,12 @@ struct ieee80211_country_ie_triplet { ...@@ -1126,6 +1126,12 @@ struct ieee80211_country_ie_triplet {
}; };
} __attribute__ ((packed)); } __attribute__ ((packed));
enum ieee80211_timeout_interval_type {
WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */,
WLAN_TIMEOUT_KEY_LIFETIME = 2 /* 802.11r */,
WLAN_TIMEOUT_ASSOC_COMEBACK = 3 /* 802.11w */,
};
/* BACK action code */ /* BACK action code */
enum ieee80211_back_actioncode { enum ieee80211_back_actioncode {
WLAN_ACTION_ADDBA_REQ = 0, WLAN_ACTION_ADDBA_REQ = 0,
......
...@@ -837,7 +837,7 @@ struct ieee802_11_elems { ...@@ -837,7 +837,7 @@ struct ieee802_11_elems {
u8 *country_elem; u8 *country_elem;
u8 *pwr_constr_elem; u8 *pwr_constr_elem;
u8 *quiet_elem; /* first quite element */ u8 *quiet_elem; /* first quite element */
u8 *assoc_comeback; u8 *timeout_int;
/* length of them, respectively */ /* length of them, respectively */
u8 ssid_len; u8 ssid_len;
...@@ -865,7 +865,7 @@ struct ieee802_11_elems { ...@@ -865,7 +865,7 @@ struct ieee802_11_elems {
u8 pwr_constr_elem_len; u8 pwr_constr_elem_len;
u8 quiet_elem_len; u8 quiet_elem_len;
u8 num_of_quiet_elem; /* can be more the one */ u8 num_of_quiet_elem; /* can be more the one */
u8 assoc_comeback_len; u8 timeout_int_len;
}; };
static inline struct ieee80211_local *hw_to_local( static inline struct ieee80211_local *hw_to_local(
......
...@@ -1317,9 +1317,10 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, ...@@ -1317,9 +1317,10 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems);
if (status_code == WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY && if (status_code == WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY &&
elems.assoc_comeback && elems.assoc_comeback_len == 4) { elems.timeout_int && elems.timeout_int_len == 5 &&
elems.timeout_int[0] == WLAN_TIMEOUT_ASSOC_COMEBACK) {
u32 tu, ms; u32 tu, ms;
tu = get_unaligned_le32(elems.assoc_comeback); tu = get_unaligned_le32(elems.timeout_int + 1);
ms = tu * 1024 / 1000; ms = tu * 1024 / 1000;
printk(KERN_DEBUG "%s: AP rejected association temporarily; " printk(KERN_DEBUG "%s: AP rejected association temporarily; "
"comeback duration %u TU (%u ms)\n", "comeback duration %u TU (%u ms)\n",
......
...@@ -653,9 +653,9 @@ void ieee802_11_parse_elems(u8 *start, size_t len, ...@@ -653,9 +653,9 @@ void ieee802_11_parse_elems(u8 *start, size_t len,
elems->pwr_constr_elem = pos; elems->pwr_constr_elem = pos;
elems->pwr_constr_elem_len = elen; elems->pwr_constr_elem_len = elen;
break; break;
case WLAN_EID_ASSOC_COMEBACK_TIME: case WLAN_EID_TIMEOUT_INTERVAL:
elems->assoc_comeback = pos; elems->timeout_int = pos;
elems->assoc_comeback_len = elen; elems->timeout_int_len = elen;
break; break;
default: default:
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册