]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TDLS: Pass peer's capability info to the driver in open mode
authorPradeep Reddy POTTETI <c_ppotte@qti.qualcomm.com>
Mon, 28 Apr 2014 14:56:17 +0000 (20:26 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 29 Apr 2014 14:08:13 +0000 (17:08 +0300)
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 <c_ppotte@qti.qualcomm.com>
src/rsn_supp/tdls.c

index ea293699d3d983a3bbe770d3f4dd6d1896b86f2b..1419d391b0c87182e839d29fbb45f62c9a1b617b 100644 (file)
@@ -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);