From bb24229b263995fca19742bc2bb45a399d023f68 Mon Sep 17 00:00:00 2001 From: Pradeep Reddy POTTETI Date: Mon, 28 Apr 2014 20:26:17 +0530 Subject: [PATCH] TDLS: Pass peer's capability info to the driver in open mode Commit 96ecea5eb14cc1362cb01b914ac4163324294a28 did not consider to pass the VHT/HT/WMM capabilities of the peer for BSS with open mode. Address this issue by passing the capabilities irrespective of the security mode. Signed-off-by: Pradeep Reddy POTTETI --- src/rsn_supp/tdls.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index ea293699d..1419d391b 100644 --- a/src/rsn_supp/tdls.c +++ b/src/rsn_supp/tdls.c @@ -230,9 +230,9 @@ static int wpa_tdls_tpk_send(struct wpa_sm *sm, const u8 *dest, u8 action_code, struct wpa_tdls_peer *peer; wpa_printf(MSG_DEBUG, "TDLS: TPK send dest=" MACSTR " action_code=%u " - "dialog_token=%u status_code=%u msg_len=%u", + "dialog_token=%u status_code=%u peer_capab=%u msg_len=%u", MAC2STR(dest), action_code, dialog_token, status_code, - (unsigned int) msg_len); + peer_capab, (unsigned int) msg_len); if (wpa_tdls_send_tpk_msg(sm, dest, action_code, dialog_token, status_code, peer_capab, msg, msg_len)) { @@ -1310,14 +1310,15 @@ static int wpa_tdls_send_tpk_m3(struct wpa_sm *sm, } #endif /* CONFIG_TDLS_TESTING */ +skip_ies: + if (peer->vht_capabilities) peer_capab |= TDLS_PEER_VHT; - else if (peer->ht_capabilities) + if (peer->ht_capabilities) peer_capab |= TDLS_PEER_HT; - else if (peer->wmm_capable) + if (peer->wmm_capable) peer_capab |= TDLS_PEER_WMM; -skip_ies: status = wpa_tdls_tpk_send(sm, src_addr, WLAN_TDLS_SETUP_CONFIRM, dtoken, 0, peer_capab, rbuf, pos - rbuf); os_free(rbuf);