TDLS: Use QoS info from WMM IE obtained in TDLS frames
TDLS Setup Request/Response frames from the peers include the WMM IE, hence parse the same and consider the QoS Info from the WMM IE. The qos_info obtained in the WMM IE overwrites the one obtained through WLAN_EID_QOS attribute. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
daa70bdf68
commit
dda8be7114
3 changed files with 77 additions and 0 deletions
|
@ -1466,6 +1466,29 @@ static int copy_peer_ext_capab(const struct wpa_eapol_ie_parse *kde,
|
|||
}
|
||||
|
||||
|
||||
static int copy_peer_wmm_capab(const struct wpa_eapol_ie_parse *kde,
|
||||
struct wpa_tdls_peer *peer)
|
||||
{
|
||||
struct wmm_information_element *wmm;
|
||||
|
||||
if (!kde->wmm) {
|
||||
wpa_printf(MSG_DEBUG, "TDLS: No supported WMM capabilities received");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (kde->wmm_len < sizeof(struct wmm_information_element)) {
|
||||
wpa_printf(MSG_DEBUG, "TDLS: Invalid supported WMM capabilities received");
|
||||
return -1;
|
||||
}
|
||||
|
||||
wmm = (struct wmm_information_element *) kde->wmm;
|
||||
peer->qos_info = wmm->qos_info;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "TDLS: Peer WMM QOS Info 0x%x", peer->qos_info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int copy_peer_supp_channels(const struct wpa_eapol_ie_parse *kde,
|
||||
struct wpa_tdls_peer *peer)
|
||||
{
|
||||
|
@ -1638,6 +1661,10 @@ static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr,
|
|||
|
||||
peer->qos_info = kde.qosinfo;
|
||||
|
||||
/* Overwrite with the qos_info obtained in WMM IE */
|
||||
if (copy_peer_wmm_capab(&kde, peer) < 0)
|
||||
goto error;
|
||||
|
||||
peer->aid = kde.aid;
|
||||
|
||||
#ifdef CONFIG_TDLS_TESTING
|
||||
|
@ -2018,6 +2045,10 @@ static int wpa_tdls_process_tpk_m2(struct wpa_sm *sm, const u8 *src_addr,
|
|||
|
||||
peer->qos_info = kde.qosinfo;
|
||||
|
||||
/* Overwrite with the qos_info obtained in WMM IE */
|
||||
if (copy_peer_wmm_capab(&kde, peer) < 0)
|
||||
goto error;
|
||||
|
||||
peer->aid = kde.aid;
|
||||
|
||||
if (!wpa_tdls_get_privacy(sm)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue